Commit 25cdd555 authored by nanahira's avatar nanahira

Merge branch 'patch-skip-confirm' of https://github.com/mercury233/ygopro-scripts into develop

parents 2134e8af a6a79cc4
...@@ -71,7 +71,7 @@ end ...@@ -71,7 +71,7 @@ end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #g==0 then return end if #g==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) local sg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
......
...@@ -50,7 +50,7 @@ function c14220547.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function c14220547.tgop(e,tp,eg,ep,ev,re,r,rp)
g=g1 g=g1
else else
g=g2 g=g2
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil)
......
...@@ -105,7 +105,7 @@ function c17016131.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -105,7 +105,7 @@ function c17016131.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c17016131.tgop2(e,tp,eg,ep,ev,re,r,rp) function c17016131.tgop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
local tg=g:Filter(Card.IsAbleToGrave,nil) local tg=g:Filter(Card.IsAbleToGrave,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=tg:Select(tp,1,1,nil):GetFirst() local tc=tg:Select(tp,1,1,nil):GetFirst()
......
...@@ -50,7 +50,7 @@ end ...@@ -50,7 +50,7 @@ end
function c20426907.disop1(e,tp,eg,ep,ev,re,r,rp) function c20426907.disop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -82,18 +82,20 @@ function c20426907.disop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,18 +82,20 @@ function c20426907.disop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c20426907.disfilter,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c20426907.disfilter,nil,e)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET) if tc:IsCanBeDisabledByEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetCode(EFFECT_DISABLE)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local e2=Effect.CreateEffect(e:GetHandler()) tc:RegisterEffect(e1)
e2:SetType(EFFECT_TYPE_SINGLE) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetValue(RESET_TURN_SET) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
...@@ -88,7 +88,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -88,7 +88,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
......
...@@ -38,7 +38,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +38,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE) e1:SetCode(EFFECT_ADD_TYPE)
......
...@@ -60,7 +60,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ac=c:GetBattleTarget() local ac=c:GetBattleTarget()
e:SetLabelObject(ac) e:SetLabelObject(ac)
return ac and ac:IsFaceup() and ac:IsControler(1-tp) return ac and ac:IsControler(1-tp)
end end
function s.desfilter2(c) function s.desfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x1115) return c:IsFaceup() and c:IsSetCard(0x1115)
......
...@@ -47,7 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
......
...@@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
......
...@@ -83,7 +83,7 @@ function s.drmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,7 +83,7 @@ function s.drmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end end
function s.drmop(e,tp,eg,ep,ev,re,r,rp) function s.drmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain() local g=Duel.GetTargetsRelateToChain():Filter(Card.IsAbleToRemove,nil,tp,POS_FACEUP,REASON_EFFECT)
if #g~=2 or Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)==0 if #g~=2 or Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)==0
or not g:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then return end or not g:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then return end
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
......
...@@ -86,7 +86,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
g=g1 g=g1
elseif sel==1 then elseif sel==1 then
g=g2 g=g2
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,s.tgfilter,1,1,nil) local sg=g:FilterSelect(tp,s.tgfilter,1,1,nil)
......
...@@ -43,7 +43,7 @@ function c40352445.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c40352445.tgop(e,tp,eg,ep,ev,re,r,rp)
local atk=tc1:GetAttack() local atk=tc1:GetAttack()
local rg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local rg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #rg>0 then if #rg>0 then
Duel.ConfirmCards(tp,rg) Duel.ConfirmCards(tp,rg,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc2=rg:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil):GetFirst() local tc2=rg:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil):GetFirst()
Duel.ShuffleExtra(1-tp) Duel.ShuffleExtra(1-tp)
......
...@@ -57,7 +57,7 @@ function c42427230.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c42427230.spop(e,tp,eg,ep,ev,re,r,rp)
end end
for i=1,count do for i=1,count do
local token=Duel.CreateToken(tp,42427231) local token=Duel.CreateToken(tp,42427231)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(42427230,3)) e1:SetDescription(aux.Stringid(42427230,3))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
......
...@@ -37,8 +37,8 @@ function s.initial_effect(c) ...@@ -37,8 +37,8 @@ function s.initial_effect(c)
--discard deck --discard deck
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1)) e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCategory(CATEGORY_DECKDES) e4:SetCategory(CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
...@@ -49,6 +49,7 @@ function s.initial_effect(c) ...@@ -49,6 +49,7 @@ function s.initial_effect(c)
--to hand --to hand
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2)) e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED) e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY) e5:SetProperty(EFFECT_FLAG_DELAY)
...@@ -60,20 +61,20 @@ end ...@@ -60,20 +61,20 @@ end
function s.fusfilter(c) function s.fusfilter(c)
return c:IsCode(19959563,57774843) and c:IsAbleToRemoveAsCost() return c:IsCode(19959563,57774843) and c:IsAbleToRemoveAsCost()
end end
function s.fselect(g) function s.fselect(g,tp,sc)
return g:GetClassCount(Card.GetCode)==2 and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) return g:GetClassCount(Card.GetCode)==2 and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
and g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)
end end
function s.spcon(e,c) function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local fg=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
return fg:CheckSubGroup(s.fselect,2,2) return g:CheckSubGroup(s.fselect,2,2,tp,c)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local cp=c:GetControler() local g=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local g=Duel.GetMatchingGroup(s.fusfilter,cp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_REMOVE) local sg=g:SelectSubGroup(tp,s.fselect,true,2,2,tp,c)
local sg=g:SelectSubGroup(cp,s.fselect,true,2,2)
if sg then if sg then
sg:KeepAlive() sg:KeepAlive()
e:SetLabelObject(sg) e:SetLabelObject(sg)
...@@ -84,6 +85,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -84,6 +85,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject() local sg=e:GetLabelObject()
c:SetMaterial(sg) c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
sg:DeleteGroup()
end end
function s.recost(e,tp,eg,ep,ev,re,r,rp,chk) function s.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end if chk==0 then return Duel.CheckLPCost(tp,2000) end
...@@ -112,31 +114,32 @@ end ...@@ -112,31 +114,32 @@ end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():IsPreviousControler(tp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp)
end end
function s.thfilter1(c) function s.thfilter1(c,tp)
return c:IsFaceup() and c:IsCode(19959563) and c:IsAbleToHand() return c:IsFaceup() and c:IsCode(19959563) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_REMOVED,0,1,c)
end end
function s.thfilter2(c) function s.thfilter2(c)
return c:IsFaceup() and c:IsCode(57774843) and c:IsAbleToHand() return c:IsFaceup() and c:IsCode(57774843) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,LOCATION_REMOVED)
end end
function s.fselect2(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_REMOVED,0,nil) local g1=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_REMOVED,0,1,1,nil,tp)
local g2=Duel.GetMatchingGroup(s.thfilter2,tp,LOCATION_REMOVED,0,nil) if #g1==0 then return end
if #g1>0 and #g2>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SendtoHand((g1+g2):SelectSubGroup(tp,s.fselect2,false,2,2),nil,REASON_EFFECT) local g2=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_REMOVED,0,1,1,g1,tp)
g1:Merge(g2)
if Duel.SendtoHand(g1,nil,REASON_EFFECT)==2 then
local tg=Duel.GetOperatedGroup() local tg=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-tp,tg) if tg:FilterCount(s.spfilter,nil,e,tp)==2
if tg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect() Duel.BreakEffect()
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
......
...@@ -74,7 +74,7 @@ function c4837861.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function c4837861.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:FilterSelect(tp,c4837861.eqfilter,1,1,nil,tp) local sg=g:FilterSelect(tp,c4837861.eqfilter,1,1,nil,tp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
......
...@@ -90,7 +90,7 @@ end ...@@ -90,7 +90,7 @@ end
function c48654323.tgop(e,tp,eg,ep,ev,re,r,rp) function c48654323.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #g==0 then return end if #g==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT) Duel.SendtoGrave(tg,REASON_EFFECT)
......
...@@ -72,7 +72,7 @@ end ...@@ -72,7 +72,7 @@ end
function c50179591.rmop2(e,tp,eg,ep,ev,re,r,rp) function c50179591.rmop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local mg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil) local mg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
if mg:GetCount()>0 then if mg:GetCount()>0 then
......
...@@ -59,7 +59,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
...@@ -64,7 +64,7 @@ function c56347375.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c56347375.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c56347375.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c56347375.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then if tc then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE) e1:SetCode(EFFECT_ADD_TYPE)
......
...@@ -39,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,co,nil) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,co,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
......
...@@ -27,8 +27,8 @@ function c60921537.extraop(e,tp,eg,ep,ev,re,r,rp,tc) ...@@ -27,8 +27,8 @@ function c60921537.extraop(e,tp,eg,ep,ev,re,r,rp,tc)
g=g1 g=g1
else else
g=g2 g=g2
Duel.ConfirmCards(tp,g,true)
end end
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT) Duel.SendtoGrave(tg,REASON_EFFECT)
......
...@@ -41,7 +41,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +41,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToChain() and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
......
...@@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND,0,1,1,nil,e,tp,race,att,atk) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND,0,1,1,nil,e,tp,race,att,atk)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
......
...@@ -91,7 +91,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +91,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE) e1:SetCode(EFFECT_ADD_TYPE)
......
...@@ -72,7 +72,7 @@ function c68304193.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,7 +72,7 @@ function c68304193.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c68304193.rmop(e,tp,eg,ep,ev,re,r,rp) function c68304193.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,c68304193.rmfilter,1,1,nil,tp) local sg=g:FilterSelect(tp,c68304193.rmfilter,1,1,nil,tp)
if #sg>0 then if #sg>0 then
......
...@@ -48,7 +48,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,7 +48,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local fid=e:GetHandler():GetFieldID() local fid=e:GetHandler():GetFieldID()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -27,7 +27,7 @@ function c80159717.exop(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c80159717.exop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
local ct=e:GetLabel() local ct=e:GetLabel()
if g:GetCount()<ct then return end if g:GetCount()<ct then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,ct,ct,nil) local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,ct,ct,nil)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
......
...@@ -25,6 +25,7 @@ function c83407038.initial_effect(c) ...@@ -25,6 +25,7 @@ function c83407038.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED) e3:SetCode(EVENT_BATTLED)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c83407038.rmcon)
e3:SetTarget(c83407038.rmtg) e3:SetTarget(c83407038.rmtg)
e3:SetOperation(c83407038.rmop) e3:SetOperation(c83407038.rmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -70,6 +71,9 @@ end ...@@ -70,6 +71,9 @@ end
function c83407038.check(c,tp) function c83407038.check(c,tp)
return c and c:IsControler(tp) and c:IsSetCard(0x4) return c and c:IsControler(tp) and c:IsSetCard(0x4)
end end
function c83407038.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
end
function c83407038.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c83407038.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil if chk==0 then return Duel.GetAttackTarget()~=nil
and (c83407038.check(Duel.GetAttacker(),tp) or c83407038.check(Duel.GetAttackTarget(),tp)) end and (c83407038.check(Duel.GetAttacker(),tp) or c83407038.check(Duel.GetAttackTarget(),tp)) end
......
...@@ -64,7 +64,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel())
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local fid=e:GetHandler():GetFieldID() local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -38,7 +38,7 @@ function c94185340.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c94185340.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c94185340.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetRank()+1) local sg=Duel.SelectMatchingCard(tp,c94185340.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetRank()+1)
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(94185340,1)) e1:SetDescription(aux.Stringid(94185340,1))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
......
...@@ -58,7 +58,7 @@ function c95474755.extg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,7 +58,7 @@ function c95474755.extg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c95474755.exop(e,tp,eg,ep,ev,re,r,rp) function c95474755.exop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil,tp,POS_FACEDOWN) local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil,tp,POS_FACEDOWN)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
......
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