示例#1
0
        private void MateLife()
        {
            Owner?.Session?.SendPacket(GeneratePst());
            if (!IsAlive)
            {
                if (LastDeath.AddMinutes(3) < DateTime.Now)
                {
                    GenerateRevive();
                }
                return;
            }

            if (LastHealth.AddSeconds(IsSitting ? 1.5 : 2) <= DateTime.Now)
            {
                LastHealth = DateTime.Now;
                if (LastDefence.AddSeconds(4) <= DateTime.Now && LastSkillUse.AddSeconds(2) <= DateTime.Now && Hp > 0)
                {
                    Hp += Hp + HealthHpLoad() < HpLoad() ? HealthHpLoad() : HpLoad() - Hp;
                    Mp += Mp + HealthMpLoad() < MpLoad() ? HealthMpLoad() : MpLoad() - Mp;
                }
            }
        }
示例#2
0
 /// <summary>
 /// You most likely don't need to override this. Is is only for some very special cases
 /// 
 /// I made this virtual so that it can be overwritten. There are some specific challenge bots we shouldn't/don't need to call this on.
 /// </summary>
 /// <param name="game"></param>
 public virtual void PostDoTurn(Game game)
 {
     LastHealth.UpdateLastHealths();
     LastPosition.UpdateLastPositions();
     TrackPortalCreations.UpdateEnemyPortalCreations();
 }