Module: Battle::Effects::Mechanics::WithTargets
- Included in:
- WithMarkedTargets, PreventTargetsMove
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/04000 Effects/00001 Mechanics/00100 WithTargets.rb
Overview
Store targets informations
*Requirement*
-
Call initialize_with_targets
Instance Method Summary collapse
-
#initialize_with_targets(targets)
Init the mechanic.
-
#targetted?(battler) ⇒ Boolean
(also: #with_targets_targetted?)
Tell if the given battler is targetted by the effect.
Instance Method Details
#initialize_with_targets(targets)
Init the mechanic
11 12 13 |
# File 'scripts/01600 Alpha 25 Battle Engine/04000 Effects/00001 Mechanics/00100 WithTargets.rb', line 11 def initialize_with_targets(targets) @wt_targets = [targets].flatten end |
#targetted?(battler) ⇒ Boolean Also known as: with_targets_targetted?
Tell if the given battler is targetted by the effect
18 19 20 |
# File 'scripts/01600 Alpha 25 Battle Engine/04000 Effects/00001 Mechanics/00100 WithTargets.rb', line 18 def targetted?(battler) return @wt_targets.include?(battler) end |