Class: Battle::Actions::Attack

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

Overview

Class describing the Attack Action

Defined Under Namespace

Classes: Encore

Constant Summary collapse

SHIFT_PRIORITY_WITH_OFFSET =

Has to be 7 because of Logic::MOVE_PRIORITY_OFFSET which offset everything

7

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:



45
46
# File 'docs/5_Battle_05_Actions.rb', line 45

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

Instance Attribute Details

#ignore_speed ⇒ Boolean

Tell if this action can ignore speed of the other pokemon

Returns:

  • (Boolean)


38
39
40
# File 'docs/5_Battle_05_Actions.rb', line 38

def ignore_speed
  @ignore_speed
end

#launcher ⇒ PFM::PokemonBattler (readonly)

Get the user of this move

Returns:



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

def launcher
  @launcher
end

#move ⇒ Battle::Move (readonly)

Get the move of this action

Returns:



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

def move
  @move
end

#pursuit_enabled ⇒ Boolean

Tell if pursuit on this action is enabled

Returns:

  • (Boolean)


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

def pursuit_enabled
  @pursuit_enabled
end

Instance Method Details

#<=>(other) ⇒ Integer

Compare this action with another

Parameters:

  • other (Base) —

    other action

Returns:

  • (Integer)


50
51
# File 'docs/5_Battle_05_Actions.rb', line 50

def <=>(other)
end

#dancer_sub_launchers

Function that manages the effect of the dancer ability



64
65
# File 'docs/5_Battle_05_Actions.rb', line 64

def dancer_sub_launchers
end

#execute

Execute the action



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

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)


69
70
# File 'docs/5_Battle_05_Actions.rb', line 69

def mycelium_might_priority(attack)
end

#priority ⇒ Integer

Get the priority of the move

Returns:

  • (Integer)


54
55
# File 'docs/5_Battle_05_Actions.rb', line 54

def priority
end

#target ⇒ PFM::PokemonBattler?

Get the target of the move

Returns:



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

def target
end