Fixed kicker costs not getting reset correctly (fixes #8495)

This commit is contained in:
Daniel Bomar 2021-12-03 19:10:02 -06:00
parent 17d9f080f9
commit a8f7cfa17d
No known key found for this signature in database
GPG key ID: C86C8658F4023918

View file

@ -115,18 +115,11 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
});
}
public void resetKicker(Game game, Ability source) {
private void resetKicker() {
for (OptionalAdditionalCost cost : kickerCosts) {
cost.reset();
}
String key = getActivationKey(source, "", game);
for (Iterator<String> iterator = activations.keySet().iterator(); iterator.hasNext(); ) {
String activationKey = iterator.next();
if (activationKey.startsWith(key)
&& activations.get(activationKey) > 0) {
activations.put(key, 0);
}
}
activations.clear();
}
private int getKickedCounterStrict(Game game, Ability source, String needKickerCost) {
@ -241,7 +234,7 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
if (ability instanceof SpellAbility) {
Player player = game.getPlayer(ability.getControllerId());
if (player != null) {
this.resetKicker(game, ability);
this.resetKicker();
for (OptionalAdditionalCost kickerCost : kickerCosts) {
boolean again = true;
while (player.canRespond() && again) {