Package csa.jportal.ai

Examples of csa.jportal.ai.AIPlayer


    public void doSelectCardFromOpponentHand(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select card in E.opponent hand!",debugLevel);

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

        Card card = c.E.mInitiatorCard;
View Full Code Here


    public void doSelectCreatureFromPlayerLibrary(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select creature in library!",debugLevel);

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

        Card card = c.E.mInitiatorCard;
View Full Code Here

    public void doSelectCreatureLandFromField(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: enter com select target land/creature!",debugLevel);

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

        Card card = c.E.mInitiatorCard;
        //#import "scripts\Allround\SorceryComboCast.java"
View Full Code Here

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

        // this can be from
        // a) my creatures
View Full Code Here

    }
    public void doSelectPlayerOrCreature(Communication c)
    {
        int debugLevel=3;
        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);


        //#import "scripts\Allround\AIHelperScript.java"
        E.D.addLog("EAI: Enter com select target creature / E.player!",debugLevel);
View Full Code Here

    public void doPointBlockerToAttacker(Communication c)
    {
        int debugLevel = 3;

        E.D.addLog("EAI: Enter point blocker to attacker",debugLevel);
        AIPlayer aiPlayer = E.player.getAIPlayer();
        int round = E.match.getRound();

        Card blocker = c.E.mInitiatorCard;
        String blockerKey="TMP_KEY_"+round+"_attacker_blocker"+blocker.getUniqueID();

        Card attacker =  (Card) aiPlayer.getObjectData(blockerKey);
        // cleanup
        aiPlayer.removeObjectData(blockerKey);

        String attackerKey="TMP_KEY_"+round+"attacker"+attacker.getUniqueID();
        aiPlayer.setBoolData(attackerKey+"blocked", true);
        E.D.addLog("EAI: setting attacker as blocked, key: \""+attackerKey+"blocked"+"\": "+ aiPlayer.getBoolData(attackerKey+"blocked"),debugLevel);

        c.E.mTargetCardTo = attacker;
        c.setCardResult(attacker);
        c.setSuccessfull(true);
    }
View Full Code Here

            Weighting weightingUsed = Weighting.DEFAULT;

            if (mPlayer instanceof MatchComputerPlayer)
            {
                MatchComputerPlayer cp = (MatchComputerPlayer) mPlayer;
                AIPlayer aip = cp.getAIPlayer();
                if (!aip.isScriptedAI())
                {
                    EAIConfigurationData eaiConfig = aip.getEAIConfig();
                    if (eaiConfig != null)
                    {
                        String wName = eaiConfig.getActiveWeightingCollection();
                        weightingUsed = Weighting.buildWeighting(wName);
                    }
View Full Code Here

      
        Weighting weightingUsed = Weighting.DEFAULT;
        if (mPlayer instanceof MatchComputerPlayer)
        {
            MatchComputerPlayer cp = (MatchComputerPlayer) mPlayer;
            AIPlayer aip = cp.getAIPlayer();
            if (!aip.isScriptedAI())
            {
                EAIConfigurationData eaiConfig = aip.getEAIConfig();
                if (eaiConfig != null)
                {
                    String wName = eaiConfig.getActiveWeightingCollection();
                    weightingUsed = Weighting.buildWeighting(wName);
                }
View Full Code Here

       
       
            String aiName = "HintNAI";
            NamedAIDataPool mNamedAIDataPool = new NamedAIDataPool();
            NamedAIData namedAIData = mNamedAIDataPool.get(aiName);
            AIPlayer cplayer = new AIPlayer(namedAIData.getAIUsed());
            cplayer.mNamedAI = namedAIData;
            cplayer.setSelectedDeckName("NoDeck");
            CardDeck.mDummyLoadingActive = true;
            mHintPlayer = new MatchComputerPlayer(cplayer);
            CardDeck.mDummyLoadingActive = false;
        }
        return mHintAI;
View Full Code Here

            Weighting weightingUsed = Weighting.DEFAULT;

            if (mPlayer instanceof MatchComputerPlayer)
            {
                MatchComputerPlayer cp = (MatchComputerPlayer) mPlayer;
                AIPlayer aip = cp.getAIPlayer();
                if (!aip.isScriptedAI())
                {
                    EAIConfigurationData eaiConfig = aip.getEAIConfig();
                    if (eaiConfig != null)
                    {
                        String wName = eaiConfig.getActiveWeightingCollection();
                        weightingUsed = Weighting.buildWeighting(wName);
                    }
View Full Code Here

TOP

Related Classes of csa.jportal.ai.AIPlayer

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.