- A little note is added to creatures that have to block an attacker (in case the player forgot who was targeted with provoke).

- Finished the basic trigger AI of AF MustBlock.
- Removed RemAIDeck SVar from some of the Provoke cards.
This commit is contained in:
Sloth
2011-10-19 09:54:57 +00:00
parent 9a47bfbcd3
commit d88363af84
8 changed files with 44 additions and 41 deletions

View File

@@ -285,11 +285,11 @@ public class CombatUtil {
attackersWithLure = attackersWithLure.getKeyword("All creatures able to block CARDNAME do so.");
for (Card attacker : attackersWithLure) {
if (canBlock(blocker, combat) && canBlock(attacker, blocker)) return true;
if (canBeBlocked(attacker, combat) && canBlock(attacker, blocker)) return true;
}
for (Card attacker : blocker.getMustBlockCards()) {
if (canBlock(blocker, combat) && canBlock(attacker, blocker)) return true;
if (canBeBlocked(attacker, combat) && canBlock(attacker, blocker)) return true;
}
return false;

View File

@@ -874,7 +874,7 @@ public final class AbilityFactory_Combat {
if (blocker == null)
return false;
abTgt.addTarget(CardFactoryUtil.AI_getBestCreature(list));
chance = false; //TODO:change this to true, once the human input takes mustblocks into account
chance = true; //TODO:change this to true, once the human input takes mustblocks into account
}
} else
return false;

View File

@@ -226,7 +226,7 @@ public class AbilityFactory_PermanentState {
// TODO: use Defined to determine, if this is an unfavorable result
ArrayList<Card> pDefined = AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa);
if (pDefined != null && pDefined.get(0).isUntapped())
if (pDefined != null && pDefined.get(0).isUntapped() && pDefined.get(0).getController().isComputer())
return false;
return true;

View File

@@ -340,6 +340,12 @@ public class CardDetailPanel extends JPanel implements CardContainer {
if (area.length() != 0) area.append("\n");
area.append("This card can't be cast.");
}
//must block
if (!card.getMustBlockCards().isEmpty()) {
if (area.length() != 0) area.append("\n");
area.append("Must block an attacker");
}
if (card.hasAttachedCardsByMindsDesire()) {
if (area.length() != 0) area.append("\n");