예제 #1
0
파일: Mob.cs 프로젝트: iFeddy/SolarFiesta
        public override void AttackSkill(ushort skillid, MapObject victim)
        {
            base.AttackSkill(skillid, victim); // lol

            if (AttackingSequence != null) return;
            AttackingSequence = new AttackSequence(this, victim, 0, InfoServer.Str, skillid, true);
            Target = victim;
        }
예제 #2
0
파일: Mob.cs 프로젝트: iFeddy/SolarFiesta
        public override void AttackSkillAoE(ushort skillid, uint X, uint Y)
        {
            base.AttackSkillAoE(skillid, X, Y); // lol

            if (AttackingSequence != null) return;
            AttackingSequence = new AttackSequence(this, 0, InfoServer.Str, skillid, X, Y);
        }
예제 #3
0
파일: Mob.cs 프로젝트: iFeddy/SolarFiesta
        public override void Attack(MapObject victim)
        {
            base.Attack(victim); // lol

            if (AttackingSequence != null) return;
            AttackingSequence = new AttackSequence(this, victim, 0, InfoServer.Str, 1400);
            Target = victim;
        }
예제 #4
0
 public void AttackStop()
 {
     if (IsAttacking)
     {
         AttackingSequence = null;
     }
 }
예제 #5
0
        public override void AttackSkillAoE(ushort skillid, uint x, uint y)
        {
            if (IsAttacking) return;

            ushort attackspeed = 1200;
            Equip weapon;
            EquippedItems.TryGetValue(ItemSlot.Weapon, out weapon);
            uint dmgmin = (uint)GetExtraStr();
            uint dmgmax = (uint)(GetExtraStr() + (GetExtraStr() % 3));
            if (weapon != null)
            {
                attackspeed = weapon.Info.AttackSpeed;
                dmgmin += weapon.Info.MinMelee;
                dmgmax += weapon.Info.MaxMelee;
            }

            AttackingSequence = new AttackSequence(this, dmgmin, dmgmax, skillid, x, y);
        }
예제 #6
0
        public override void AttackSkill(ushort skillid, MapObject victim)
        {
            if (victim == null)
            {
                victim = SelectedObject;
            }

            if (IsAttacking || victim == null || !victim.IsAttackable) return;

            ushort attackspeed = 1200;
            Equip weapon;
            EquippedItems.TryGetValue(ItemSlot.Weapon, out weapon);
            uint dmgmin = (uint)GetWeaponDamage(true);
            uint dmgmax = (uint)(GetWeaponDamage(true) + (GetWeaponDamage(true) % 3));
            if (weapon != null)
            {
                attackspeed = weapon.Info.AttackSpeed;
                dmgmin += weapon.Info.MinMelee;
                dmgmax += weapon.Info.MaxMelee;
            }

            AttackingSequence = new AttackSequence(this, victim, dmgmin, dmgmax, skillid, true);
        }
예제 #7
0
        public override void Update(DateTime date)
        {
            if (AttackingSequence != null)
            {
                AttackingSequence.Update(date);
                if (AttackingSequence.State == AttackSequence.AnimationState.Ended)
                {
                    AttackingSequence = null;
                }
            }

            if (SelectedObject != null)
            {
                if (SelectedObject is Mob)
                {
                    if ((SelectedObject as Mob).IsDead) SelectedObject = null; // Stop the reference ffs
                }
            }

            if (State == PlayerState.Resting)
            {
                if (date >= NextHPRest)
                {
                    HealHP((uint)(MaxHP / 1000 * House.Info.HPRecovery));
                    //TODO: also show this to people who have me selected.
                    NextHPRest = date.AddMilliseconds(House.Info.HPTick);
                }
                if (date >= NextSPRest)
                {
                    HealSP((uint)(MaxSP / 1000 * House.Info.SPRecovery));
                    //TODO: also show this to people who have me selected.
                    NextSPRest = date.AddMilliseconds(House.Info.SPTick);
                }
            }
        }