Class: Battle::Actions::Attack::Encore

Inherits:
Battle::Actions::Attack show all
Defined in:
scripts/01600 Alpha 25 Battle Engine/03000 Actions/00002 Attack.rb

Overview

Action describing the action forced by Encore

Instance Attribute Summary

Attributes inherited from Battle::Actions::Attack

#ignore_speed, #launcher, #move, #pursuit_enabled, #sub_launchers

Instance Method Summary collapse

Methods inherited from Battle::Actions::Attack

#<=>, #initialize, #priority, #target

Methods inherited from Base

#<=>, #initialize, #valid?

Constructor Details

This class inherits a constructor from Battle::Actions::Attack

Instance Method Details

#execute

Execute the action



95
96
97
98
99
100
101
102
# File 'scripts/01600 Alpha 25 Battle Engine/03000 Actions/00002 Attack.rb', line 95

def execute
  @move.forced_next_move_decrease_pp = true
  super
  @move.forced_next_move_decrease_pp = false
  if @move.pp <= 0 && (effect = @launcher.effects.get(:encore))
    effect.kill
  end
end