public void GetHit(YiObject attacker, int damage) { if (!Alive) { return; } CurrentHp -= damage; if (CurrentHp <= 0) { KilledFrom(attacker); } }
public virtual void KilledFrom(YiObject attacker) { if (HasFlag(StatusEffect.SuperMan) || HasFlag(StatusEffect.Cyclone)) { (attacker as Player)?.Send(MsgInteract.Create(attacker, this, MsgInteractType.Death, 0xFFFF * attacker.XpKills)); } else { ScreenSystem.Send(this, MsgInteract.Die(attacker, this), true); } var human = attacker; if (human != null) { human.PkPoints++; } }
public bool IsBlack(YiObject mapObject) { return(mapObject.Level - Level < -4); }
public bool IsRed(YiObject mapObject) { return(mapObject.Level - Level >= -4 && mapObject.Level - Level < 0); }
public bool IsWhite(YiObject mapObject) { return(mapObject.Level - Level >= 0 && mapObject.Level - Level < 3); }
public bool IsGreen(YiObject mapObject) { return(mapObject.Level - Level >= 3); }