Commit 66849dae authored by TanakaKotoha's avatar TanakaKotoha

iidx gooooooooooooooooooold

parent fc904c1f
No preview for this file type
...@@ -2,84 +2,84 @@ ...@@ -2,84 +2,84 @@
local m=50000062 local m=50000062
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) c:SetUniqueOnField(1,0,m)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE) e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.negcon) e2:SetCondition(cm.negcon)
e2:SetOperation(cm.negop) e2:SetOperation(cm.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m) e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon) e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:GetSummonLocation()==LOCATION_EXTRA return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:GetSummonLocation()==LOCATION_EXTRA
end end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp) function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and e:GetHandler():GetFlagEffect(m)<=0 and e:GetHandler():GetFlagEffect(m)<=0
end end
function cm.negop(e,tp,eg,ep,ev,re,r,rp) function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x50c,0x11,1400,1600,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x50c,0x11,1400,1600,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.tffilter(c,tp) function cm.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x50c) and not c:IsCode(m) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x50c) and not c:IsCode(m) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if not c:CheckUniqueOnField(tp) then return end if not c:CheckUniqueOnField(tp) then return end
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x50c,0x11,1400,1600,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x50c,0x11,1400,1600,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then
c:AddMonsterAttribute(TYPE_NORMAL) c:AddMonsterAttribute(TYPE_NORMAL)
local iss=Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) local iss=Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--redirect --redirect
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT) e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true) c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local g=Duel.GetMatchingGroup(cm.tffilter,tp,LOCATION_GRAVE+LOCATION_DECK,LOCATION_GRAVE+LOCATION_DECK,nil,e,0,tp) local g=Duel.GetMatchingGroup(cm.tffilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,nil,e,0,tp)
if iss and g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if iss and g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
end end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment