Example #1
0
        public void Perform()
        {
            MutableBattleCommand command = CreateCommand();
            Byte scriptId = PrepareCommand(command);

            SBattleCalculator.Calc(_v.Caster, _v.Target, command, scriptId);
        }
        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);
        }