mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Fixed Replicate.
This commit is contained in:
@@ -1111,7 +1111,7 @@ public class AbilityUtils {
|
||||
}
|
||||
} else {
|
||||
// if it's paid by the AI already the human can pay, but it won't change anything
|
||||
paid |= HumanPlay.payCostDuringAbilityResolve(payer, source, cost, sa);
|
||||
paid |= HumanPlay.payCostDuringAbilityResolve(payer, source, cost, sa, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,8 @@ public class HumanPlay {
|
||||
* a {@link forge.Command} object.
|
||||
* @param sourceAbility TODO
|
||||
*/
|
||||
public static boolean payCostDuringAbilityResolve(final Player p, final Card source, final Cost cost, SpellAbility sourceAbility) {
|
||||
public static boolean payCostDuringAbilityResolve(final Player p, final Card source, final Cost cost, SpellAbility sourceAbility
|
||||
, String prompt) {
|
||||
|
||||
// Only human player pays this way
|
||||
Card current = null; // Used in spells with RepeatEach effect to distinguish cards, Cut the Tethers
|
||||
@@ -296,8 +297,6 @@ public class HumanPlay {
|
||||
current = source.getImprinted().get(0);
|
||||
}
|
||||
|
||||
String promptCurrent = current == null ? "" : "Current Card: " + current + "\r\n";
|
||||
|
||||
final List<CostPart> parts = cost.getCostParts();
|
||||
ArrayList<CostPart> remainingParts = new ArrayList<CostPart>(cost.getCostParts());
|
||||
CostPart costPart = null;
|
||||
@@ -451,8 +450,8 @@ public class HumanPlay {
|
||||
}
|
||||
}
|
||||
if (typeChoices.size() > 1) {
|
||||
String prompt = "Select type counters to remove";
|
||||
counterType = GuiChoose.one(prompt, typeChoices);
|
||||
String cprompt = "Select type counters to remove";
|
||||
counterType = GuiChoose.one(cprompt, typeChoices);
|
||||
} else {
|
||||
counterType = typeChoices.get(0);
|
||||
}
|
||||
@@ -603,7 +602,10 @@ public class HumanPlay {
|
||||
if (!(costPart instanceof CostPartMana ))
|
||||
throw new RuntimeException("GameActionUtil.payCostDuringAbilityResolve - The remaining payment type is not Mana.");
|
||||
|
||||
String prompt = source + "\r\n" + promptCurrent;
|
||||
if (prompt == null) {
|
||||
String promptCurrent = current == null ? "" : "Current Card: " + current + "\r\n";
|
||||
prompt = source + "\r\n" + promptCurrent;
|
||||
}
|
||||
InputPayMana toSet = new InputPayManaExecuteCommands(p, prompt, cost.getCostMana().getManaToPay());
|
||||
Singletons.getControl().getInputQueue().setInputAndWait(toSet);
|
||||
return toSet.isPaid();
|
||||
|
||||
@@ -585,8 +585,8 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
* @see forge.game.player.PlayerController#payManaOptional(forge.Card, forge.card.cost.Cost)
|
||||
*/
|
||||
@Override
|
||||
public boolean payManaOptional(Card c, Cost attackCost, String prompt, ManaPaymentPurpose purpose) {
|
||||
return HumanPlay.payCostDuringAbilityResolve(player, c, attackCost, null);
|
||||
public boolean payManaOptional(Card c, Cost cost, String prompt, ManaPaymentPurpose purpose) {
|
||||
return HumanPlay.payCostDuringAbilityResolve(player, c, cost, null, prompt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
hasPaid = activating.getController().payManaOptional(sp.getSourceCard(), costMultikicker, prompt, ManaPaymentPurpose.Replicate);
|
||||
if( hasPaid )
|
||||
sp.getSourceCard().addReplicateMagnitude(1);
|
||||
} while( !hasPaid );
|
||||
} while( hasPaid );
|
||||
}
|
||||
|
||||
for (int i = 0; i < sp.getSourceCard().getReplicateMagnitude(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user