Re: Help with restoration angel
The only strange thing i notice is the use of EffectDC():Get_Targets(0):Get_NthCardPtr(0) instead of EffectDC():Get_Targets(0):Get_CardPtr(0). I think that particular line of code should be:
As a side note, in lua the expression "a and b" is equal to b when a and b are not null. This allow the resolution code to be reduced to:
- Code: Select all
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
As a side note, in lua the expression "a and b" is equal to b when a and b are not null. This allow the resolution code to be reduced to:
- Code: Select all
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target then
EffectDC():Get_Targets(0):Protect_CardPtr(0)
target:RemoveFromGame()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target then
target:PutIntoPlay( EffectController() )
end
</RESOLUTION_TIME_ACTION>