/// <summary> /// 对手回合结束的清场 /// </summary> public static List <String> TurnEnd(ActionStatus gameStatus) { List <String> ActionLst = new List <string>(); //对手回合加成属性的去除 int ExistMinionCount = gameStatus.AllRole.MyPublicInfo.BattleField.MinionCount; for (int i = 0; i < ExistMinionCount; i++) { if (gameStatus.AllRole.MyPublicInfo.BattleField.BattleMinions[i] != null) { gameStatus.AllRole.MyPublicInfo.BattleField.BattleMinions[i].本回合生命力加成 = 0; gameStatus.AllRole.MyPublicInfo.BattleField.BattleMinions[i].本回合攻击力加成 = 0; if (gameStatus.AllRole.MyPublicInfo.BattleField.BattleMinions[i].特殊效果 == MinionCard.特殊效果枚举.回合结束死亡) { gameStatus.AllRole.MyPublicInfo.BattleField.BattleMinions[i] = null; } } } gameStatus.AllRole.MyPublicInfo.BattleField.ClearDead(gameStatus.battleEvenetHandler, false); ActionLst.AddRange(ActionStatus.Settle(gameStatus)); ActionLst.AddRange(gameStatus.battleEvenetHandler.事件处理(gameStatus)); return(ActionLst); }
/// <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; } }