NeoAnderson wrote:I also revised the other card we were talking about.
Now it says :
At the beginning of your upkeep, you may reveal a card from your hand. If the number of Forests you control is less than the number of green mana symbols on the card you revealed, search your library for up to X Forests, where X is the difference between those numbers, put them onto the battlefield tapped, then shuffle your library.Here you can find the revised code, let me know if is ok.
I wouldn't put any restriction inside the TRIGGER block... as the card reads now, you are free to reveal a card even if you have only lands or red cards in your hand. Moreover, the restriction would give away information about your hand to your opponents (if it doesn't trigger, then you don't have a suitable card in your hand).
The query in a PLAY_TIME_ACTION is also wrong: all the choices that don't involve targetting should be made during resolution. Actually, I would remove the query altogether and move the choice to the card selection with a QUERY_FLAG_MAY: if you don't want to reveal a card, you'll click on Finish, and this will save you from one useless click when you want to reveal a card.
- Dryads recalling | Open
- Code: Select all
...
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_UPKEEP
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local numlands = CountBasicLandsSubtypeControlledBy(LAND_TYPE_FOREST, player, ZONE_BATTLEFIELD)
EffectDC():Set_Int(50, numlands)
EffectDC():Set_Int(51, 0)
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
if player ~= nil then
--pick a card to reveal
local filter = ClearFilter()
filter:SetZone( ZONE_HAND, player )
player:ChooseItem( "CARD_QUERY_CHOOSE_CARD_TO_REVEAL", EffectDC():Make_Targets(0), QUERY_FLAG_MAY )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
if player ~= nil then
local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if card ~= nil then
card:Reveal()
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if card ~= nil then
local LandsToPutOnBattlefield = ColourManaCountIntoCard(COLOUR_GREEN, card, player)
local NumOfLands = EffectDC():Get_Int(50)
LandsToPutOnBattlefield = LandsToPutOnBattlefield - NumOfLands
EffectDC():Set_Int(51, LandsToPutOnBattlefield)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
if LandsToPutOnBattlefield > 0 then
local filter = ClearFilter()
local effectController = EffectController()
filter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_FOREST )
filter:SetZone( ZONE_LIBRARY, effectController )
effectController:SetItemCount( LandsToPutOnBattlefield )
for i = 0, (LandsToPutOnBattlefield - 1) do
effectController:SetItemPrompt(i, "CARD_QUERY_CHOOSE_LAND_TO_PUT_ONTO_THE_BATTLEFIELD_TAPPED" )
end
effectController:ChooseItems( EffectDC():Make_Targets(3), QUERY_FLAG_UP_TO )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
if LandsToPutOnBattlefield > 0 then
for i = 0,(LandsToPutOnBattlefield - 1) do
local target_card = EffectDC():Get_Targets(3):Get_CardPtr(i)
if target_card ~= nil then
target_card:PutOntoBattlefieldTapped( EffectController() )
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local LandsToPutOnBattlefield = EffectDC():Get_Int(51)
if LandsToPutOnBattlefield > 0 then
EffectController():ShuffleLibrary()
end
</RESOLUTION_TIME_ACTION>
...
I might have forgot to remove an "end" or something like that... the lack of a precise indentation really doesn't help.

EDIT: Oh, I was forgetting: this depends on you, but if you leave this line:
- Code: Select all
filter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_BASIC )
then the ability text should read "search your library for up to
X basic Forests". Either modify the text, or remove that line.