applejackson
2015-02-28T16:55:12Z
Hi i'm new to scripting and i have been working on a card for about 45 mins and it still is not working pls help. My card Cannot be Normal Summoned or Set. Must be Special Summoned by The All Knowing Apple Tree's Effect. This card cannot be targeted by' and is unaffected by card effects while The All Knowing Apple Tree is on the field.
the trees id is 22653766 what i did so fare was --Apple Jackson
function c54886736.initial_effect(c)
local e1=effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
--
local e2=effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
end

and all i was trying to do so far was the cannot be targeted and uneffected part if the is a simple reason i messed up pls tell me. and also mabye do it 😛 Thanks for any help.[:smile:]
Anonym003
2015-03-05T21:17:41Z
You were missing the Value and the Condition, if you still didn't figured it out that is.
Arvine
2015-03-07T10:04:43Z
This is might be what you need

Quote:


--Insert Name Here
function c54886736.initial_effect(c)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c54886736.econ)
e1:SetValue(c54886736.efilter)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c54886736.tgcon)
e2:SetValue(1)
c:RegisterEffect(e2)
--cannot special summon
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
end

function c54886736.tgfilter(c)
return c:IsFaceup() and c:IsCode(22653766)
end
function c54886736.tgcon(e)
return Duel.IsExistingMatchingCard(c54886736.tgfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler())
end

function c54886736.econ(e)
return Duel.IsExistingMatchingCard(c54886736.tgfilter,0,LOCATION_ONFIELD,0,1,nil)
end
function c54886736.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end

File Attachment(s):
c54886736.lua (2kb) downloaded 2 time(s).

You cannot view/download attachments. Try to login or register.