Examples of OneEffect


Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim.OneEffect

                CardSim bCard = mBattlefield[p].getCard(i);
                Vector<OneEffect> effects = bCard.effectsOnCard;
                if (effects != null)
                for (int j = effects.size()-1; j >=0 ; j--)
                {
                    OneEffect oneEffect = effects.elementAt(j);
                    if (removedCard.getCard().getUniqueID().equals(oneEffect.effectCard.getCard().getUniqueID()))
                    {
                        if (oneEffect.isSource)
                            doSourceEffectOnOneCard(bCard, bCard.getOwner(), oneEffect.key, AIEnhancedCardHints.getHints(removedCard), removedCard.getOwner(), removedCard);
                        else
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim.OneEffect

            if (effects != null)
            {
                card.clearEffects();
                for (int j = 0; j < effects.size(); j++)
                {
                    OneEffect oneEffect = effects.elementAt(j);
                    CardSim effectCard = oneEffect.effectCard;
                    effectCard = allCards.get(effectCard.getCard().getUniqueID());
                    // null might happen, if
                    // effect card is moved to library top
                    // library is on short copy / library dummy
                    // not included in "allCards"
                    // but this also means, that this card
                    // is "dead" so we dont have to do anything and can just go on
                    if (effectCard == null) continue;
                   
                    AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(effectCard);
                   
                    if (hints.hasHint(TI_SOURCE_DEATH))
                    {
                        if (mBattlefield[p].isInList(effectCard))
                        {
                            if (oneEffect.isSource)
                            {
                                doSourceEffectOnOneCard(card, card.getOwner(), oneEffect.key, hints, effectCard.getOwner(), effectCard);
                            }
                            else
                            {
                                doTargetEffectOnOneCard(card, card.getOwner(), oneEffect.key, hints, effectCard.getOwner(), effectCard);
                            }
                        }
                    }
                }
            }
        }
        //half reset "opponent" battlefield
        mBattlefield[(newActivePlayer+1)%2].newRound(false);
        // apply auras etc
        for (int i = 0; i < mBattlefield[(newActivePlayer+1)%2].size(); i++)
        {
            int p = (newActivePlayer+1)%2;
            CardSim card = mBattlefield[p].getCard(i);
           
            Vector<OneEffect> effects = card.getEffects();
            if (effects != null)
            {
                card.clearEffects();
                for (int j = 0; j < effects.size(); j++)
                {
                    OneEffect oneEffect = effects.elementAt(j);
                    CardSim effectCard = oneEffect.effectCard;
                    effectCard = allCards.get(effectCard.getCard().getUniqueID());

                    // null might happen, if
                    // effect card is moved to library top
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.