- 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

@@ -5,7 +5,6 @@ Text:no text
PT:5/3 PT:5/3
K:Trample K:Trample
K:Provoke K:Provoke
SVar:RemAIDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/brontotherium.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/brontotherium.jpg
SetInfo:LGN|Uncommon|http://magiccards.info/scans/en/le/119.jpg SetInfo:LGN|Uncommon|http://magiccards.info/scans/en/le/119.jpg

View File

@@ -5,7 +5,6 @@ Text:no text
PT:3/2 PT:3/2
K:Provoke K:Provoke
K:CARDNAME can't be blocked by more than one creature. K:CARDNAME can't be blocked by more than one creature.
SVar:RemAIDeck:True
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/krosan_vorine.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/krosan_vorine.jpg
SetInfo:LGN|Common|http://magiccards.info/scans/en/le/131.jpg SetInfo:LGN|Common|http://magiccards.info/scans/en/le/131.jpg

View File

@@ -5,7 +5,6 @@ Text:no text
PT:2/2 PT:2/2
K:First Strike K:First Strike
K:Provoke K:Provoke
SVar:RemAIDeck:True
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/lowland_tracker.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/lowland_tracker.jpg
SetInfo:LGN|Common|http://magiccards.info/scans/en/le/17.jpg SetInfo:LGN|Common|http://magiccards.info/scans/en/le/17.jpg

View File

@@ -285,11 +285,11 @@ public class CombatUtil {
attackersWithLure = attackersWithLure.getKeyword("All creatures able to block CARDNAME do so."); attackersWithLure = attackersWithLure.getKeyword("All creatures able to block CARDNAME do so.");
for (Card attacker : attackersWithLure) { 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()) { 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; return false;

View File

@@ -874,7 +874,7 @@ public final class AbilityFactory_Combat {
if (blocker == null) if (blocker == null)
return false; return false;
abTgt.addTarget(CardFactoryUtil.AI_getBestCreature(list)); 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 } else
return false; return false;

View File

@@ -226,7 +226,7 @@ public class AbilityFactory_PermanentState {
// TODO: use Defined to determine, if this is an unfavorable result // TODO: use Defined to determine, if this is an unfavorable result
ArrayList<Card> pDefined = AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa); 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 false;
return true; return true;

View File

@@ -341,6 +341,12 @@ public class CardDetailPanel extends JPanel implements CardContainer {
area.append("This card can't be cast."); 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 (card.hasAttachedCardsByMindsDesire()) {
if (area.length() != 0) area.append("\n"); if (area.length() != 0) area.append("\n");
Card[] cards = card.getAttachedCardsByMindsDesire(); Card[] cards = card.getAttachedCardsByMindsDesire();