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

Instance Method Details

#initialize_with_targets(targets)

Init the mechanic

Parameters:



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

Parameters:

Returns:

  • (Boolean)


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