Module: Battle::Move::Mechanics::Counter
- Included in:
- CounterBase
- Defined in:
- docs/5_Battle_10_Move.rb
Overview
Preset used for counter attacks Should be included only in a Battle::Move class or a class with the same interface The includer must overwrite the following methods:
-
counter_fails?(attacker, user, targets)
Instance Method Summary collapse
-
#damages(user, target) ⇒ Integer
(also: #counter_damages)
Method calculating the damages done by counter.
-
#move_usable_by_user(user, targets) ⇒ Boolean
(also: #counter_move_usable_by_user)
Function that tests if the user is able to use the move.
Instance Method Details
#damages(user, target) ⇒ Integer Also known as: counter_damages
Method calculating the damages done by counter
924 925 |
# File 'docs/5_Battle_10_Move.rb', line 924 def damages(user, target) end |
#move_usable_by_user(user, targets) ⇒ Boolean Also known as: counter_move_usable_by_user
Note:
Thing that prevents the move from being used should be defined by :move_prevention_user Hook
Function that tests if the user is able to use the move
917 918 |
# File 'docs/5_Battle_10_Move.rb', line 917 def move_usable_by_user(user, targets) end |