Class: Zyps::StrengthCondition

Inherits:
Condition
  • Object
show all
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

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