Merge branch 'fixghired' into 'master'

Fix some cards failing to target for X=0

See merge request core-developers/forge!4601
This commit is contained in:
Michael Kamensky
2021-04-27 04:50:01 +00:00
2 changed files with 2 additions and 3 deletions

View File

@@ -302,7 +302,7 @@ public class TargetRestrictions {
*/
public final boolean isMinTargetsChosen(final Card c, final SpellAbility sa) {
int min = getMinTargets(c, sa);
if (min == 0) {
if (min == 0 || (sa.isDividedAsYouChoose() && sa.getDividedValue() == 0)) {
return true;
}
return min <= sa.getTargets().size();

View File

@@ -1,10 +1,9 @@
Name:Conflagrate
ManaCost:X X R
Types:Sorcery
A:SP$ DealDamage | Cost$ X X R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target to distribute damage to | NumDmg$ X | TargetMin$ Min | TargetMax$ MaxTgts | DividedAsYouChoose$ X | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of targets.
A:SP$ DealDamage | Cost$ X X R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target to distribute damage to | NumDmg$ X | TargetMin$ 1 | TargetMax$ MaxTgts | DividedAsYouChoose$ X | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of targets.
SVar:MaxTgts:PlayerCountPlayers$Amount/Plus.NumCreatures
SVar:NumCreatures:Count$Valid Creature,Planeswalker
SVar:Min:SVar$X/LimitMax.1
SVar:X:Count$xPaid
K:Flashback:R R Discard<X/Card/card>
Oracle:Conflagrate deals X damage divided as you choose among any number of targets.\nFlashback—{R}{R}, Discard X cards. (You may cast this card from your graveyard for its flashback cost. Then exile it.)