mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Fixed Vaevictis Asmadi, the Dire AI targeting logic.
This commit is contained in:
@@ -481,6 +481,21 @@ public class PumpAi extends PumpAiBase {
|
|||||||
} else if (sa.getParam("AILogic").equals("DonateTargetPerm")) {
|
} else if (sa.getParam("AILogic").equals("DonateTargetPerm")) {
|
||||||
// Donate step 2 - target a donatable permanent.
|
// Donate step 2 - target a donatable permanent.
|
||||||
return SpecialCardAi.Donate.considerDonatingPermanent(ai, sa);
|
return SpecialCardAi.Donate.considerDonatingPermanent(ai, sa);
|
||||||
|
} else if (sa.getParam("AILogic").equals("SacOneEach")) {
|
||||||
|
// each player sacrifices one permanent, e.g. Vaevictis, Asmadi the Dire - grab the worst for allied and
|
||||||
|
// the best for opponents
|
||||||
|
sa.resetTargets();
|
||||||
|
for (Player p : game.getPlayers()) {
|
||||||
|
CardCollection targetable = CardLists.filter(p.getCardsIn(ZoneType.Battlefield), CardPredicates.isTargetableBy(sa));
|
||||||
|
if (!targetable.isEmpty()) {
|
||||||
|
if (p.isOpponentOf(ai)) {
|
||||||
|
sa.getTargets().add(ComputerUtilCard.getBestAI(targetable));
|
||||||
|
} else {
|
||||||
|
sa.getTargets().add(ComputerUtilCard.getWorstAI(targetable));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if (isFight) {
|
if (isFight) {
|
||||||
return FightAi.canFightAi(ai, sa, attack, defense);
|
return FightAi.canFightAi(ai, sa, attack, defense);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Legendary Creature Elder Dragon
|
|||||||
PT:6/6
|
PT:6/6
|
||||||
K:Flying
|
K:Flying
|
||||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigTarget | TriggerDescription$ Whenever CARDNAME attacks, for each player, choose target permanent that player controls. Those players sacrifice those permanents. Each player who sacrificed a permanent this way reveals the top card of their library, then puts it onto the battlefield if it's a permanent card.
|
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigTarget | TriggerDescription$ Whenever CARDNAME attacks, for each player, choose target permanent that player controls. Those players sacrifice those permanents. Each player who sacrificed a permanent this way reveals the top card of their library, then puts it onto the battlefield if it's a permanent card.
|
||||||
SVar:TrigTarget:DB$ Pump | ValidTgts$ Permanent | TgtPrompt$ Select target permanent a players controls to be sacrificed. | TargetMin$ OneEach | TargetMax$ OneEach | References$ OneEach | TargetsWithDifferentControllers$ True | SubAbility$ DBSacrificeAll
|
SVar:TrigTarget:DB$ Pump | ValidTgts$ Permanent | TgtPrompt$ Select target permanent a player controls to be sacrificed. | TargetMin$ OneEach | TargetMax$ OneEach | References$ OneEach | TargetsWithDifferentControllers$ True | SubAbility$ DBSacrificeAll | AILogic$ SacOneEach
|
||||||
SVar:DBSacrificeAll:DB$ SacrificeAll | Defined$ Targeted | RememberSacrificed$ True | SubAbility$ DBRepeatEach
|
SVar:DBSacrificeAll:DB$ SacrificeAll | Defined$ Targeted | RememberSacrificed$ True | SubAbility$ DBRepeatEach
|
||||||
SVar:DBRepeatEach:DB$ RepeatEach | DefinedCards$ Remembered | UseImprinted$ True | RepeatSubAbility$ DBDig | SubAbility$ DBCleanup
|
SVar:DBRepeatEach:DB$ RepeatEach | DefinedCards$ Remembered | UseImprinted$ True | RepeatSubAbility$ DBDig | SubAbility$ DBCleanup
|
||||||
SVar:DBDig:DB$ Dig | Defined$ ImprintedController | DigNum$ 1 | Reveal$ True | DestinationZone$ Battlefield | DestinationZone2$ Library | LibraryPosition2$ 0 | ChangeNum$ All | ChangeValid$ Permanent
|
SVar:DBDig:DB$ Dig | Defined$ ImprintedController | DigNum$ 1 | Reveal$ True | DestinationZone$ Battlefield | DestinationZone2$ Library | LibraryPosition2$ 0 | ChangeNum$ All | ChangeValid$ Permanent
|
||||||
|
|||||||
Reference in New Issue
Block a user