Commit f63f4a07 authored by POLYMER's avatar POLYMER

fix

parent 06ffaef9
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
--e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,0)
......
--龙神迷子·铃音
function c130006027.initial_effect(c)
--囚徒与恶眼
local cm,m=GetID()
function cm.initial_effect(c)
--search limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,0)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,0)
local e3=e1:Clone()
e3:SetCode(EVENT_MOVE)
Duel.RegisterEffect(e3,0)
end
end
function cm.filter(c,e)
return c:GetPreviousLocation()==LOCATION_DECK and c:IsOnField() and (c:IsStatus(STATUS_EFFECT_ENABLED) or not c:IsLocation(LOCATION_MZONE) or c:IsStatus(STATUS_CHAINING) or c:IsFacedown()) and not ((Duel.CheckEvent(EVENT_SUMMON_SUCCESS) or Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS)) and e:GetCode()==EVENT_MOVE and c:IsLocation(LOCATION_MZONE))
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,e)
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(cm.filter,nil,e) e:GetLabelObject():GetLabelObject():Merge(g) end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,0)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
--e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetLabelObject(g)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() Duel.SendtoDeck(g,nil,0,REASON_RULE) g:Clear() end)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,0)
e1:SetLabelObject(e2)
end
\ No newline at end of file
......@@ -169,7 +169,7 @@ end
function cm.chainop2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(0x6) and rc:IsOnField() and not rc:IsLocation(0x200) and rc:IsRelateToChain(re) and rc:IsCanTurnSet() and re:GetActivateLocation()&0x0f~=0 then
if rc:IsType(0x6) and rc:IsOnField() and not rc:IsLocation(0x200) and rc:IsCanTurnSet() and re:GetActivateLocation()&0x0f~=0 then
if rc:IsStatus(STATUS_LEAVE_CONFIRMED) then
rc:CancelToGrave()
end
......
......@@ -30,6 +30,7 @@ function cm.rop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1 then
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
end
Duel.Readjust()
end
function cm.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -30,6 +30,7 @@ function cm.rop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1 then
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
end
Duel.Readjust()
end
function cm.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -30,6 +30,7 @@ function cm.rop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1 then
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
end
Duel.Readjust()
end
function cm.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60151906.e1con)
e1:SetCondition(c60151905.e1con)
e1:SetOperation(c60151905.e1op)
c:RegisterEffect(e1)
--special summon
......
......@@ -128,7 +128,7 @@ function c60151909.e1ope5filter(e,re)
end
function c60151909.e1ope6tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSSetable() end
if chk==0 then return c:IsCanTurnSet() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c60151909.e1ope6op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -59,7 +59,7 @@ function c60152903.check(c)
return c
end
function c60152903.checkop(e,tp,eg,ep,ev,re,r,rp)
if c60152903.check(Duel.GetBattleTarget())~=nil then
if c60152903.check(Duel.GetAttacker()) and c60152903.check(Duel.GetAttackTarget()) then
Duel.RegisterFlagEffect(tp,60152903,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,60152903,RESET_PHASE+PHASE_END,0,1)
end
......
......@@ -2,32 +2,32 @@
function c60152913.initial_effect(c)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c60152913.e1tg)
e1:SetValue(1)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_DEFENSE_ATTACK)
e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(c60152913.e1tg)
e0:SetValue(1)
c:RegisterEffect(e0)
--damage conversion
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_REVERSE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetValue(c60152913.rev)
c:RegisterEffect(e2)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetCode(EFFECT_REVERSE_DAMAGE)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(1,0)
e8:SetValue(c60152913.rev)
c:RegisterEffect(e8)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c60152913.e3con)
e3:SetOperation(c60152913.e3op)
c:RegisterEffect(e3)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetCondition(c60152913.e3con)
e9:SetOperation(c60152913.e3op)
c:RegisterEffect(e9)
end
function c60152913.e1tg(e,c)
return c:IsSetCard(0x3b29)
......@@ -43,17 +43,17 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp)
local g=c:GetMaterial()
if #g==0 then return end
if g:IsExists(Card.IsOriginalCode,1,nil,60152901) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152901,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012901)
e2:SetCondition(c60152913.con)
e2:SetTarget(c60152913.60152901e2tg)
e2:SetOperation(c60152913.60152901e2op)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152901,1))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,6012901)
e1:SetCondition(c60152913.con)
e1:SetTarget(c60152913.2901e2tg)
e1:SetOperation(c60152913.2901e2op)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(c60152913,1))
end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152902) then
......@@ -65,78 +65,78 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012902)
e2:SetCondition(c60152913.con)
e2:SetTarget(c60152913.60152902e2tg)
e2:SetOperation(c60152913.60152902e2op)
e2:SetTarget(c60152913.2902e2tg)
e2:SetOperation(c60152913.2902e2op)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,2))
end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152903) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152903,1))
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012903)
e2:SetCondition(c60152913.con)
e2:SetTarget(c60152913.60152903e2tg)
e2:SetOperation(c60152913.60152903e2op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60152903,1))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,6012903)
e3:SetCondition(c60152913.con)
e3:SetTarget(c60152913.2903e2tg)
e3:SetOperation(c60152913.2903e2op)
c:RegisterEffect(e3)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,3))
end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152904) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152904,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012904)
e2:SetCondition(c60152913.con)
e2:SetTarget(c60152913.60152904e2tg)
e2:SetOperation(c60152913.60152904e2op)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(60152904,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,6012904)
e4:SetCondition(c60152913.con)
e4:SetTarget(c60152913.2904e2tg)
e4:SetOperation(c60152913.2904e2op)
c:RegisterEffect(e4)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,4))
end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152905) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152905,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012905)
e2:SetCondition(c60152913.con)
e2:SetTarget(c60152913.60152905e2tg)
e2:SetOperation(c60152913.60152905e2op)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(60152905,1))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,6012905)
e5:SetCondition(c60152913.con)
e5:SetTarget(c60152913.2905e2tg)
e5:SetOperation(c60152913.2905e2op)
c:RegisterEffect(e5)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,5))
end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152906) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152906,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012906)
e2:SetCondition(c60152913.con)
e2:SetTarget(c60152913.60152906e2tg)
e2:SetOperation(c60152913.60152906e2op)
c:RegisterEffect(e2)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(60152906,1))
e6:SetCategory(CATEGORY_RECOVER)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,6012906)
e6:SetCondition(c60152913.con)
e6:SetTarget(c60152913.2906e2tg)
e6:SetOperation(c60152913.2906e2op)
c:RegisterEffect(e6)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,6))
end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,60152907) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152907,1))
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6012907)
e2:SetCondition(c60152913.con)
e2:SetTarget(c60152913.60152907e2tg)
e2:SetOperation(c60152913.60152907e2op)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(60152907,1))
e7:SetCategory(CATEGORY_RECOVER+CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1,6012907)
e7:SetCondition(c60152913.con)
e7:SetTarget(c60152913.2907e2tg)
e7:SetOperation(c60152913.2907e2op)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60152913,7))
end
......@@ -144,17 +144,17 @@ end
function c60152913.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0
end
function c60152913.60152901e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
function c60152913.2901e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end
function c60152913.60152901e2opfilter(c)
function c60152913.2901e2opfilter(c)
return c:IsAbleToDeck()
end
function c60152913.60152901e2op(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2901e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
Duel.Damage(0,d,REASON_EFFECT,true)
......@@ -166,7 +166,7 @@ function c60152913.60152901e2op(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60152913.60152901e2opfilter,tp,0,LOCATION_HAND,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c60152913.2901e2opfilter,tp,0,LOCATION_HAND,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
......@@ -175,17 +175,17 @@ function c60152913.60152901e2op(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c60152913.60152902e2opfilter(c)
function c60152913.2902e2opfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c60152913.60152902e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
function c60152913.2902e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(1-tp,60152902)==0 end
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end
function c60152913.60152902e2op(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2902e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
Duel.Damage(0,d,REASON_EFFECT,true)
......@@ -199,7 +199,7 @@ function c60152913.60152902e2op(e,tp,eg,ep,ev,re,r,rp)
if s<0 then s=p1-p2 end
local d2=math.floor(s/1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c60152913.60152902e2opfilter,tp,0,LOCATION_ONFIELD,1,d2,nil)
local g=Duel.SelectMatchingCard(tp,c60152913.2902e2opfilter,tp,0,LOCATION_ONFIELD,1,d2,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......@@ -216,24 +216,24 @@ function c60152913.60152902e2op(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c60152913.60152903e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
function c60152913.2903e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(tp,60152903)==0 and Duel.GetMatchingGroupCount(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)>0 end
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end
function c60152913.60152903e2opfilter(c)
function c60152913.2903e2opfilter(c)
return c:IsAbleToDeck()
end
function c60152913.60152903e2op(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2903e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
Duel.Damage(0,d,REASON_EFFECT,true)
Duel.Damage(1,d,REASON_EFFECT,true)
Duel.RDComplete()
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c60152913.60152903e2opfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c60152913.2903e2opfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -251,17 +251,17 @@ function c60152913.60152903e2op(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c60152913.60152904e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
function c60152913.2904e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(1-tp,60152904)==0 end
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end
function c60152913.60152904e2opfilter(c)
function c60152913.2904e2opfilter(c)
return c:IsAbleToDeck()
end
function c60152913.60152904e2op(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2904e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
Duel.Damage(0,d,REASON_EFFECT,true)
......@@ -276,7 +276,7 @@ function c60152913.60152904e2op(e,tp,eg,ep,ev,re,r,rp)
local d2=math.floor(s/1000)
if d2>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60152913.60152904e2opfilter,tp,0,LOCATION_GRAVE,1,d2,nil)
local g=Duel.SelectMatchingCard(tp,c60152913.2904e2opfilter,tp,0,LOCATION_GRAVE,1,d2,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
......@@ -284,7 +284,7 @@ function c60152913.60152904e2op(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c60152913.60152905e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
function c60152913.2905e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL
if chk==0 then return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)~=0 end
Duel.SetTargetPlayer(p)
......@@ -305,7 +305,7 @@ function c60152913.60152905e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
end
function c60152913.60152905e2op(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2905e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
Duel.Damage(0,d,REASON_EFFECT,true)
......@@ -324,16 +324,16 @@ function c60152913.60152905e2op(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c60152913.60152906e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
function c60152913.2906e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c60152913.60152906e2opfilter(c)
function c60152913.2906e2opfilter(c)
return c
end
function c60152913.60152906e2op(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2906e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
Duel.BreakEffect()
......@@ -345,31 +345,31 @@ function c60152913.60152906e2op(e,tp,eg,ep,ev,re,r,rp)
local d2=math.floor(s/1000)
if d2>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60152913.60152906e2opfilter,tp,0,LOCATION_ONFIELD,1,d2,nil)
local g=Duel.SelectMatchingCard(tp,c60152913.2906e2opfilter,tp,0,LOCATION_ONFIELD,1,d2,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c60152913.60152907e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
function c60152913.2907e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c60152913.60152907e2op(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2907e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
--lose lp
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(c60152913.60152907e2opop)
e1:SetOperation(c60152913.2907e2opop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c60152913.60152907e2opop(e,tp,eg,ep,ev,re,r,rp)
function c60152913.2907e2opop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60152913)
Duel.Damage(tp,500,REASON_EFFECT,true)
Duel.Damage(1-tp,500,REASON_EFFECT,true)
......
......@@ -62,14 +62,12 @@ function c60152921.e1op(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc2=g:GetFirst()
if Duel.GetMatchingGroup(c60152921.filter,tp,LOCATION_GRAVE,0,nil,tc2)>0 then
local g2=Duel.GetMatchingGroup(c60152921.filter,tp,LOCATION_GRAVE,0,nil,tc2)
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(3072077,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,c60152921.filter,tp,LOCATION_GRAVE,0,1,1,nil,tc2)
if g3:GetCount()>0 then
Duel.SendtoHand(g3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
end
local sg=g2:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
end
......
......@@ -4,7 +4,7 @@ function c60152927.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60152925.e1con)
e1:SetCondition(c60152927.e1con)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
......@@ -36,11 +36,11 @@ function c60152927.initial_effect(c)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e5:SetCountLimit(1)
e5:SetTarget(c6142488.e5tg)
e5:SetOperation(c6142488.e5op)
e5:SetTarget(c60152927.e5tg)
e5:SetOperation(c60152927.e5op)
c:RegisterEffect(e5)
end
function c60152925.e1con(e,tp,eg,ep,ev,re,r,rp)
function c60152927.e1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0
end
function c60152927.target(e,c)
......@@ -75,7 +75,7 @@ end
function c60152927.filter(c,e,tp)
return c:IsSetCard(0x3b29) and c:IsType(TYPE_RITUAL)
end
function c6483224.filter2(c)
function c60152927.filter2(c)
return c:IsFaceup() and (c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ) or c:IsType(TYPE_LINK))
end
function c60152927.e5tg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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