mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Compare commits
1 Commits
ee045d854d
...
offeringEm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28f0676bcf |
@@ -517,28 +517,7 @@ public class HumanPlay {
|
|||||||
d.setExiledSA(ability);
|
d.setExiledSA(ability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ability.isOffering() && ability.getSacrificedAsOffering() != null) {
|
return CostPayment.handleOfferings(ability, manaInputCancelled, !manaInputCancelled) && !manaInputCancelled;
|
||||||
final Card offering = ability.getSacrificedAsOffering();
|
|
||||||
offering.setUsedToPay(false);
|
|
||||||
if (!manaInputCancelled) {
|
|
||||||
game.getAction().sacrifice(new CardCollection(offering), ability, false, params);
|
|
||||||
}
|
|
||||||
ability.resetSacrificedAsOffering();
|
|
||||||
}
|
|
||||||
if (ability.isEmerge() && ability.getSacrificedAsEmerge() != null) {
|
|
||||||
final Card emerge = ability.getSacrificedAsEmerge();
|
|
||||||
emerge.setUsedToPay(false);
|
|
||||||
if (!manaInputCancelled) {
|
|
||||||
game.getAction().sacrifice(new CardCollection(emerge), ability, false, params);
|
|
||||||
ability.setSacrificedAsEmerge(game.getChangeZoneLKIInfo(emerge));
|
|
||||||
} else {
|
|
||||||
ability.resetSacrificedAsEmerge();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!table.isEmpty() && !manaInputCancelled) {
|
|
||||||
table.triggerChangesZoneAll(game, ability);
|
|
||||||
}
|
|
||||||
return !manaInputCancelled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean payManaCost(final PlayerControllerHuman controller, final ManaCost realCost, final CostPartMana mc, final SpellAbility ability, final Player activator, String prompt, ManaConversionMatrix matrix, boolean effect) {
|
public static boolean payManaCost(final PlayerControllerHuman controller, final ManaCost realCost, final CostPartMana mc, final SpellAbility ability, final Player activator, String prompt, ManaConversionMatrix matrix, boolean effect) {
|
||||||
@@ -564,24 +543,16 @@ public class HumanPlay {
|
|||||||
CostAdjustment.adjust(toPay, ability, cardsToDelve, false);
|
CostAdjustment.adjust(toPay, ability, cardsToDelve, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Card offering = null;
|
|
||||||
Card emerge = null;
|
|
||||||
|
|
||||||
InputPayMana inpPayment;
|
InputPayMana inpPayment;
|
||||||
if (ability.isOffering()) {
|
if (ability.isOffering() && ability.getSacrificedAsOffering() == null) {
|
||||||
if (ability.getSacrificedAsOffering() == null) {
|
|
||||||
System.out.println("Sacrifice input for Offering cancelled");
|
System.out.println("Sacrifice input for Offering cancelled");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
offering = ability.getSacrificedAsOffering();
|
if (ability.isEmerge() && ability.getSacrificedAsEmerge() == null) {
|
||||||
}
|
|
||||||
if (ability.isEmerge()) {
|
|
||||||
if (ability.getSacrificedAsEmerge() == null) {
|
|
||||||
System.out.println("Sacrifice input for Emerge cancelled");
|
System.out.println("Sacrifice input for Emerge cancelled");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
emerge = ability.getSacrificedAsEmerge();
|
|
||||||
}
|
|
||||||
if (!toPay.isPaid()) {
|
if (!toPay.isPaid()) {
|
||||||
// if matrix still null it's effect payment
|
// if matrix still null it's effect payment
|
||||||
if (matrix == null) {
|
if (matrix == null) {
|
||||||
@@ -602,17 +573,6 @@ public class HumanPlay {
|
|||||||
source.setXManaCostPaidByColor(toPay.getXManaCostPaidByColor());
|
source.setXManaCostPaidByColor(toPay.getXManaCostPaidByColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle convoke and offerings
|
|
||||||
if (ability.isOffering()) {
|
|
||||||
if (ability.getSacrificedAsOffering() == null && offering != null) {
|
|
||||||
ability.setSacrificedAsOffering(offering);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ability.isEmerge()) {
|
|
||||||
if (ability.getSacrificedAsEmerge() == null && emerge != null) {
|
|
||||||
ability.setSacrificedAsEmerge(emerge);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return handleOfferingConvokeAndDelve(ability, cardsToDelve, false);
|
return handleOfferingConvokeAndDelve(ability, cardsToDelve, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user