Class: Battle::Actions::Item

Inherits:
Base show all
Defined in:
docs/01600_Alpha_25_Battle_Engine_03000_Actions.rb

Overview

Class describing the usage of an Item

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#valid?

Constructor Details

#initialize(scene, item_wrapper, bag, user) ⇒ Item

Create a new item action

Parameters:



128
129
# File 'docs/01600_Alpha_25_Battle_Engine_03000_Actions.rb', line 128

def initialize(scene, item_wrapper, bag, user)
end

Instance Attribute Details

#item_wrapperPFM::ItemDescriptor::Wrapper (readonly)

Get the item wrapper executing the action



122
123
124
# File 'docs/01600_Alpha_25_Battle_Engine_03000_Actions.rb', line 122

def item_wrapper
  @item_wrapper
end

#userPFM::PokemonBattler (readonly)

Get the Pokemon responsive of the item usage

Returns:



119
120
121
# File 'docs/01600_Alpha_25_Battle_Engine_03000_Actions.rb', line 119

def user
  @user
end

Instance Method Details

#<=>(other) ⇒ Integer

Compare this action with another

Parameters:

  • other (Base)

    other action

Returns:

  • (Integer)


133
134
# File 'docs/01600_Alpha_25_Battle_Engine_03000_Actions.rb', line 133

def <=>(other)
end

#execute

Execute the action



136
137
# File 'docs/01600_Alpha_25_Battle_Engine_03000_Actions.rb', line 136

def execute
end