Пример #1
0
        //public void UseMoveOnSelf(int moveNum) {
        //    BattleProcessor.MoveHitCharacter(this, this, moveNum);
        //    Messenger.SpellAnim(moveNum, this.MapID, this.X, this.Y);
        //}
        public void UseMove(int moveSlot)
        {
            BattleSetup setup = new BattleSetup();

            setup.Attacker = this;
            setup.moveSlot = moveSlot;

            BattleProcessor.HandleAttack(setup);

            BattleProcessor.FinalizeAction(setup);
        }
Пример #2
0
        public void UseMove(int moveSlot)
        {
            if (owner.Player.Dead)
            {
                return;
            }


            owner.Player.Map.ProcessingPaused = false;


            if (owner.Player.ProtectionOff)
            {
                owner.Player.Hunted = true;
                Messenger.SendHunted(owner);
            }

            if (!Core.GetTickCount().Elapsed(owner.Player.PauseTimer, 0))
            {
                return;
            }

            if (moveSlot > -1 && moveSlot < 4)
            {
                Move move       = MoveManager.Moves[Moves[moveSlot].MoveNum];
                IMap currentMap = owner.Player.GetCurrentMap();
                if (move.KeyItem > 0)
                {
                    bool doorOpened = UseMoveKey(currentMap, move, moveSlot);
                    if (doorOpened)
                    {
                        return;
                    }
                }
            }
            BattleSetup setup = new BattleSetup();

            setup.Attacker = this;
            setup.moveSlot = moveSlot;

            BattleProcessor.HandleAttack(setup);


            BattleProcessor.FinalizeAction(setup);
        }