a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalLatest imagesSearchRegisterLog in

Share
 

 Help with Unaffected effect

View previous topic View next topic Go down 
AuthorMessage
cane_63106

cane_63106


Member Title : D.D. Dragon Kaiser
Posts : 454
Join date : 2013-07-23
Location : St. Louis, MO

Help with Unaffected effect Empty
PostSubject: Help with Unaffected effect   Help with Unaffected effect Icon_minitimeSat Aug 10, 2013 5:26 am

I've been trying this since yesterday and can't seem to get this effect straight. The effect is: 

When this card is Special Summoned from being banished, it gains the following effects: This card is unaffected by your opponent's monster card effects. Once per turn you can banish 1 monster on the field. 

I've been able to program the, not being able to banish until after it's special summoned 1st, but i can't even get the unaffected part straight. Can someone please help me with this?

--32083004
function c32083004.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32083004,1))
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c32083004.rmtg)
e1:SetOperation(c32083004.rmop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c32083004.efilter)
c:RegisterEffect(e2)
end
function c32083004.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:GetHandler():GetPreviousLocation()~=LOCATION_REMOVED then return end
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c32083004.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
function c32083004.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
end
end
Back to top Go down
http:// https://www.youtube.com/user/cane63106/videos
 

Help with Unaffected effect

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Magical Hats (Anime) Effect + Dark Sage (Anime) Effect [Help Please]
» Help with effect
» Help with this effect?!
» Darkness Greed: Neither effect nor picture
» Card Effect Functionality you'd like to see

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Custom Card Ruling and Bugs-