mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Multikicker bugfix
This commit is contained in:
@@ -381,7 +381,7 @@ public class GameActionPlay {
|
|||||||
ability = ability.getSubAbility();
|
ability = ability.getSubAbility();
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("Playing:" + sa.getDescription() + " of " + sa.getSourceCard() + " new = " + newAbility);
|
// System.out.println("Playing:" + sa.getDescription() + " of " + sa.getSourceCard() + " new = " + newAbility);
|
||||||
if (newAbility) {
|
if (newAbility) {
|
||||||
final TargetSelection ts = new TargetSelection(sa.getTarget(), sa);
|
final TargetSelection ts = new TargetSelection(sa.getTarget(), sa);
|
||||||
CostPayment payment = null;
|
CostPayment payment = null;
|
||||||
|
|||||||
@@ -519,23 +519,13 @@ public class MagicStack extends MyObservable {
|
|||||||
// both X and multi is not supported yet
|
// both X and multi is not supported yet
|
||||||
|
|
||||||
final SpellAbility sa = sp;
|
final SpellAbility sa = sp;
|
||||||
final Ability ability = new Ability(sp.getSourceCard(), sp.getMultiKickerManaCost()) {
|
final Ability abilityIncreaseMultikicker = new Ability(sp.getSourceCard(), sp.getMultiKickerManaCost()) {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
this.getSourceCard().addMultiKickerMagnitude(1);
|
this.getSourceCard().addMultiKickerMagnitude(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
final Command unpaidCommand = new Command() {
|
|
||||||
private static final long serialVersionUID = -3342222770086269767L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
|
||||||
MagicStack.this.push(sa);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
Player activating = sp.getActivatingPlayer();
|
Player activating = sp.getActivatingPlayer();
|
||||||
|
|
||||||
if (activating.isHuman()) {
|
if (activating.isHuman()) {
|
||||||
@@ -545,9 +535,9 @@ public class MagicStack extends MyObservable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
ability.resolve();
|
abilityIncreaseMultikicker.resolve();
|
||||||
|
|
||||||
final ManaCostBeingPaid manaCost = MagicStack.this.getMultiKickerSpellCostChange(ability);
|
final ManaCostBeingPaid manaCost = MagicStack.this.getMultiKickerSpellCostChange(abilityIncreaseMultikicker);
|
||||||
|
|
||||||
if (manaCost.isPaid()) {
|
if (manaCost.isPaid()) {
|
||||||
this.execute();
|
this.execute();
|
||||||
@@ -567,8 +557,7 @@ public class MagicStack extends MyObservable {
|
|||||||
if ( toSet.isPaid() ) {
|
if ( toSet.isPaid() ) {
|
||||||
this.execute();
|
this.execute();
|
||||||
} else
|
} else
|
||||||
unpaidCommand.execute();
|
MagicStack.this.push(sa);
|
||||||
Singletons.getModel().getMatch().getInput().setInput(toSet);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -576,8 +565,8 @@ public class MagicStack extends MyObservable {
|
|||||||
} else {
|
} else {
|
||||||
// computer
|
// computer
|
||||||
|
|
||||||
while (ComputerUtilCost.canPayCost(ability, activating)) {
|
while (ComputerUtilCost.canPayCost(abilityIncreaseMultikicker, activating)) {
|
||||||
ComputerUtil.playNoStack((AIPlayer)activating, ability, game);
|
ComputerUtil.playNoStack((AIPlayer)activating, abilityIncreaseMultikicker, game);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.push(sa);
|
this.push(sa);
|
||||||
|
|||||||
Reference in New Issue
Block a user