コード例 #1
0
ファイル: Beast.cs プロジェクト: tmc0210/iyingdiBattleGround
 public static bool SummonRamdom1StarMinion(GameEvent gameEvent)
 {
     Card targetCard = CardBuilder.GetCardsByStar(1)
         .Filter(card=>!card.isGold && !card.isToken)
         .GetOneRandomly();
     if (targetCard != null)
     {
         gameEvent.player.board.SummonMinion(new GameEvent()
         {
             hostCard = gameEvent.hostCard,
             targetCard = targetCard.NewCard(),
             player = gameEvent.player,
         });
     }
     if (gameEvent.hostCard.isGold)
     {
         targetCard = CardBuilder.GetCardsByStar(1)
             .Filter(card => !card.isGold && !card.isToken)
             .GetOneRandomly();
         if (targetCard != null)
         {
             gameEvent.player.board.SummonMinion(new GameEvent()
             {
                 hostCard = gameEvent.hostCard,
                 targetCard = targetCard.NewCard(),
                 player = gameEvent.player,
             });
         }
     }
     return true;
 }