scalata.domain.entities.items.Potion
See thePotion companion object
Consumable healing potion.
- amount points healed when used.
- Pickable calling
interact picks up the potion.
- Usable consuming the potion heals the player and removes it from the inventory.
Attributes
-
Companion
-
object
-
Graph
-
-
Supertypes
-
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Members list
Perform the interaction logic.
Perform the interaction logic.
Value parameters
-
gameSession
-
current immutable snapshot
Attributes
-
Returns
-
updated snapshot or an error wrapped in GameResult
-
Definition Classes
-
Create the same item at a given position.
Create the same item at a given position.
Attributes
-
Definition Classes
-
true if the item has been removed from the floor.
true if the item has been removed from the floor.
Attributes
-
Inherited from:
-
Item
Transfer item from floor to inventory.
Transfer item from floor to inventory.
Value parameters
-
gameSession
-
current session snapshot
-
item
-
the item being collected
Attributes
-
Returns
-
a new session with world and player updated
-
Inherited from:
-
Pickable
Attributes
-
Inherited from:
-
Product
Attributes
-
Inherited from:
-
Product
Glyph used by the ASCII renderer.
Glyph used by the ASCII renderer.
Attributes
-
Definition Classes
-
-
Inherited from:
-
Item