Module: Battle::Effects::Mechanics::SuccessiveSuccessfulUses
- Included in:
- FuryCutter, Rollout
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/04000 Effects/00001 Mechanics/00100 SuccessiveSuccessfulUses.rb
Instance Method Summary collapse
-
#increase
Increase the successive uses by one.
-
#successive_uses ⇒ Integer
Return the number of successive succesful use of the move.
Instance Method Details
#increase
Increase the successive uses by one
17 18 19 |
# File 'scripts/01600 Alpha 25 Battle Engine/04000 Effects/00001 Mechanics/00100 SuccessiveSuccessfulUses.rb', line 17 def increase @successive_uses += 1 end |
#successive_uses ⇒ Integer
Return the number of successive succesful use of the move.
7 8 9 10 11 12 13 14 |
# File 'scripts/01600 Alpha 25 Battle Engine/04000 Effects/00001 Mechanics/00100 SuccessiveSuccessfulUses.rb', line 7 def successive_uses return @successive_uses if @pokemon.move_history.last&.last_turn? && @pokemon.last_successfull_move_is?(@move_db_symbol) if @pokemon.move_history.last&.last_turn? && accepted_moves.any? { |move_sym| @pokemon.last_successfull_move_is?(move_sym) } return @successive_uses end return @successive_uses = 0 end |