mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Merge pull request #114 from Northmoc/peekfix
PeekAndReveal stackDesc NPE fix
This commit is contained in:
@@ -32,11 +32,12 @@ public class PeekAndRevealEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
final int numPeek = sa.hasParam("PeekAmount") ?
|
final int numPeek = sa.hasParam("PeekAmount") ?
|
||||||
AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("PeekAmount"), sa) : 1;
|
AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("PeekAmount"), sa) : 1;
|
||||||
final String verb = sa.hasParam("NoReveal") ? " looks at " : " reveals ";
|
final String verb = sa.hasParam("NoReveal") || sa.hasParam("RevealOptional") ? " looks at " :
|
||||||
final String defined = sa.getParam("Defined");
|
" reveals ";
|
||||||
|
final String defined = sa.getParamOrDefault("Defined", "their");
|
||||||
String whose;
|
String whose;
|
||||||
if (defined.equals("Player")) {
|
if (defined.equals("Player")) {
|
||||||
whose = "each player's ";
|
whose = "each player's";
|
||||||
} else { // other else ifs for specific defined can be added above as needs arise
|
} else { // other else ifs for specific defined can be added above as needs arise
|
||||||
whose = Lang.joinHomogenous(getTargetPlayers(sa));
|
whose = Lang.joinHomogenous(getTargetPlayers(sa));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:U
|
|||||||
Types:Snow Creature Human Wizard
|
Types:Snow Creature Human Wizard
|
||||||
PT:1/2
|
PT:1/2
|
||||||
A:AB$ PeekAndReveal | Cost$ S T | PeekAmount$ 1 | RevealValid$ Snow | RevealOptional$ True | RememberRevealed$ True | SubAbility$ DBChangeZone | SpellDescription$ Look at the top card of your library. If it's a snow card, you may reveal it and put it into your hand.
|
A:AB$ PeekAndReveal | Cost$ S T | PeekAmount$ 1 | RevealValid$ Snow | RevealOptional$ True | RememberRevealed$ True | SubAbility$ DBChangeZone | SpellDescription$ Look at the top card of your library. If it's a snow card, you may reveal it and put it into your hand.
|
||||||
SVar:DBChangeZone:DB$ ChangeZone | Defined$ TopOfLibrary | Origin$ Library | Destination$ Hand | ConditionDefined$ Remembered | ConditionPresent$ Snow | ConditionCompare$ EQ1 | SubAbility$ DBCleanup
|
SVar:DBChangeZone:DB$ ChangeZone | Defined$ TopOfLibrary | Origin$ Library | Destination$ Hand | ConditionDefined$ Remembered | ConditionPresent$ Snow | ConditionCompare$ EQ1 | SubAbility$ DBCleanup | StackDescription$ If it's a snow card, {p:You} may reveal it and put it into their hand.
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
DeckNeeds:Type$Snow
|
DeckNeeds:Type$Snow
|
||||||
Oracle:{S}, {T}: Look at the top card of your library. If it's a snow card, you may reveal it and put it into your hand. ({S} can be paid with one mana from a snow source.)
|
Oracle:{S}, {T}: Look at the top card of your library. If it's a snow card, you may reveal it and put it into your hand. ({S} can be paid with one mana from a snow source.)
|
||||||
|
|||||||
Reference in New Issue
Block a user