Examples of CombatFormation


Examples of csa.jportal.ai.standardAI.sim.CombatFormation

        CombatSim cs = new CombatSim(attackerPlayer, defenderOpponent);
        CombatSim.attackerLands = myLands ;
        CombatSim.blockerLands = opponentLands;

        // we think our opponent is VERY smart - > 10 (out of 10)
        CombatFormation as = cs.simDefensiveBlocker(10, 0);
        if (intellligence == 10)
        {
            int opponentLife = Match.match.getLife(Match.match.getOpponent(Match.match.getOwner(myCreatures.getCard(0))));

            if (as != null)
View Full Code Here

Examples of csa.jportal.ai.standardAI.sim.CombatFormation

    /** Defensive Blocker means, little damage to player as possible, and not much blocker die during attack
     * -> but also not much attackers will die
     */
    public static CombatFormation getDefensiveBlocker(CardList myCreatures, CardList attackerOpponent, CardList myLands, CardList opponentLands, int minorMood, int intellligence)
    {
        CombatFormation result = new CombatFormation();
        if (myCreatures.size()==0) return result;
        if (attackerOpponent.size() == 0)
        {
            //System.out.println("Unused blocker: " +myCreatures);
            return result;
        }

        CardList defenderPlayer = myCreatures.getSubListTapState(false);
        if (intellligence > 7) defenderPlayer = removeWithHint(defenderPlayer, "CAN_BE_TAPPED_INSTEAD_ATTACK");

        CombatSim cs = new CombatSim(attackerOpponent, defenderPlayer);
        CombatSim.attackerLands = opponentLands;
        CombatSim.blockerLands = myLands;

        result = cs.simDefensiveBlocker(intellligence, minorMood);
        if (result==null)
            return new CombatFormation();;
        return result;
    }
View Full Code Here

Examples of csa.jportal.ai.standardAI.sim.CombatFormation

            return new CombatFormation();;
        return result;
    }
    public static CombatFormation getMediumBlocker(CardList myCreatures, CardList attackerOpponent, CardList myLands, CardList opponentLands, int minorMood, int intellligence)
    {
        CombatFormation result = new CombatFormation();
        if (myCreatures.size()==0) return result;
        if (attackerOpponent.size() == 0)
        {
            //System.out.println("Unused blocker: " +myCreatures);
            return result;
        }
        CardList defenderPlayer = myCreatures.getSubListTapState(false);
        if (intellligence > 5) defenderPlayer = removeWithHint(defenderPlayer, "CAN_BE_TAPPED_INSTEAD_ATTACK");

        CombatSim cs = new CombatSim(attackerOpponent, defenderPlayer);
        CombatSim.attackerLands = opponentLands;
        CombatSim.blockerLands = myLands;

        result = cs.simMediumBlocker(intellligence, minorMood);
        int myLife = Match.match.getLife(Match.match.getOwner(myCreatures.getCard(0)));

        if (result != null)
        if (result.attackerDead == 0)
        {
            if (result.blockerDead > 0)
            if (result.blockerManaDead / result.blockerDead >4 )
            {
                if (myLife - result.getAllAttackerDamage() >0)
                result = null;
            }
        }

        if (result != null)
        if (result.playerDamage > myLife)
        {
            return getDefensiveBlocker(myCreatures, attackerOpponent, myLands, opponentLands, minorMood, intellligence);
        }
        if (result==null)
            return new CombatFormation();;
        return result;
    }
View Full Code Here

Examples of csa.jportal.ai.standardAI.sim.CombatFormation

     */
     // opponent creatures should only be attackers to make sense!
    public static CombatFormation getAgressiveBlocker(CardList myCreatures, CardList attackerOpponent, CardList myLands, CardList opponentLands, int minorMood, int intellligence)
    {
        Logable D = Configuration.getConfiguration().getDebugEntity();
        CombatFormation result = new CombatFormation();
        if (myCreatures.size()==0) return result;
        if (attackerOpponent.size() == 0)
        {
            //System.out.println("Unused blocker: " +myCreatures);
            return result;
        }
        CardList defenderPlayer = myCreatures.getSubListTapState(false);
        if (intellligence > 3) defenderPlayer = removeWithHint(defenderPlayer, "CAN_BE_TAPPED_INSTEAD_ATTACK");

        CombatSim cs = new CombatSim(attackerOpponent, defenderPlayer);
        CombatSim.attackerLands = opponentLands;
        CombatSim.blockerLands = myLands;

        result = cs.simAgressiveBlocker(intellligence, minorMood);
        int myLife = Match.match.getLife(Match.match.getOwner(myCreatures.getCard(0)));

        if (result != null)
        if (result.attackerDead == 0)
        {
            D.addLog("No attacker dead!",3);
            if (result.blockerDead > 0)
            {
                D.addLog("But blocker dead!",3);
                if (result.blockerManaDead / result.blockerDead >4 )
                {
                    D.addLog("Attacker will damage player for: "+result.getAllAttackerDamage(),3);
                    D.addLog("Attacker will damage player for2: "+result.playerDamage,3);
                    D.addLog("player Life: "+myLife,3);
                    if (myLife - result.getAllAttackerDamage() >0)
                    {
                        D.addLog("Player damage accepted",3);
                        result = null;
                    }
                }
            }
        }

        if (result != null)
        if (result.playerDamage > myLife)
        {
            return getMediumBlocker(myCreatures, attackerOpponent, myLands, opponentLands, minorMood, intellligence);
        }

        if (result==null)
            return new CombatFormation();
        return result;
   }
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.