- Added an alias to AILogic Pump (AILogic BestOption) to ChooseGenericEffectAi for cards where this name of the logic makes more sense. Switched Catastrophe to using this AILogic name.

This commit is contained in:
Agetian
2017-07-11 07:09:52 +00:00
parent b69b6f1097
commit 89cfd0bbb0
2 changed files with 3 additions and 4 deletions

View File

@@ -39,8 +39,7 @@ public class ChooseGenericEffectAi extends SpellAbilityAi {
return true; return true;
} else if (aiLogic.startsWith("Fabricate")) { } else if (aiLogic.startsWith("Fabricate")) {
return true; return true;
} else if ("Pump".equals(aiLogic)) { } else if ("Pump".equals(aiLogic) || "BestOption".equals(aiLogic)) {
// or is that more generic?
for (AbilitySub sb : sa.getAdditionalAbilityList("Choices")) { for (AbilitySub sb : sa.getAdditionalAbilityList("Choices")) {
if (SpellApiToAi.Converter.get(sb.getApi()).canPlayAIWithSubs(ai, sb)) { if (SpellApiToAi.Converter.get(sb.getApi()).canPlayAIWithSubs(ai, sb)) {
return true; return true;
@@ -324,7 +323,7 @@ public class ChooseGenericEffectAi extends SpellAbilityAi {
int bestGuessDamage = totalCMC * 3 / revealedCards.size(); int bestGuessDamage = totalCMC * 3 / revealedCards.size();
return life <= bestGuessDamage ? spells.get(0) : spells.get(1); return life <= bestGuessDamage ? spells.get(0) : spells.get(1);
} else if ("Pump".equals(logic)) { } else if ("Pump".equals(logic) || "BestOption".equals(logic)) {
List<SpellAbility> filtered = Lists.newArrayList(); List<SpellAbility> filtered = Lists.newArrayList();
// filter first for the spells which can be done // filter first for the spells which can be done
for (SpellAbility sp : spells) { for (SpellAbility sp : spells) {

View File

@@ -1,7 +1,7 @@
Name:Catastrophe Name:Catastrophe
ManaCost:4 W W ManaCost:4 W W
Types:Sorcery Types:Sorcery
A:SP$ GenericChoice | Cost$ 4 W W | Choices$ DBKillLand,DBKillCreatures | Defined$ You | AILogic$ Pump | StackDescription$ SpellDescription | SpellDescription$ Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated. A:SP$ GenericChoice | Cost$ 4 W W | Choices$ DBKillLand,DBKillCreatures | Defined$ You | AILogic$ BestOption | StackDescription$ SpellDescription | SpellDescription$ Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated.
SVar:DBKillLand:DB$ DestroyAll | ValidCards$ Land | SpellDescription$ Destroy all lands. SVar:DBKillLand:DB$ DestroyAll | ValidCards$ Land | SpellDescription$ Destroy all lands.
SVar:DBKillCreatures:DB$ DestroyAll | ValidCards$ Creature | NoRegen$ True | SpellDescription$ Destroy all creatures. They can't be regenerated. SVar:DBKillCreatures:DB$ DestroyAll | ValidCards$ Creature | NoRegen$ True | SpellDescription$ Destroy all creatures. They can't be regenerated.
SVar:Picture:http://www.wizards.com/global/images/magic/general/catastrophe.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/catastrophe.jpg