TheBoos2569
2016-07-09T11:30:01Z
Basically, I have a pendulum monster, that while in the Pend scale, same archetype Pend scales can't be destroyed, including himself. Yet, the code is fine IMO and they still can be destroyed by MST, monster effects, etc.

Here's the script, the value is strange since I've been testing different targeting and values in those slots.

function c11000181.initial_effect(c)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_PZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1F7))
e2:SetValue(c11000181.indval)
c:RegisterEffect(e2)
end
function c11000181.indval(e,re,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER)
end
Arydan
2016-07-10T02:40:39Z
I'v got same problem with you when i was scripting a card for the first time

basically, i dunno how to make an effect that included 3 types of effects (monster effect,spell, trap).
i make a scripts like yours, but it doesn't work.

i looks at the other scripts, n there's no function like that.

then i make an IMO that
re:IsActiveType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) is not a fuction that list in utility.lua

so.. for effect like that, you have to make it split. or included all of them in the same one.

like this:
re:IsActiveType(TYPE_EFFECT)

OR

YOU DONT HAVE TO WRITE THAT FUNCTION.

basically,
SetCode(EFFECT_INDESTRUCTABLE_EFFECT) is included all of them. It couldn't be destroyed by any other effect that would destroy it, included spell/trap or monster effect.

and you just have to change the value to e1:SetValue(1)

hope this helps
TheBoos2569
2016-07-10T16:34:58Z
This is the exact problem I have with the anti-destruction at the moment. I tried at first to have SetTargetRange as is, and the same with SetTarget, only having 1 in the value. It didn't work.

After that I tried copying from dinoster, changing targeting values, and the SetValue into different set. That didn't work out either. This is the latest what I tried, and I am kinda weirded out that this effect will simply not kickstart at all.

EDIT:

After a few more hours of testing this out, I finally found the script that works for him (silly me)

Anyway, I thank you for your response ^^
Users browsing this topic