This commit is contained in:
TRT
2022-11-29 15:31:35 +01:00
parent cf2e294542
commit 56963e6d07
2 changed files with 6 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ import forge.game.card.CardCollection;
import forge.game.card.CardCollectionView;
import forge.game.card.CardLists;
import forge.game.card.CardPredicates;
import forge.game.card.CardUtil;
import forge.game.combat.Combat;
import forge.game.combat.CombatUtil;
import forge.game.phase.PhaseHandler;
@@ -216,8 +217,10 @@ public class EffectAi extends SpellAbilityAi {
} else if (logic.equals("Fight")) {
return FightAi.canFightAi(ai, sa, 0, 0);
} else if (logic.equals("Pump")) {
CardCollection options = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), sa.getTargetRestrictions().getValidTgts(), ai, sa.getHostCard(), sa);
options = CardLists.getTargetableCards(options, sa);
List<Card> options = CardUtil.getValidCardsToTarget(sa.getTargetRestrictions(), sa);
if (sa.getPayCosts().hasTapCost()) {
options.remove(sa.getHostCard());
}
if (!options.isEmpty() && phase.isPlayerTurn(ai) && phase.getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) {
sa.getTargets().add(ComputerUtilCard.getBestCreatureAI(options));
return true;

View File

@@ -4,6 +4,6 @@ Types:Creature Goblin Warrior
PT:2/2
A:AB$ RollDice | Cost$ 3 G | ResultSVar$ X | SubAbility$ DBPump | AILogic$ Combat | SpellDescription$ Roll a six-sided die.
SVar:DBPump:DB$ Pump | Defined$ Self | NumAtt$ X | NumDef$ X | SpellDescription$ CARDNAME gets +X/+X until end of turn, where X is the result.
T:Mode$ RolledDie | Execute$ TrigTrample | ValidPlayer$ You | ValidResult$ GE5 | TriggerDescription$ Whenever you roll a 5 or higher on a die, CARDNAME gains trample until end of turn.
T:Mode$ RolledDie | TriggerZones$ Battlefield | Execute$ TrigTrample | ValidPlayer$ You | ValidResult$ GE5 | TriggerDescription$ Whenever you roll a 5 or higher on a die, CARDNAME gains trample until end of turn.
SVar:TrigTrample:DB$ Pump | Defined$ Self | KW$ Trample
Oracle:{3}{G}: Roll a six-sided die. Ground Pounder gets +X/+X until end of turn, where X is the result.\nWhenever you roll a 5 or higher on a die, Ground Pounder gains trample until end of turn.