Package csa.jportal.ai.enhancedAI.enhancedHints

Examples of csa.jportal.ai.enhancedAI.enhancedHints.AIEnhancedCardHints


        AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);
        return hints.hasAnyHint(key, bundle);
    }
    public static boolean hasAllHints(Card card, String key, HintBundle bundle)
    {
        AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);
        return hints.hasAllHint(key, bundle);
    }
View Full Code Here


        return E.hints.hasKey(key);
    }

    public static boolean hasKey(Card card, String key)
    {
        AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);
        if (hints == null) return false;
        return hints.hasKey(key);
    }
View Full Code Here

        return hints.hasKey(key);
    }

    public boolean hasKey(CardSim card, String key)
    {
        AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);
        if (hints == null) return false;
        return hints.hasKey(key);
    }
View Full Code Here

        return hints.hasKey(key);
    }

    static String getManaGeneratingAbilityString(Card card)
    {
        AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);
        String t1 = hints.getHintValue(HintDefinition.HINT_SITUATION_ACTIVATION, TY_GENERATE_MANA);
        String t2 = hints.getHintValue(HintDefinition.HINT_SITUATION_ACTIVATION, SY_GENERATE_MANA);
       
        return t1+t2;
    }
View Full Code Here

    {
        CardSimList ret = new CardSimList();
        for (int i = 0; i < list.size(); i++)
        {
            CardSim card = list.getCard(i);
            AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);
            boolean notAllowed = false;

            if (    (card.isArtifact()) ||
                    (card.isCreature()) ||
                    (card.isLand()) ||
                    (card.isSorcery()) ||
                    (card.isEnchantment()) )
            {
                if (!ownTurn)
                {
                    continue;
                }
            }
            else if(card.isInstant())
            {
                if (ownTurn)
                {
                    notAllowed = notAllowed || hints.hasHint(HINT_SITUATION_INSTANT, PR_PLAYER_TURN_NOT_ALLOWED);
                }
                else
                {
                    notAllowed = notAllowed || hints.hasHint(HINT_SITUATION_INSTANT, PR_OPPONENT_TURN_NOT_ALLOWED);
                }
            }
            else
            {
                notAllowed = true;
View Full Code Here

    {
        CardSimList ret = new CardSimList();
        for (int i = 0; i < list.size(); i++)
        {
            CardSim card = list.getCard(i);
            AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);
            boolean notAllowed = false;
            if (ownTurn)
            {
                notAllowed = notAllowed || hints.hasHint(HINT_SITUATION_ACTIVATION, PR_PLAYER_TURN_NOT_ALLOWED);
            }
            else
            {
                notAllowed = notAllowed || hints.hasHint(HINT_SITUATION_ACTIVATION, PR_OPPONENT_TURN_NOT_ALLOWED);
            }

            if (hints.hasHint(HINT_SITUATION_ACTIVATION, PR_BEFOR_ATTACKER))
            {
                if (vMatch.getAttacker().size() > 0)
                    notAllowed = true;
            }
            if (!notAllowed)
View Full Code Here

        for (int i = 0; i < list.size(); i++)
        {
            CardSim card = list.getCard(i);
            if (card.getOwner() == player)
            {
                AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);

                if (!hints.hasKey(HintAll.HINT_SITUATION_CARD_PLAYED))
                {
                    continue;
                }
                int good = isGoodEffectCard(card, HintAll.HINT_SITUATION_CARD_PLAYED);
                if (good == -1)
View Full Code Here

        for (int i = 0; i < list.size(); i++)
        {
            CardSim card = list.getCard(i);
            if (card.getOwner() == badOwner)
            {
                AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);

                // do not remove with "bad" features!
                int good = isGoodEffectCard(card, HintAll.HINT_SITUATION_CARD_PLAYED);
                if (good != -1)
                    if (hints.hasKey(HintAll.HINT_SITUATION_CARD_PLAYED))
                    {
                        continue;
                    }
            }
            ret.addCard(card);
View Full Code Here

        for (int i = 0; i < list.size(); i++)
        {
            CardSim card = list.getCard(i);
            int player = card.getOwner();
            int opponent = (card.getOwner()+1)%2;
            AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(card);

            if (hints.hasHintType(key, HintAll.HINT_TYPE_PLAY_RESTRICTION))
            {
                if (hints.hasHint(key, HintAll.PR_ONLY_WHEN_OPPONENT_MORE_LANDS))
                {
                    if (vMatch.getLand(player).size()>=vMatch.getLand(opponent).size())
                        continue;
                }
            }
View Full Code Here

TOP

Related Classes of csa.jportal.ai.enhancedAI.enhancedHints.AIEnhancedCardHints

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.