Package csa.jportal.card

Examples of csa.jportal.card.Card


        if (cardsPlayed == null) cardsPlayed = new Vector();
        CardList cardsPlayedList = new CardList();

        for (int t = 0; t <cardsPlayed.size(); t++)
        {
            Card cc = (Card) cardsPlayed.elementAt(t);
            cardsPlayedList.addCard(cc);
        }
        CardList hand = E.match.getHand(E.player);
        CardList instants = hand.getSubListByType("Instant");

        // don`t play the same aura buf twice
        for (int i=0; i<cardsPlayed.size(); i++)
        {
            Card c = (Card) cardsPlayed.elementAt(i);
            int id = c.getIntId();
            if (AIHelper.hasHint(c, "EFFECT_TEMP_AURA"))
            {
                instants = instants.removeCardById(id);
            }
        }

        E.D.addLog("EAI: Enter Stack handle" ,debugLevel);
        E.D.addLog("EAI: Match StackSize: " +E.match.getStackSize(),debugLevel);


        if (instants.size()==0)
        {
            E.D.addLog("EAI: I have no instants, so what can I do? - Nothing!",debugLevel);
            return true;
        }
        E.D.addLog("EAI: there are "+instants.size()+" instants on my hand... hm...",debugLevel);

        int phase = E.match.getPhase();
        E.D.addLog("EAI: We are in Phase: "+phase +"("+Match.PHASE_MAIN1+")",debugLevel);

        // only two types of instant cards known so far
        // for main phase
        if ((phase == Match.PHASE_MAIN1|| (phase == Match.PHASE_MAIN2))
        {
            E.D.addLog("EAI: We are in main phase now!",debugLevel);
            CardList possibleInstant = AIHelper.getInstantsForMain(instants);

            possibleInstant = AIHelper.onlyEnoughMana(possibleInstant, E.match.getLand(E.player));

            if (possibleInstant.size()==0)
            {
                E.D.addLog("EAI: I have no instants I can use this phase,  so what can I do? - Nothing!",debugLevel);
                return true;
            }

            if (E.match.getStackSize()==0)
            {
                E.D.addLog("EAI: Stack is zero, I don´t think I´ll cast anything right now.",debugLevel);
                return true;
            }

              // todo decide if stack 0 card can be handled by an instant we have!
              Card stackCard = E.match.getStackCard(E.match.getStackSize()-1);

              if (stackCard.isCreature())
              {
                    possibleInstant = AIHelper.onlyWithHint(possibleInstant,"INSTANT_WHEN_OPPONENT_CREATURE_PLAYED" );
              }
              else
              if ((stackCard.isSorcery()) || (stackCard.isInstant()))
              {
                  possibleInstant = AIHelper.onlyWithHint(possibleInstant, "INSTANT_WHEN_OPPONENT_SORCERY_PLAYED");

                  // dont negate own spells!
                  MatchPlayable ow = E.match.getOwner(stackCard);
                  int owNo = E.match.getMyNumber(ow);
                  int myNo = E.match.getMyNumber(E.player);
                  if (owNo == myNo)
                  {
                        possibleInstant =  AIHelper.removeWithHint(possibleInstant, "INSTANT_NEGATES_INSTANT_NEGATES_SORCERY");
                  }
              }
            if (possibleInstant.size()==0)
            {
                E.D.addLog("EAI: I have no instants I can use this phase,  so what can I do? - Nothing! (2)",debugLevel);
                return true;
            }
            playCardInstant(possibleInstant.getCard(0), cardsPlayed, cardKey, aiPlayer);

            return true;
        }

        // only two types of instant cards known so far
        // for opponents attack phase phase
        else if ((phase == Match.PHASE_COMBAT_DECLARE_ATTACKERS))
        {
            if (E.match.getStackSize()!=0)
            {
                // while attacking in stack?
                E.D.addLog("EAI: In stack > 1 while attacking? Don´t know yet what todo!",debugLevel);
                return true;
            }

            if (E.match.isMyTurn(E.player))
            {
                E.D.addLog("EAI: I know of no instants to play in my own turn!",debugLevel);
                return true;
            }

            E.D.addLog("EAI: We are in opponents attackers phase!",debugLevel);
            CardList possibleInstant = AIHelper.getInstantsForAttackers(instants);
            possibleInstant = AIHelper.onlyEnoughMana(possibleInstant, E.match.getLand(E.player));
            CardList goodInstants = new CardList();
            E.D.addLog("EAI: Possbile instants(1): "+possibleInstant,debugLevel);

            for (int i=0; i < possibleInstant.size();i++)
            {
                Card card = possibleInstant.getCard(i);
                if (AIHelper.sorceryHintMakesSenseNow(E.player, E.match, card))
                {
                    goodInstants.addCard(card);
                }
            }
            E.D.addLog("EAI: goodInstants (2): "+goodInstants,debugLevel);
            goodInstants = goodInstants.removeList(AIHelper.getUnUseableHandCard(goodInstants, E.match, E.player));
            E.D.addLog("EAI: goodInstants (3): "+goodInstants,debugLevel);
            goodInstants = AIHelper.adjustListWithCardNeeds(goodInstants, true, "STACK",E.match, E.player);
            E.D.addLog("EAI: goodInstants (4): "+goodInstants,debugLevel);

            if (goodInstants.size() == 0)
            {
                E.D.addLog("EAI: I have no instants I can use this phase,  so what can I do? - Nothing!",debugLevel);
                return true;
            }

            while (goodInstants.size()>0)
            {
                Card instant = goodInstants.getCard(0);     // todo chose one!

                CardList attackers = E.match.getAttackerList();
                AICardHints hints = new AICardHints(instant);

                AIHint hint = hints.getHintbyVarname("EFFECT_PLAYER_CREATURE_UNTAP");
View Full Code Here


    private Card handleSorcery(CombatFormation sa, String baseKey)
    {
        int debugLevel = 1;
        E.D.addLog("EAI: handle sorcery in main called ",debugLevel);

        Card target = sa.getTarget();
        Card spell = sa.getSpell();
        if (spell == null) return null;

        if (!E.match.isInHand(E.player, spell))
        {
          // the selected card is not in our hand anymore...
View Full Code Here

        if (cardsPlayed == null) cardsPlayed = new Vector();
        CardList cardsPlayedList = new CardList();

        for (int t = 0; t <cardsPlayed.size(); t++)
        {
            Card cc = (Card) cardsPlayed.elementAt(t);
            cardsPlayedList.addCard(cc);
        }
        //#import "scripts\Allround\AIHelperScript.java"

        AIHelper.checkMoodChange(E.match, E.player);

        // bRet indicates Phase done - if not set to true at some stage
        // computer will sit in an endless loop and
        // repeatedly load and run Script!

        String landKey="TMP_KEY_"+E.match.getRound()+"landPlayed";

        E.D.addLog("EAI: Computer entered main script.",debugLevel);

        CombatFormation sorceryAction = (CombatFormation) E.aiPlayer.getObjectData(baseKey+"SORCERY_COMBO");
        E.D.addLog("EAI: Enter Main: sorceryAction: "+sorceryAction,debugLevel);
        E.aiPlayer.removeObjectData(baseKey+"SORCERY_TARGET");
        if (sorceryAction != null)
        {
            E.D.addLog("EAI: Continue sorcery combo",debugLevel);
            Card spell = handleSorcery(sorceryAction, baseKey);
            E.D.addLog("EAI: Spell: "+spell, debugLevel);
            if (spell != null ) //?
            {
                return playCard(spell,cardsPlayed, cardKey, E.aiPlayer);
            }
            else
            {
                return true;
            }

        }

        // try playing a land - if available
        if( (E.match.getPhase() == Match.PHASE_MAIN1) || (E.match.getPhase() == Match.PHASE_MAIN2))
        {
            E.D.addLog("EAI: Entering Main",debugLevel);

            // first thing we do
            boolean landPlayed = E.aiPlayer.getBoolData(landKey);
            E.D.addLog("EAI: (Boolean) landPlayed = "+landPlayed,debugLevel);
            if (!landPlayed)
            {
                E.D.addLog("EAI: Entering land not played yet",debugLevel);
                // to show we "tried" playing a land, not that we actually played one
                E.aiPlayer.setBoolData(landKey, true);
                CardList hand = E.match.getHand(E.player);
                hand = hand.removeList(cardsPlayedList);

                CardList handLands = hand.getSubListByType("Land");
                E.D.addLog("EAI: Lands in hand: " +handLands.size(),debugLevel);
                if (handLands.size()>0)
                {
                    int intelligence  = E.aiPlayer.mStrategie.getIntelligence();
                    int landPlayMood = E.match.getLand(E.player).size()-2+(intelligence/2);

                    if (landPlayMood>10)
                    {
                        int prob = 12 - (landPlayMood);
                        if (prob < 0) prob = 0;
                        int randy =  csa.Global.getRand().nextInt(10);
                        E.D.addLog("EAI: Check landplay: randy = "+randy+" prob = "+prob,debugLevel);

                        if (randy>=prob )
                        {
                            boolean skip = false;
                            // todo check if enough lands of EVERY usefull color are present (2? at least?)
                            int manaBlack = E.match.getLand(E.player).getSubListBySubType("Swamp").size();
                            int manaRed = E.match.getLand(E.player).getSubListBySubType("Mountain").size();
                            int manaWhite = E.match.getLand(E.player).getSubListBySubType("Plains").size();
                            int manaBlue = E.match.getLand(E.player).getSubListBySubType("Island").size();
                            int manaGreen = E.match.getLand(E.player).getSubListBySubType("Forest").size();

                            if ((manaBlack < 3) && (handLands.getSubListBySubType("Swamp").size()>0) ) skip = true;
                            if ((manaRed < 3) && (handLands.getSubListBySubType("Mountain").size()>0) ) skip = true;
                            if ((manaWhite < 3) && (handLands.getSubListBySubType("Plains").size()>0) ) skip = true;
                            if ((manaBlue < 3) && (handLands.getSubListBySubType("Island").size()>0) ) skip = true;
                            if ((manaGreen < 3) && (handLands.getSubListBySubType("Forest").size()>0) ) skip = true;


                          if (AIHelper.enoughLands(E.match.getLand(E.player).size(), hand ))
                            if (!skip)
                              landPlayed=true;
                        }
                    }

                    if (!landPlayed)
                    {
                        // simple AI - play first land!

                        String color = AIHelper.getColorOfLessFrequence(E.match.getLand(E.player), handLands);
                        CardList handlands = handLands.getSubListByColor(color);
                        Card aLand;
                        if (handlands.size() > 0)
                            aLand = handlands.getCard(0);
                        else
                            aLand = handLands.getCard(csa.Global.getRand().nextInt(handLands.size()));

                        return playCard(aLand,cardsPlayed, cardKey, E.aiPlayer);
                    }
                    else
                    {
                        E.D.addLog("EAI: Lands saved! " +handLands.size(),debugLevel);
                    }
                }
                // indicate we are finished for now and
                // that we want to be called again, when land was playout out by E.match
                // which is done after we "returned
            }
            else
            {
                E.D.addLog("EAI: Entering land played already",debugLevel);
            }


            // here
            E.D.addLog("EAI: Checking what to play in Main",debugLevel);

            // try playing a creature
            // if that means communication - I don´t know what will happen
            // lets come to us one at a time...
            CardList lands = E.match.getLand(E.player);
            CardList hand = E.match.getHand(E.player);
            hand = hand.removeList(cardsPlayedList);
            CardList creatureHand = hand.getSubListByType("Creature");
            CardList sorceriesHand = hand.getSubListByType("Sorcery");
            CardList possibleCreatures = AIHelper.onlyEnoughMana(creatureHand, lands);
            CardList possibleSorceries = AIHelper.onlyEnoughMana(sorceriesHand, lands);
            CardList goodSorceries = new CardList();
            CardList goodCreatures = new CardList();
            for (int i=0; i < possibleSorceries.size();i++)
            {
                Card card = possibleSorceries.getCard(i);
                if (AIHelper.sorceryHintMakesSenseNow(E.player, E.match, card))
                {
                    goodSorceries.addCard(card);
                }
            }

            for (int i=0; i < possibleCreatures.size();i++)
            {
                Card card = possibleCreatures.getCard(i);
                if (AIHelper.sorceryHintMakesSenseNow(E.player, E.match, card))
                {
                    goodCreatures.addCard(card);
                }
            }
            if(E.match.getPhase() == Match.PHASE_MAIN2)
                E.aiPlayer.removeObjectData(E.match.getPlayerBaseKey(E.player, false)+"ATTACKER_CHECK");

            // no buffs in second phase - what good should they be after attacking is done?
            CardList newGood = new CardList();
            if (E.match.getPhase() == Match.PHASE_MAIN2)
            {
                for (int i=0; i < goodSorceries.size();i++)
                {
                    Card card = goodSorceries.getCard(i);
                    if (!AIHelper.isBufCard(card))
                    {
                        newGood.addCard(card);
                    }
                }
                goodSorceries = newGood;
            }


            // these are cards for land/ color needs which are not in any deck right now
            goodSorceries = goodSorceries.removeList(AIHelper.getUnUseableHandCard(goodSorceries,Match.match, E.player));

            goodSorceries = AIHelper.adjustListWithCardNeeds(goodSorceries, true, "MAIN", E.match, E.player);
            goodCreatures = AIHelper.adjustListWithCardNeeds(goodCreatures, true, "MAIN", E.match, E.player);

            goodSorceries.sortListByManaCost();
            E.D.addLog("EAI: Good sorceries: "+ goodSorceries,1);
            possibleCreatures.sortListByManaCost();
            E.D.addLog("EAI: Good creatures: "+ goodCreatures,1);

       //     CardList opponentCreatures = E.match.getBattlefieldOpponent(E.player);
       //     CardList myCreatures = E.match.getBattlefield(E.player);

            CardList joinList = new CardList();
            joinList.addList(goodSorceries);
            joinList.addList(goodCreatures);


            AIHelper.sorceryAction = null;
            AIHelper.isCastSeeking = true;
            Card selectedCard = AIHelper.selectGoodCard(joinList, true, null, true, false, E.match, E.player);

            AIHelper.isCastSeeking = false;
            if (sorceryAction != null)
            {
                  E.aiPlayer.setObjectData(baseKey+"SORCERY_COMBO", sorceryAction);
                Card spell = handleSorcery(sorceryAction, baseKey);
                if (spell == null ) //?
                {
                    E.aiPlayer.removeObjectData(cardKey);
                    return true;
                }
View Full Code Here

        int debugLevel = 3;
        E.D.addLog("EAI: Pay Mana entered.",debugLevel);
        String baseKey=E.match.getPlayerBaseKey(E.player);
        int round = E.match.getRound();
        Card cardToPayFor = c.E.mInitiatorCard;
        String keyHead="TMP_KEY_Payment_"+E.match.getRound()+"_"+cardToPayFor.getUniqueID()+"_"+c.getUniqueID();
        E.D.addLog("EAI: Keyhead generated: "+keyHead,debugLevel);

        boolean paymentOngoing = E.aiPlayer.getBoolData(keyHead);
        if (!paymentOngoing)
        {
              E.D.addLog("EAI: New payment entered.",debugLevel);
            // we start payment now!
            E.aiPlayer.setBoolData(keyHead, true);
            E.aiPlayer.setIntData(keyHead+"_G", cardToPayFor.getManaCost("G"));
            E.aiPlayer.setIntData(keyHead+"_B", cardToPayFor.getManaCost("B"));
            E.aiPlayer.setIntData(keyHead+"_W", cardToPayFor.getManaCost("W"));
            E.aiPlayer.setIntData(keyHead+"_U", cardToPayFor.getManaCost("U"));
            E.aiPlayer.setIntData(keyHead+"_R", cardToPayFor.getManaCost("R"));
            int allCost = cardToPayFor.getManaCostUncolored();
            if (allCost == -1) // X
            {
                int baseCost = 0;
                int xCost = 0;
                baseCost += E.aiPlayer.getIntData(keyHead+"_G");
                baseCost += E.aiPlayer.getIntData(keyHead+"_B");
                baseCost += E.aiPlayer.getIntData(keyHead+"_W");
                baseCost += E.aiPlayer.getIntData(keyHead+"_U");
                baseCost += E.aiPlayer.getIntData(keyHead+"_R");

                xCost = AIHelper.getManaMax(E.match.getLand(E.player)) - baseCost;
                // EFFECT_ONE_PLAYER_DAMAGE -> max
                // EFFECT_OPPONENT_DAMAGE  -> max


                // EFFECT_ONE_CREATURE_DAMAGE -> creature life
                if (AIHelper.hasHint(cardToPayFor, "EFFECT_ONE_CREATURE_DAMAGE"))
                {
                     if (!((AIHelper.hasHint(cardToPayFor, "EFFECT_ONE_PLAYER_DAMAGE")) || (AIHelper.hasHint(cardToPayFor, "EFFECT_OPPONENT_DAMAGE"))))
                     {
                        // seek creature
                        CardList opponentCreatures = E.match.getBattlefieldOpponent(E.player);
                        if (opponentCreatures.size() == 0)
                        {
                            // whats this??
                            xCost = 0;
                        }
                        else
                        {
                            Card target = AIHelper.getDamageTarget(opponentCreatures, xCost, false, E.match, E.player);
                            xCost = target.getNowToughness();
                        }
                     }
                }


                // than x < E.player life No Suicide!
                if (AIHelper.hasHint(cardToPayFor, "EFFECT_PLAYER_DAMAGE"))
                {
                    int life = E.match.getLife(E.player);
                    if (life-1 < xCost) xCost = life-1;
                }
                allCost = xCost+baseCost;
            }
            E.aiPlayer.setIntData(keyHead+"_All", allCost);
        }

        // now all data is set so we can continue to pay
        // I take it that we ALLWAYS!!! have enough Lands to pay!
        // no checking is done here!
        CardList lands = E.match.getLand(E.player);
        CardList untappedLands = lands.getSubListTapState(false);

        E.D.addLog("EAI: Untapped lands: " + untappedLands ,debugLevel);
        Card toTap=null;
        if (E.aiPlayer.getIntData(keyHead+"_G")>0)
        {
            E.D.addLog("EAI: Payment 1 forest." ,debugLevel);
            CardList greens = untappedLands.getSubListBySubType("Forest");
            if (greens.size()!=0)
View Full Code Here

        E.D.addLog("EAI: Enter select card from hand!",debugLevel);

        String baseKey=E.match.getPlayerBaseKey(E.player);
        //#import "scripts\Allround\AIHelperScript.java"

        Card card = c.E.mInitiatorCard;

        CardList playerList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createCardPlayerHand(E.player, E.opponent));
        playerList = AIHelper.removeRS(playerList, c, E.match, E.player);

        playerList.removeCard(card);
        playerList = AIHelper.adjustListWithCardNeeds(playerList, card);

        E.D.addLog("EAI: Player:!" + E.player, debugLevel);
        E.D.addLog("EAI: Initiator E.player:!" + c.E.mInitiatorPlayer,debugLevel);
        Card chosen;

        if (E.player == c.E.mInitiatorPlayer)
           E.D.addLog("EAI: Asked from self!",debugLevel);
        else
           E.D.addLog("EAI: Asked from Opponent!",debugLevel);
View Full Code Here

        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select target untapped creature!",debugLevel);
        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);

        Card card = c.E.mInitiatorCard;
        E.D.addLog("Script combo loaded ->",debugLevel);

        Card st = (Card) E.player.getAIPlayer().getObjectData(baseKey+"SORCERY_TARGET");
        if (st != null)
        {
            E.D.addLog("Sorcer Combo target ->"+st,debugLevel);
            E.player.getAIPlayer().removeObjectData(baseKey+"SORCERY_TARGET");
            c.E.mTargetCardTo = st;
            c.setCardResult(st);
            c.setSuccessfull(true);
            return;
        }

        CardList playerList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createUntappedCreaturePlayer(E.player, E.opponent));
        playerList = AIHelper.removeRS(playerList, c, E.match, E.player);
        CardList opponentList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createUntappedCreatureOpponent(E.player, E.opponent));
        opponentList = AIHelper.removeRS(opponentList, c, E.match, E.player);

        playerList = AIHelper.adjustListWithCardNeeds(playerList, card);
        opponentList = AIHelper.adjustListWithCardNeeds(opponentList, card);

        E.D.addLog("EAI: Player:!" + E.player, debugLevel);
        E.D.addLog("EAI: Initiator E.player:!" + c.E.mInitiatorPlayer,debugLevel);

        Card target=null;
        if (opponentList.size()>0)
        {
            target = AIHelper.getMostDamaging(opponentList);
            AIHelper.addToRS(target, c, E.match, E.player);
            c.E.mTargetCardTo = target;
View Full Code Here

    public void doSelectTappedCreature(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select tapped creature!",debugLevel);
        Card card = c.E.mInitiatorCard;
        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        //#import "scripts\Allround\AIHelperScript.java"

        E.D.addLog("Script combo loaded ->",debugLevel);

        Card st = (Card) E.player.getAIPlayer().getObjectData(baseKey+"SORCERY_TARGET");
        if (st != null)
        {
            E.D.addLog("Sorcer Combo target ->"+st,debugLevel);
            E.player.getAIPlayer().removeObjectData(baseKey+"SORCERY_TARGET");
            c.E.mTargetCardTo = st;
            c.setCardResult(st);
            c.setSuccessfull(true);
            return;
        }

        CardList playerList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createTappedCreaturePlayer(E.player, E.opponent));
        playerList = AIHelper.removeRS(playerList, c, E.match, E.player);
        CardList opponentList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createTappedCreatureOpponent(E.player, E.opponent));
        opponentList = AIHelper.removeRS(opponentList, c, E.match, E.player);

        playerList = AIHelper.adjustListWithCardNeeds(playerList, card);
        opponentList = AIHelper.adjustListWithCardNeeds(opponentList, card);

        E.D.addLog("EAI: Player:!" + E.player, debugLevel);
        E.D.addLog("EAI: Initiator E.player:!" + c.E.mInitiatorPlayer,debugLevel);

        Card target=null;
        if (opponentList.size()>0)
        {
            target = AIHelper.getMostDamaging(opponentList);
            AIHelper.addToRS(target, c, E.match, E.player);
            c.E.mTargetCardTo = target;
View Full Code Here

        E.D.addLog("EAI: Enter com select attacking target creature!",debugLevel);
        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        //#import "scripts\Allround\AIHelperScript.java"

        Card card = c.E.mInitiatorCard;
        CardList opponentList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createAttackingCreatureOpponentCreature(E.player, E.opponent));
        opponentList = AIHelper.removeRS(opponentList, c, E.match, E.player);
        opponentList = AIHelper.adjustListWithCardNeeds(opponentList, card);

        E.D.addLog("EAI: Player:!" + E.player, debugLevel);
        E.D.addLog("EAI: Initiator E.player:!" + c.E.mInitiatorPlayer,debugLevel);

        E.D.addLog("EAI: Asked from myself!",debugLevel);
        Card target=null;
        if (opponentList.size()>0)
        {
            target = AIHelper.getMostDamaging(opponentList);
            AIHelper.addToRS(target, c, E.match, E.player);
            c.E.mTargetCardTo = target;
View Full Code Here

        int debugLevel=3;
        E.D.addLog("EAI: Enter com select target creature!",debugLevel);

        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        Card card = c.E.mInitiatorCard;

        //#import "scripts\Allround\AIHelperScript.java"

        // this can be from
        // a) my creatures
        // b) Opponent creatures
        // c) even a stack creature
        //#import "scripts\Allround\SorceryComboCast.java"

        AICardHints hints = new AICardHints(card);
        AIHint hint;

        Card chosen = null;
        E.D.addLog("EAI: Player:!" + E.player,debugLevel);
        E.D.addLog("EAI: InitiatorPlayer:!" + c.E.mInitiatorPlayer,debugLevel);

        //if (E.player == c.E.mInitiatorPlayer)
        {
          E.D.addLog("EAI: Asked from myself!",debugLevel);

            CardList targetList=null;
            Card target=null;
            CardList myCreatures = E.match.getBattlefield(E.player);
            myCreatures = AIHelper.removeRS(myCreatures, c, E.match, E.player);
            myCreatures=AIHelper.adjustListWithCardNeeds(myCreatures, card);

            CardList opponentCreatures = E.match.getBattlefieldOpponent(E.player);
View Full Code Here

        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        //#import "scripts\Allround\AIHelperScript.java"

        Card card = c.E.mInitiatorCard;
        CardList playerList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createCreaturePlayerGraveyard(E.player, E.opponent));
        playerList = AIHelper.removeRS(playerList, c, E.match, E.player);
        playerList = AIHelper.adjustListWithCardNeeds(playerList, card);

        E.D.addLog("EAI: Player:!" + E.player, debugLevel);
        E.D.addLog("EAI: Initiator E.player:!" + c.E.mInitiatorPlayer,debugLevel);

        Card target=null;

        if (playerList.size()>0)
        {

            if (AIHelper.hasHint(card, "EFFECT_PLAYER_CREATURE_FROM_GRAVE_TO_PLAY"))
View Full Code Here

TOP

Related Classes of csa.jportal.card.Card

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.