Package csa.jportal.ai.enhancedAI.enhancedSim

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CombatSimNew


        CombatSimConfig c = new CombatSimConfig(E.aiPlayer);
        c.attackers = allAttackers;
        c.attackerLands = vMatch.getLand(attacker);
        c.blockerLands = vMatch.getLand((attacker+1)%2);
        int blockerHealth = vMatch.getLife((attacker+1)%2);
        CombatSimNew csim = new CombatSimNew(allAttackers, allBlockers, c, false);
        CombatFormation formation = csim.computeBestBlock(blockerHealth, Weighting.DEFAULT,0);

        CardSimList blockersUsed = new CardSimList();
       
        for (int i=0; i< formation.singleFights.size(); i++)
        {
View Full Code Here


                    CardSimList blocker = vMatch.getBattlefield(player).getSubListByType("Creature");
                    blocker = blocker.removeActivateable();
                    //blocker = vMatch.removeAllreadyBlocking(blocker);
                    blocker = blocker.onlyTapstate(false);

                    CombatSimNew csim = new CombatSimNew(possibleAttackers, blocker, c, false);
                    int blockerHealth = vMatch.getLife(player);

                    // TEST new Attacking!
                    CombatFormation attackFormation = csim.computeBestAttack(Weighting.DEFAULT, blockerHealth);

                    for (int a=0; a< attackFormation.singleFights.size(); a++)
                    {
                        CardSim at = attackFormation.singleFights.elementAt(a).attacker;
                        EAIAction attack = EAIAction.createDeclareAttackerAction(no++, at);
View Full Code Here

            CombatSimConfig c = new CombatSimConfig(E.aiPlayer);
            c.attackers = attacker;
            c.attackerLands = vMatch.getLand(E.pNumber);
            c.blockerLands = vMatch.getLand(opponentNo);

            CombatSimNew csim = new CombatSimNew(attacker, blocker, c, false);
            int blockerHealth = vMatch.getLife(opponentNo);

            int preventDamage = EAIHelper.getDamagePrevention(vMatch, player, vMatch.getBattlefield((player)));
            // TEST new Blocking!
            formation = csim.computeBestBlock(blockerHealth, Weighting.DEFAULT, preventDamage);
           
            if (formation != null)
            {
                blockerCache.put(blKey, formation);
            }
View Full Code Here

            c.attackers = attacker;
            c.attackerLands = vMatch.getLand(opponentNo);
            c.blockerLands = vMatch.getLand(playerNo);
            int blockerHealth = vMatch.getLife(playerNo);
           
            CombatSimNew csim = new CombatSimNew(attacker, blocker, c, false);

            // TEST new Blocking!
           
           
            int preventDamage = EAIHelper.getDamagePrevention(vMatch, (player+1)%2, vMatch.getBattlefield((player+1)%2));
           
           
            if (strategy == BLOCK_PLAYER_LEAST_CREATURE_DEAD)
                formation = csim.computeBestBlock(blockerHealth, Weighting.DEFAULT, preventDamage);
            else
                formation = csim.computeBestBlockHealth(blockerHealth, Weighting.DEFAULT, preventDamage);
            if (formation != null)
            {
                blockerCache.put(blKey, formation);
            }
            else
View Full Code Here

TOP

Related Classes of csa.jportal.ai.enhancedAI.enhancedSim.CombatSimNew

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.