Tegardee
  • Tegardee
  • Advanced Member Topic Starter
2015-10-11T21:27:33Z
hey guys, can someone help me.

this is the effect that I want.

"When this card is Synchro Summoned: You can pay Life Points so that you only have 10 left; During this Duel, Each card you control is unaffected by other card effects except its own. You can only use this effect of "Killarz, Warrior From the Underworld" once per Duel."

the effect work ok, he pay the cost, but don't give the immune to the cards.

Code:
MVPIII
2015-10-12T01:54:59Z
Try this, changes are in orange. That's usually how I see "for the rest of this duel" effects that emanate from a monster effect anyways so it should work

function c56351269.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
--immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetTarget(c56351269.etg)
e1:SetValue(c56351269.eval)
Duel.RegisterEffect(e1,tp)
local g=Group.CreateGroup()
g:KeepAlive()
e:SetLabelObject(e1)
end
end
Tegardee
  • Tegardee
  • Advanced Member Topic Starter
2015-10-12T13:42:49Z
also don't works.
MVPIII
2015-10-12T20:41:34Z
Right... looking back at it I didn't have to tell you to change the first thing I told you to change, since you already declared local c=e:getHandler(). So you could change that part back, but leave the second change as Duel.RegisterEffect(e1,tp)

Pretty sure you don't need to set a reset considering it's for the remainder of the duel so I'd say take that out. But idk exactly what could be wrong with the script if that doesn't work.

If that fails, you can just take out the first 2 lines of your regop function just to see if it works without it.
Tegardee
  • Tegardee
  • Advanced Member Topic Starter
2015-10-12T23:01:36Z
the regop are alright.

the problem are in function eval.

I don't know the functions of immune effects.

but I think that "e:GetOwner()" only works for 1 card, and not for a group of cards.
Tegardee
  • Tegardee
  • Advanced Member Topic Starter
2015-10-13T20:44:24Z
finally, after much time I have do this effect.