Merge branch 'reset' into 'master'

Clear manaPaid before Targeting

See merge request core-developers/forge!5203
This commit is contained in:
Michael Kamensky
2021-08-08 16:53:44 +00:00
3 changed files with 4 additions and 2 deletions

View File

@@ -155,7 +155,6 @@ public class CostPartMana extends CostPart {
@Override
public boolean payAsDecided(Player payer, PaymentDecision pd, SpellAbility sa) {
// TODO Auto-generated method stub
sa.clearManaPaid();
// decision not used here, the whole payment is interactive!

View File

@@ -3,5 +3,5 @@ ManaCost:2 B
Types:Legendary Creature Demon Rogue
K:Deathtouch
PT:2/3
A:AB$ ChangeZone | Cost$ 1 B | ValidTgts$ Player | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | Mandatory$ True | ChangeType$ Card | ChangeNum$ 1 | Boast$ True | SpellDescription$ Target player searches their library for a card, then shuffles their library and puts that card on top of it.
A:AB$ ChangeZone | Cost$ 1 B | ValidTgts$ Player | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | Mandatory$ True | ChangeType$ Card | ChangeNum$ 1 | Boast$ True | Chooser$ Targeted | SpellDescription$ Target player searches their library for a card, then shuffles their library and puts that card on top of it.
Oracle:Deathtouch\nBoast — {1}{B}: Target player searches their library for a card, then shuffles and puts that card on top. (Activate only if this creature attacked this turn and only once each turn.)

View File

@@ -144,6 +144,9 @@ public class HumanPlaySpellAbility {
}
}
// reset is also done early here, because if an ability is canceled from targeting it might otherwise lead to refunding mana from earlier cast
ability.clearManaPaid();
// This line makes use of short-circuit evaluation of boolean values, that is each subsequent argument
// is only executed or evaluated if the first argument does not suffice to determine the value of the expression
// because of Selective Snare do announceType first