For the token used by
Goblin Spymaster, that's because I wasn't paying attention. The function file listed it as "GOBLIN_C_1_1_S_H" instead of "GOBLIN_C_1_1_R_S". I replaced "R" with "S" instead of replacing "H" with "S". It's been fixed.
For
Fyndhorn Druid, try removing pre_trigger="1". pre-trigger replacements usually are used to replace an action entirely, such as when it says "instead of *whatever*". You don't need the int to be set before the actual blocking, so removing pre_trigger should be fine.
Also, remember what was mentioned recently. When you see a card phrased like this one, it uses an INTERVENING_IF block. When *this*, if *this*, do *this*. That's an intervening if, and it needs to use an intervening if block. It gets checked both before it's put onto the stack and before it resolves. In a case where it's impossible to change between those two checks (such as in this case), you can use ignore_resolution_check="1", but it still needs to be in the right block: INTERVENING_IF. Just return true if the "if" clause is met.
- Code: Select all
<INTERVENING_IF ignore_resolution_check="1">
return LinkedDC():Get_Int(33) == 1
</INTERVENING_IF>
Then remove the LinkedDC check in the RTA.
Hopefully removing the pre_trigger bit will fix it. Not certain, though.
Telekinesis: Don't need to protect the pointer on line 54. It's not meant to continue functioning if it changes zones.
Your spell ability tries to use LinkedDC() but it's not marked with linked_ability_group="1". However, neither it nor the delayed trigger need the LinkedDC().
Remove line 44.
Remove linked_ability_group="1" from line 67.
Delayed triggers need a cleanup, and they need a resource id. Add resource_id="1" to line 67 (the 1 here matches the 1 used on line 55). Add the cleanup tag: <CLEANUP fire_once="1" />. Finally, the delayed trigger should be a replacement_effect.
The RTA at line 72 should just be this:
- Code: Select all
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_CardPtr(0)
if target_creature ~= nil then
target_creature:Hold()
end
</RESOLUTION_TIME_ACTION>
I'm considering what would happen if the creature is destroyed or moves zones before this trigger fires. With the current trigger (which doesn't check if it's nil), it would throw an error for trying to index a nil value ("target_creature:GetController()"). If you do check if it's nil before returning true, then it'll check for the rest of the game.
Perhaps a safe way to handle it would be to return true in the cleanup if the pointer is nil. I'm not sure, though, since I've never tried it.
- Code: Select all
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
local target_creature = EffectDC():Get_CardPtr(0)
return MTG():GetStep() == STEP_UNTAP and target_creature ~= nil and TriggerPlayer() == target_creature:GetController()
</TRIGGER>
<CLEANUP fire_once="1">
return EffectDC():Get_CardPtr(0) == nil
</CLEANUP>
Giant Oyster: On line 51 you check if EffectSource() is nil and you also check if 'card' is nil, but card
is EffectSource().
Lines 69 and 71 effectively do the same thing. A cleared register returns 0 when you check it. So, you don't need anything more than LinkedDC():
Clear() in that RTA (you can remove the 'if' blocks entirely).
Line 75: CLEANUP tags are for delayed triggers.
Remove this.
Line 101: Don't protect the pointer. Protecting the pointer should only be done if the ability should continue to do something with that card even after it changes zones, which is not the case here.
Line 118 and 129: Never uses or needs LinkedDC(), so I'd remove the linked_ability_group="1".
Delayed trigger #5 has no cleanup (which is probably why it isn't running). Its cleanup should be:
- Code: Select all
<CLEANUP>
return EffectSource() == nil or EffectSource():IsTapped() == false
</CLEANUP>
GetEffectX(): I looked into GetEffectX(), GetPaidX(), and GetManaX() awhile ago, but I don't remember the exact results. One of them always worked, whereas two of them worked only in some situations. I'd try replacing GetEffectX() with GetPaidX() or GetManaX() and see if that helps.
I'll look into the reveal function to make sure I didn't mess it up. (Also, completely irrelevant, but your test card says it will reveal 7 cards, but it reveals 8. 8-1=7, and i will start at 0. 0, 1, 2, 3, 4, 5, 6, 7. for i=0,6 would be 7 cards.)