Arcanorum/rogueworld

Energy fountain

Arcanorum opened this issue · 0 comments

Task description

Similar to #199, another "fountain" item should be added that when used would place down an interactive object on the ground and stay there for a set amount of time.
Any player can then interact with the fountain to get the energy regeneration status effect.

References/notes

Example fountain in the DawnLike tileset:
image

Acceptance criteria

Code

  • A new item config should be added to Items.yml, called "EnergyFountain".
  • When a player uses this item, a new "EnergyFountain" entity should be added to the board tile the player is on. (Similar to the Trap item logic for adding a new entity.
  • When any player presses on the sprite of the fountain on the client, they should be given the EnergyRegen status effect. (A new item class file should be added called "EnergyFountain.js", that has a class that has a method to call when interacted with)
  • After several minutes (depending on testing), the EnergyFountain entity should be removed from the game world. ("lifespan" config property)
  • Multiple fountains of any kind should not be able to be placed on the same board tile at once.
  • A new crafting recipe config should be added to CraftingRecipes.yml, that results in the new "EnergyFountain" item type. Should include several energy potions and iron bars as ingredients.

Visual

  • A GUI icon that looks like a fountain, but flowing with with blue water (like a energy potion). icon-energy-fountain.png
  • A similar entity sprite, for the thing that is placed on the ground when used. energy-fountain.png