Class: Zyps::StrengthCondition

Inherits:
Condition 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

Methods inherited from Condition

#copy

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