Commit df3693ad authored by POLYMER's avatar POLYMER

fix

parent fb6bcc1f
......@@ -62,7 +62,7 @@ function c28316050.thfilter(c)
return c:IsSetCard(0x286,0x289) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c28316050.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c28316050.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c28316050.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c28316050.dcop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -66,10 +66,11 @@ function c28323723.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(tg,nil,REASON_EFFECT)==0 then return end
Duel.ConfirmCards(1-tp,tg)
if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end
local b1=Duel.IsExistingMatchingCard(c28323723.stfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28323723.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
local b2=Duel.IsExistingMatchingCard(c28323723.nofilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c28323723.sefilter,tp,LOCATION_DECK,0,1,nil)
local b3=Duel.IsExistingMatchingCard(c28323723.shfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28323723.exfilter,tp,LOCATION_EXTRA,0,1,nil)
local b4=Duel.IsExistingMatchingCard(c28323723.cofilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28323723.rmfilter,tp,LOCATION_GRAVE,0,1,nil)
local b1,b2,b3,b4=false
if Duel.IsExistingMatchingCard(c28323723.stfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28323723.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then b1=true end
if Duel.IsExistingMatchingCard(c28323723.nofilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c28323723.sefilter,tp,LOCATION_DECK,0,1,nil) then b2=true end
if Duel.IsExistingMatchingCard(c28323723.shfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28323723.exfilter,tp,LOCATION_EXTRA,0,1,nil) then b3=true end
if Duel.IsExistingMatchingCard(c28323723.cofilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28323723.rmfilter,tp,LOCATION_GRAVE,0,1,nil) then b4=true end
if not (b1 or b2 or b3 or b4) then return end
local off=1
local ops,opval={},{}
......
......@@ -59,10 +59,11 @@ function c28381214.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(tg,nil,REASON_EFFECT)==0 then return end
Duel.ConfirmCards(1-tp,tg)
if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end
local b1=Duel.IsExistingMatchingCard(c28381214.ilfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28381214.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c28381214.anfilter,tp,LOCATION_HAND,0,2,nil)
local b3=Duel.IsExistingMatchingCard(c28381214.hkfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28381214.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b4=Duel.IsExistingMatchingCard(c28381214.alfilter,tp,LOCATION_HAND,0,2,nil)
local b1,b2,b3,b4=false
if Duel.IsExistingMatchingCard(c28381214.ilfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28381214.tgfilter,tp,LOCATION_DECK,0,1,nil) then b1=true end
if Duel.IsExistingMatchingCard(c28381214.anfilter,tp,LOCATION_HAND,0,2,nil) then b2=true end
if Duel.IsExistingMatchingCard(c28381214.hkfilter,tp,LOCATION_HAND,0,2,nil) and Duel.IsExistingMatchingCard(c28381214.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then b3=true end
if Duel.IsExistingMatchingCard(c28381214.alfilter,tp,LOCATION_HAND,0,2,nil) then b4=true end
if not (b1 or b2 or b3 or b4) then return end
local off=1
local ops,opval={},{}
......
......@@ -63,7 +63,7 @@ function s.repcon(e)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.repfilter(c,tp,re)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_COST) and re and re:IsActivated() and c==re:GetHandler() and not c:IsReason(REASON_REPLACE)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_RELEASE) and re and re:IsActivated() and c==re:GetHandler() and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp,re) end
......
--线膛燧发枪 黎明之翼
local m=60151903
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c60151903.e1con)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c60151903.e2splimit)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_PZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,60151902))
e3:SetValue(1000)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BATTLED)
e4:SetRange(LOCATION_PZONE)
e4:SetOperation(c60151903.e4op)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(60151903,0))
e5:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_PZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetTarget(c60151903.e5tg)
e5:SetOperation(c60151903.e5op)
c:RegisterEffect(e5)
--pendulum summon
aux.EnablePendulumAttribute(c)
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c60151903.e1con)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c60151903.e2splimit)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_PZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,60151902))
e3:SetValue(1000)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BATTLED)
e4:SetRange(LOCATION_PZONE)
e4:SetOperation(c60151903.e4op)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(60151903,0))
e5:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_PZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetTarget(c60151903.e5tg)
e5:SetOperation(c60151903.e5op)
c:RegisterEffect(e5)
end
function c60151903.e1confilter(c)
return c:IsCode(60151902)
return c:IsCode(60151902)
end
function c60151903.e1con(e)
return not Duel.IsExistingMatchingCard(c60151903.e1confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
or e:GetHandler():GetLeftScale()==0
return not Duel.IsExistingMatchingCard(c60151903.e1confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
or e:GetHandler():GetLeftScale()==0
end
function c60151903.e2splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
return bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c60151903.e4opcheck(c,tp)
return c and c:IsControler(tp) and c:IsCode(60151902)
return c and c:IsControler(tp) and c:IsCode(60151902)
end
function c60151903.e4op(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if (c60151903.e4opcheck(Duel.GetAttacker(),tp) or c60151903.e4opcheck(Duel.GetAttackTarget(),tp)) then
local c=e:GetHandler()
if c:GetLeftScale()==0 then return end
local scl=1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(-scl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
local tp=e:GetHandlerPlayer()
if (c60151903.e4opcheck(Duel.GetAttacker(),tp) or c60151903.e4opcheck(Duel.GetAttackTarget(),tp)) then
local c=e:GetHandler()
if c:GetLeftScale()==0 then return end
local scl=1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(-scl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
function c60151903.e5tgfilter(c)
return c:IsFaceup() and c:IsAbleToGrave()
return c:IsFaceup() and c:IsAbleToGrave()
end
function c60151903.e5tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c60151903.e5tgfilter,tp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():GetFlagEffect(60151901)~=0 end
local g=Duel.GetMatchingGroup(c60151903.e5tgfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(5043010,2))
if chk==0 then return Duel.IsExistingMatchingCard(c60151903.e5tgfilter,tp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():GetFlagEffect(60151901)~=0 end
local g=Duel.GetMatchingGroup(c60151903.e5tgfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(5043010,2))
end
function c60151903.e5op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.Recover(tp,1000,REASON_EFFECT) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60151903.e5tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.Recover(tp,1000,REASON_EFFECT) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60151903.e5tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -2,107 +2,107 @@
local m=60151904
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c60151904.e1con)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c60151904.e2splimit)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_PZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,60151902))
e3:SetValue(1000)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BATTLED)
e4:SetRange(LOCATION_PZONE)
e4:SetOperation(c60151904.e4op)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(60151904,0))
e5:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_PZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetTarget(c60151904.e5tg)
e5:SetOperation(c60151904.e5op)
c:RegisterEffect(e5)
--pendulum summon
aux.EnablePendulumAttribute(c)
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c60151904.e1con)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c60151904.e2splimit)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_PZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,60151902))
e3:SetValue(1000)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BATTLED)
e4:SetRange(LOCATION_PZONE)
e4:SetOperation(c60151904.e4op)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(60151904,0))
e5:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_PZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetTarget(c60151904.e5tg)
e5:SetOperation(c60151904.e5op)
c:RegisterEffect(e5)
end
function c60151904.e1confilter(c)
return c:IsCode(60151902)
return c:IsCode(60151902)
end
function c60151904.e1con(e)
return not Duel.IsExistingMatchingCard(c60151904.e1confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
or e:GetHandler():GetLeftScale()==0
return not Duel.IsExistingMatchingCard(c60151904.e1confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
or e:GetHandler():GetLeftScale()==0
end
function c60151904.e2splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
return bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c60151904.e4opcheck(c,tp)
return c and c:IsControler(tp) and c:IsCode(60151902)
return c and c:IsControler(tp) and c:IsCode(60151902)
end
function c60151904.e4op(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if (c60151904.e4opcheck(Duel.GetAttacker(),tp) or c60151904.e4opcheck(Duel.GetAttackTarget(),tp)) then
local c=e:GetHandler()
if c:GetLeftScale()==0 then return end
local scl=1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(-scl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
local tp=e:GetHandlerPlayer()
if (c60151904.e4opcheck(Duel.GetAttacker(),tp) or c60151904.e4opcheck(Duel.GetAttackTarget(),tp)) then
local c=e:GetHandler()
if c:GetLeftScale()==0 then return end
local scl=1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(-scl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
function c60151904.e5tgfilter(c)
return c:IsFacedown() and c:IsAbleToDeck()
return c:IsFacedown() and c:IsAbleToDeck()
end
function c60151904.e5tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c60151904.e5tgfilter,tp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():GetFlagEffect(60151901)~=0 end
local g=Duel.GetMatchingGroup(c60151904.e5tgfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(5043010,2))
if chk==0 then return Duel.IsExistingMatchingCard(c60151904.e5tgfilter,tp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():GetFlagEffect(60151901)~=0 end
local g=Duel.GetMatchingGroup(c60151904.e5tgfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(5043010,2))
end
function c60151904.e5op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local lp1=Duel.GetLP(1-tp)
if lp1>=1000 then
Duel.SetLP(1-tp,lp1-1000)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60151904.e5tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
else
Duel.SetLP(1-tp,0)
end
if not e:GetHandler():IsRelateToEffect(e) then return end
local lp1=Duel.GetLP(1-tp)
if lp1>=1000 then
Duel.SetLP(1-tp,lp1-1000)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60151904.e5tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
else
Duel.SetLP(1-tp,0)
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