mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38: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") ?
|
||||
AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("PeekAmount"), sa) : 1;
|
||||
final String verb = sa.hasParam("NoReveal") ? " looks at " : " reveals ";
|
||||
final String defined = sa.getParam("Defined");
|
||||
final String verb = sa.hasParam("NoReveal") || sa.hasParam("RevealOptional") ? " looks at " :
|
||||
" reveals ";
|
||||
final String defined = sa.getParamOrDefault("Defined", "their");
|
||||
String whose;
|
||||
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
|
||||
whose = Lang.joinHomogenous(getTargetPlayers(sa));
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:U
|
||||
Types:Snow Creature Human Wizard
|
||||
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.
|
||||
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
|
||||
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.)
|
||||
|
||||
Reference in New Issue
Block a user