Commit 39cb7323 authored by Vury Leo's avatar Vury Leo

improve destroy-replace

parent d2f5e2cf
...@@ -93,7 +93,7 @@ function c17228908.repfilter(c,tp) ...@@ -93,7 +93,7 @@ function c17228908.repfilter(c,tp)
end end
function c17228908.desfilter(c,e) function c17228908.desfilter(c,e)
return c:IsRace(RACE_DINOSAUR) and c:IsDestructable(e) return c:IsRace(RACE_DINOSAUR) and c:IsDestructable(e)
and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c17228908.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c17228908.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=eg:FilterCount(c17228908.repfilter,nil,tp) local ct=eg:FilterCount(c17228908.repfilter,nil,tp)
......
...@@ -48,7 +48,7 @@ function c20920083.tg(e,c) ...@@ -48,7 +48,7 @@ function c20920083.tg(e,c)
end end
function c20920083.repfilter(c,e) function c20920083.repfilter(c,e)
return c:GetSequence()<5 and c:IsDestructable(e) return c:GetSequence()<5 and c:IsDestructable(e)
and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c20920083.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c20920083.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -64,6 +64,7 @@ function c20920083.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,6 +64,7 @@ function c20920083.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c20920083.desrepop(e,tp,eg,ep,ev,re,r,rp) function c20920083.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,20920083)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -19,7 +19,7 @@ function c22862454.repfilter(c,tp) ...@@ -19,7 +19,7 @@ function c22862454.repfilter(c,tp)
end end
function c22862454.desfilter(c,e,tp) function c22862454.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsType(TYPE_MONSTER) return c:IsControler(tp) and c:IsType(TYPE_MONSTER)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c22862454.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c22862454.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -40,7 +40,7 @@ function c27782503.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c27782503.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c27782503.repfilter(c,e) function c27782503.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -55,6 +55,7 @@ function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,6 +55,7 @@ function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c27782503.desrepop(e,tp,eg,ep,ev,re,r,rp) function c27782503.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,27782503)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -18,7 +18,7 @@ function c2881864.repfilter(c,tp) ...@@ -18,7 +18,7 @@ function c2881864.repfilter(c,tp)
end end
function c2881864.desfilter(c,e,tp) function c2881864.desfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and (c:IsSetCard(0x134) or c:IsRace(RACE_BEASTWARRIOR)) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and (c:IsSetCard(0x134) or c:IsRace(RACE_BEASTWARRIOR))
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c2881864.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c2881864.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c2881864.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c2881864.repfilter,1,nil,tp)
......
...@@ -115,6 +115,7 @@ function c29867611.desrepval(e,c) ...@@ -115,6 +115,7 @@ function c29867611.desrepval(e,c)
return c29867611.repfilter(c,e:GetHandlerPlayer()) return c29867611.repfilter(c,e:GetHandlerPlayer())
end end
function c29867611.desrepop(e,tp,eg,ep,ev,re,r,rp) function c29867611.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29867611)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end end
function c29867611.atkcon(e) function c29867611.atkcon(e)
......
...@@ -44,7 +44,7 @@ function c29981921.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c29981921.disop(e,tp,eg,ep,ev,re,r,rp)
end end
function c29981921.repfilter(c,e) function c29981921.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -59,6 +59,7 @@ function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,6 +59,7 @@ function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c29981921.desrepop(e,tp,eg,ep,ev,re,r,rp) function c29981921.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29981921)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -25,7 +25,7 @@ function c31904181.dircon(e) ...@@ -25,7 +25,7 @@ function c31904181.dircon(e)
end end
function c31904181.repfilter(c,e) function c31904181.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -40,6 +40,7 @@ function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,6 +40,7 @@ function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c31904181.desrepop(e,tp,eg,ep,ev,re,r,rp) function c31904181.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,31904181)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -56,7 +56,7 @@ function s.repfilter(c,tp) ...@@ -56,7 +56,7 @@ function s.repfilter(c,tp)
end end
function s.desfilter(c,e,tp) function s.desfilter(c,e,tp)
return c:IsFaceupEx() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsCode(96228804) return c:IsFaceupEx() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsCode(96228804)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp)
......
...@@ -73,7 +73,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.repfilter(c,e) function s.repfilter(c,e)
return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -88,6 +88,7 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -88,6 +88,7 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp) function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -28,7 +28,7 @@ function c59496924.repfilter(c,tp) ...@@ -28,7 +28,7 @@ function c59496924.repfilter(c,tp)
end end
function c59496924.desfilter(c,e,tp) function c59496924.desfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd2) return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd2)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c59496924.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c59496924.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c59496924.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c59496924.repfilter,1,nil,tp)
......
...@@ -70,6 +70,7 @@ function c61840587.desfilter1(c,rc) ...@@ -70,6 +70,7 @@ function c61840587.desfilter1(c,rc)
return c:IsRelateToCard(rc) and c:IsLocation(LOCATION_MZONE) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) return c:IsRelateToCard(rc) and c:IsLocation(LOCATION_MZONE) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c61840587.desop(e,tp,eg,ep,ev,re,r,rp) function c61840587.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,61840587)
local c=e:GetHandler() local c=e:GetHandler()
local sg=e:GetLabelObject():GetLabelObject() local sg=e:GetLabelObject():GetLabelObject()
if not sg then return end if not sg then return end
......
...@@ -76,20 +76,24 @@ end ...@@ -76,20 +76,24 @@ end
function c6284176.repfilter(c,tp) function c6284176.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_PLANT) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_PLANT) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function c6284176.rfilter(c) function c6284176.rfilter(c,e)
return c:IsRace(RACE_PLANT) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) return c:IsRace(RACE_PLANT) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c6284176.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c6284176.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c6284176.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c6284176.repfilter,1,nil,tp)
and Duel.CheckReleaseGroupEx(tp,c6284176.rfilter,1,REASON_EFFECT,true,nil) end and Duel.CheckReleaseGroupEx(tp,c6284176.rfilter,1,REASON_EFFECT,true,nil,e) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectReleaseGroupEx(tp,c6284176.rfilter,1,1,REASON_EFFECT,true,nil,e)
e:SetLabelObject(g:GetFirst())
return true
else return false end
end end
function c6284176.repval(e,c) function c6284176.repval(e,c)
return c6284176.repfilter(c,e:GetHandlerPlayer()) return c6284176.repfilter(c,e:GetHandlerPlayer())
end end
function c6284176.repop(e,tp,eg,ep,ev,re,r,rp) function c6284176.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) local rc=e:GetLabelObject()
local g=Duel.SelectReleaseGroupEx(tp,c6284176.rfilter,1,1,REASON_EFFECT,true,nil)
Duel.Hint(HINT_CARD,0,6284176) Duel.Hint(HINT_CARD,0,6284176)
Duel.Release(g,REASON_EFFECT+REASON_REPLACE) Duel.Release(rc,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -54,7 +54,7 @@ function c63176202.spcon(e,c) ...@@ -54,7 +54,7 @@ function c63176202.spcon(e,c)
end end
function c63176202.repfilter(c,e) function c63176202.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -69,6 +69,7 @@ function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -69,6 +69,7 @@ function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c63176202.desrepop(e,tp,eg,ep,ev,re,r,rp) function c63176202.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,63176202)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -57,7 +57,7 @@ function c64398890.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c64398890.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c64398890.repfilter(c,e) function c64398890.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -72,6 +72,7 @@ function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,6 +72,7 @@ function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c64398890.desrepop(e,tp,eg,ep,ev,re,r,rp) function c64398890.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,64398890)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -53,7 +53,7 @@ function s.repfilter(c,tp) ...@@ -53,7 +53,7 @@ function s.repfilter(c,tp)
end end
function s.desfilter(c,e,tp) function s.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsFaceupEx() and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsControler(tp) and c:IsFaceupEx() and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp)
......
...@@ -48,7 +48,7 @@ function c675319.repfilter(c,tp) ...@@ -48,7 +48,7 @@ function c675319.repfilter(c,tp)
end end
function c675319.desfilter(c,e,tp) function c675319.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsType(TYPE_MONSTER) return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsType(TYPE_MONSTER)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c675319.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c675319.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c675319.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c675319.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp)
......
...@@ -24,7 +24,7 @@ function c69025477.dircon(e) ...@@ -24,7 +24,7 @@ function c69025477.dircon(e)
end end
function c69025477.repfilter(c,e) function c69025477.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -39,6 +39,7 @@ function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,6 +39,7 @@ function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c69025477.desrepop(e,tp,eg,ep,ev,re,r,rp) function c69025477.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,69025477)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -41,24 +41,29 @@ function s.repfilter(c,tp) ...@@ -41,24 +41,29 @@ function s.repfilter(c,tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and not c:IsReason(REASON_REPLACE) and not c:IsReason(REASON_REPLACE)
end end
function s.rfilter(c) function s.rfilter(c,e)
return c:IsRace(RACE_FIEND) return c:IsRace(RACE_FIEND)
and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp)
and Duel.CheckReleaseGroupEx(tp,s.rfilter,1,REASON_EFFECT,false,nil) end and Duel.CheckReleaseGroupEx(tp,s.rfilter,1,REASON_EFFECT,false,nil,e) end
return Duel.SelectEffectYesNo(tp,c,96) if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local rg=Duel.SelectReleaseGroupEx(tp,s.rfilter,1,1,REASON_EFFECT,false,nil,e)
e:SetLabelObject(rg:GetFirst())
return true
end
return false
end end
function s.desrepval(e,c) function s.desrepval(e,c)
return s.repfilter(c,e:GetHandlerPlayer()) return s.repfilter(c,e:GetHandlerPlayer())
end end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp) function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) local rc=e:GetLabelObject()
local g=Duel.SelectReleaseGroupEx(tp,s.rfilter,1,1,REASON_EFFECT,false,nil)
Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_CARD,0,id)
Duel.Release(g,REASON_EFFECT+REASON_REPLACE) Duel.Release(rc,REASON_EFFECT+REASON_REPLACE)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return not c:IsCode(id) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsCode(id) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -48,7 +48,7 @@ function c72330894.etlimit(e,c) ...@@ -48,7 +48,7 @@ function c72330894.etlimit(e,c)
end end
function c72330894.desfilter(c,e) function c72330894.desfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x12d) and c:IsDestructable(e) return c:IsFaceup() and c:IsSetCard(0x12d) and c:IsDestructable(e)
and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c72330894.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c72330894.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -93,7 +93,7 @@ function c73193552.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function c73193552.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c73193552.repfilter(c,e) function c73193552.repfilter(c,e)
return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c73193552.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c73193552.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -109,6 +109,7 @@ function c73193552.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -109,6 +109,7 @@ function c73193552.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c73193552.desrepop(e,tp,eg,ep,ev,re,r,rp) function c73193552.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,73193552)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -45,7 +45,7 @@ function c7631534.repfilter(c,tp) ...@@ -45,7 +45,7 @@ function c7631534.repfilter(c,tp)
end end
function c7631534.desfilter(c,e,tp) function c7631534.desfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x14f) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x14f)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c7631534.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c7631534.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c7631534.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c7631534.repfilter,1,nil,tp)
......
...@@ -49,7 +49,7 @@ function c80476891.repfilter(c,tp) ...@@ -49,7 +49,7 @@ function c80476891.repfilter(c,tp)
end end
function c80476891.desfilter(c,e,tp) function c80476891.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsOnField() return c:IsControler(tp) and c:IsOnField()
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c80476891.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c80476891.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c80476891.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c80476891.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
......
...@@ -72,7 +72,7 @@ function c83347294.repfilter(c,tp) ...@@ -72,7 +72,7 @@ function c83347294.repfilter(c,tp)
end end
function c83347294.desfilter(c,e,tp) function c83347294.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE) and c:IsSetCard(0x99) return c:IsControler(tp) and c:IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE) and c:IsSetCard(0x99)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c83347294.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c83347294.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c83347294.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c83347294.repfilter,1,nil,tp)
...@@ -90,6 +90,7 @@ function c83347294.repval(e,c) ...@@ -90,6 +90,7 @@ function c83347294.repval(e,c)
return c83347294.repfilter(c,e:GetHandlerPlayer()) return c83347294.repfilter(c,e:GetHandlerPlayer())
end end
function c83347294.repop(e,tp,eg,ep,ev,re,r,rp) function c83347294.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,83347294)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -35,7 +35,7 @@ function c85696777.repfilter(c,tp) ...@@ -35,7 +35,7 @@ function c85696777.repfilter(c,tp)
end end
function c85696777.desfilter(c,e,tp) function c85696777.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsControler(tp) and c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c85696777.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c85696777.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c85696777.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c85696777.repfilter,1,nil,tp)
...@@ -53,6 +53,7 @@ function c85696777.desrepval(e,c) ...@@ -53,6 +53,7 @@ function c85696777.desrepval(e,c)
return c85696777.repfilter(c,e:GetHandlerPlayer()) return c85696777.repfilter(c,e:GetHandlerPlayer())
end end
function c85696777.desrepop(e,tp,eg,ep,ev,re,r,rp) function c85696777.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,85696777)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -67,24 +67,25 @@ function s.desrepfilter(c,tp) ...@@ -67,24 +67,25 @@ function s.desrepfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function s.rfilter(c) function s.rfilter(c,e)
return c:IsRace(RACE_REPTILE+RACE_DINOSAUR) return c:IsRace(RACE_REPTILE+RACE_DINOSAUR)
and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.desrepfilter,1,nil,tp) if chk==0 then return eg:IsExists(s.desrepfilter,1,nil,tp)
and Duel.CheckReleaseGroupEx(tp,s.rfilter,1,REASON_EFFECT,false,nil) end and Duel.CheckReleaseGroupEx(tp,s.rfilter,1,REASON_EFFECT,false,nil,e) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local rg=Duel.SelectReleaseGroupEx(tp,s.rfilter,1,1,REASON_EFFECT,false,nil,e)
e:SetLabelObject(rg:GetFirst())
return true
else return false end
end end
function s.desrepval(e,c) function s.desrepval(e,c)
return s.desrepfilter(c,e:GetHandlerPlayer()) return s.desrepfilter(c,e:GetHandlerPlayer())
end end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp) function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) local rc=e:GetLabelObject()
local g=Duel.SelectReleaseGroupEx(tp,s.rfilter,1,1,REASON_EFFECT,false,nil) Duel.Hint(HINT_CARD,0,id)
if #g>0 then Duel.Release(rc,REASON_EFFECT+REASON_REPLACE)
Duel.Hint(HINT_CARD,0,id)
Duel.HintSelection(g)
Duel.Release(g,REASON_EFFECT+REASON_REPLACE)
end
end end
...@@ -57,7 +57,7 @@ function c90397998.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c90397998.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c90397998.repfilter(c,e) function c90397998.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -72,6 +72,7 @@ function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,6 +72,7 @@ function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c90397998.desrepop(e,tp,eg,ep,ev,re,r,rp) function c90397998.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,90397998)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
...@@ -39,7 +39,7 @@ function c95519486.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c95519486.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c95519486.repfilter(c,e) function c95519486.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x103d) return c:IsFaceup() and c:IsSetCard(0x103d)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) and not c:IsImmuneToEffect(e)
end end
function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -54,6 +54,7 @@ function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,6 +54,7 @@ function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c95519486.desrepop(e,tp,eg,ep,ev,re,r,rp) function c95519486.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,95519486)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
......
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