Commit 58bab7be authored by wyykak's avatar wyykak

fix by sama and k

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 4ce03089
...@@ -49,6 +49,9 @@ function c23206.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,6 +49,9 @@ function c23206.operation(e,tp,eg,ep,ev,re,r,rp)
if t[sel]==aux.Stringid(23206,0) then if t[sel]==aux.Stringid(23206,0) then
local g=Duel.SelectMatchingCard(tp,c23206.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,dice) local g=Duel.SelectMatchingCard(tp,c23206.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,dice)
g:GetFirst():AddCounter(0x128a,dice) g:GetFirst():AddCounter(0x128a,dice)
if Duel.GetFlagEffect(g:GetFirst():GetControler(),23200)==0 then
Duel.RegisterFlagEffect(tg:GetFirst():GetControler(),23200,0,0,0)
end
elseif t[sel]==aux.Stringid(23206,1) then elseif t[sel]==aux.Stringid(23206,1) then
local g=Duel.SelectMatchingCard(tp,c23206.hfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,dice) local g=Duel.SelectMatchingCard(tp,c23206.hfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,dice)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
......
...@@ -55,7 +55,7 @@ function c27073.filter(c) ...@@ -55,7 +55,7 @@ function c27073.filter(c)
end end
function c27073.target(e,tp,eg,ep,ev,re,r,rp,chk) function c27073.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27073.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(c27073.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_TO_GRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TO_GRAVE,nil,1,tp,LOCATION_DECK)
end end
function c27073.operation(e,tp,eg,ep,ev,re,r,rp) function c27073.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -66,7 +66,7 @@ function c27073.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c27073.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
end end
end end
end end
......
...@@ -55,7 +55,7 @@ function c27076.filter(c) ...@@ -55,7 +55,7 @@ function c27076.filter(c)
end end
function c27076.target(e,tp,eg,ep,ev,re,r,rp,chk) function c27076.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27076.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(c27076.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
end end
function c27076.operation(e,tp,eg,ep,ev,re,r,rp) function c27076.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
...@@ -67,7 +67,7 @@ function c27076.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function c27076.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
end end
end end
end end
......
...@@ -27,6 +27,7 @@ function c50103.initial_effect(c) ...@@ -27,6 +27,7 @@ function c50103.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c50103.con4)
e2:SetOperation(c50103.op4) e2:SetOperation(c50103.op4)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -76,9 +77,10 @@ end ...@@ -76,9 +77,10 @@ end
function c50103.acon(e,tp,eg,ep,ev,re,r,rp) function c50103.acon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c50103.afilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c50103.afilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c50103.con4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0
end
function c50103.op4(e,tp,eg,ep,ev,re,r,rp) function c50103.op4(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetOverlayCount()
if ct>0 then return end
if Duel.GetLP(tp)>=500 then if Duel.GetLP(tp)>=500 then
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
......
...@@ -4,8 +4,8 @@ function c50171.initial_effect(c) ...@@ -4,8 +4,8 @@ function c50171.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50171,0)) e4:SetDescription(aux.Stringid(50171,0))
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE+LOCATION_HAND)
e4:SetCountLimit(1) e4:SetCountLimit(1,50171)
e4:SetTarget(c50171.btg) e4:SetTarget(c50171.btg)
e4:SetOperation(c50171.bop) e4:SetOperation(c50171.bop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -29,6 +29,7 @@ function c50171.bop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,6 +29,7 @@ function c50171.bop(e,tp,eg,ep,ev,re,r,rp)
TET.ELCounter.Add(nil,1-tp,50234,num,e) TET.ELCounter.Add(nil,1-tp,50234,num,e)
--destroy replace --destroy replace
local c=e:GetHandler() local c=e:GetHandler()
if c:IsLocation(LOCATION_MZONE) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_DESTROY_REPLACE)
...@@ -37,6 +38,7 @@ function c50171.bop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +38,7 @@ function c50171.bop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c50171.repval) e2:SetValue(c50171.repval)
e2:SetOperation(c50171.repop) e2:SetOperation(c50171.repop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end
end end
function c50171.filter(c,tp) function c50171.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
......
...@@ -35,7 +35,7 @@ function c50325.bop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c50325.bop(e,tp,eg,ep,ev,re,r,rp)
end end
function c50325.ccon(e,tp,eg,ep,ev,re,r,rp) function c50325.ccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==c and c:IsRelateToBattle()
end end
function c50325.cop(e,tp,eg,ep,ev,re,r,rp) function c50325.cop(e,tp,eg,ep,ev,re,r,rp)
local num=1 local num=1
......
...@@ -55,8 +55,11 @@ function c50517.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,8 +55,11 @@ function c50517.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c50517.discon(e,tp,eg,ep,ev,re,r,rp) function c50517.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local og=Duel.GetOverlayGroup(tp,LOCATION_MZONE,0)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(c50517.discfilter,tp,0x94,0,1,c) local fg=Duel.GetFieldGroup(tp,0x14,0)
og:Merge(fg)
local sg=og:Filter(c50517.discfilter,nil)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) and Duel.IsChainNegatable(ev) and sg:GetCount()>0
end end
function c50517.discfilter(c) function c50517.discfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250) and c:IsAbleToDeck() and not c:IsStatus(STATUS_BATTLE_DESTROYED) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250) and c:IsAbleToDeck() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
...@@ -66,7 +69,7 @@ function c50517.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,7 +69,7 @@ function c50517.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0x94) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0x80)
end end
end end
function c50517.disop(e,tp,eg,ep,ev,re,r,rp) function c50517.disop(e,tp,eg,ep,ev,re,r,rp)
...@@ -77,21 +80,31 @@ function c50517.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,21 +80,31 @@ function c50517.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
local og=Duel.GetOverlayGroup(tp,LOCATION_MZONE,0)
local fg=Duel.GetFieldGroup(tp,0x14,0)
og:Merge(fg)
local sg=og:Filter(c50517.discfilter,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c50517.discfilter,tp,0x94,0,1,1,c) local g=sg:Select(tp,1,1,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function c50517.discon2(e,tp,eg,ep,ev,re,r,rp) function c50517.discon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local og=Duel.GetOverlayGroup(tp,LOCATION_MZONE,0)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(c50517.discfilter,tp,0x90,0,1,c) local fg=Duel.GetFieldGroup(tp,0x14,0)
and Duel.IsExistingMatchingCard(c50517.filter,tp,0x11,0,1,nil) og:Merge(fg)
local sg=og:Filter(c50517.discfilter,nil)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) and Duel.IsChainNegatable(ev) and sg:GetCount()>0
end end
function c50517.disop2(e,tp,eg,ep,ev,re,r,rp) function c50517.disop2(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetOverlayGroup(tp,LOCATION_MZONE,0)
local fg=Duel.GetFieldGroup(tp,0x14,0)
og:Merge(fg)
local sg=og:Filter(c50517.discfilter,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c50517.discfilter,tp,0x94,0,1,1,c) local g=sg:Select(tp,1,1,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
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