public static bool Summon1Or2Copy(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName(gameEvent.hostCard.name, gameEvent.hostCard.isGold).NewCard(); targetCard.TransformToNewCardWithEffects(gameEvent.hostCard); if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = targetCard, player = gameEvent.player, }); } if (gameEvent.hostCard.isGold) { targetCard = CardBuilder.SearchCardByName(gameEvent.hostCard.name, gameEvent.hostCard.isGold).NewCard(); targetCard.TransformToNewCardWithEffects(gameEvent.hostCard); if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = targetCard, player = gameEvent.player, }); } } return(true); }
public BoardInitArgs GetTestBoardInitArgs() { EnemyManager.CreateEnemy(); CardPile cardPile = new CardPile(); cardPile.InitCardPileFully(); int tmp = random.Next(4) + 1; Enemy enemy = EnemyManager.enemies[tmp - 1]; enemy.Init(cardPile); Player player = this.player; if (player == null) { player = new Player(CardBuilder.SearchCardByName("雷诺·杰克逊").NewCard()); } BoardInitArgs boardInitArgs = new BoardInitArgs { player = player, enemy = enemy, cardPile = cardPile, level = tmp }; //Debug.Log(boardInitArgs.player + "this"); return(boardInitArgs); }
public static bool Summon1Or2JadeGloem(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("青玉魔像"); if (targetCard != null) { gameEvent.player.JadeGloem++; Card golem1 = targetCard.NewCard(); golem1.effectsStay.Add(new BodyPlusEffect(gameEvent.player.JadeGloem, gameEvent.player.JadeGloem)); gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = golem1, player = gameEvent.player, }); if (gameEvent.hostCard.isGold) { gameEvent.player.JadeGloem++; Card golem2 = targetCard.NewCard(); golem2.effectsStay.Add(new BodyPlusEffect(gameEvent.player.JadeGloem, gameEvent.player.JadeGloem)); gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = golem2, player = gameEvent.player, }); } } return(true); }
public static void LoadLockCard() { string unlockCards = PlayerPrefs.GetString("unlockCards", "{}"); Pack pack = new Pack(); try { pack = JsonUtility.FromJson <Pack>(unlockCards); } catch (Exception) { PlayerPrefs.SetString("unlockCards", "{}"); pack = new Pack(); } List <string> names = pack.cards; names.Select(name => CardBuilder.SearchCardByName(name)) .Map(card => { if (card != null) { card.Lock = false; } }); Debug.Log("load card " + names.Count); Card defaultHero = CardBuilder.SearchCardByName(herosUnlockChain[0]); if (defaultHero != null) { defaultHero.Lock = false; } }
public static bool TransformToACopyOfMinion(GameEvent gameEvent) { Card tmp = CardBuilder.SearchCardByName("暗影映像", gameEvent.hostCard.isGold); gameEvent.hostCard.TransformToNewCardWithEffects(gameEvent.targetCard.NewCard()); gameEvent.hostCard.effectsStay.Add(new ProxyEffect(ProxyEnum.AfterMinionPlayedInHand, tmp.GetProxys(ProxyEnum.AfterMinionPlayedInHand))); gameEvent.hostCard.effectsStay.Add(new KeyWordEffect(Keyword.Changing)); return(true); }
public static bool Create11BeastOr22(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("山猫", gameEvent.hostCard.isGold); if (targetCard != null) { gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); } return true; }
public static bool Summon88(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("忠实护卫"); if (targetCard != null) { gameEvent.player.AddMinionToBattlePile(targetCard.NewCard(), 0); } return(false); }
public static bool FullYourHandWithCoins(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("铸币"); for (int i = 0; i < 5; i++) { gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); } return(true); }
public void InitSpecialCards() { DiscoverHigherStarSpell.Add(CardBuilder.SearchCardByName("三连奖励1星", false)); DiscoverHigherStarSpell.Add(CardBuilder.SearchCardByName("三连奖励2星", false)); DiscoverHigherStarSpell.Add(CardBuilder.SearchCardByName("三连奖励3星", false)); DiscoverHigherStarSpell.Add(CardBuilder.SearchCardByName("三连奖励4星", false)); DiscoverHigherStarSpell.Add(CardBuilder.SearchCardByName("三连奖励5星", false)); DiscoverHigherStarSpell.Add(CardBuilder.SearchCardByName("三连奖励6星", false)); treasure.UnionWith(CardBuilder.AllCards.FilterValue(card => card.tag.Contains("宝藏"))); }
public static bool Add11DragonToYouHandIfLost(GameEvent gameEvent) { var targetCard = CardBuilder.SearchCardByName("雏龙"); if (gameEvent.player.board.ResultOfTheLastGame.Equals("Player1 Wins") && targetCard != null) { gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); return(true); } return(false); }
public static bool AddAShadowToHand(GameEvent gameEvent) { var targetCard = CardBuilder.SearchCardByName("暗影映像"); if (targetCard != null) { gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); } return(true); }
public static bool GainCoinsForEachLeftCois(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("铸币"); for (int i = 0; i < gameEvent.player.leftCoins; i++) { gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); } gameEvent.player.leftCoins = 0; return(true); }
public static bool TransformToRandomMinion(GameEvent gameEvent) { Card ShifterZerus = CardBuilder.SearchCardByName("百变泽鲁斯", gameEvent.hostCard.isGold); Card targetCard = CardBuilder.AllCards.FilterValue(card => card.isGold == gameEvent.hostCard.isGold && (!card.isToken || card.isGold) && card.cardType == CardType.Minion && !card.name.Equals("百变泽鲁斯")).GetOneRandomly(); gameEvent.hostCard.TransformToNewCardWithoutEffects(targetCard); gameEvent.hostCard.effectsStay.Add(new ProxyEffect(ProxyEnum.TurnStartInHand, ShifterZerus.GetProxys(ProxyEnum.TurnStartInHand))); gameEvent.hostCard.effectsStay.Add(new KeyWordEffect(Keyword.Changing)); return(true); }
public static bool ReturnToHand(GameEvent gameEvent) { var targetCard = CardBuilder.SearchCardByName(gameEvent.hostCard.name, gameEvent.hostCard.isGold); if (targetCard != null) { gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); } return(true); }
public static bool Summon2FusionMoster(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("融合怪"); if (targetCard != null) { gameEvent.player.AddMinionToBattlePile(targetCard.NewCard(), 0); gameEvent.player.AddMinionToBattlePile(targetCard.NewCard(), 0); } return(true); }
public static bool Create244Dragons(GameEvent gameEvent) { var targetCard = CardBuilder.SearchCardByName("青铜龙", gameEvent.hostCard.isGold); if (targetCard != null) { gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); gameEvent.player.AddMinionToHandPile(targetCard.NewCard()); } return(true); }
public static bool TransformTo68CopyOfMinion(GameEvent gameEvent) { int value1 = 6; int value2 = 8; Card tmp = CardBuilder.SearchCardByName("软泥教授弗洛普", gameEvent.hostCard.isGold); gameEvent.hostCard.TransformToNewCardWithEffects(gameEvent.targetCard.NewCard()); gameEvent.hostCard.effectsStay.Add(new BodyPlusEffect(value1 - gameEvent.hostCard.GetMinionBody().x, value2 - gameEvent.hostCard.GetMinionBody().y)); gameEvent.hostCard.effectsStay.Add(new ProxyEffect(ProxyEnum.AfterMinionPlayedInHand, tmp.GetProxys(ProxyEnum.AfterMinionPlayedInHand))); gameEvent.hostCard.effectsStay.Add(new KeyWordEffect(Keyword.Changing)); return(true); }
public static void UnlockHeroByHero(Card hero) { int index = herosUnlockChain.ToList().IndexOf(hero.name); if (index >= 0 && index + 1 < herosUnlockChain.Length) { Card newHero = CardBuilder.SearchCardByName(herosUnlockChain[index + 1]); if (newHero != null) { UnlockCard(newHero.id); } } }
public static bool Summon55BeastOr1010(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("铁皮小恐龙", gameEvent.hostCard.isGold); if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = (Card)targetCard.NewCard(), player = gameEvent.player, }); } return false; }
public static bool Summon11MechOr22(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("机械袋鼠宝宝", gameEvent.hostCard.isGold); if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = (Card)targetCard.NewCard(), player = gameEvent.player, }); } return(false); }
public static bool Summon22Demon(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("小鬼", true); if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = (Card)targetCard.NewCard(), player = gameEvent.player, }); return(true); } return(false); }
public static bool OtherAllyGainDeathrattleSummonDemon(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("小鬼囚徒", gameEvent.hostCard.isGold); foreach (Card ally in gameEvent.player.GetAllAllyMinion()) { if (ally == gameEvent.hostCard) { continue; } //if (ally.IsMinionType(MinionType.Demons)) { ally.effectsStay.Add(new ProxyEffect(ProxyEnum.Deathrattle, targetCard.GetProxys(ProxyEnum.Deathrattle))); } } return(true); }
public static bool SummonThree22Mech(GameEvent gameEvent) { for (int i = 0; i < 3; i++) { Card targetCard = CardBuilder.SearchCardByName("微型机器人", true); if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = (Card)targetCard.NewCard(), player = gameEvent.player, }); } } return(false); }
public static bool SummonThree13Demon(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("虚空行者", gameEvent.hostCard.isGold); for (int i = 0; i < 3; i++) { if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = (Card)targetCard.NewCard(), player = gameEvent.player, }); } } return(false); }
public static bool SummonAttacksNumber11Beast(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("老鼠", gameEvent.hostCard.isGold); if (targetCard != null) { int attack = gameEvent.hostCard.GetMinionBody().x; for (int i = 0; i < attack; i++) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = targetCard.NewCard(), player = gameEvent.player, }); } return true; } return false; }
public static bool SummonTwo22Beast(GameEvent gameEvent) { Card targetCard = CardBuilder.SearchCardByName("土狼", gameEvent.hostCard.isGold); if (targetCard != null) { gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = targetCard.NewCard(), player = gameEvent.player, }); gameEvent.player.board.SummonMinion(new GameEvent() { hostCard = gameEvent.hostCard, targetCard = targetCard.NewCard(), player = gameEvent.player, }); } return true; }
public Jaraxxus() : base() { player = new Player(CardBuilder.SearchCardByName("加拉克苏斯大王").NewCard()); }
public void AllAllyStrenthen()//为体现流派集群特色,为群体buff特殊编码 { if (player.star > 5 && ((minionTypes.ContainsKey(MinionType.Murlocs) && minionTypes[MinionType.Murlocs] > 0))) { if (random.Next(10) > 7) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { foreach (Card ally in player.GetAllAllyMinion()) { if (ally.IsMinionType(MinionType.Murlocs)) { player.board.EvolveFunc(ally); } } player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "使用巨壳龙群体进化了鱼人"); } } } if (player.star > 2 && (minionTypes.ContainsKey(MinionType.Murlocs) && minionTypes[MinionType.Murlocs] > 2)) { if (random.Next(10) > 7) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { foreach (Card ally in player.GetAllAllyMinion()) { if (ally.IsMinionType(MinionType.Murlocs)) { ally.effectsStay.Add(new BodyPlusEffect(2, 2)); } } player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "群体强化鱼人随从"); } } } if ((minionTypes.ContainsKey(MinionType.Demons) && minionTypes[MinionType.Demons] > 2)) { if (random.Next(10) > 6) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { Card targetCard = CardBuilder.SearchCardByName("小鬼囚徒"); foreach (Card ally in player.GetAllAllyMinion()) { if (ally.IsMinionType(MinionType.Demons)) { ally.effectsStay.Add(new ProxyEffect(ProxyEnum.Deathrattle, targetCard.GetProxys(ProxyEnum.Deathrattle))); } } player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "使用锈誓信徒群体强化了恶魔"); } } } if ((minionTypes.ContainsKey(MinionType.Mechs) && minionTypes[MinionType.Mechs] > 1)) { if (random.Next(10) > 6) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { foreach (Card ally in player.GetAllAllyMinion()) { if (ally.IsMinionType(MinionType.Mechs)) { ally.effectsStay.Add(new BodyPlusEffect(2, 0)); } } player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "使用金刚刃牙兽群体强化机械随从"); } } } }
public void RandomlyGiveMinionBuff() { player.battlePile.Shuffle(); AllAllyStrenthen(); foreach (var card in player.battlePile) { if (card.GetPositionTag() == 0 && !card.HasKeyword(Keyword.Taunt)) //为1号送死随从使用阿古斯添加嘲讽 { if (random.Next(10) > 4) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { card.effectsStay.Add(new KeyWordEffect(Keyword.Taunt)); card.effectsStay.Add(new BodyPlusEffect(1, 1)); player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "使" + card.name + "获得了嘲讽"); } } } else if (card.GetPositionTag() == 1) //对于一号进攻位随从进行优先强化,若为机械,添加31磁力 { if (random.Next(10) > 4) { if (card.IsMinionType(MinionType.Mechs)) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { card.effectsStay.Add(new ProxyEffect(ProxyEnum.Deathrattle, CardBuilder.SearchCardByName("量产型恐吓机").GetProxys(ProxyEnum.Deathrattle))); card.effectsStay.Add(new BodyPlusEffect(3, 1)); player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "将量产型恐吓机磁力了" + card.name); } } if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { card.effectsStay.Add(new BodyPlusEffect(2, 2)); player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "优先强化了进攻随从" + card.name); } } } else if (card.GetPositionTag() == 2) //对于二号常规位机械磁力吵吵模组,如有圣盾,优先强化 { if (random.Next(10) > 3) { if (card.IsMinionType(MinionType.Mechs)) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1 && !card.HasKeyword(Keyword.DivineShield)) { card.effectsStay.Add(new KeyWordEffect(Keyword.DivineShield)); card.effectsStay.Add(new KeyWordEffect(Keyword.Taunt)); card.effectsStay.Add(new BodyPlusEffect(2, 4)); player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "将吵吵模组磁力了" + card.name); } } else if (card.HasKeyword(Keyword.DivineShield)) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { card.effectsStay.Add(new BodyPlusEffect(2, 2)); player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "优先强化了圣盾随从" + card.name); } } } } if (card.IsMinionType(MinionType.Murlocs)) //对于鱼人,添加剧毒 { if (random.Next(15) == 5) { if (player.leftCoins >= Const.coinCostToBuyMinion - 1 && !card.HasKeyword(Keyword.Poisonous)) { card.effectsStay.Add(new KeyWordEffect(Keyword.Poisonous)); player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "使" + card.name + "获得了剧毒"); } } } } do { if (random.Next(10) > 5) //使用剩余费用随机刷新并购买普通的+2/+2战吼随从并卖出 { if (player.leftCoins >= Const.coinCostToBuyMinion - 1) { Card card = player.battlePile.GetOneRandomly(); card.effectsStay.Add(new BodyPlusEffect(2, 2)); player.leftCoins -= Const.coinCostToBuyMinion - 1; Debug.Log(player.hero.name + "使用剩余费用强化了" + card.name); } } else { player.leftCoins -= Const.InitialFlushCost; } }while (player.leftCoins > 0); }
public Trion() : base() { player = new Player(CardBuilder.SearchCardByName("提里奥·弗丁").NewCard()); }