Class: Battle::Actions::Attack

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

Overview

Class describing the Attack Action

Direct Known Subclasses

Encore

Defined Under Namespace

Classes: Encore

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#valid?

Constructor Details

#initialize(scene, move, launcher, target_bank, target_position) ⇒ Attack

Create a new attack action

Parameters:



43
44
# File 'docs/5_Battle_05_Actions.rb', line 43

def initialize(scene, move, launcher, target_bank, target_position)
end

Instance Attribute Details

#ignore_speedBoolean

Tell if this action can ignore speed of the other pokemon

Returns:

  • (Boolean)


36
37
38
# File 'docs/5_Battle_05_Actions.rb', line 36

def ignore_speed
  @ignore_speed
end

#launcherPFM::PokemonBattler (readonly)

Get the user of this move

Returns:



30
31
32
# File 'docs/5_Battle_05_Actions.rb', line 30

def launcher
  @launcher
end

#moveBattle::Move (readonly)

Get the move of this action

Returns:



27
28
29
# File 'docs/5_Battle_05_Actions.rb', line 27

def move
  @move
end

#pursuit_enabledBoolean

Tell if pursuit on this action is enabled

Returns:

  • (Boolean)


33
34
35
# File 'docs/5_Battle_05_Actions.rb', line 33

def pursuit_enabled
  @pursuit_enabled
end

Instance Method Details

#<=>(other) ⇒ Integer

Compare this action with another

Parameters:

  • other (Base)

    other action

Returns:

  • (Integer)


48
49
# File 'docs/5_Battle_05_Actions.rb', line 48

def <=>(other)
end

#dancer_sub_launchers

Function that manages the effect of the dancer ability



62
63
# File 'docs/5_Battle_05_Actions.rb', line 62

def dancer_sub_launchers
end

#execute

Execute the action



59
60
# File 'docs/5_Battle_05_Actions.rb', line 59

def execute
end

#mycelium_might_priority(attack) ⇒ Integer

Define which Pokémon should go first if either of them or both have the ability Mycelium Might.

Parameters:

Returns:

  • (Integer)


67
68
# File 'docs/5_Battle_05_Actions.rb', line 67

def mycelium_might_priority(attack)
end

#priorityInteger

Get the priority of the move

Returns:

  • (Integer)


52
53
# File 'docs/5_Battle_05_Actions.rb', line 52

def priority
end

#targetPFM::PokemonBattler?

Get the target of the move

Returns:



56
57
# File 'docs/5_Battle_05_Actions.rb', line 56

def target
end