- For Dragon's Fire, only reveal stuff if power is 4 or greater.

This commit is contained in:
Agetian
2023-06-12 18:39:33 +03:00
parent 83b8cacdd4
commit 4b9ff0d23f
2 changed files with 9 additions and 2 deletions

View File

@@ -471,10 +471,17 @@ public class AiCostDecision extends CostDecisionMakerBase {
}
if (cost.getRevealFrom().size() == 2 && cost.getRevealFrom().containsAll(Arrays.asList(ZoneType.Hand, ZoneType.Battlefield))) { // RevealOrChoose
String aiLogic = ability.getParamOrDefault("AILogic", "");
CardCollection battlefieldOrHand = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield),
type.split(";"), player, source, ability);
battlefieldOrHand.addAll(CardLists.getValidCards(hand, type.split(";"), player, source, ability));
return PaymentDecision.card(getBestCreatureAI(battlefieldOrHand));
if (aiLogic.startsWith("PowerAtLeast.")) {
int minPower = Integer.parseInt(aiLogic.substring(aiLogic.indexOf(".") + 1));
battlefieldOrHand = CardLists.filterPower(battlefieldOrHand, minPower);
}
return battlefieldOrHand.isEmpty() ? null : PaymentDecision.card(getBestCreatureAI(battlefieldOrHand));
}
if (cost.getType().equals("SameColor")) {

View File

@@ -2,7 +2,7 @@ Name:Dragon's Fire
ManaCost:1 R
Types:Instant
K:Kicker:RevealOrChoose<1/Dragon>:Generic
A:SP$ DealDamage | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ Y | SpellDescription$ CARDNAME deals 3 damage to target creature or planeswalker. If you revealed a Dragon card or chose a Dragon as you cast this spell, CARDNAME deals damage equal to the power of that card or creature instead.
A:SP$ DealDamage | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ Y | AILogic$ PowerAtLeast.4 | SpellDescription$ CARDNAME deals 3 damage to target creature or planeswalker. If you revealed a Dragon card or chose a Dragon as you cast this spell, CARDNAME deals damage equal to the power of that card or creature instead.
SVar:Y:Count$OptionalGenericCostPaid.X.3
SVar:X:Revealed$CardPower
Oracle:As an additional cost to cast this spell, you may reveal a Dragon card from your hand or choose a Dragon you control.\nDragon's Fire deals 3 damage to target creature or planeswalker. If you revealed a Dragon card or chose a Dragon as you cast this spell, Dragon's Fire deals damage equal to the power of that card or creature instead.