You need to sign in or sign up before continuing.
Commit 20fe0c28 authored by POLYMER's avatar POLYMER

fix

parent 84542be2
...@@ -191,7 +191,7 @@ function c114064005.repval(e,c) ...@@ -191,7 +191,7 @@ function c114064005.repval(e,c)
end end
function c114064005.kufilter(c) function c114064005.kufilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsCode(80831721,15471265,20065322,25573054,40703222,89086566) or c:IsSetCard(0xa4)) return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsCode(6309986,80831721,15471265,20065322,25573054,40703222,89086566) or c:IsSetCard(0xa4))
end end
function c114064005.kmfilter(c) function c114064005.kmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4)
......
...@@ -131,7 +131,7 @@ function c114431144.excost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -131,7 +131,7 @@ function c114431144.excost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g1,nil,2,REASON_COST) Duel.SendtoDeck(g1,nil,2,REASON_COST)
end end
function c114431144.pdfilter(c,e,tp,xyzc) function c114431144.pdfilter(c,e,tp,xyzc)
return c:IsCode(74641045) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeXyzMaterial(xyzc) return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsCode(74641045) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeXyzMaterial(xyzc)
end end
function c114431144.extg(e,tp,eg,ep,ev,re,r,rp,chk) function c114431144.extg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -47,12 +47,12 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,12 +47,12 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetCard(sc) Duel.SetTargetCard(sc)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Duel.GetFirstTarget(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Duel.GetFirstTarget(),1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCountFromEx(tp,tp,nil,tc)>0 and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then if tc:IsRelateToEffect(e) and Duel.GetLocationCountFromEx(tp,tp,nil,tc)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
......
function c114890515.initial_effect(c) function c114890515.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,5,c114890515.ovfilter,aux.Stringid(114890515,0),5,c114890515.xyzop) aux.AddXyzProcedure(c,nil,4,5,c114890515.ovfilter,aux.Stringid(114890515,0),5,c114890515.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c114890515.atkval) e1:SetValue(c114890515.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c114890515.defval) e2:SetValue(c114890515.defval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(114890515,1)) e3:SetDescription(aux.Stringid(114890515,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCost(c114890515.spcost) e3:SetCost(c114890515.spcost)
e3:SetTarget(c114890515.sptg) e3:SetTarget(c114890515.sptg)
e3:SetOperation(c114890515.spop) e3:SetOperation(c114890515.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(114890515,2)) e4:SetDescription(aux.Stringid(114890515,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetTarget(c114890515.mttg) e4:SetTarget(c114890515.mttg)
e4:SetOperation(c114890515.mtop) e4:SetOperation(c114890515.mtop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c114890515.ovfilter(c) function c114890515.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf1) and not c:IsCode(114890515) return c:IsFaceup() and c:IsSetCard(0xf1) and not c:IsCode(114890515)
end end
function c114890515.xyzop(e,tp,chk) function c114890515.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,114890510)==0 end if chk==0 then return Duel.GetFlagEffect(tp,114890510)==0 end
Duel.RegisterFlagEffect(tp,114890510,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,114890510,RESET_PHASE+PHASE_END,0,1)
end end
function c114890515.atkfilter(c) function c114890515.atkfilter(c)
return c:IsSetCard(0xf1) and c:GetAttack()>=0 return c:IsSetCard(0xf1) and c:GetAttack()>=0
end end
function c114890515.atkval(e,c) function c114890515.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c114890515.atkfilter,nil) local g=e:GetHandler():GetOverlayGroup():Filter(c114890515.atkfilter,nil)
return g:GetSum(Card.GetAttack) return g:GetSum(Card.GetAttack)
end end
function c114890515.deffilter(c) function c114890515.deffilter(c)
return c:IsSetCard(0xf1) and c:GetDefense()>=0 return c:IsSetCard(0xf1) and c:GetDefense()>=0
end end
function c114890515.defval(e,c) function c114890515.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c114890515.deffilter,nil) local g=e:GetHandler():GetOverlayGroup():Filter(c114890515.deffilter,nil)
return g:GetSum(Card.GetDefense) return g:GetSum(Card.GetDefense)
end end
function c114890515.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c114890515.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST) c:RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c114890515.filter(c,e,tp,tc) function c114890515.filter(c,e,tp,tc)
return c:IsRank(4) and e:GetHandler():IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 return c:IsRank(4) and e:GetHandler():IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end end
function c114890515.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c114890515.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114890515.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.IsExistingMatchingCard(c114890515.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c114890515.spop(e,tp,eg,ep,ev,re,r,rp) function c114890515.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c114890515.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c) local g=Duel.SelectMatchingCard(tp,c114890515.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
if not g or g:GetCount()==0 then return end if not g or g:GetCount()==0 then return end
local sc=g:GetFirst() local sc=g:GetFirst()
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,mg)
end end
sc:SetMaterial(Group.FromCards(c)) sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,c) Duel.Overlay(sc,c)
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure() sc:CompleteProcedure()
end end
function c114890515.mtfilter(c) function c114890515.mtfilter(c)
return c:IsSetCard(0xf1) return c:IsSetCard(0xf1)
end end
function c114890515.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c114890515.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c114890515.mtfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c114890515.mtfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function c114890515.mtop(e,tp,eg,ep,ev,re,r,rp) function c114890515.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c114890515.mtfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c114890515.mtfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(c,g) Duel.Overlay(c,g)
end end
end end
\ No newline at end of file
...@@ -75,13 +75,13 @@ end ...@@ -75,13 +75,13 @@ end
function c118426889.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c118426889.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c118426889.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp,c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,true,true,POS_FACEUP) end if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.IsExistingMatchingCard(c118426889.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp,c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,true,true,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,0,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_EXTRA)
end end
function c118426889.operation2(e,tp,eg,ep,ev,re,r,rp) function c118426889.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) then return end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c118426889.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,c) local tg=Duel.SelectMatchingCard(tp,c118426889.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,c)
......
--青き眼の狂人 --青き眼の狂人
function c118824150.initial_effect(c) function c118824150.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,118824150) e1:SetCountLimit(1,118824150)
e1:SetCost(c118824150.dwcost) e1:SetCost(c118824150.dwcost)
e1:SetTarget(c118824150.dwtg) e1:SetTarget(c118824150.dwtg)
e1:SetOperation(c118824150.dwop) e1:SetOperation(c118824150.dwop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(118824150,1)) e2:SetDescription(aux.Stringid(118824150,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,118824151) e2:SetCountLimit(1,118824151)
e2:SetCost(c118824150.spcost) e2:SetCost(c118824150.spcost)
e2:SetTarget(c118824150.sptg) e2:SetTarget(c118824150.sptg)
e2:SetOperation(c118824150.spop) e2:SetOperation(c118824150.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search --search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,118824152) e3:SetCountLimit(1,118824152)
e3:SetCondition(c118824150.thcon) e3:SetCondition(c118824150.thcon)
e3:SetTarget(c118824150.thtg) e3:SetTarget(c118824150.thtg)
e3:SetOperation(c118824150.thop) e3:SetOperation(c118824150.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--revive --revive
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(118824150,3)) e4:SetDescription(aux.Stringid(118824150,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,118824153) e4:SetCountLimit(1,118824153)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c118824150.rvcost) e4:SetCost(c118824150.rvcost)
e4:SetTarget(c118824150.rvtg) e4:SetTarget(c118824150.rvtg)
e4:SetOperation(c118824150.rvop) e4:SetOperation(c118824150.rvop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c118824150.dwfilter(c) function c118824150.dwfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable()
end end
function c118824150.dwcost(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.dwcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() if chk==0 then return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c118824150.dwfilter,tp,LOCATION_HAND,0,1,c) end and Duel.IsExistingMatchingCard(c118824150.dwfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c118824150.dwfilter,tp,LOCATION_HAND,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c118824150.dwfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c) g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c118824150.dwtg(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.dwtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function c118824150.dwop(e,tp,eg,ep,ev,re,r,rp) function c118824150.dwop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c118824150.spfilter(c) function c118824150.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xdd) and c:IsAbleToDeckOrExtraAsCost() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xdd) and c:IsAbleToDeckOrExtraAsCost()
end end
function c118824150.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c118824150.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c118824150.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c118824150.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c118824150.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function c118824150.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) 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 c118824150.spop(e,tp,eg,ep,ev,re,r,rp) function c118824150.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c118824150.thcon(e,tp,eg,ep,ev,re,r,rp) function c118824150.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c118824150.thfilter(c) function c118824150.thfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and not c:IsCode(118824150) and c:IsAbleToHand() return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and not c:IsCode(118824150) and c:IsAbleToHand()
end end
function c118824150.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c118824150.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c118824150.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c118824150.thop(e,tp,eg,ep,ev,re,r,rp) function c118824150.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c118824150.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c118824150.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c118824150.rvcost(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.rvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c118824150.rvfilter(c,e,tp) function c118824150.rvfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,true,true) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,true,true)
end end
function c118824150.rvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c118824150.rvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c118824150.rvfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c118824150.rvfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c118824150.rvfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
and Duel.IsExistingTarget(c118824150.rvfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c118824150.rvfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
local g=Duel.SelectTarget(tp,c118824150.rvfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c118824150.rvop(e,tp,eg,ep,ev,re,r,rp) function c118824150.rvop(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 tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,true,true,POS_FACEUP)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
...@@ -28,7 +28,7 @@ function s.spfilter(c,e,tp,rc) ...@@ -28,7 +28,7 @@ function s.spfilter(c,e,tp,rc)
return c:IsCode(rc:GetCode()) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0 return c:IsCode(rc:GetCode()) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
...@@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g:GetFirst()) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g:GetFirst())
......
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