コード例 #1
0
        public void Perform()
        {
            MutableBattleCommand command = CreateCommand();
            Byte scriptId = PrepareCommand(command);

            SBattleCalculator.Calc(_v.Caster, _v.Target, command, scriptId);
        }
コード例 #2
0
        private Byte PrepareCommand(MutableBattleCommand command)
        {
            Byte scriptId;

            if (_v.Target.IsPlayer)
            {
                command.AbilityId = BattleAbilityId.RebirthFlame;
                scriptId          = ReviveScript.Id;
            }
            else
            {
                command.AbilityId = BattleAbilityId.Phoenix;
                scriptId          = MagicAttackScript.Id;
            }

            command.LoadAbility();
            return(scriptId);
        }
コード例 #3
0
        public void Perform()
        {
            if (!_v.CheckHasCommandItem())
            {
                return;
            }

            Byte       itemId     = _v.Command.Power;
            BattleItem item       = BattleItem.Find(itemId);
            Byte       itemScript = item.ScriptId;

            MutableBattleCommand itemCommand = new MutableBattleCommand();

            itemCommand.Id        = BattleCommandId.Item;
            itemCommand.AbilityId = BattleAbilityId.Void;
            itemCommand.LoadAbility();
            itemCommand.AbilityId = (BattleAbilityId)itemId;

            SBattleCalculator.Calc(_v.Caster, _v.Target, itemCommand, itemScript);
            BattleItem.RemoveFromInventory(itemId);
        }