Hey all, I need help with a card I'm working on. In the card effect, the problem effects are highlighted
%3A+you+can+equip+1+%22Artifact%22+monster+from+your+deck+or+graveyard+to+this+card.+You+can+only+use+this+effect+of+%22Traptrix+Fencers%22+once+per+turn.+When+an+%22Artifact%22+monster+is+equipped+to+this+card%3A+you+can+choose+to+apply+the+effect+of+that+monster+as+if+it+was+special+summoned+during+your+opponent%27s+turn+as+this+card%27s+effect.+If+an+%22Artifact%22+monster+equipped+to+this+card+would+be+sent+to+the+graveyard%3A+special+summon+it+to+your+side+of+the+field+instead+(even+if+this+card+is+no+longer+on+the+field+or+flipped+face-down).&atk=1900&def=1700&creator=&year=2015&serial=65000016)
Effect: This card is unaffected by the effects of "Hole" normal trap cards. When a "Hole" normal trap card is activated (except during the damage step): you can equip 1 "Artifact" monster from your deck or graveyard to this card. You can only use this effect of "Traptrix Fencers" once per turn.
When an "Artifact" monster is equipped to this card: you can choose to apply the effect of that monster as if it was special summoned during your opponent's turn as this card's effect. If an "Artifact" monster equipped to this card would be sent to the graveyard: special summon it to your side of the field instead (even if this card is no longer on the field or flipped face-down).Really I just need to know if there's an easy way to replicate just the specific effect of (some of) the artifact monsters being special summoned during the opponent's turn, without copying the entire effect, since if I copy the entire effect, fencers would need to be special summoned herself during the opponent's turn. I've tried checking cards like test tiger and evo-force (the only 2 cards like it I guess) but they have their own condition that isn't made too obvious in the script, aside from some number in the filter and operation functions.
Unfinished script for fencers
function c65000016.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c65000016.efilter)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,65000016)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c65000016.eqcon)
e2:SetTarget(c65000016.eqtg)
e2:SetOperation(c65000016.eqop)
c:RegisterEffect(e2)
end
function c65000016.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89))
end
function c65000016.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
return rp==tp and c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89))
end
function c65000016.filter(c,e,tp,ft)
return c:IsSetCard(0x97) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c65000016.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c65000016.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function c65000016.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c65000016.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c65000016.eqlimit)
tc:RegisterEffect(e1)
end
end
function c65000016.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
end