mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Fixed kicker costs not getting reset correctly (fixes #8495)
This commit is contained in:
parent
17d9f080f9
commit
a8f7cfa17d
1 changed files with 3 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue