Class: Zyps::StrengthCondition
- Defined in:
- lib/zyps/conditions.rb
Overview
True if the actor’s strength is equal to or greater than the target’s.
Instance Method Summary collapse
-
#select(actor, targets) ⇒ Object
Returns an array of targets that are weaker than the actor.
Methods inherited from Condition
Instance Method Details
#select(actor, targets) ⇒ Object
Returns an array of targets that are weaker than the actor. For now, strength is based merely on size.
79 80 81 |
# File 'lib/zyps/conditions.rb', line 79 def select(actor, targets) targets.find_all {|target| actor.size >= target.size} end |