protected override void TickCore(Entity host, RealmTime time, ref object state)
        {
            int cool = (int)state;
            if (cool <= 0)
            {
                var entity = host.GetPlayerOwner();

                if (!entity.HasConditionEffect(ConditionEffectIndex.Sick))
                {
                    try
                    {
                        var distance = Vector2.Distance(new Vector2(host.X, host.Y),
                            new Vector2(entity.X, entity.Y));

                        if (distance < 10)
                        {
                            var hp = entity.HP;
                            var maxHp = entity.Stats[0] + entity.Boost[0];
                            hp = Math.Min(hp + 25, maxHp);

                            if (hp != entity.HP)
                            {
                                var n = hp - entity.HP;
                                entity.HP = hp;
                                entity.UpdateCount++;
                                entity.Owner.BroadcastPacket(new ShowEffectPacket
                                {
                                    EffectType = EffectType.Potion,
                                    TargetId = entity.Id,
                                    Color = new ARGB(0xFFFFFF)
                                }, null);
                                entity.Owner.BroadcastPacket(new ShowEffectPacket
                                {
                                    EffectType = EffectType.Trail,
                                    TargetId = host.Id,
                                    PosA = new Position { X = entity.X, Y = entity.Y },
                                    Color = new ARGB(0xFFFFFF)
                                }, null);
                                entity.Owner.BroadcastPacket(new NotificationPacket
                                {
                                    ObjectId = entity.Id,
                                    Text = "+" + n,
                                    Color = new ARGB(0xff00ff00)
                                }, null);
                            }
                        }
                    }
                    catch
                    {
                    }
                }
                cool = 500;
            }
            else
                cool -= time.thisTickTimes;

            state = cool;
        }
        protected override void TickCore(Entity host, RealmTime time, ref object state)
        {
            int cool = (int)state;
            if (cool <= 0)
            {
                var entities = host.GetNearestEntities(6);

                Enemy en = null;
                foreach (Entity e in entities)
                    if (e is Enemy)
                    {
                        en = e as Enemy;
                        break;
                    }

                if (en != null & en.ObjectDesc.Enemy)
                {
                    en.Owner.BroadcastPacket(new ShowEffectPacket
                    {
                        EffectType = EffectType.AreaBlast,
                        Color = new ARGB(0x3E3A78),
                        TargetId = en.Id,
                        PosA = new Position { X = 1, }
                    }, null);
                    en.Owner.BroadcastPacket(new ShowEffectPacket
                    {
                        EffectType = EffectType.Trail,
                        TargetId = host.Id,
                        PosA = new Position { X = en.X, Y = en.Y },
                        Color = new ARGB(0x3E3A78)
                    }, null);
                    en.Damage(host.GetPlayerOwner(), time, 35, false, new ConditionEffect[] { });
                }
                cool = 300;
            }
            else
                cool -= time.thisTickTimes;

            state = cool;
        }
        protected override void TickCore(Entity host, RealmTime time, ref object state)
        {
            FollowState s;
            if (state == null) s = new FollowState();
            else s = (FollowState)state;

            Status = CycleStatus.NotStarted;

            Player player = host.GetPlayerOwner();
            if (player.Owner == null)
            {
                host.Owner.LeaveWorld(host);
                return;
            }

            Vector2 vect;
            switch (s.State)
            {
                case F.DontKnowWhere:
                    if (s.RemainingTime > 0)
                        s.RemainingTime -= time.thisTickTimes;
                    else
                        s.State = F.Acquired;
                    break;

                case F.Acquired:
                    if (player == null)
                    {
                        s.State = F.DontKnowWhere;
                        s.RemainingTime = 0;
                        break;
                    }
                    if (s.RemainingTime > 0)
                        s.RemainingTime -= time.thisTickTimes;

                    vect = new Vector2(player.X - host.X, player.Y - host.Y);
                    if (vect.Length > 20)
                    {
                        host.Move(player.X, player.Y);
                        host.UpdateCount++;
                    }
                    else if (vect.Length > 1)
                    {
                        float dist = host.GetSpeed(1.2f) * (time.thisTickTimes / 1000f);
                        if (vect.Length > 2)
                            dist = host.GetSpeed(1.2f + ((float)player.Stats[4] / 100)) * (time.thisTickTimes / 1000f);
                        else if (vect.Length > 3.5)
                            dist = host.GetSpeed(1.2f + ((float)player.Stats[4] + (float)player.Boost[4] / 100)) * (time.thisTickTimes / 1000f);
                        else if (vect.Length > 5)
                            dist = host.GetSpeed(1.3f + ((float)player.Stats[4] + (float)player.Boost[4] / 100)) * (time.thisTickTimes / 1000f);
                        else if (vect.Length > 6)
                            dist = host.GetSpeed(1.4f + ((float)player.Stats[4] + (float)player.Boost[4] / 100)) * (time.thisTickTimes / 1000f);
                        else if (vect.Length > 7)
                            dist = host.GetSpeed(1.5f + ((float)player.Stats[4] + (float)player.Boost[4] / 100)) * (time.thisTickTimes / 1000f);

                        Status = CycleStatus.InProgress;
                        vect.X -= Random.Next(-2, 2) / 2f;
                        vect.Y -= Random.Next(-2, 2) / 2f;
                        vect.Normalize();
                        host.ValidateAndMove(host.X + vect.X * dist, host.Y + vect.Y * dist);
                        host.UpdateCount++;
                    }

                    break;
            }

            state = s;
        }