Commit 5380a8c5 authored by Huangnan's avatar Huangnan

fix

parent b4c7f0bd
Pipeline #33939 passed with stages
in 61 minutes and 8 seconds
......@@ -43,10 +43,10 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -19,10 +19,9 @@ function c40011519.initial_effect(c)
--trap effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetProperty(0,EFFECT_FLAG2_COF)
e3:SetCode(EVENT_SUMMON)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40011519+1)
e3:SetCondition(c40011519.discon)
e3:SetTarget(c40011519.distg)
......
......@@ -19,10 +19,9 @@ function c40011522.initial_effect(c)
--trap effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetProperty(0,EFFECT_FLAG2_COF)
e3:SetCode(EVENT_SPSUMMON)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40011522+1)
e3:SetCondition(c40011522.discon)
e3:SetTarget(c40011522.distg)
......
......@@ -28,7 +28,7 @@ function s.cfilter(c,cc)
return c:IsSetCard(0x3ca5) and c:IsSummonable(true,nil) and c.card_code_list and s.checkcodelist(c,cc)
end
function s.sumfilter(c)
return c:IsFaceup() and c:IsSetCard(0xca5) and c.card_code_list and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_HAND,0,1,nil,cc)
return c:IsFaceup() and c:IsSetCard(0xca5) and c.card_code_list and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_HAND,0,1,nil,c)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
......
......@@ -64,6 +64,8 @@ function c71403001.op1(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not yume.PPT_loaded then
yume.PPT_loaded=true
function yume.PPTOtherScaleCheck(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x715)
end
......@@ -129,6 +131,28 @@ function yume.PPTSetFromGraveOp(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function yume.QuickDualSelectCheck(g1,g2,uniqf,...)
--Experimental quick algorithm for checking if there are two cards from two groups, one for each group
--param uniqf is a function for extra unique restrictions like different card names(currently unimplemented)
local g3=g1&g2
return #g1>0 and #g2>0 and not (#g1==#g3 and #g2==#g3 and #g1==1)
end
function yume.QuickDualSelect(tp,g1,g2,msg1,msg2,opf,...)
--Experimental quick algorithm for selecting two cards from two groups, one for each group
--param opf is a function for operations after selecting the first card, receiving the selected card as the first param and returning a bool standing for whether you do it("[opf], and if you do, select sg2")
local g3=g1&g2
local excard=nil
if #g2==#g3 and #g3==1 then excard=g3:GetFirst() end
Duel.Hint(HINT_SELECTMSG,tp,msg1)
local sg1=g1:Select(tp,1,1,excard)
local sc=sg1:GetFirst()
if not msg2 then return sg1 end
local ext_params={...}
if opf and not opf(sc,table.unpack(ext_params)) then return sg1,Group.CreateGroup() end
Duel.Hint(HINT_SELECTMSG,tp,msg2)
local sg2=g2:Select(tp,1,1,sc)
return sg1,sg2
end
function yume.PPTActivateZonesLimitForPlacingPend(e,tp,eg,ep,ev,re,r,rp)
local zone=0xff
local p0=Duel.CheckLocation(tp,LOCATION_PZONE,0)
......@@ -245,6 +269,12 @@ function yume.OptionalPendulum(e,c,tp)
e2:SetReset(RESET_PHASE+PHASE_MAIN1)
Duel.RegisterEffect(e2,tp)
e1:SetLabelObject(e2)
--would be sp summoned as Chain Link 2+
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON)
e3:SetOperation(yume.RegOpWhenWouldBeSpSummoned)
Duel.RegisterEffect(e3,tp)
local use_oppo_pend=not self_pend_flag or oppo_pend_flag and Duel.SelectYesNo(tp,aux.Stringid(71403001,5))
if use_oppo_pend then
Duel.SpecialSummonRule(tp,oppo_lpz,SUMMON_TYPE_PENDULUM)
......@@ -261,6 +291,12 @@ function yume.ResetExtraPendulumEffect(e,tp,eg,ep,ev,re,r,rp)
e1:Reset()
e:Reset()
end
function yume.RegOpWhenWouldBeSpSummoned(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()>1 then
Duel.SetChainLimit(aux.FALSE)
end
e:Reset()
end
function yume.RegPPTPuyopuyoBasicExtraFlag(c)
--Destroyed and added to Extra from Main Monster Zone
local e1=Effect.CreateEffect(c)
......@@ -499,4 +535,5 @@ function yume.PPTPuyopuyoExMoveOp(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--气泡方块使 T
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403002.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,true)
......
--气泡方块使 I
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403003.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,true)
......@@ -94,6 +95,7 @@ function c71403003.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c_is_in_hand=c:IsLocation(LOCATION_HAND)
if not (c:IsRelateToEffect(e) and (c_is_in_hand or c:GetSequence()<5)) then return end
local op_flag=false
if c_is_in_hand then
op_flag=Duel.SendtoExtraP(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()
else
......
--气泡方块使 S
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403004.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,true)
......@@ -103,6 +104,7 @@ function c71403004.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c_is_in_hand=c:IsLocation(LOCATION_HAND)
if not (c:IsRelateToEffect(e) and (c_is_in_hand or c:GetSequence()<5)) then return end
local op_flag=false
if c_is_in_hand then
op_flag=Duel.SendtoExtraP(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()
else
......
--气泡方块使 Z
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403005.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,true)
......@@ -48,7 +49,7 @@ function c71403005.initial_effect(c)
yume.PPTCounter()
end
function c71403005.filterp2a(c)
return c:GetSequence()>4 and c:IsFaceup() and c:IsSetCard(0x715) and c:IsCanChangePosition()
return c:GetSequence()<5 and c:IsFaceup() and c:IsSetCard(0x715) and c:IsCanChangePosition()
end
function c71403005.filterp2b(c)
return c:IsSetCard(0x715) and c:IsType(TYPE_PENDULUM)
......@@ -101,6 +102,7 @@ function c71403005.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c_is_in_hand=c:IsLocation(LOCATION_HAND)
if not (c:IsRelateToEffect(e) and (c_is_in_hand or c:GetSequence()<5)) then return end
local op_flag=false
if c_is_in_hand then
op_flag=Duel.SendtoExtraP(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()
else
......@@ -128,17 +130,11 @@ function c71403005.op1(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
oc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DISEFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c71403005.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
oc:RegisterEffect(e3)
oc:RegisterFlagEffect(71403005,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
end
function c71403005.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler()==e:GetHandler()
end
\ No newline at end of file
--T旋爆裂!
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--TETRIS!
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403008.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--美学魔术!
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403009.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
......
--存块!旋转!
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--气泡方块的星舰舰长 T
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403011.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsXyzType,TYPE_PENDULUM),4,2,nil,nil,99)
......@@ -144,7 +145,7 @@ function c71403011.op2(e,tp,eg,ep,ev,re,r,rp)
result=Duel.Destroy(dg,REASON_EFFECT)
end
if result==0 then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=Duel.GetFieldGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local oppo_g=g:Filter(Card.IsControler,nil,1-tp)
local seq_pos_table={}
for tc in aux.Next(oppo_g) do
......@@ -153,7 +154,7 @@ function c71403011.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
local changed_g=Group.CreateGroup()
local unchanged_g=Group.CreateGroup()
for seq,pos in ipairs(seq_pos_table) do
for seq,pos in pairs(seq_pos_table) do
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,seq)
if tc then
if tc:GetPosition()==pos then
......
--气泡方块使 J&L
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403012.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,true)
......@@ -48,7 +49,7 @@ function c71403012.initial_effect(c)
yume.PPTCounter()
end
function c71403012.filterp2a(c)
return c:GetSequence()>4 and c:IsFaceup() and c:IsSetCard(0x715) and c:IsCanChangePosition()
return c:GetSequence()<5 and c:IsFaceup() and c:IsSetCard(0x715) and c:IsCanChangePosition()
end
function c71403012.filterp2b(c)
return c:IsFaceup() and yume.PPTPlacePendExceptFromFieldFilter(c)
......@@ -98,6 +99,7 @@ function c71403012.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c_is_in_hand=c:IsLocation(LOCATION_HAND)
if not (c:IsRelateToEffect(e) and (c_is_in_hand or c:GetSequence()<5)) then return end
local op_flag=false
if c_is_in_hand then
op_flag=Duel.SendtoExtraP(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()
else
......
--气泡方块使 O
---@param c Card
if not c71403001 then dofile("expansions/script/c71403001.lua") end
function c71403013.initial_effect(c)
--pendulum summon
......@@ -71,7 +72,7 @@ function c71403013.opp2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c71403013.filterp2b,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
......@@ -103,6 +104,7 @@ function c71403013.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c_is_in_hand=c:IsLocation(LOCATION_HAND)
if not (c:IsRelateToEffect(e) and (c_is_in_hand or c:GetSequence()<5)) then return end
local op_flag=false
if c_is_in_hand then
op_flag=Duel.SendtoExtraP(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()
else
......@@ -116,5 +118,5 @@ function c71403013.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c71403013.filter1,tp,LOCATION_GRAVE,0,1,2,nil)
if g:GetCount()==0 then return end
Duel.SendtoDeck(g,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--两个人在一起就是最强的!
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403014.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -8,8 +9,9 @@ function c71403014.initial_effect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_LIMIT_ZONE)
e1:SetCost(yume.PPTLimitCost)
e1:SetValue(yume.PPTActivateZonesLimitForPlacingPend)
e1:SetTarget(c71403014.tg1)
e1:SetOperation(c71403014.op1)
c:RegisterEffect(e1)
......
--气泡方块的淘气双子 J&L
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403015.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsXyzType,TYPE_PENDULUM),4,2,nil,nil,99)
......
--气泡方块的千金与管家 S&Z
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403016.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsXyzType,TYPE_PENDULUM),4,2,nil,nil,99)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--inactivatable
local ep1=Effect.CreateEffect(c)
ep1:SetType(EFFECT_TYPE_FIELD)
ep1:SetCode(EFFECT_CANNOT_DISABLE)
ep1:SetRange(LOCATION_PZONE)
ep1:SetTargetRange(LOCATION_MZONE,0)
ep1:SetCondition(yume.PPTOtherScaleCheck)
ep1:SetTarget(c71403016.indtg)
ep1:SetValue(c71403016.efilter)
c:RegisterEffect(ep1)
local ep1a=Effect.CreateEffect(c)
ep1a:SetType(EFFECT_TYPE_FIELD)
ep1a:SetCode(EFFECT_CANNOT_DISEFFECT)
ep1a:SetRange(LOCATION_PZONE)
ep1a:SetTargetRange(LOCATION_MZONE,0)
ep1a:SetCondition(yume.PPTOtherScaleCheck)
ep1a:SetTarget(c71403016.indtg)
ep1a:SetValue(c71403016.efilter)
c:RegisterEffect(ep1a)
--change pos
local ep2=Effect.CreateEffect(c)
ep2:SetCategory(CATEGORY_POSITION)
ep2:SetType(EFFECT_TYPE_IGNITION)
ep2:SetCode(EVENT_FREE_CHAIN)
ep2:SetRange(LOCATION_PZONE)
ep2:SetDescription(aux.Stringid(71403016,0))
ep2:SetCountLimit(1,71503016)
ep2:SetProperty(EFFECT_FLAG_CARD_TARGET)
ep2:SetCost(yume.PPTLimitCost)
ep2:SetTarget(c71403016.tgp2)
ep2:SetOperation(c71403016.opp2)
c:RegisterEffect(ep2)
--monster movement effect
yume.RegPPTTetrisExMoveEffect(c,71403016)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71403016,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOEXTRA+CATEGORY_DESTROY+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START+TIMING_END_PHASE)
e2:SetCountLimit(1,71513016)
e2:SetCost(yume.PPTLimitCost)
e2:SetTarget(c71403016.tg2)
e2:SetOperation(c71403016.op2)
c:RegisterEffect(e2)
yume.PPTCounter()
end
c71403016.pendulum_level=4
function c71403016.indtg(e,c)
return c:IsFaceup() and c:IsSetCard(0x715) and c:IsSummonLocation(LOCATION_EXTRA)
end
function c71403016.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c71403016.tgp2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local tg=Duel.SelectTarget(tp,Card.IsCanChangePosition,0,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,tg,#tg,0,0)
end
function c71403016.opp2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e)
and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
for sc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(71403016,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c71403016.immcon)
e1:SetValue(c71403016.efilter)
e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
sc:RegisterEffect(e1)
end
end
end
end
function c71403016.immcon(e)
return e:GetHandler():IsControler(e:GetOwnerPlayer())
end
function c71403016.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
return (c:CheckRemoveOverlayCard(tp,2,REASON_EFFECT)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.IsExistingMatchingCard(c71403016.filter2,tp,LOCATION_ONFIELD,0,1,nil,true))
and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_PENDULUM)
end
local g1=Duel.GetMatchingGroup(Card.IsAbleToDeck,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(c71403016.filter2a,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g2,1,0,0)
end
function c71403016.filter2(c,check)
return c:IsFaceup() and c:IsSetCard(0x715)
and (not check or Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c))
end
function c71403016.filter2a(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x715)
end
function c71403016.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt1=c:IsRelateToEffect(e) and c:CheckRemoveOverlayCard(tp,2,REASON_EFFECT)
local opt2=Duel.IsExistingMatchingCard(c71403016.filter2,tp,LOCATION_ONFIELD,0,1,nil,false)
local result=0
if not opt1 and not opt2 then return end
if opt1 and not opt2 then result=0 end
if opt2 and not opt1 then result=1 end
if opt1 and opt2 then result=Duel.SelectOption(tp,aux.Stringid(71403011,2),aux.Stringid(71403011,3)) end
if result==0 then
result=c:RemoveOverlayCard(tp,2,2,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,c71403016.filter2,tp,LOCATION_ONFIELD,0,1,1,nil,false)
Duel.HintSelection(dg)
result=Duel.Destroy(dg,REASON_EFFECT)
end
if result==0 then return end
local dg=Duel.GetMatchingGroup(c71403016.filter2a,tp,LOCATION_GRAVE,0,1,nil)
local ct=2
if dg:GetCount()==1 then
ct=1
elseif dg:GetCount()==0 then
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end
g=Duel.GetOperatedGroup()
ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
local sdg=dg:Select(tp,1,ct,nil)
Duel.SendtoExtraP(sdg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--我来做你的对手。
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403017.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71403014,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_LIMIT_ZONE)
e1:SetCost(yume.PPTLimitCost)
e1:SetValue(yume.PPTActivateZonesLimitForPlacingPend)
e1:SetTarget(c71403017.tg1)
e1:SetOperation(c71403017.op1)
c:RegisterEffect(e1)
yume.RegPPTSTGraveEffect(c,71403014)
if not c71403017.global_check then
c71403017.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD)
ge1:SetCondition(c71403017.regcon)
ge1:SetOperation(c71403017.regop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHANGE_POS)
ge2:SetOperation(c71403017.regop2)
Duel.RegisterEffect(ge2,0)
end
yume.PPTCounter()
end
function c71403017.lffilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousSetCard(0x715)
and c:IsPreviousPosition(POS_FACEUP) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c71403017.lffilter2(c,tp)
return c:GetOwner()==tp and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c71403017.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c71403017.lffilter,1,nil)
end
function c71403017.regop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c71403017.lffilter,nil)
if g:IsExists(c71403017.lffilter2,1,nil,0) then
Duel.RegisterFlagEffect(0,71403017,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
if g:IsExists(c71403017.lffilter2,1,nil,1) then
Duel.RegisterFlagEffect(1,71403017,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
end
function c71403017.posfilter(c)
return c:GetFlagEffect(71503017)==0
end
function c71403017.regop2(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c71403017.posfilter,nil)
Duel.RegisterFlagEffect(0,71503017,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1,g:GetCount())
for tc in aux.Next(g) do
tc:RegisterFlagEffect(71503017,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
end
function c71403017.xyzfilter(c)
return c:IsSetCard(0x715) and c:IsXyzSummonable(nil)
end
function c71403017.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local exg=Duel.GetMatchingGroup(c71403017.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then
local pg=Duel.GetMatchingGroup(yume.PPTPlacePendExceptFromFieldFilter,tp,LOCATION_EXTRA,0,nil)
return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and yume.QuickDualSelectCheck(pg,exg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,exg,1,0,0)
end
function c71403017.placeop(tc,tp)
return Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
function c71403017.op1(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.GetMatchingGroup(yume.PPTPlacePendExceptFromFieldFilter,tp,LOCATION_EXTRA,0,nil)
local exg=Duel.GetMatchingGroup(c71403017.xyzfilter,tp,LOCATION_EXTRA,0,nil)
pg,exg=yume.QuickDualSelect(tp,pg,exg,HINTMSG_TOFIELD,HINTMSG_SPSUMMON,c71403017.placeop,tp)
if exg:GetCount()>0 then
Duel.BreakEffect()
local xyzc=exg:GetFirst()
if Duel.GetFlagEffect(tp,71403017)~=0 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetOperation(c71403017.regop3)
xyzc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetOperation(c71403017.desop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
Duel.XyzSummon(tp,xyzc,nil)
end
end
function c71403017.regop3(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
function c71403017.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,71403017)
local res=table.pack(Duel.GetFlagEffectLabel(tp,71503017))
local ct=0
for i=1,res.n do
ct=ct+res[i]
end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if ct>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71403017,1)) then
local dg=g:Select(tp,1,ct,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
\ No newline at end of file
--气泡方块使 林檎
---@param c Card
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403019.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,true)
......@@ -78,7 +78,7 @@ function c71403019.opp2(e,tp,eg,ep,ev,re,r,rp)
end
local op_flag=false
if op==0 then
op_flag=Duel.Destroy(sg,REASON_EFFECT)>0
op_flag=Duel.Destroy(tc,REASON_EFFECT)>0
else
op_flag=Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)>0
end
......
--气泡方块使 亚鲁鲁
---@param c Card
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403021.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,true)
......@@ -87,7 +87,7 @@ function c71403021.opp2(e,tp,eg,ep,ev,re,r,rp)
end
local op_flag=false
if op==0 then
op_flag=Duel.Destroy(sg,REASON_EFFECT)>0
op_flag=Duel.Destroy(tc,REASON_EFFECT)>0
else
op_flag=Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)>0
end
......
--气泡方块的见习法师与搭档 亚鲁鲁·娜嘉&卡邦可
---@param c Card
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403022.initial_effect(c)
--syn summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_PENDULUM),aux.NonTuner(aux.FilterBoolFunction(Card.IsSynchroType,TYPE_PENDULUM)),1,1)
......@@ -105,7 +105,7 @@ end
function c71403022.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c71403022.filter2,tp,LOCATION_EXTRA+LOCATION_ONFIELD,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c71403022.filter2sp,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c71403022.filter2sp),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
end
local g1=Duel.GetMatchingGroup(c71403022.filter2,tp,LOCATION_EXTRA+LOCATION_ONFIELD,0,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,1,0,0)
......@@ -116,10 +116,10 @@ function c71403022.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local desg=Duel.SelectMatchingCard(tp,c71403022.filter2,tp,LOCATION_EXTRA+LOCATION_ONFIELD,0,1,1,nil,tp)
if Duel.Destroy(desg,REASON_EFFECT)>0 then
local deck_group=Duel.GetMatchingGroup(c71403022.filter2sp,tp,LOCATION_DECK,0,nil,e,tp)
if deck_group:GetCount()>0 then
local sp_group=Duel.GetMatchingGroup(aux.NecroValleyFilter(c71403022.filter2sp),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if sp_group:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local setg=deck_group:Select(tp,1,1,nil)
local setg=sp_group:Select(tp,1,1,nil)
if setg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(setg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
......
--L-J幻象!
if not c71403001 then dofile("expansions/script/c71403001.lua") end
---@param c Card
function c71403023.initial_effect(c)
--destroy
......@@ -16,7 +17,7 @@ function c71403023.initial_effect(c)
yume.PPTCounter()
end
function c71403023.filtertg1(c,tp)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
return c:GetOriginalType()&TYPE_PENDULUM~=0 and c:IsFaceup()
and Duel.IsExistingMatchingCard(c71403023.filter1,tp,LOCATION_DECK,0,1,nil,c:GetCurrentScale())
end
function c71403023.filter1(c,scale)
......@@ -73,7 +74,7 @@ function c71403023.op1(e,tp,eg,ep,ev,re,r,rp)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local spg=pg:Select(tp,ct,ct,nil)
for pc in aux.Next(pg) do
for pc in aux.Next(spg) do
Duel.MoveToField(pc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,0x715) then
......
......@@ -79,7 +79,7 @@ function c82000240.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c82000240.drfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf57) and not c:IsCode(8200240) and c:IsAbleToDeck()
return c:IsFaceup() and c:IsSetCard(0xf57) and not c:IsCode(82000240) and c:IsAbleToDeck()
end
function c82000240.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c82000240.drfilter(chkc) end
......
......@@ -170,7 +170,7 @@ function c82000400.tjfilter(c,e)
end
function c82000400.ewop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lg=c:GetColumnGroup()
local lg=c:GetColumnGroup(1,1)
if c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c82000400.ewfilter2,tp,0,LOCATION_MZONE,nil,lg)
if g:GetCount()==0 then return end
......
......@@ -77,10 +77,10 @@ function c82000600.thop(e,tp,eg,ep,ev,re,r,rp)
end
function c82000600.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup()
return c:IsFaceup()
end
function c82000600.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCountFromEx(tp,tp,nil,e:GetHandler())>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -93,7 +93,7 @@ function c82000600.op(e,tp,eg,ep,ev,re,r,rp)
end
function c82000600.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE)
end
function c82000600.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
......
......@@ -7,6 +7,7 @@ function c82000714.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCondition(c82000714.con)
e1:SetCost(c82000714.cost)
e1:SetTarget(c82000714.target)
e1:SetOperation(c82000714.activate)
c:RegisterEffect(e1)
......@@ -25,6 +26,16 @@ end
function c82000714.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)
end
function c82000714.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,82000714)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c82000714.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct1=g1:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
......
......@@ -22,15 +22,12 @@ end
function c82000716.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,8000)
Duel.SetLP(1-tp,8000)
if not c82000706.global_check then
c82000706.global_check=true
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
......@@ -123,7 +123,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ConfirmCards(1-tp,cg)
end
function cm.thfilter(c)
return c:IsSetCard(0x1ef1) and c:IsAbleToHand()
return c:IsSetCard(0x3ef1) and c:IsAbleToHand()
and c:IsType(TYPE_MONSTER)
end
function cm.thtg(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