public override void helpTo(Warriors we) { if (CDTime.isCoolDown()) { return; } Warrior target = this; int min = this.attackDistance; for (int i = we.size() - 1; i >= 0; --i) { if (we.At(i) is Rescue) { continue; } if (we.At(i).fullHP()) { continue; } if (this.distance(we.At(i)) <= min) { min = this.distance(we.At(i)); target = we.At(i); } } target.addHP(this.power); CDTime.record(); }
public override void attackTo(Warriors they) { if (CDTime.isCoolDown() || they.size() == 0) { return; } if (this.distance(they.frontLine()) <= this.attackDistance) { img.Image = myRealStatus[(int)Status.attack]; attackGroup(they.frontGroup()); CDTime.record(); } }