mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Merge branch 'pumping' into 'master'
Rework Fell the Mighty without Pump See merge request core-developers/forge!5817
This commit is contained in:
@@ -66,7 +66,32 @@ public class DestroyAllAi extends SpellAbilityAi {
|
|||||||
if (ComputerUtil.preventRunAwayActivations(sa)) {
|
if (ComputerUtil.preventRunAwayActivations(sa)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final String aiLogic = sa.getParamOrDefault("AILogic", "");
|
||||||
|
|
||||||
|
if ("FellTheMighty".equals(aiLogic)) {
|
||||||
|
CardCollection aiList = ai.getCreaturesInPlay();
|
||||||
|
if (aiList.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CardLists.sortByPowerAsc(aiList);
|
||||||
|
Card lowest = aiList.get(0);
|
||||||
|
if (!sa.canTarget(lowest)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CardCollection oppList = CardLists.filter(ai.getGame().getCardsIn(ZoneType.Battlefield),
|
||||||
|
CardPredicates.Presets.CREATURES, CardPredicates.isControlledByAnyOf(ai.getOpponents()));
|
||||||
|
|
||||||
|
oppList = CardLists.filterPower(oppList, lowest.getNetPower() + 1);
|
||||||
|
if (ComputerUtilCard.evaluateCreatureList(oppList) > 200) {
|
||||||
|
sa.resetTargets();
|
||||||
|
sa.getTargets().add(lowest);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return doMassRemovalLogic(ai, sa);
|
return doMassRemovalLogic(ai, sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,16 +36,7 @@ public class PumpAi extends PumpAiBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) {
|
protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) {
|
||||||
if ("FellTheMighty".equals(aiLogic)) {
|
if ("MoveCounter".equals(aiLogic)) {
|
||||||
CardCollection aiList = ai.getCreaturesInPlay();
|
|
||||||
if (aiList.isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
CardLists.sortByPowerAsc(aiList);
|
|
||||||
if (!sa.canTarget(aiList.get(0))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else if ("MoveCounter".equals(aiLogic)) {
|
|
||||||
final Game game = ai.getGame();
|
final Game game = ai.getGame();
|
||||||
List<Card> tgtCards = CardLists.filter(game.getCardsIn(ZoneType.Battlefield),
|
List<Card> tgtCards = CardLists.filter(game.getCardsIn(ZoneType.Battlefield),
|
||||||
CardPredicates.isTargetableBy(sa));
|
CardPredicates.isTargetableBy(sa));
|
||||||
@@ -258,20 +249,6 @@ public class PumpAi extends PumpAiBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if ("FellTheMighty".equals(aiLogic)) {
|
|
||||||
CardCollection aiList = ai.getCreaturesInPlay();
|
|
||||||
CardLists.sortByPowerAsc(aiList);
|
|
||||||
Card lowest = aiList.get(0);
|
|
||||||
|
|
||||||
CardCollection oppList = CardLists.filter(game.getCardsIn(ZoneType.Battlefield),
|
|
||||||
CardPredicates.Presets.CREATURES, CardPredicates.isControlledByAnyOf(ai.getOpponents()));
|
|
||||||
|
|
||||||
oppList = CardLists.filterPower(oppList, lowest.getNetPower() + 1);
|
|
||||||
if (ComputerUtilCard.evaluateCreatureList(oppList) > 200) {
|
|
||||||
sa.resetTargets();
|
|
||||||
sa.getTargets().add(lowest);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else if (aiLogic.startsWith("Donate")) {
|
} else if (aiLogic.startsWith("Donate")) {
|
||||||
// Donate step 1 - try to target an opponent, preferably one who does not have a donate target yet
|
// Donate step 1 - try to target an opponent, preferably one who does not have a donate target yet
|
||||||
return SpecialCardAi.Donate.considerTargetingOpponent(ai, sa);
|
return SpecialCardAi.Donate.considerTargetingOpponent(ai, sa);
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
Name:Fell the Mighty
|
Name:Fell the Mighty
|
||||||
ManaCost:4 W
|
ManaCost:4 W
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ Pump | Cost$ 4 W | ValidTgts$ Creature | StackDescription$ None | SubAbility$ DBDestroy | AILogic$ FellTheMighty | SpellDescription$ Destroy all creatures with power greater than target creature's power.
|
A:SP$ DestroyAll | ValidCards$ Creature.powerGTX | Cost$ 4 W | ValidTgts$ Creature | AILogic$ FellTheMighty | SpellDescription$ Destroy all creatures with power greater than target creature's power.
|
||||||
SVar:DBDestroy:DB$ DestroyAll | ValidCards$ Creature.powerGTX
|
SVar:X:Targeted$CardPower
|
||||||
SVar:X:ParentTargeted$CardPower
|
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/fell_the_mighty.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/fell_the_mighty.jpg
|
||||||
Oracle:Destroy all creatures with power greater than target creature's power.
|
Oracle:Destroy all creatures with power greater than target creature's power.
|
||||||
|
|||||||
Reference in New Issue
Block a user