Class: Battle::Actions::Shift

Inherits:
Base show all
Defined in:
docs/5_Battle_05_Actions.rb

Overview

Class describing the usage of switching out a Pokemon

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#valid?

Constructor Details

#initialize(scene, launcher) ⇒ Shift

Create a new shift action

Parameters:



246
247
# File 'docs/5_Battle_05_Actions.rb', line 246

def initialize(scene, launcher)
end

Instance Attribute Details

#launcher ⇒ PFM::PokemonBattler (readonly)

Get the Pokemon who initiated the shifting

Returns:



242
243
244
# File 'docs/5_Battle_05_Actions.rb', line 242

def launcher
  @launcher
end

Instance Method Details

#<=>(other) ⇒ Integer

Compare this action with another

Parameters:

  • other (Base) —

    other action

Returns:

  • (Integer)


251
252
# File 'docs/5_Battle_05_Actions.rb', line 251

def <=>(other)
end

#execute

Execute the action



258
259
# File 'docs/5_Battle_05_Actions.rb', line 258

def execute
end

#priority ⇒ Integer

Get the priority of the move

Returns:

  • (Integer)


255
256
# File 'docs/5_Battle_05_Actions.rb', line 255

def priority
end