Commit b9b307d4 authored by POLYMER's avatar POLYMER

fix

parent 82a69db7
No preview for this file type
...@@ -159,22 +159,28 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -159,22 +159,28 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local eid=e1:GetFieldID() local eid=e1:GetFieldID()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,9)) c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,9))
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,10))
e1:SetTarget(function(e,c) e1:SetTarget(function(e,c)
local seq1=aux.GetColumn(c) local seq1=aux.GetColumn(c,e:GetHandlerPlayer())
local seq2=aux.GetColumn(e:GetHandler()) local seq2=aux.GetColumn(e:GetHandler())
return seq1 and seq2 and seq1-seq2==1 return seq1 and seq2 and seq1-seq2==1
end) end)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
e:SetLabel(0) e:GetHandler():ResetFlagEffect(m)
end) end)
e1:SetLabel(eid) e1:SetLabel(eid)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCondition(cm.con2)
e2:SetTarget(function(e,c) e2:SetTarget(function(e,c)
local seq1=aux.GetColumn(c) local seq1=aux.GetColumn(c,e:GetHandlerPlayer())
local seq2=aux.GetColumn(e:GetHandler()) local seq2=aux.GetColumn(e:GetHandler(),e:GetHandlerPlayer())
return seq1 and seq2 and seq1-seq2==-1 return seq1 and seq2 and seq1-seq2==-1
end) end)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():ResetFlagEffect(m+1)
end)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
--[[Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) --[[Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.cclfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,cm.cclfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e:GetHandler())
...@@ -186,3 +192,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -186,3 +192,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
if not (e:GetHandler():GetFlagEffect(m)>0 and e:GetHandler():GetFlagEffectLabel(m)==e:GetLabel() and e:GetHandler():IsFacedown()) then e:SetLabel(0) return false end if not (e:GetHandler():GetFlagEffect(m)>0 and e:GetHandler():GetFlagEffectLabel(m)==e:GetLabel() and e:GetHandler():IsFacedown()) then e:SetLabel(0) return false end
return true return true
end end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
if not (e:GetHandler():GetFlagEffect(m+1)>0 and e:GetHandler():GetFlagEffectLabel(m+1)==e:GetLabel() and e:GetHandler():IsFacedown()) then e:SetLabel(0) return false end
return true
end
\ No newline at end of file
...@@ -75,7 +75,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
return rc:IsSetCard(0x836) return rc:IsSetCard(0x836)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and c:IsFaceupEx() return c:IsSetCard(0x836) and c:IsAbleToHand() and c:IsFaceupEx()
end end
function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -35,6 +35,7 @@ function c51926009.initial_effect(c) ...@@ -35,6 +35,7 @@ function c51926009.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE) e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,51926009)
e4:SetCondition(c51926009.drcon) e4:SetCondition(c51926009.drcon)
e4:SetTarget(c51926009.drtg) e4:SetTarget(c51926009.drtg)
e4:SetOperation(c51926009.drop) e4:SetOperation(c51926009.drop)
......
...@@ -131,7 +131,7 @@ function c60152901.e2con(e,tp,eg,ep,ev,re,r,rp) ...@@ -131,7 +131,7 @@ function c60152901.e2con(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,1,nil) 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)
......
...@@ -128,10 +128,12 @@ function c60152902.e2opfilter(c) ...@@ -128,10 +128,12 @@ function c60152902.e2opfilter(c)
end end
function c60152902.e2tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152902.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return Duel.GetFlagEffect(1-tp,60152902)>0 end if chk==0 then return Duel.GetFlagEffect(1-tp,60152902)>0 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) 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)
local tg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0)
end end
function c60152902.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152902.e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
...@@ -128,7 +128,7 @@ function c60152904.e2con(e,tp,eg,ep,ev,re,r,rp) ...@@ -128,7 +128,7 @@ function c60152904.e2con(e,tp,eg,ep,ev,re,r,rp)
end 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 true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) 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)
......
...@@ -22,17 +22,13 @@ function c60152905.initial_effect(c) ...@@ -22,17 +22,13 @@ function c60152905.initial_effect(c)
e2:SetDescription(aux.Stringid(60152905,1)) e2:SetDescription(aux.Stringid(60152905,1))
e2:SetCategory(CATEGORY_NEGATE) e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012905) e2:SetCountLimit(1,6012905)
e2:SetCondition(c60152905.e2con) e2:SetCondition(c60152905.e2con)
e2:SetTarget(c60152905.e2tg) e2:SetTarget(c60152905.e2tg)
e2:SetOperation(c60152905.e2op) e2:SetOperation(c60152905.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCondition(c60152905.e2con1)
e4:SetCode(EVENT_CHAINING)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60152905,2)) e3:SetDescription(aux.Stringid(60152905,2))
...@@ -108,11 +104,14 @@ function c60152905.e1op(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,11 +104,14 @@ function c60152905.e1op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c60152905.e2con(e,tp,eg,ep,ev,re,r,rp) function c60152905.e2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetCurrentChain()==0 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0 if not (Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0) then return end
end for i=1,ev do
function c60152905.e2con1(e,tp,eg,ep,ev,re,r,rp) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetCurrentChain()>0 if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0 return true
end
end
return false
end end
function c60152905.e2tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152905.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
......
...@@ -102,13 +102,12 @@ function c60152906.e1op(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,13 +102,12 @@ function c60152906.e1op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c60152906.e2tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152906.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
function c60152906.e2opfilter(c)
return c
end end
function c60152906.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152906.e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
...@@ -122,7 +121,7 @@ function c60152906.e2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,7 +121,7 @@ function c60152906.e2op(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_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60152906.e2opfilter,tp,0,LOCATION_ONFIELD,1,d2,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,d2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
......
...@@ -191,17 +191,13 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp) ...@@ -191,17 +191,13 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp)
e5:SetDescription(aux.Stringid(60152905,1)) e5:SetDescription(aux.Stringid(60152905,1))
e5:SetCategory(CATEGORY_NEGATE) e5:SetCategory(CATEGORY_NEGATE)
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN) e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,6012915) e5:SetCountLimit(1,6012915)
e5:SetCondition(c60152913.e22905con) e5:SetCondition(c60152913.e22905con)
e5:SetTarget(c60152913.e22905tg) e5:SetTarget(c60152913.e22905tg)
e5:SetOperation(c60152913.e22905op) e5:SetOperation(c60152913.e22905op)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e8=e5:Clone()
e8:SetCondition(c60152913.e22905con1)
e8:SetCode(EVENT_CHAINING)
c:RegisterEffect(e8)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,5)) c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,5))
end end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152906) then if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152906) then
...@@ -241,7 +237,7 @@ function c60152913.e22901con(e,tp,eg,ep,ev,re,r,rp) ...@@ -241,7 +237,7 @@ function c60152913.e22901con(e,tp,eg,ep,ev,re,r,rp)
end 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 true end if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,1,nil) 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)
...@@ -275,10 +271,12 @@ function c60152913.e22902opf(c) ...@@ -275,10 +271,12 @@ function c60152913.e22902opf(c)
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)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return Duel.GetFlagEffect(1-tp,60152902)>0 end if chk==0 then return Duel.GetFlagEffect(1-tp,60152902)>0 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) 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)
local tg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0)
end end
function c60152913.e22902op(e,tp,eg,ep,ev,re,r,rp) function c60152913.e22902op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
...@@ -348,7 +346,7 @@ function c60152913.e22904con(e,tp,eg,ep,ev,re,r,rp) ...@@ -348,7 +346,7 @@ function c60152913.e22904con(e,tp,eg,ep,ev,re,r,rp)
end 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 true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) 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)
...@@ -380,12 +378,14 @@ function c60152913.e22904op(e,tp,eg,ep,ev,re,r,rp) ...@@ -380,12 +378,14 @@ function c60152913.e22904op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c60152913.e22905con(e,tp,eg,ep,ev,re,r,rp) function c60152913.e22905con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetCurrentChain()==0 if not (Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0) then return end
and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0 for i=1,ev do
end local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
function c60152913.e22905con1(e,tp,eg,ep,ev,re,r,rp) if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetCurrentChain()>0 return true
and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0 end
end
return false
end end
function c60152913.e22905tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152913.e22905tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
...@@ -424,14 +424,12 @@ function c60152913.e22905op(e,tp,eg,ep,ev,re,r,rp) ...@@ -424,14 +424,12 @@ function c60152913.e22905op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c60152913.e22906tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152913.e22906tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end end
function c60152913.e22906opfilter(c)
return c
end
function c60152913.e22906op(e,tp,eg,ep,ev,re,r,rp) function c60152913.e22906op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT) Duel.Recover(p,d,REASON_EFFECT)
...@@ -444,7 +442,7 @@ function c60152913.e22906op(e,tp,eg,ep,ev,re,r,rp) ...@@ -444,7 +442,7 @@ function c60152913.e22906op(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_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60152913.e22906opfilter,tp,0,LOCATION_ONFIELD,1,d2,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,d2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
......
--无限的未完成
local s,id,o=GetID()
function s.initial_effect(c)
if not iroha then
iroha=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EVENT_PREDRAW)
e1:SetRange(0xff)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e1:SetOperation(s.op)
Duel.RegisterEffect(e1,0)
_CreateToken=Duel.CreateToken
function Duel.CreateToken(p,code)
local c =_CreateToken(p,code)
s.changecode(c)
return c
end
function aux.IsCodeListed(c,code)
return false
end
function Duel.Win(p,r)
end
end
end
function s.changecode(tc)
--local cid=tc:GetOriginalCode()
local cid=0
local Type=tc:GetOriginalType()
if Type&TYPE_MONSTER>0 then
if Type&TYPE_NORMAL>0 then cid=id+1 end
if Type&TYPE_LINK>0 then cid=id+10+tc:GetLink() end --
if Type&TYPE_SYNCHRO>0 then cid=id+3 end
if Type&TYPE_XYZ>0 then cid=id+5 end
if Type&TYPE_RITUAL>0 then cid=id+7 end
if Type&TYPE_FUSION>0 then cid=id+9 end
if Type&TYPE_PENDULUM>0 then cid=cid+1 end
if cid>id+39 or cid<id+1 then cid=id+1 end
if Type&TYPE_TOKEN>0 then cid=id+39 end
tc:SetCardData(CARDDATA_CODE,cid)
else
if Type&TYPE_SPELL>0 then
tc:SetCardData(CARDDATA_CODE,id+20)
if Type&TYPE_QUICKPLAY>0 then tc:SetCardData(CARDDATA_CODE,id+21) end
if Type&TYPE_CONTINUOUS>0 then tc:SetCardData(CARDDATA_CODE,id+22) end
if Type&TYPE_EQUIP>0 then tc:SetCardData(CARDDATA_CODE,id+23) end
if Type&TYPE_FIELD>0 then tc:SetCardData(CARDDATA_CODE,id+24) end
if Type&TYPE_RITUAL>0 then tc:SetCardData(CARDDATA_CODE,id+25) end
else
if Type&TYPE_TRAP>0 then
tc:SetCardData(CARDDATA_CODE,id+30)
if Type&TYPE_CONTINUOUS>0 then tc:SetCardData(CARDDATA_CODE,id+31) end
if Type&TYPE_COUNTER>0 then tc:SetCardData(CARDDATA_CODE,id+32) end
end
end
end
end
--function s.changemonster(c,Type,Lkm,Lv,Rk,Att,Atk,Def,Race,Lsc,Rsc)
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_SINGLE)
-- e1:SetCode(EFFECT_SET_BASE_ATTACK)
-- e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
-- e1:SetRange(0xff)
-- e1:SetValue(Atk)
-- c:RegisterEffect(e1)
-- local e2=e1:Clone()
-- e2:SetCode(EFFECT_SET_BASE_DEFENSE)
-- e2:SetValue(Def)
-- c:RegisterEffect(e2)
-- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_SINGLE)
-- e3:SetCode(EFFECT_CHANGE_TYPE)
-- e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
-- e3:SetValue(Type)
-- e3:SetReset(0)
-- c:RegisterEffect(e3)
-- local e4=e1:Clone()
-- e4:SetCode(EFFECT_CHANGE_LINK_MARKER_KOISHI)
-- e4:SetValue(Lkm)
-- c:RegisterEffect(e4)
-- local e5=e1:Clone()
-- e5:SetCode(EFFECT_CHANGE_LEVEL)
-- e5:SetValue(Lv)
-- c:RegisterEffect(e5)
-- local e6=e1:Clone()
-- e6:SetCode(EFFECT_CHANGE_RANK)
-- e6:SetValue(Rk)
-- c:RegisterEffect(e6)
-- local e7=e1:Clone()
-- e7:SetCode(EFFECT_CHANGE_ATTRIBUTE)
-- e7:SetValue(Att)
-- c:RegisterEffect(e7)
-- local e8=e1:Clone()
-- e8:SetCode(EFFECT_CHANGE_RACE)
-- e8:SetValue(Race)
-- c:RegisterEffect(e8)
-- local e9=e1:Clone()
-- e9:SetCode(EFFECT_CHANGE_LSCALE)
-- e9:SetValue(Lsc)
-- c:RegisterEffect(e9)
-- local e10=e1:Clone()
-- e10:SetCode(EFFECT_CHANGE_RSCALE)
-- e10:SetValue(Rsc)
-- c:RegisterEffect(e10)
--end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_CARD,1-tp,id)
local tg=Duel.GetFieldGroup(tp,0xff,0xff)
if tg then
for tc in aux.Next(tg) do
s.changecode(tc)
end
Duel.Draw(tp,Duel.SendtoDeck(Duel.GetFieldGroup(tp,LOCATION_HAND,0),nil,SEQ_DECKSHUFFLE,REASON_RULE),REASON_RULE)
Duel.Draw(1-tp,Duel.SendtoDeck(Duel.GetFieldGroup(1-tp,LOCATION_HAND,0),nil,SEQ_DECKSHUFFLE,REASON_RULE),REASON_RULE)
local rg=Duel.GetFieldGroup(tp,LOCATION_EXTRA,LOCATION_EXTRA)
Duel.Remove(rg,POS_FACEDOWN,REASON_RULE)
Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_RULE)
end
function Card.SetEntityCode(c,bool)
end
_SetCardData=Card.SetCardData
function Card.SetCardData(c,type,value)
if type==CARDDATA_CODE then return end
_SetCardData(c,type,value)
end
_Hint=Duel.Hint
function Duel.Hint(ht,p,desc)
if ht==HINT_CARD then desc=id+1 end
_Hint(ht,p,desc)
end
end
\ No newline at end of file
...@@ -63,14 +63,14 @@ function c65840060.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,14 +63,14 @@ function c65840060.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24425055,0)) e1:SetDescription(aux.Stringid(65840060,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24425055,0)) e3:SetDescription(aux.Stringid(65840060,0))
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e3:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -82,8 +82,13 @@ function c67201262.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,8 +82,13 @@ function c67201262.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(c,g) local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end end
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