mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- 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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user