Commit 47a1e3c9 authored by Huangnan's avatar Huangnan

fix

parent 5a6483d2
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,12400119) aux.AddCodeList(c,12400119)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,7,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop) aux.AddXyzProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
--ov --ov
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -69,15 +69,12 @@ function s.xyzop(e,tp,chk) ...@@ -69,15 +69,12 @@ function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function s.ovfilter2(c,e)
return c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end
function s.ovfilter3(c) function s.ovfilter3(c)
return c:IsCanOverlay() and c:IsSetCard(0x62a2,0xaf1b) and c:IsFaceupEx() return c:IsCanOverlay() and c:IsFaceupEx() and (c:IsSetCard(0xaf1b) or aux.IsCodeListed(c,12400119))
end end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and
Duel.IsExistingMatchingCard(s.ovfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) end Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
end end
function s.ovop(e,tp,eg,ep,ev,re,r,rp) function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -95,12 +92,13 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,12 +92,13 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
local g1=Duel.GetMatchingGroup(s.ovfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) local g1=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
if #g1>0 and c:IsRelateToEffect(e) then if #g1>0 and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg1=g1:Select(tp,1,1,nil) local sg1=g1:Select(tp,1,1,c)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ovfilter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ovfilter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if Duel.Overlay(c,sg1) and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Overlay(c,sg1)
if #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg2=g2:Select(tp,1,2,nil) local sg2=g2:Select(tp,1,2,nil)
Duel.Overlay(c,sg2) Duel.Overlay(c,sg2)
......
...@@ -136,7 +136,7 @@ function cm.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -136,7 +136,7 @@ function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local ct=1 local ct=1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if Duel.IsExistingMatchingCard(cm.tfilter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,10,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then ct=2 end if Duel.IsExistingMatchingCard(cm.tfilter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,10,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then ct=2 end
local sg=Duel.SelectMatchingCard(tp,cm.tfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ct,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,cm.tfilter2,tp,LOCATION_REMOVED,0,1,ct,nil,e,tp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_WATER,RACE_SPELLCASTER,3,1000,1000) tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_WATER,RACE_SPELLCASTER,3,1000,1000)
......
...@@ -91,7 +91,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,7 +91,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp,true):Filter(s.costfilter,nil) local rg=Duel.GetReleaseGroup(tp,true):Filter(s.costfilter,nil)
if chk==0 then return rg:GetCount()>0 end if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,s.costfilter,1,1,nil) local g=Duel.SelectReleaseGroupEx(tp,s.costfilter,1,1,REASON_COST,TRUE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:GetOwner()~=tp if tc:GetOwner()~=tp
then then
......
--忍·龙 风来 --忍·龙 风来
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,52700740)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--忍·龙 石英 --忍·龙 石英
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,52700740)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
...@@ -40,7 +40,7 @@ function s.spfilter(c,e,tp) ...@@ -40,7 +40,7 @@ function s.spfilter(c,e,tp)
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)
local a=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_DECK,7,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local a=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_DECK,7,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b=Duel.IsExistingMatchingCard(s.spfilter,tp,0,LOCATION_GRAVE,1,nil)and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b=Duel.IsExistingMatchingCard(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp)and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetCustomActivityCount(id,e:GetHandlerPlayer(),ACTIVITY_CHAIN)==0 and ( a or b) end if chk==0 then return Duel.GetCustomActivityCount(id,e:GetHandlerPlayer(),ACTIVITY_CHAIN)==0 and ( a or b) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK+LOCATION_GRAVE)
end end
...@@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCustomActivityCount(id,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 then return end if Duel.GetCustomActivityCount(id,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local a=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_DECK,7,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local a=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_DECK,7,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b=Duel.IsExistingMatchingCard(s.spfilter,tp,0,LOCATION_GRAVE,1,nil)and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b=Duel.IsExistingMatchingCard(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp)and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not (a or b) then return end if not (a or b) then return end
local off=1 local off=1
local ops={} local ops={}
......
...@@ -94,7 +94,7 @@ function s.xspfilter(c) ...@@ -94,7 +94,7 @@ function s.xspfilter(c)
return c:IsSetCard(0x3529) and c:IsAbleToGrave() return c:IsSetCard(0x3529) and c:IsAbleToGrave()
end end
function s.thfilter(c) function s.thfilter(c)
return aux.IsCodeListed(c,id) and c:IsSetCard(0x3529) and c:IsAbleToHand() return aux.IsCodeListed(c,52700740) and c:IsSetCard(0x3529) and c:IsAbleToHand()
end end
function s.acfilter(c,tp) function s.acfilter(c,tp)
return c:IsCode(52700743) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsCode(52700743) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
...@@ -107,7 +107,7 @@ function s.cpfilter(c) ...@@ -107,7 +107,7 @@ function s.cpfilter(c)
local s2=c:IsCode(52700740) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) local s2=c:IsCode(52700740) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
local s3=c:IsCode(52700742) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local s3=c:IsCode(52700742) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_DECK,0,1,nil,tp)
return s1 or s2 or s3 or s4 return s1 or s2 or s3
end end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.cpfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.cpfilter(chkc) end
......
...@@ -96,30 +96,34 @@ end ...@@ -96,30 +96,34 @@ end
function c62624525.spcon(e,tp,eg,ep,ev,re,r,rp) function c62624525.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsType(TYPE_CONTINUOUS) and e:GetHandler():IsType(TYPE_SPELL) return e:GetHandler():IsType(TYPE_CONTINUOUS) and e:GetHandler():IsType(TYPE_SPELL)
end end
function c62624525.costfilter(c) function c62624525.costfilter(c,e,tp)
return c:IsSetCard(0x6d0) and c:IsType(TYPE_MONSTER) and c:IsReleasable() return c:IsSetCard(0x6d0) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
and Duel.GetLocationCountFromEx(tp,tp,c)>0 and Duel.IsExistingMatchingCard(c62624525.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function c62624525.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c62624525.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() if chk==0 then return e:GetHandler():IsReleasable()
and Duel.IsExistingMatchingCard(c62624525.costfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingMatchingCard(c62624525.costfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c62624525.costfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c62624525.costfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c62624525.spfilter(c,e,tp) function c62624525.spfilter(c,e,tp,ec)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and c:IsCode(62624630) and c:IsCode(62624630) and Duel.GetLocationCountFromEx(tp,tp,ec,c)>0
end
function c62624525.spfilter1(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and c:IsCode(62624630) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c62624525.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624525.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62624525.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c62624525.spop(e,tp,eg,ep,ev,re,r,rp) function c62624525.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62624525.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c62624525.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -35,17 +35,20 @@ end ...@@ -35,17 +35,20 @@ end
function cm.tgfilter(c) function cm.tgfilter(c)
return c:IsSetCard(0x2c5) and c:IsAbleToGrave() and c:IsFaceupEx() return c:IsSetCard(0x2c5) and c:IsAbleToGrave() and c:IsFaceupEx()
end end
function cm.tgfilter1(c)
return aux.IsCodeListed(c,75646600) and c:IsAbleToGrave() and c:IsFaceupEx()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_REMOVED,0,nil) local sg=Duel.GetMatchingGroup(cm.tgfilter1,tp,LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
if Duel.SendtoGrave(g,REASON_EFFECT)>0 and Duel.GetFlagEffect(tp,75646600)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) and #sg>0 then if Duel.SendtoGrave(g,REASON_EFFECT)>0 and Duel.GetFlagEffect(tp,75646600)>0 and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local tg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_REMOVED,0,0,1,nil) local tg=Duel.SelectMatchingCard(tp,cm.tgfilter1,tp,LOCATION_REMOVED,0,0,1,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN) Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN)
end end
......
...@@ -30,7 +30,7 @@ function cm.initial_effect(c) ...@@ -30,7 +30,7 @@ function cm.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1) e4:SetValue(1)
e4:SetCondition(cm.lkcon) e4:SetCondition(cm.lkcon)
c:RegisterEffect(e4) c:RegisterEffect(e4)
......
...@@ -112,6 +112,7 @@ function cm.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,6 +112,7 @@ function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
tc:SetMaterial(rg) tc:SetMaterial(rg)
end end
tc:CompleteProcedure()
end end
elseif a and not b then elseif a and not b then
local chkf=tp local chkf=tp
...@@ -161,6 +162,7 @@ function cm.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -161,6 +162,7 @@ function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
tc:SetMaterial(rg) tc:SetMaterial(rg)
end end
tc:CompleteProcedure()
else else
return false return false
end end
......
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