mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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;
|
return kickerCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetKicker() {
|
public void resetKicker(Game game, Ability source) {
|
||||||
|
String key = getActivationKey(source, "", game);
|
||||||
|
activations.remove(key);
|
||||||
for (OptionalAdditionalCost cost: kickerCosts) {
|
for (OptionalAdditionalCost cost: kickerCosts) {
|
||||||
cost.reset();
|
cost.reset();
|
||||||
}
|
}
|
||||||
|
@ -196,13 +198,13 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
|
||||||
if (ability instanceof SpellAbility) {
|
if (ability instanceof SpellAbility) {
|
||||||
Player player = game.getPlayer(controllerId);
|
Player player = game.getPlayer(controllerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
this.resetKicker();
|
this.resetKicker(game, ability);
|
||||||
for (OptionalAdditionalCost kickerCost: kickerCosts) {
|
for (OptionalAdditionalCost kickerCost: kickerCosts) {
|
||||||
boolean again = true;
|
boolean again = true;
|
||||||
while (player.isInGame() && again) {
|
while (player.isInGame() && again) {
|
||||||
String times = "";
|
String times = "";
|
||||||
if (kickerCost.isRepeatable()) {
|
if (kickerCost.isRepeatable()) {
|
||||||
int activatedCount = kickerCost.getActivateCount();
|
int activatedCount = getKickedCounter(game, ability);
|
||||||
times = Integer.toString(activatedCount + 1) + (activatedCount == 0 ? " time ":" times ");
|
times = Integer.toString(activatedCount + 1) + (activatedCount == 0 ? " time ":" times ");
|
||||||
}
|
}
|
||||||
if (kickerCost.canPay(ability, sourceId, controllerId, game) &&
|
if (kickerCost.canPay(ability, sourceId, controllerId, game) &&
|
||||||
|
|
Loading…
Reference in a new issue