mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- The AI will now predict P/T changes from effects in the command zone (like Jace, Architect of Thought's +1 ability).
This commit is contained in:
@@ -757,6 +757,7 @@ public class ComputerUtilCombat {
|
|||||||
// look out for continuous static abilities that only care for blocking
|
// look out for continuous static abilities that only care for blocking
|
||||||
// creatures
|
// creatures
|
||||||
final List<Card> cardList = game.getCardsIn(ZoneType.Battlefield);
|
final List<Card> cardList = game.getCardsIn(ZoneType.Battlefield);
|
||||||
|
cardList.addAll(game.getCardsIn(ZoneType.Command));
|
||||||
for (final Card card : cardList) {
|
for (final Card card : cardList) {
|
||||||
for (final StaticAbility stAb : card.getStaticAbilities()) {
|
for (final StaticAbility stAb : card.getStaticAbilities()) {
|
||||||
final Map<String, String> params = stAb.getMapParams();
|
final Map<String, String> params = stAb.getMapParams();
|
||||||
@@ -786,6 +787,9 @@ public class ComputerUtilCombat {
|
|||||||
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
||||||
theTriggers.addAll(card.getTriggers());
|
theTriggers.addAll(card.getTriggers());
|
||||||
}
|
}
|
||||||
|
for (Card card : game.getCardsIn(ZoneType.Command)) {
|
||||||
|
theTriggers.addAll(card.getTriggers());
|
||||||
|
}
|
||||||
theTriggers.addAll(attacker.getTriggers());
|
theTriggers.addAll(attacker.getTriggers());
|
||||||
for (final Trigger trigger : theTriggers) {
|
for (final Trigger trigger : theTriggers) {
|
||||||
final Map<String, String> trigParams = trigger.getMapParams();
|
final Map<String, String> trigParams = trigger.getMapParams();
|
||||||
@@ -904,6 +908,9 @@ public class ComputerUtilCombat {
|
|||||||
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
||||||
theTriggers.addAll(card.getTriggers());
|
theTriggers.addAll(card.getTriggers());
|
||||||
}
|
}
|
||||||
|
for (Card card : game.getCardsIn(ZoneType.Command)) {
|
||||||
|
theTriggers.addAll(card.getTriggers());
|
||||||
|
}
|
||||||
theTriggers.addAll(attacker.getTriggers());
|
theTriggers.addAll(attacker.getTriggers());
|
||||||
for (final Trigger trigger : theTriggers) {
|
for (final Trigger trigger : theTriggers) {
|
||||||
final Map<String, String> trigParams = trigger.getMapParams();
|
final Map<String, String> trigParams = trigger.getMapParams();
|
||||||
@@ -1050,6 +1057,9 @@ public class ComputerUtilCombat {
|
|||||||
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
||||||
theTriggers.addAll(card.getTriggers());
|
theTriggers.addAll(card.getTriggers());
|
||||||
}
|
}
|
||||||
|
for (Card card : game.getCardsIn(ZoneType.Command)) {
|
||||||
|
theTriggers.addAll(card.getTriggers());
|
||||||
|
}
|
||||||
// if the defender has first strike and wither the attacker will deal
|
// if the defender has first strike and wither the attacker will deal
|
||||||
// less damage than expected
|
// less damage than expected
|
||||||
if (null != blocker) {
|
if (null != blocker) {
|
||||||
@@ -1065,6 +1075,7 @@ public class ComputerUtilCombat {
|
|||||||
// look out for continuous static abilities that only care for attacking
|
// look out for continuous static abilities that only care for attacking
|
||||||
// creatures
|
// creatures
|
||||||
final List<Card> cardList = game.getCardsIn(ZoneType.Battlefield);
|
final List<Card> cardList = game.getCardsIn(ZoneType.Battlefield);
|
||||||
|
cardList.addAll(game.getCardsIn(ZoneType.Command));
|
||||||
for (final Card card : cardList) {
|
for (final Card card : cardList) {
|
||||||
for (final StaticAbility stAb : card.getStaticAbilities()) {
|
for (final StaticAbility stAb : card.getStaticAbilities()) {
|
||||||
final Map<String, String> params = stAb.getMapParams();
|
final Map<String, String> params = stAb.getMapParams();
|
||||||
@@ -1227,6 +1238,9 @@ public class ComputerUtilCombat {
|
|||||||
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
for (Card card : game.getCardsIn(ZoneType.Battlefield)) {
|
||||||
theTriggers.addAll(card.getTriggers());
|
theTriggers.addAll(card.getTriggers());
|
||||||
}
|
}
|
||||||
|
for (Card card : game.getCardsIn(ZoneType.Command)) {
|
||||||
|
theTriggers.addAll(card.getTriggers());
|
||||||
|
}
|
||||||
if (blocker != null) {
|
if (blocker != null) {
|
||||||
toughness += attacker.getKeywordMagnitude("Bushido");
|
toughness += attacker.getKeywordMagnitude("Bushido");
|
||||||
theTriggers.addAll(blocker.getTriggers());
|
theTriggers.addAll(blocker.getTriggers());
|
||||||
|
|||||||
Reference in New Issue
Block a user