It is currently 24 Apr 2024, 23:37
   
Text Size

Fix for Defense of the Heart

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Fix for Defense of the Heart

Postby jpb » 09 Jan 2009, 07:26

Nixrage pointed out that the computer was not picking it's own creatures when it sacrificed Defense of the Heart. To fix this replace the current getCreatureFromLibrary method in GameActionUtil.java with the following one.

Code: Select all
              public Card getCreatureFromLibrary(){
                 PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());

                 CardList creatureList = new CardList(library.getCards());
                 creatureList = creatureList.getType("Creature");

                 if(Constant.Player.Computer.equals(card.getController())){
                    return CardFactoryUtil.AI_getBestCreature(creatureList);
                 }
                 else{
                    Object o = AllZone.Display.getChoiceOptional("Choose a creature card", creatureList.toArray());
                    if(o != null)
                    {
                       Card creature = (Card)o;
                       return creature;
                    }
                    else{
                       return null;
                    }
                 }
              }
jpb
 
Posts: 132
Joined: 05 Sep 2008, 13:12
Has thanked: 0 time
Been thanked: 0 time

Return to Forge

Who is online

Users browsing this forum: No registered users and 125 guests


Who is online

In total there are 125 users online :: 0 registered, 0 hidden and 125 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 125 guests

Login Form