mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Kicker - Fixed that multikicker activation number was not reset after canceled cast.
This commit is contained in:
parent
bcd81309e9
commit
259ef3aed5
1 changed files with 5 additions and 3 deletions
|
@ -141,7 +141,9 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
|
|||
return kickerCost;
|
||||
}
|
||||
|
||||
public void resetKicker() {
|
||||
public void resetKicker(Game game, Ability source) {
|
||||
String key = getActivationKey(source, "", game);
|
||||
activations.remove(key);
|
||||
for (OptionalAdditionalCost cost: kickerCosts) {
|
||||
cost.reset();
|
||||
}
|
||||
|
@ -196,13 +198,13 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
|
|||
if (ability instanceof SpellAbility) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
if (player != null) {
|
||||
this.resetKicker();
|
||||
this.resetKicker(game, ability);
|
||||
for (OptionalAdditionalCost kickerCost: kickerCosts) {
|
||||
boolean again = true;
|
||||
while (player.isInGame() && again) {
|
||||
String times = "";
|
||||
if (kickerCost.isRepeatable()) {
|
||||
int activatedCount = kickerCost.getActivateCount();
|
||||
int activatedCount = getKickedCounter(game, ability);
|
||||
times = Integer.toString(activatedCount + 1) + (activatedCount == 0 ? " time ":" times ");
|
||||
}
|
||||
if (kickerCost.canPay(ability, sourceId, controllerId, game) &&
|
||||
|
|
Loading…
Reference in a new issue