create Javascript pseudocode for minion Mana Wyrm from Hearthstone with ability…
Jump to turn (11)
- 1create Javascript pseudocode for minion Mana Wyrm from Hearthstone with ability
- 2write this class
- 3create Javascript class for minion Mana Wyrm from Hearthstone with ability “When
- 4its ability must add only +1 attack
- 5Create Sorcerer's Apprentice code
- 6what is reduceNextSpellCostBy()?
- 7Sorcerer’s Apprentice reduce spell cost by 1 while she is in board
- 8do it without reduceNextSpellCostBy().
- 9Sorcerer's Apprentice class reduces the cost of ALL spell by 1 while the minion
- 10She must add the cost of the spell by 1 when she removes from the board if she r
- 11If Sorcerer's Apprentice is on the board, when played drawn a spell, its cost mu
- User
create Javascript pseudocode for minion Mana Wyrm from Hearthstone with ability "Whenever you cast a spell, gain +1 Attack"
- Assistant
- create a variable called "manaWyrm" with the value of an object
- add properties to the "manaWyrm" object:
- "attack" with a value of 1
- "ability" with a value of a function that takes no arguments
- within the "ability" function, create a variable called "spellCounter" with a value of 0
- add an event listener for when a spell is cast:
- increment "spellCounter" by 1
- increase "manaWyrm.attack" by the amount of "spellCounter"
- return the "manaWyrm" object with its updated properties and ability function
- User
write this class