Class: Zyps::StrengthCondition
- Inherits:
-
Condition
- Object
- Condition
- 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.
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.
88 89 90 |
# File 'lib/zyps/conditions.rb', line 88 def select(actor, targets) targets.find_all {|target| actor.size >= target.size} end |