Package csa.jportal.card

Examples of csa.jportal.card.Card


            public void displayEventOccurred(DisplayEvent e)
            {
                //  if rigth click, than show info of current card
                if (e.mMessageType == MOUSE_LEFTRELEASED_CARD)
                {
                    Card card = e.mCard;
                    for (int i=0; i < simList2.size(); i++)
                    {
                        if (card.getUniqueID().equals(simList2.getCard(i).getCard().getUniqueID()))
                        {
                            CardSim sim = simList2.getCard(i);
                            showSimCardInfo(sim);
                            break;
                        }
View Full Code Here


            public void displayEventOccurred(DisplayEvent e)
            {
                //  if rigth click, than show info of current card
                if (e.mMessageType == MOUSE_LEFTRELEASED_CARD)
                {
                    Card card = e.mCard;
                    for (int i=0; i < simList2.size(); i++)
                    {
                        if (card.getUniqueID().equals(simList2.getCard(i).getCard().getUniqueID()))
                        {
                            CardSim sim = simList2.getCard(i);
                            showSimCardInfo(sim);
                            break;
                        }
View Full Code Here

            // check if last card on stack is mine
            // if not
            // reset all schedules!
            if (E.match.getStackSize()!=0)
            {
                Card lastStackCard = E.match.getStackCard(E.match.getStackSize()-1);
                if (E.match.getIntOwner(lastStackCard) != E.pNumber)
                {
                     mAStackSave = mAStack;
                     mAStack = new EAIActionStack();
                     plan = null;
                     // NOTE;
                     // this also means, if we "defend" our doings, we nonetheless
                     // lose the actions, that we planned
                     // to take next
                     // including targetting we thought of!
                   
                }
            }
           
        }
       
       
        // todo decide if stack 0 card can be handled by an instant we have!

        if (E.match.getStackSize()!=0)
        {
            Card lastStackCard = E.match.getStackCard(E.match.getStackSize()-1);
            if (E.match.getIntOwner(lastStackCard) == E.pNumber)
            {
                // last card on stack is our own
                // hm - dont do anything
                // since we assume, that we already did everything we could
View Full Code Here

        if (action == null)
        {
            E.D.addLog("EAI: No action known (either instant from old AI code, or triggered Mana need).", 3);
            ManaPayment mana = c.manaExpected;
            Card card = c.E.mInitiatorCard;

           
            if ((mana != null) && (mana.paymentType == ManaPayment.MP_TRIGGER_ACTIVATE_CARD))
            {
                E.D.addLog("EAI: triggered Mana encountered.", 3);
View Full Code Here

    public static CardList onlyWithHint(CardList creatureList, String key, HintBundle bundle)
    {
        CardList ret = new CardList();
        for (int i=0; i < creatureList.size();i++)
        {
            Card card = creatureList.getCard(i);
            if (hasHint(card, key, bundle))
                ret.addCard(card);
        }
        return ret;
    }
View Full Code Here

    public static CardList removeWithHint(CardList list, String key, HintBundle bundle)
    {
        CardList ret = new CardList();
        for (int i=0; i < list.size();i++)
        {
            Card card = list.getCard(i);
            if (!hasHint(card, key, bundle))
                ret.addCard(card);
        }
        return ret;
    }
View Full Code Here

        }
        if (skip) return null;

        String color = getColorOfLessFrequence(E.match.getLand(E.player), handLands);
        CardList handlands = handLands.getSubListByColor(color);
        Card aLand;

        if (handlands.size() == 1)
            aLand = handlands.getCard(0);
        else
            aLand = handLands.getCard(csa.Global.getRand().nextInt(handLands.size()));
View Full Code Here

        }
        if (skip) return null;

        String color = getColorOfLessFrequence(vMatch.getLand(E.pNumber), handLands);
        CardList handlands = handLands.getSubListByColor(color);
        Card aLand;

        if (handlands.size() == 1)
            aLand = handlands.getCard(0);
        else
            aLand = handLands.getCard(csa.Global.getRand().nextInt(handLands.size()));
View Full Code Here

    }

    public static ManaCollection getPlayCost(CardSim c)
    {
        ManaCollection m = new ManaCollection();
        Card card = c.getCard();
        for (int i=0; i<card.getManaCost("W");i++) m.mMana.addElement(ManaItem.createManaItem("W") );
        for (int i=0; i<card.getManaCost("B");i++) m.mMana.addElement(ManaItem.createManaItem("B") );
        for (int i=0; i<card.getManaCost("U");i++) m.mMana.addElement(ManaItem.createManaItem("U") );
        for (int i=0; i<card.getManaCost("R");i++) m.mMana.addElement(ManaItem.createManaItem("R") );
        for (int i=0; i<card.getManaCost("G");i++) m.mMana.addElement(ManaItem.createManaItem("G") );

        for (int i=0; i<card.getManaCostUncolored();i++) m.mMana.addElement(ManaItem.createManaItem("*") );

        if (card.getManaCost() == -1) m.mMana.addElement(ManaItem.createManaItem("X") );

        return m;
    }
View Full Code Here

        return m;
    }
    public static ManaCollection getPlayCostBase(CardSim c)
    {
        ManaCollection m = new ManaCollection();
        Card card = c.getCard();
        for (int i=0; i<card.getManaCost("W");i++) m.mMana.addElement(ManaItem.createManaItem("W") );
        for (int i=0; i<card.getManaCost("B");i++) m.mMana.addElement(ManaItem.createManaItem("B") );
        for (int i=0; i<card.getManaCost("U");i++) m.mMana.addElement(ManaItem.createManaItem("U") );
        for (int i=0; i<card.getManaCost("R");i++) m.mMana.addElement(ManaItem.createManaItem("R") );
        for (int i=0; i<card.getManaCost("G");i++) m.mMana.addElement(ManaItem.createManaItem("G") );

        for (int i=0; i<card.getManaCostUncolored();i++) m.mMana.addElement(ManaItem.createManaItem("*") );
        return m;
    }
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.