public override int update(int code) { foreach (Rune r in Living.gameParent.GetRuneList()) { if (Vector2.Distance(new Vector2(r.getPos().X+64, r.getPos().Y+64), position) < r.getCollideRadius()) { r.activated(this); } } if (health > 0) { renderCode = 1; if (target != null) moveTowards(); else target = AcquireTarget(); } else { renderCode = 3; return 1; } base.TakeEnvironmentalDamage(); return 0; }
public override void damage(int amount, Living.DamageType damageType) { for (int i = 0; i < linkedSouls.Count; i++) { linkedSouls[i].damage((int)(0.2 * amount * getRuneAdjustment()) / linkedSouls[i].getSoulPower(), damageType); amount -= (int)(0.2 * amount); } base.damage(amount, damageType); }
public void linkSoul(Living liveEnt) { linkedSouls.Add(liveEnt); }