Commit 466f8d49 authored by POLYMER's avatar POLYMER

fix

parent 7bbf3151
...@@ -70,11 +70,11 @@ function cm.disop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,11 +70,11 @@ function cm.disop2(e,tp,eg,ep,ev,re,r,rp)
local aa=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_REMOVED+LOCATION_GRAVE,1,1,nil) local aa=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_REMOVED+LOCATION_GRAVE,1,1,nil)
Duel.SendtoDeck(aa,tp,0,REASON_EFFECT) Duel.SendtoDeck(aa,tp,0,REASON_EFFECT)
end end
function cm.efilter(e,te) function cm.efilter(e,te,c)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler()) return not g or not g:IsContains(c)
end end
function cm.eftg(e,c) function cm.eftg(e,c)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
......
...@@ -17,21 +17,20 @@ function c21401148.initial_effect(c) ...@@ -17,21 +17,20 @@ function c21401148.initial_effect(c)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--deck normal type --deck normal type
--把gettype和istype重写,如果c是id,并且在卡组,就返回原本的函数
local ori_GetType = Card.GetType local ori_GetType = Card.GetType
local ori_IsType = Card.IsType local ori_IsType = Card.IsType
Card.GetType = function(c) Card.GetType = function(c)
if c:IsOriginalCodeRule(id) and c:IsLocation(LOCATION_DECK) then if c:IsOriginalCodeRule(id) and c:IsLocation(LOCATION_DECK) and ori_IsType(c,TYPE_EFFECT) then
--Debug.Message("gettype") --Debug.Message("gettype")
return TYPE_MONSTER + TYPE_NORMAL return ori_GetType(c) ~ TYPE_EFFECT ~ TYPE_NORMAL
end end
return ori_GetType(c) return ori_GetType(c)
end end
Card.IsType = function(c,type) Card.IsType = function(c,type)
if c:IsOriginalCodeRule(id) and type & TYPE_NORMAL and c:IsLocation(LOCATION_DECK) then if c:IsOriginalCodeRule(id) and type & TYPE_NORMAL > 0 and c:IsLocation(LOCATION_DECK) then
if not type==TYPE_NORMAL then if type~=TYPE_NORMAL then
--Debug.Message("istype_cont") --Debug.Message("istype_cont")
return ori_IsType(c,type~TYPE_NORMAL) return ori_IsType(c,type ~ TYPE_NORMAL)
else else
--Debug.Message("istype_true") --Debug.Message("istype_true")
return true return true
...@@ -41,7 +40,7 @@ function c21401148.initial_effect(c) ...@@ -41,7 +40,7 @@ function c21401148.initial_effect(c)
end end
end end
--把gettype和istype重写,如果c是id,并且在卡组,就返回原本的函数
function s.EnableDualAttribute(c) function s.EnableDualAttribute(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -86,9 +86,9 @@ function c29002020.ioperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,9 +86,9 @@ function c29002020.ioperation(e,tp,eg,ep,ev,re,r,rp)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function c29002020.efilter(e,te) function c29002020.efilter(e,te,c)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() then return false end if te:GetOwnerPlayer()==e:GetHandlerPlayer() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler()) return not g or not g:IsContains(c)
end end
\ No newline at end of file
...@@ -154,9 +154,9 @@ end ...@@ -154,9 +154,9 @@ end
function cm.imlimit(e,c) function cm.imlimit(e,c)
return c:IsFaceup() and cm.SealDragon(c) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and cm.SealDragon(c) and c:IsType(TYPE_MONSTER)
end end
function cm.efilter(e,te,re,rp) function cm.efilter(e,te,c)
if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler()) return not g or not g:IsContains(c)
end end
...@@ -56,36 +56,22 @@ function cm.imcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,36 +56,22 @@ function cm.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_AQUA) and c:IsType(TYPE_SYNCHRO)
end
function cm.imop(e,tp,eg,ep,ev,re,r,rp) function cm.imop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_ADJUST) e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.etg)
e2:SetValue(cm.efilter)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
e2:SetRange(0xff) Duel.RegisterEffect(e2,tp)
e2:SetOperation(cm.immop)
e:GetHandler():RegisterEffect(e2)
end end
function cm.immop(e,tp,eg,ep,ev,re,r,rp) function cm.etg(e,c)
local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil) return c:IsRace(RACE_AQUA) and c:IsType(TYPE_SYNCHRO)
if #sg==0 then return end
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end end
function cm.efilter(e,te) function cm.efilter(e,te,c)
if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler()) return not g or not g:IsContains(c)
end end
...@@ -19,12 +19,12 @@ function cm.econ(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,12 +19,12 @@ function cm.econ(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0) local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0)
return #g>0 and not g:IsExists(aux.NOT(Card.IsSetCard),1,nil,0x3531) return #g>0 and not g:IsExists(aux.NOT(Card.IsSetCard),1,nil,0x3531)
end end
function cm.efilter(e,te) function cm.efilter(e,te,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
if te:GetHandlerPlayer()==tp or not te:IsActivated() then return false end if te:GetHandlerPlayer()==tp or not te:IsActivated() then return false end
if not Duel.IsPlayerCanDiscardDeck(tp,2) then return false end if not Duel.IsPlayerCanDiscardDeck(tp,2) then return false end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not g or not g:IsExists(function(c,e,tp)return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x3531) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)end,1,nil,e,tp) then if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not g or not g:IsContains(c) then
if Duel.GetFlagEffect(tp,m)==0 then if Duel.GetFlagEffect(tp,m)==0 then
Duel.RegisterFlagEffect(tp,m,0,0,0) Duel.RegisterFlagEffect(tp,m,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -35,11 +35,11 @@ end ...@@ -35,11 +35,11 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsType(TYPE_DUAL) or (c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsExists(function(c)return c:IsType(TYPE_DUAL) and c:IsFaceup()end,1,nil)) return c:IsType(TYPE_DUAL) or (c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsExists(function(c)return c:IsType(TYPE_DUAL) and c:IsFaceup()end,1,nil))
end end
function cm.efilter(e,te) function cm.efilter(e,te,c)
if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsExists(cm.filter,1,nil) return not g or not g:IsContains(c)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
......
...@@ -122,11 +122,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,11 +122,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
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)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
......
...@@ -94,9 +94,9 @@ end ...@@ -94,9 +94,9 @@ end
function cm.etarget(e,c) function cm.etarget(e,c)
return e:GetHandler():GetColumnGroup():IsContains(c) return e:GetHandler():GetColumnGroup():IsContains(c)
end end
function cm.efilter(e,te) function cm.efilter(e,te,c)
if not te:IsActivated() then return false end if not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler()) return not g or not g:IsContains(c)
end end
...@@ -15,20 +15,12 @@ function c60152901.initial_effect(c) ...@@ -15,20 +15,12 @@ function c60152901.initial_effect(c)
e1:SetTarget(c60152901.e1tg) e1:SetTarget(c60152901.e1tg)
e1:SetOperation(c60152901.e1op) e1:SetOperation(c60152901.e1op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable and destroy
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e11:SetRange(LOCATION_MZONE)
e11:SetCode(EVENT_CUSTOM+60152901)
e11:SetOperation(c60152901.e11op)
c:RegisterEffect(e11)
if not c60152901.global_check then if not c60152901.global_check then
c60152901.global_check=true c60152901.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_HAND) ge1:SetCode(EVENT_TO_HAND)
ge1:SetCondition(c60152901.regcon)
ge1:SetOperation(c60152901.regop) ge1:SetOperation(c60152901.regop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
...@@ -40,7 +32,7 @@ function c60152901.initial_effect(c) ...@@ -40,7 +32,7 @@ function c60152901.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012901) e2:SetCountLimit(1,6012901)
e2:SetCondition(c60152901.con) e2:SetCondition(c60152901.e2con)
e2:SetTarget(c60152901.e2tg) e2:SetTarget(c60152901.e2tg)
e2:SetOperation(c60152901.e2op) e2:SetOperation(c60152901.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -121,25 +113,25 @@ end ...@@ -121,25 +113,25 @@ end
function c60152901.cfilter(c,tp) function c60152901.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end end
function c60152901.regcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_DRAW or Duel.GetCurrentPhase()==0 then return false end
local v=0
if eg:IsExists(c60152901.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c60152901.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c60152901.regop(e,tp,eg,ep,ev,re,r,rp) function c60152901.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+60152901,re,r,rp,ep,e:GetLabel()) local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
local tc=g:GetFirst()
while tc do
if not (Duel.GetCurrentPhase()==PHASE_DRAW or Duel.GetCurrentPhase()==0) and Duel.GetFlagEffect(tc:GetControler(),60152901)==0 then
Duel.RegisterFlagEffect(tc:GetControler(),60152901,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,60152901)>0 and Duel.GetFlagEffect(1,60152901)>0 then
break
end
tc=g:GetNext()
end
end end
function c60152901.e11op(e,tp,eg,ep,ev,re,r,rp) function c60152901.e2con(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,60152901,RESET_PHASE+PHASE_END,0,1) return Duel.GetFlagEffect(1-tp,60152901)>0
end end
function c60152901.e2tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152901.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(tp,60152901)==0 and Duel.GetMatchingGroupCount(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)>0 end if chk==0 then return true end
Duel.SetTargetPlayer(p) Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
...@@ -155,7 +147,7 @@ function c60152901.e2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -155,7 +147,7 @@ function c60152901.e2op(e,tp,eg,ep,ev,re,r,rp)
Duel.RDComplete() Duel.RDComplete()
Duel.BreakEffect() Duel.BreakEffect()
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
...@@ -32,7 +32,7 @@ function c60152904.initial_effect(c) ...@@ -32,7 +32,7 @@ function c60152904.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012904) e2:SetCountLimit(1,6012904)
e2:SetCondition(c60152904.con) e2:SetCondition(c60152904.e2con)
e2:SetTarget(c60152904.e2tg) e2:SetTarget(c60152904.e2tg)
e2:SetOperation(c60152904.e2op) e2:SetOperation(c60152904.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -123,9 +123,12 @@ function c60152904.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,9 +123,12 @@ function c60152904.checkop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
end end
function c60152904.e2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,60152904)>0
end
function c60152904.e2tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152904.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(1-tp,60152904)==0 end if chk==0 then return true end
Duel.SetTargetPlayer(p) Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
......
...@@ -50,7 +50,7 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,6012901) e1:SetCountLimit(1,6012901)
e1:SetCondition(c60152913.con) e1:SetCondition(c60152913.e22901con)
e1:SetTarget(c60152913.e22901tg) e1:SetTarget(c60152913.e22901tg)
e1:SetOperation(c60152913.e22901op) e1:SetOperation(c60152913.e22901op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -92,7 +92,7 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,6012904) e4:SetCountLimit(1,6012904)
e4:SetCondition(c60152913.con) e4:SetCondition(c60152913.e22904con)
e4:SetTarget(c60152913.e22904tg) e4:SetTarget(c60152913.e22904tg)
e4:SetOperation(c60152913.e22904op) e4:SetOperation(c60152913.e22904op)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -144,14 +144,17 @@ end ...@@ -144,14 +144,17 @@ end
function c60152913.con(e,tp,eg,ep,ev,re,r,rp) function c60152913.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0 return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0
end end
function c60152913.e22901con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,60152901)>0
end
function c60152913.e22901tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152913.e22901tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(tp,60152901)==0 and Duel.GetMatchingGroupCount(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)>0 end if chk==0 then return true end
Duel.SetTargetPlayer(p) Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end end
function c60152913.e22901opfilter(c) function c60152913.e22901opf(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
end end
function c60152913.e22901op(e,tp,eg,ep,ev,re,r,rp) function c60152913.e22901op(e,tp,eg,ep,ev,re,r,rp)
...@@ -162,11 +165,11 @@ function c60152913.e22901op(e,tp,eg,ep,ev,re,r,rp) ...@@ -162,11 +165,11 @@ function c60152913.e22901op(e,tp,eg,ep,ev,re,r,rp)
Duel.RDComplete() Duel.RDComplete()
Duel.BreakEffect() Duel.BreakEffect()
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60152913.e22901opfilter,tp,0,LOCATION_HAND,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60152913.e22901opf,tp,0,LOCATION_HAND,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
...@@ -175,7 +178,7 @@ function c60152913.e22901op(e,tp,eg,ep,ev,re,r,rp) ...@@ -175,7 +178,7 @@ function c60152913.e22901op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c60152913.e22902opfilter(c) function c60152913.e22902opf(c)
return c:IsFaceup() and not c:IsDisabled() return c:IsFaceup() and not c:IsDisabled()
end end
function c60152913.e22902tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152913.e22902tg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -199,7 +202,7 @@ function c60152913.e22902op(e,tp,eg,ep,ev,re,r,rp) ...@@ -199,7 +202,7 @@ function c60152913.e22902op(e,tp,eg,ep,ev,re,r,rp)
if s<0 then s=p1-p2 end if s<0 then s=p1-p2 end
local d2=math.floor(s/1000) local d2=math.floor(s/1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c60152913.e22902opfilter,tp,0,LOCATION_ONFIELD,1,d2,nil) local g=Duel.SelectMatchingCard(tp,c60152913.e22902opf,tp,0,LOCATION_ONFIELD,1,d2,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -251,14 +254,17 @@ function c60152913.e22903op(e,tp,eg,ep,ev,re,r,rp) ...@@ -251,14 +254,17 @@ function c60152913.e22903op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c60152913.e22904con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,60152904)>0
end
function c60152913.e22904tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152913.e22904tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(1-tp,60152904)==0 end if chk==0 then return true end
Duel.SetTargetPlayer(p) Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end end
function c60152913.e22904opfilter(c) function c60152913.e22904opf(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
end end
function c60152913.e22904op(e,tp,eg,ep,ev,re,r,rp) function c60152913.e22904op(e,tp,eg,ep,ev,re,r,rp)
...@@ -276,7 +282,7 @@ function c60152913.e22904op(e,tp,eg,ep,ev,re,r,rp) ...@@ -276,7 +282,7 @@ function c60152913.e22904op(e,tp,eg,ep,ev,re,r,rp)
local d2=math.floor(s/1000) local d2=math.floor(s/1000)
if d2>=1 then if d2>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60152913.e22904opfilter,tp,0,LOCATION_GRAVE,1,d2,nil) local g=Duel.SelectMatchingCard(tp,c60152913.e22904opf,tp,0,LOCATION_GRAVE,1,d2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
...@@ -365,11 +371,11 @@ function c60152913.e22907op(e,tp,eg,ep,ev,re,r,rp) ...@@ -365,11 +371,11 @@ function c60152913.e22907op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(c60152913.e22907opop) e1:SetOperation(c60152913.e22907oop)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c60152913.e22907opop(e,tp,eg,ep,ev,re,r,rp) function c60152913.e22907oop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60152913) Duel.Hint(HINT_CARD,0,60152913)
Duel.Damage(tp,500,REASON_EFFECT,true) Duel.Damage(tp,500,REASON_EFFECT,true)
Duel.Damage(1-tp,500,REASON_EFFECT,true) Duel.Damage(1-tp,500,REASON_EFFECT,true)
......
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