mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Implemented a better fix for Explorer's Scope that does not break a ton of other AB Dig abilities. Also fixes Quest for Ula's Temple.
- Note, however, that this fix as it is introduces an additional complication for card scripting in the form of extra parameters ForcedRevealToController / ShowOptionalAbilityPrompt. I tried making these global and based on card logic but there are enough card scripts that utilize ChangeNum$ All + NumToDig$ 1 in different ways that making it global in different ways tends to break different card scripts. Better ideas are welcome.
This commit is contained in:
@@ -189,18 +189,24 @@ public class DigEffect extends SpellAbilityEffect {
|
||||
andOrCards = new CardCollection();
|
||||
}
|
||||
|
||||
if (!sa.hasParam("Reveal")) {
|
||||
// make sure at least the controller gets to see the card
|
||||
if (sa.hasParam("ForcedRevealToController")) {
|
||||
// TODO: this parameter is used on Explorer's Scope to ensure the card is shown to the ability controller
|
||||
// (making this global for ChangeNum=All,NumToDig=1 causes cards like Quest for Ula's Temple to reveal the card multiple times,
|
||||
// but something has to be done about this to make it more universal)
|
||||
game.getAction().revealTo(top, player);
|
||||
}
|
||||
|
||||
// Optional ability
|
||||
String message = sa.hasParam("OptionalMessage") ? sa.getParam("OptionalMessage") : "Would you like to proceed with the optional ability for " + host.getName() + "?\n\n(" + sa.getDescription() + ")";
|
||||
if ( !valid.isEmpty() && sa.hasParam("Optional") && !p.getController().confirmAction(sa, null, message) )
|
||||
return;
|
||||
|
||||
if (changeAll) {
|
||||
movedCards = new CardCollection(valid);
|
||||
|
||||
if (optional && !valid.isEmpty() && sa.hasParam("ShowOptionalAbilityPrompt")) {
|
||||
// TODO: Without ShowOptionalAbilityPrompt, ChangeAll mode with NumToDig = 1 does not give the player any confirmation request
|
||||
// (however, making it global for this mode causes it to appear for cards with subabilities which do not require extra
|
||||
// prompting, e.g. Write into Being or Quest for Ula's Temple).
|
||||
if (!p.getController().confirmAction(sa, null, sa.getParam("ShowOptionalAbilityPrompt"))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sa.hasParam("RandomChange")) {
|
||||
int numChanging = Math.min(destZone1ChangeNum, valid.size());
|
||||
|
||||
Reference in New Issue
Block a user