Пример #1
0
 public void GetHit(YiObject attacker, int damage)
 {
     if (!Alive)
     {
         return;
     }
     CurrentHp -= damage;
     if (CurrentHp <= 0)
     {
         KilledFrom(attacker);
     }
 }
Пример #2
0
        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++;
            }
        }
Пример #3
0
 public bool IsBlack(YiObject mapObject)
 {
     return(mapObject.Level - Level < -4);
 }
Пример #4
0
 public bool IsRed(YiObject mapObject)
 {
     return(mapObject.Level - Level >= -4 && mapObject.Level - Level < 0);
 }
Пример #5
0
 public bool IsWhite(YiObject mapObject)
 {
     return(mapObject.Level - Level >= 0 && mapObject.Level - Level < 3);
 }
Пример #6
0
 public bool IsGreen(YiObject mapObject)
 {
     return(mapObject.Level - Level >= 3);
 }