Commit 07079df3 authored by Huangnan's avatar Huangnan

fix

parent 6fdb5a10
Pipeline #41741 failed with stages
in 6 minutes and 43 seconds
...@@ -51,7 +51,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.gcheck(g,tp,rc) function s.gcheck(g,tp,rc)
return g:IsContains(rc) and Duel.GetLocationCountFromEx(tp,tp,g)>0 return g:IsContains(rc) and Duel.GetLocationCountFromEx(tp,tp,g,TYPE_FUSION)>0
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -38,7 +38,7 @@ function s.sfilter(c,tc,e,tp) ...@@ -38,7 +38,7 @@ function s.sfilter(c,tc,e,tp)
return aux.IsCodeListed(tc,c:GetCode()) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return aux.IsCodeListed(tc,c:GetCode()) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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 Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc then return end if not tc then return end
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc,e,tp) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.sfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc,e,tp)
if #sg>0 then if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -48,7 +48,7 @@ end ...@@ -48,7 +48,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdcheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdcheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdcheck,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.SelectMatchingCard(tp,cm.tdcheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local tc=g:GetFirst() local tc=g:GetFirst()
e:SetLabelObject(tc) e:SetLabelObject(tc)
......
...@@ -49,8 +49,11 @@ function s.control(c) ...@@ -49,8 +49,11 @@ function s.control(c)
e1:SetOperation(s.ctrlop) e1:SetOperation(s.ctrlop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSummonPlayer(tp)
end
function s.ctrlcon(e,tp,eg,ep,ev,re,r,rp) function s.ctrlcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,47330700)~=0 and ep~=tp and eg:IsExists(Card.IsType,1,nil,TYPE_MONSTER) return Duel.GetFlagEffect(tp,47330700)~=0 and ep~=tp and eg:IsExists(s.filter,1,nil,1-tp)
end end
function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctrlfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(s.ctrlfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
...@@ -61,14 +64,14 @@ end ...@@ -61,14 +64,14 @@ end
function s.ctrlfilter(c) function s.ctrlfilter(c)
return c:IsSetCard(0xaca4) and not c:IsCode(id) return c:IsSetCard(0xaca4) and not c:IsCode(id)
end end
function s.ctfilter(c,e) function s.ctfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) and c:IsControlerCanBeChanged() return c:IsCanBeEffectTarget(e) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsControlerCanBeChanged()
end end
function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and eg:IsContains(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and eg:IsContains(chkc) end
if chk==0 then return eg:IsExists(s.ctfilter,1,nil,e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end if chk==0 then return eg:IsExists(s.ctfilter,1,nil,e,1-tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=eg:FilterSelect(tp,s.ctfilter,1,1,nil,e) local g=eg:FilterSelect(tp,s.ctfilter,1,1,nil,e,1-tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
......
...@@ -135,7 +135,7 @@ function s.rhfilter(c,e,tp) ...@@ -135,7 +135,7 @@ function s.rhfilter(c,e,tp)
end end
function s.rhtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.rhtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.rhfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return c:IsAbleToHand() and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(s.rhfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -102,8 +102,9 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,8 +102,9 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
Duel.BreakEffect()
local g2=Duel.SelectMatchingCard(tp,s.f2,tp,LOCATION_ONFIELD,0,1,1,nil) local g2=Duel.SelectMatchingCard(tp,s.f2,tp,LOCATION_ONFIELD,0,1,1,nil)
local ag=g:GetFirst() local ag=g2:GetFirst()
if c:IsSSetable() then if c:IsSSetable() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.Equip(tp,c,ag) Duel.Equip(tp,c,ag)
......
...@@ -45,12 +45,12 @@ function s.f2(c) ...@@ -45,12 +45,12 @@ function s.f2(c)
return c:IsDiscardable() return c:IsDiscardable()
end end
function s.f3(c) function s.f3(c,e)
return c:IsSetCard(0x3480) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER) return c:IsSetCard(0x3480) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER) and not c:IsImmuneToEffect(e)
end end
function s.f4(c) function s.f4(c,e)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER) return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER) and not c:IsImmuneToEffect(e)
end end
function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -100,14 +100,13 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,14 +100,13 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local q=e:GetLabel() local q=e:GetLabel()
if q==1 then if q==1 then
if Duel.IsExistingMatchingCard(s.f4,tp,LOCATION_MZONE,0,1,nil) then if Duel.IsExistingMatchingCard(s.f4,tp,LOCATION_MZONE,0,1,nil,e) then
q=2 q=2
end end
elseif q==0 then elseif q==0 then
if Duel.IsExistingMatchingCard(s.f3,tp,LOCATION_MZONE,0,1,nil) then if Duel.IsExistingMatchingCard(s.f3,tp,LOCATION_MZONE,0,1,nil,e) then
q=2 q=2
end end
end end
...@@ -116,24 +115,26 @@ end ...@@ -116,24 +115,26 @@ end
function s.op3(e,tp,eg,ep,ev,re,r,rp) function s.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local s=e:GetLabel() local p=e:GetLabel()
local g=Group.CreateGroup() local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(s.f3,tp,LOCATION_ONFIELD,0,nil,e) local g1=Duel.GetMatchingGroup(s.f3,tp,LOCATION_ONFIELD,0,nil,e)
local g2=Duel.GetMatchingGroup(s.f4,tp,LOCATION_ONFIELD,0,nil,e) local g2=Duel.GetMatchingGroup(s.f4,tp,LOCATION_ONFIELD,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
if s==1 then if p==1 then
g=g2:Select(tp,1,1,nil) g=g2:Select(tp,1,1,nil)
else elseif p==0 then
g=g1:Select(tp,1,1,nil) g=g1:Select(tp,1,1,nil)
end end
if g:GetCount()>0 then if g:GetCount()>0 then
local ag=g:GetFirst() local ag=g:GetFirst()
local e1=Effect.CreateEffect(ag) if ag:IsFaceup() and ag:IsRelateToEffect(e) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_ADD_TYPE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(TYPE_TUNER)
ag:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ag:RegisterEffect(e1)
end
end end
end end
\ No newline at end of file
...@@ -4,6 +4,7 @@ function c61200109.initial_effect(c) ...@@ -4,6 +4,7 @@ function c61200109.initial_effect(c)
--双招效果 --双招效果
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
...@@ -56,6 +57,7 @@ function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,6 +57,7 @@ function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.f1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.f1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end end
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0)
end end
function s.op1(e,tp,eg,ep,ev,re,r,rp) function s.op1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -99,8 +99,8 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,8 +99,8 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local bg=Duel.GetMatchingGroup(s.f3,tp,0,LOCATION_ONFIELD,nil) local bg=Duel.GetMatchingGroup(s.f3,tp,0,LOCATION_ONFIELD,nil)
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Destroy(c,REASON_EFFECT) Duel.Destroy(c,REASON_EFFECT)
Duel.Destroy(tc,REASON_EFFECT)
if bg:GetCount()>0 then if bg:GetCount()>0 then
local lbg=bg:Filter(s.f4,nil) local lbg=bg:Filter(s.f4,nil)
local ng=Group.CreateGroup() local ng=Group.CreateGroup()
......
...@@ -98,27 +98,35 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,27 +98,35 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(s.f2,tp,LOCATION_HAND,0,c) local g1=Duel.GetMatchingGroup(s.f2,tp,LOCATION_HAND,0,c)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.f2),tp,LOCATION_GRAVE,0,nil) local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.f2),tp,LOCATION_GRAVE,0,nil)
local b1=false
local b2=false
local g=Group.CreateGroup() local g=Group.CreateGroup()
local q=0
local op=0
if g1:GetCount()>=1 then if g1:GetCount()>=1 then
b1=true q=1
end end
if g2:GetCount()>=2 then if g2:GetCount()>=2 then
b2=true if q==0 then
q=2
elseif q==1 then
q=3
end
end end
if chk==0 then if chk==0 then
return c:IsAbleToGraveAsCost() return c:IsAbleToGraveAsCost()
and (b1 or b2) and (q==1 or q==2 or q==3)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local op=aux.SelectFromOptions(tp, if q==3 then
{b1,aux.Stringid(id,2)}, op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))+1
{b2,aux.Stringid(id,3)}) elseif q==2 then
op=2
elseif q==1 then
op=1
end
if op==1 then if op==1 then
local g=g1:Select(tp,1,1,nil) g=g1:Select(tp,1,1,nil)
elseif op==2 then elseif op==2 then
local g=g2:Select(tp,2,2,nil) g=g2:Select(tp,2,2,nil)
end end
Duel.SendtoGrave(c,REASON_COST) Duel.SendtoGrave(c,REASON_COST)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -81,7 +81,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
tc:CompleteProcedure() Duel.SpecialSummonComplete()
end end
end end
end end
......
...@@ -96,8 +96,9 @@ end ...@@ -96,8 +96,9 @@ end
function c82001203.operation(e,tp,eg,ep,ev,re,r,rp) function c82001203.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local dg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) local dg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local rt=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*500 if dg:GetCount()>0 and Duel.SendtoHand(dg,nil,REASON_EFFECT)>0 then
if dg:GetCount()>0 and Duel.SendtoHand(dg,nil,REASON_EFFECT)>0 and Duel.Recover(tp,rt,REASON_EFFECT)>0 then local rt=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*500
Duel.Recover(tp,rt,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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