Beispiel #1
0
        /// <summary>
        /// 针对系统的法术效果
        /// </summary>
        /// <param name="game"></param>
        /// <param name="ConvertPosDirect"></param>
        /// <param name="Ability"></param>
        /// <returns></returns>
        public static List <string> RunGameSystemEffect(ActionStatus game, AtomicEffectDefine effect, CardUtility.位置选择用参数结构体 Option)
        {
            List <string> Result = new List <string>();

            switch (effect.AtomicEffectType)
            {
            case AtomicEffectDefine.AtomicEffectEnum.卡牌:
                CardEffect CardAtomic = new CardEffect();
                CardAtomic.GetField(effect.InfoArray);
                return(CardAtomic.RunEffect(game, Option.EffectTargetSelectDirect));

            case AtomicEffectDefine.AtomicEffectEnum.水晶:
                CrystalEffect CrystalAtomic = new CrystalEffect();
                CrystalAtomic.GetField(effect.InfoArray);
                return(CrystalAtomic.RunEffect(game, Option.EffectTargetSelectDirect));

            case AtomicEffectDefine.AtomicEffectEnum.武器:
                WeaponPointEffect WeaponPointAtomic = new WeaponPointEffect();
                WeaponPointAtomic.GetField(effect.InfoArray);
                return(WeaponPointAtomic.RunEffect(game, Option.EffectTargetSelectDirect));

            case AtomicEffectDefine.AtomicEffectEnum.召唤:
                SummonEffect SummonAtomic = new SummonEffect();
                SummonAtomic.GetField(effect.InfoArray);
                return(SummonAtomic.RunEffect(game, Option.EffectTargetSelectDirect));
            }
            return(Result);
        }
Beispiel #2
0
        /// <summary>
        /// 处理对方的动作
        /// </summary>
        /// <param name="ActionCommand"></param>
        /// <param name="game"></param>
        public static void Process(string ActionCommand, ActionStatus game)
        {
            string[] actField = ActionCommand.Split(CardUtility.strSplitMark.ToCharArray());
            switch (ActionCode.GetActionType(ActionCommand))
            {
            case ActionCode.ActionType.Card:
                CardEffect.ReRunEffect(1, game, actField);
                break;

            case ActionCode.ActionType.UseMinion:
                int Pos    = int.Parse(actField[2]);
                var minion = (MinionCard)CardUtility.GetCardInfoBySN(actField[1]);
                minion.初始化();
                game.AllRole.YourPublicInfo.BattleField.PutToBattle(Pos, minion);
                Buff.ResetBuff(game);
                break;

            case ActionCode.ActionType.UseWeapon:
                game.AllRole.YourPublicInfo.Hero.Weapon = (WeaponCard)CardUtility.GetCardInfoBySN(actField[1]);
                break;

            case ActionCode.ActionType.UseSecret:
                game.AllRole.YourPublicInfo.Hero.SecretCount++;;
                break;

            case ActionCode.ActionType.UseAbility:
                break;

            case ActionCode.ActionType.Fight:
                //FIGHT#1#2
                FightHandler.Fight(int.Parse(actField[2]), int.Parse(actField[1]), game, false);
                break;

            case ActionCode.ActionType.Point:
                IAtomicEffect point = new PointEffect();
                point.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.Health:
                IAtomicEffect health = new HealthEffect();
                health.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.Status:
                IAtomicEffect status = new StatusEffect();
                status.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.Transform:
                IAtomicEffect transform = new TransformEffect();
                transform.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.Attack:
                IAtomicEffect attack = new AttackEffect();
                attack.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.HitSecret:
                SecretCard.ReRunSecret(game, actField);
                break;

            case ActionCode.ActionType.Control:
                ControlEffect.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.Summon:
                SummonEffect.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.Crystal:
                CrystalEffect.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.WeaponPoint:
                WeaponPointEffect.ReRunEffect(game, actField);
                break;

            case ActionCode.ActionType.Settle:
                ActionStatus.Settle(game);
                break;
            }
        }