Commit 4e194629 authored by Huangnan's avatar Huangnan

fix

parent 6dccaeef
Pipeline #41993 failed with stages
in 8 minutes and 43 seconds
No preview for this file type
...@@ -108,7 +108,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -108,7 +108,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp) then if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then if tc then
......
...@@ -111,7 +111,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,7 +111,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.atkfilter(c) function s.atkfilter(c)
return cc:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function s.atkval(e,c) function s.atkval(e,c)
local ct=Duel.GetMatchingGroupCount(s.atkfilter,tp,LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(s.atkfilter,tp,LOCATION_GRAVE,0,nil)
......
...@@ -59,6 +59,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,6 +59,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if cl==3 and tg:GetClassCount(Card.GetCode)>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if cl==3 and tg:GetClassCount(Card.GetCode)>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:SelectSubGroup(tp,aux.dncheck,false,2,2) local sg=tg:SelectSubGroup(tp,aux.dncheck,false,2,2)
if sg then if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -32,7 +32,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if cl==2 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if cl==2 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:Select(tp,1,1,nil) local sg=tg:Select(tp,1,1,nil)
if sg then if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -40,7 +40,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if cl==5 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if cl==5 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,3) local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
if sg1 then if sg1 then
Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.SendtoHand(sg1,nil,REASON_EFFECT)
......
...@@ -41,7 +41,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
if cl==6 and #g>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) if cl==6 and #g>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,3) local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil) local sg2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
......
...@@ -28,7 +28,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil) local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if cl==3 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if cl==3 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:Select(tp,1,1,nil) local sg=tg:Select(tp,1,1,nil)
if sg then if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -65,7 +65,7 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.ovfilter2,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.ovfilter2,tp,LOCATION_DECK,0,nil)
if #g>0 then if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Overlay(c,sg) Duel.Overlay(c,sg)
end end
......
...@@ -129,17 +129,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,17 +129,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g3=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil) local g3=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil) local sg1=g1:Select(tp,1,1,nil)
sg:Merge(sg1) sg:Merge(sg1)
end end
if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(id,4))) then if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(id,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil) local sg2=g2:Select(tp,1,1,nil)
sg:Merge(sg2) sg:Merge(sg2)
end end
if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(id,5))) then if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(id,5))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg3=g3:Select(tp,1,1,nil) local sg3=g3:Select(tp,1,1,nil)
sg:Merge(sg3) sg:Merge(sg3)
end end
......
...@@ -38,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,2,2,nil) local tg=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,2,2,nil)
tg:Merge(cg) tg:Merge(cg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,4,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,4,0,0)
if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,e:GetHandler(),1,nil) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(s.chainlm) Duel.SetChainLimit(s.chainlm)
end end
end end
......
...@@ -33,7 +33,7 @@ function s.cfilter(c,tp) ...@@ -33,7 +33,7 @@ function s.cfilter(c,tp)
return c:IsRace(RACE_FIEND) and not c:IsPublic() and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,attr) return c:IsRace(RACE_FIEND) and not c:IsPublic() and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,attr)
end end
function s.thfilter(c,attr) function s.thfilter(c,attr)
return not c:IsSummonableCard() and c:IsRace(RACE_FIEND) and c:IsAttribute(attr) return not c:IsSummonableCard() and c:IsRace(RACE_FIEND) and c:IsAttribute(attr) and c:IsAbleToHand()
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)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
......
...@@ -49,7 +49,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ 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_REMOVED,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_COST)
local tc=g:GetFirst() local tc=g:GetFirst()
e:SetLabelObject(tc) e:SetLabelObject(tc)
end end
......
...@@ -91,7 +91,7 @@ function cm.geop(e,tp) ...@@ -91,7 +91,7 @@ function cm.geop(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,e:GetLabel()) Duel.Hint(HINT_CARD,0,e:GetLabel())
if not c:IsLocation(LOCATION_MZONE) or not c:IsFaceup() then return end if not c:IsLocation(LOCATION_MZONE) or not c:IsFaceup() then return end
c:RegisterFlagEffect(e:GetLabel(),rsreset.est,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) c:RegisterFlagEffect(e:GetLabel(),RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function rkch.gaincon(code) function rkch.gaincon(code)
return function(e) return function(e)
......
...@@ -34,6 +34,21 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,6 +34,21 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ph = Duel.GetCurrentPhase() local ph = Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()==0 and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) and Duel.GetFlagEffect(tp,16104242)==0 return Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()==0 and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) and Duel.GetFlagEffect(tp,16104242)==0
......
...@@ -75,7 +75,8 @@ function s.checkintab(tab,v) ...@@ -75,7 +75,8 @@ function s.checkintab(tab,v)
end end
return false return false
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e)
for tp=0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then
local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)} local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)}
for _,ke in ipairs(effect_record) do for _,ke in ipairs(effect_record) do
...@@ -84,20 +85,24 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,20 +85,24 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end
return false return false
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e)
for tp=0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then
local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)} local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)}
for _,ke in ipairs(effect_record) do for _,ke in ipairs(effect_record) do
if not s.checkintab(record_tab,ke) then if not s.checkintab(record_tab,ke) then
local condition=ke:GetCondition() or aux.TRUE
ke:SetCondition(function(ce,ctp,...) ke:SetCondition(function(ce,ctp,...)
return not Duel.IsPlayerAffectedByEffect(ctp,id) and ke:GetCondition()(...) return not Duel.IsPlayerAffectedByEffect(ctp,id) and condition(ce,ctp,...)
end) end)
table.insert(record_tab,ke) table.insert(record_tab,ke)
end end
end end
end end
end
end end
function s.spcheck(c,e,tp) function s.spcheck(c,e,tp)
return c:IsSetCard(0xcc3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xcc3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -146,6 +146,7 @@ function cm.rstop(e,tp,eg,ep,ev,re,r,rp) ...@@ -146,6 +146,7 @@ function cm.rstop(e,tp,eg,ep,ev,re,r,rp)
for i,v in ipairs(tab) do for i,v in ipairs(tab) do
if aux.GetValueType(v)=="Effect" then if aux.GetValueType(v)=="Effect" then
v:Reset() v:Reset()
e:GetHandler():ResetFlagEffect(m+1)
end end
end end
end end
......
...@@ -12,7 +12,7 @@ function s.spsummon(c) ...@@ -12,7 +12,7 @@ function s.spsummon(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.pbfilter(c) function s.pbfilter(c)
return (c:IsSetCard(0x5ca3) or c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WYRM)) and not c:IsPublic() return (c:IsSetCard(0x435) or c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WYRM)) and not c:IsPublic()
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()
...@@ -49,7 +49,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -49,7 +49,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
end end
function s.tograve(c) function s.tograve(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
...@@ -64,17 +64,20 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,17 +64,20 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsSetCard(0x5ca3) and c:IsAbleToGrave() return c:IsSetCard(0x435) and (c:IsAbleToGrave() or c:IsAbleToRemove())
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if g:GetCount()>0 then if tc then
Duel.SendtoGrave(g,REASON_EFFECT) if tc:IsAbleToGrave() and (not tc:IsAbleToRemove() or Duel.SelectOption(tp,1191,1192)==0) then
Duel.SendtoGrave(tc,REASON_EFFECT)
elseif tc:IsAbleToRemove() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end end
end end
function s.initial_effect(c) function s.initial_effect(c)
......
...@@ -36,50 +36,43 @@ function c72404101.initial_effect(c) ...@@ -36,50 +36,43 @@ function c72404101.initial_effect(c)
end end
--e3 --e3
function c72404101.costfilter(c,e,tp) function c72404101.costfilter3(c,e,tp)
return c:IsSetCard(0x720) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1) and Duel.GetMZoneCount(tp,c,tp)>0 and Duel.IsExistingMatchingCard(c72404101.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) return c:IsSetCard(0x720) and Duel.GetMZoneCount(tp,c)>0 and c:IsControler(tp) and c:IsFaceup()
and Duel.IsExistingMatchingCard(c72404101.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetLevel(),c:GetCode())
end
function c72404101.spfilter3(c,e,tp,lv,code)
return c:IsRace(RACE_PLANT) and c:IsLevel(lv) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c72404101.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c72404101.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then if chk==0 then return Duel.CheckReleaseGroup(tp,c72404101.costfilter3,1,nil,e,tp) end
e:SetLabel(1) local rg=Duel.SelectReleaseGroup(tp,c72404101.costfilter3,1,1,nil,e,tp)
return true e:SetLabel(rg:GetFirst():GetLevel())
end e:SetValue(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
end end
function c72404101.target3(e,tp,eg,ep,ev,re,r,rp,chk) function c72404101.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return true end
if e:GetLabel()==1 then
return Duel.CheckReleaseGroup(REASON_COST,tp,c72404101.costfilter,1,nil,e,tp)
else
return false
end
end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c72404101.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
e:SetLabel(0)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c72404101.spfilter(c,e,tp,tc)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(tc:GetLevel()) and not c:IsCode(tc:GetCode())
end
function c72404101.operation3(e,tp,eg,ep,ev,re,r,rp) function c72404101.operation3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local lv=e:GetLabel()
local code=e:GetValue()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c72404101.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc) local g=Duel.SelectMatchingCard(tp,c72404101.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv,code)
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
end end
--e4 --e4
function c72404101.costfilter2(c) function c72404101.costfilter4(c)
return c:IsRace(RACE_PLANT) and c:IsReleasable() return c:IsRace(RACE_PLANT) and c:IsReleasable()
end end
function c72404101.cost4(e,tp,eg,ep,ev,re,r,rp,chk) function c72404101.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72404101.costfilter2,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c72404101.costfilter4,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c72404101.costfilter2,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c72404101.costfilter4,tp,LOCATION_HAND,0,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c72404101.target4(e,tp,eg,ep,ev,re,r,rp,chk) function c72404101.target4(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
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