Class: Battle::Actions::Item
Overview
Class describing the usage of an Item
Instance Attribute Summary collapse
-
#item_wrapper ⇒ PFM::ItemDescriptor::Wrapper
readonly
Get the item wrapper executing the action.
-
#user ⇒ PFM::PokemonBattler
readonly
Get the Pokemon responsive of the item usage.
Instance Method Summary collapse
-
#<=>(other) ⇒ Integer
Compare this action with another.
-
#execute
Execute the action.
-
#initialize(scene, item_wrapper, bag, user) ⇒ Item
constructor
Create a new item action.
Methods inherited from Base
Constructor Details
#initialize(scene, item_wrapper, bag, user) ⇒ Item
Create a new item action
128 129 |
# File 'docs/5_Battle_05_Actions.rb', line 128 def initialize(scene, item_wrapper, bag, user) end |
Instance Attribute Details
#item_wrapper ⇒ PFM::ItemDescriptor::Wrapper (readonly)
Get the item wrapper executing the action
122 123 124 |
# File 'docs/5_Battle_05_Actions.rb', line 122 def item_wrapper @item_wrapper end |
#user ⇒ PFM::PokemonBattler (readonly)
Get the Pokemon responsive of the item usage
119 120 121 |
# File 'docs/5_Battle_05_Actions.rb', line 119 def user @user end |
Instance Method Details
#<=>(other) ⇒ Integer
Compare this action with another
133 134 |
# File 'docs/5_Battle_05_Actions.rb', line 133 def <=>(other) end |
#execute
Execute the action
136 137 |
# File 'docs/5_Battle_05_Actions.rb', line 136 def execute end |