Commit a9e28a64 authored by REIKAI's avatar REIKAI 💬

update 01.08

parent bc179df8
Pipeline #19261 passed with stages
in 24 minutes and 23 seconds
No preview for this file type
--小鲨鱼升级了
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
rscf.AddTokenList(c, 31300024)
local e1 = rsef.A(c,nil,nil,nil,"eq,atk,def,rec",nil,nil,nil,
rsop.target(s.eqfilter,"eq",LOCATION_EXTRA),s.act)
local e2 = rsef.I(c,"td",{1,id},"td","tg",LOCATION_GRAVE,nil,nil,
rstg.target({Card.IsAbleToDeck,"td",LOCATION_GRAVE,LOCATION_GRAVE,1,3,c},
{"opc",Card.IsAbleToDeck,"td"}),s.tdop)
end
function s.tdop(e,tp)
local c = rscf.GetSelf(e)
local g = rsgf.GetTargetGroup()
g:AddCard(c)
if #g > 0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function s.eqfilter(c,e,tp)
local ac = e:GetHandler()
return ((ac:IsLocation(LOCATION_SZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0) or Duel.GetLocationCount(tp,LOCATION_SZONE)>1 or (not e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0))and c:IsFacedown() and Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.exfilter(c)
return c:IsFaceup() and c:IsCode(31300024)
end
function s.act(e,tp)
local c = e:GetHandler()
local tg = Duel.GetMatchingGroup(s.exfilter,tp,LOCATION_MZONE,0,nil)
if #tg<=0 then return end
local g = Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)
if #g == 0 or Duel.GetLocationCount(tp,LOCATION_SZONE) <= 0 then return end
local sg = g:RandomSelect(tp,1)
Duel.ConfirmCards(1-tp,sg)
local tc = sg:GetFirst()
if tc:IsForbidden() then
Duel.SendtoGrave(tc,REASON_RULE)
return
end
if aux.IsCodeListed(tc, 31300024) then
local ec = tg:Select(tp,1,1,nil):GetFirst()
rsop.Equip(e, tc, ec)
else
if Duel.Recover(tp, 1200, REASON_EFFECT) > 0 then
for tc in aux.Next(tg) do
local e1,e2 = rscf.QuickBuff({c,tc},"atk+,def+",1200)
end
end
end
end
--狗狗摸摸
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
aux.AddCodeList(c, 31300024)
local e1 = rsef.A(c,nil,nil,{1,id,"o"},"dr","tg",nil,nil,
rstg.target(s.tfilter,"dis",LOCATION_SZONE,0,1,1,c),s.act)
local e2 = rsef.I(c,"th",{1,id + 100},"td,th","tg",LOCATION_GRAVE,aux.exccon,
nil, rstg.target({s.thfilter,"th",LOCATION_GRAVE},
{"opc",Card.IsAbleToDeck,"td"}),s.thop)
end
function s.thfilter(c)
return c:IsAbleToHand() and c:GetTurnID() == Duel.GetTurnCount() and c:IsType(TYPE_SPELL) and aux.IsCodeListed(c, 31300024)
end
function s.thop(e,tp)
local c, tc = rscf.GetSelf(), rscf.GetTargetCard()
if c and Duel.SendtoDeck(c,nil,2,REASON_EFFECT) > 0 and c:IsLocation(LOCATION_DECK) and tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function s.tfilter(c)
return aux.IsCodeListed(c, 31300024) and aux.NegateAnyFilter(c)
end
function s.act(e,tp)
local tc = rscf.GetTargetCard(aux.NegateAnyFilter)
if tc and rsop.DisableCards(tc, e, false, rsrst.std_ep) > 0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--小鲨鱼 休闲服&猫耳
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
aux.AddCodeList(c, 31300024)
c:EnableReviveLimit()
rscf.SetSummonCondition(c,false,aux.FALSE)
--disable attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(s.atkcon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.discon)
e3:SetOperation(s.disop)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(s.acon)
e4:SetValue(1200)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(s.eftg)
e5:SetLabelObject(e2)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(s.eftg)
e6:SetLabelObject(e3)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e7:SetTarget(s.eftg)
e7:SetLabelObject(e1)
c:RegisterEffect(e7)
c:RegisterEffect(e1)
c:RegisterEffect(e2)
c:RegisterEffect(e3)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_EQUIP)
e8:SetCode(EFFECT_ADD_TYPE)
e8:SetCondition(s.acon)
e8:SetValue(TYPE_EFFECT)
c:RegisterEffect(e8)
end
s.toss_coin=true
function s.eftg(e,c)
return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget() == c and c:IsCode(31300024)
end
function s.acon(e)
local c = e:GetHandler()
local tc = c:GetEquipTarget()
return tc and tc:IsCode(31300024)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(1)>0
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
if Duel.TossCoin(tp,1) >= 1 then
local e1 = rscf.QuickBuff(e:GetHandler(),"im",s.imval(re),"rst",RESET_CHAIN)
end
end
function s.imval(re)
return function(e, re0)
return re0 == re
end
end
function s.atkcon(e,tp)
local ac,bc = Duel.GetBattleMonster(tp)
return ac and bc
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--小鲨鱼 礼服&三叉戟
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddCodeList(c, 31300024)
rscf.SetSummonCondition(c,false,aux.FALSE)
-- attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(s.atktg)
e1:SetCondition(s.atkcon)
e1:SetValue(-3200)
c:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--disable
local e3 = rsef.QO_NegateActivation(c,"dum",1,LOCATION_MZONE,
rscon.neg(s.fun,1))
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(s.acon)
e4:SetValue(1200)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(s.eftg)
e6:SetLabelObject(e3)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e7:SetTarget(s.eftg)
e7:SetLabelObject(e1)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e8:SetRange(LOCATION_SZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(s.eftg)
e8:SetLabelObject(e2)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_EQUIP)
e9:SetCode(EFFECT_ADD_TYPE)
e9:SetCondition(s.acon)
e9:SetValue(TYPE_EFFECT)
c:RegisterEffect(e9)
end
function s.cfilter(c)
return c:IsAbleToGraveAsCost() and c:IsComplexType(TYPE_SPELL+TYPE_EQUIP)
end
function s.fun(e,tp,re,rp,tg,loc)
return loc & LOCATION_ONFIELD == 0
end
function s.atkcon(e)
return Duel.GetCurrentPhase() == PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget()
end
function s.atktg(e,c)
return c==e:GetHandler():GetBattleTarget() and c:IsControler(1-e:GetHandlerPlayer())
end
function s.eftg(e,c)
return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget() == c and c:IsCode(31300024)
end
function s.acon(e)
local c = e:GetHandler()
local tc = c:GetEquipTarget()
return tc and tc:IsCode(31300024)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(1)>0
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
if Duel.TossCoin(tp,1) >= 1 then
local e1 = rscf.QuickBuff(c,"im",s.imval(re),"rst",RESET_CHAIN)
end
end
function s.imval(re)
return function(e, re0)
return re0 == re
end
end
--小鲨鱼 Α
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
rscf.AddTokenList(c, id + 1)
local e1 = rsef.A(c,nil,nil,{1,id,"o"},"sp,tk,eq",nil,nil,nil,
s.tg,s.act)
local e2 = rsef.FTO(c,EVENT_TO_GRAVE,"tg",{1,id+100},nil,"de,dsp",
LOCATION_SZONE,s.tgcon,rscost.setlab(100),s.tgtg,s.tgop)
local e3 = rsef.I(c,"th",{1,id+200},"th",nil,LOCATION_GRAVE,nil,
rscost.cost(s.resfilter,"res",LOCATION_ONFIELD+LOCATION_HAND),
rsop.target(Card.IsAbleToHand,"th"),s.thop)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetValue(s.eqlimit)
c:RegisterEffect(e0)
s.Next_Sum = 0
end
function s.eqlimit(e,c)
return s.eqfilter(c)
end
function s.resfilter(c)
return (c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) or c:IsRace(RACE_CYBERSE)) and c:IsReleasable()
end
function s.thop(e,tp)
local c = rscf.GetSelf(e)
if c then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function s.exdfilter(c,tp)
return c:IsPreviousControler(1-tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE))
end
function s.tgcon(e,tp,eg)
return eg:IsExists(s.exdfilter,1,nil,tp)
end
function s.filter(c)
return c:IsCode(31300019) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function s.eqfilter(c)
return c:IsFaceup() and c:IsCode(id + 1)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1 = Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,0,1,nil)
local b2 = rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,0) and not Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_ONFIELD,0,1,nil)
if chkc then return s.eqfilter(chkc) and chkc:IsControler(tp) end
if chk == 0 then return b1 or b2 end
local op = rshint.SelectOption(tp,b1,{id,0},b2,{id,1})
if op == 1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
else
e:SetProperty(0)
rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,1)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
e:SetLabel(op)
end
function s.act(e,tp)
local c, tc = rscf.GetFaceUpSelf(e), rscf.GetTargetCard(Card.IsFaceup)
local op = e:GetLabel()
if op == 1 then
if c and tc then
Duel.Equip(tp,c,tc)
end
else
local sumcode = { id+1, 31300031, 31300032, 31300033, 31300034 }
s.Next_Sum = s.Next_Sum + 1
local code = sumcode[ s.Next_Sum ]
local ct, og , tk = rssf.SpecialSummonToken(e,tp,code)
if tk and c then
Duel.Equip(tp,c,tk)
end
end
end
--小鲨鱼 B
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
rscf.AddTokenList(c, id + 1)
aux.AddCodeList(c, id - 1)
local e1 = rsef.A(c,nil,nil,{1,id,"o"},"sp,tk,eq",nil,nil,nil,
s.tg,s.act)
local e2 = rsef.FTO(c,EVENT_TO_GRAVE,"tg",{1,id+100},nil,"de,dsp",
LOCATION_SZONE,s.tgcon,rscost.setlab(100),s.tgtg,s.tgop)
local e3 = rsef.I(c,"th",{1,id+200},"th",nil,LOCATION_GRAVE,nil,
rscost.cost(s.resfilter,"res",LOCATION_ONFIELD+LOCATION_HAND),
rsop.target(Card.IsAbleToHand,"th"),s.thop)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetValue(s.eqlimit)
c:RegisterEffect(e0)
s.Next_Sum = 0
end
function s.eqlimit(e,c)
return s.eqfilter(c)
end
function s.resfilter(c)
return (c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) or c:IsRace(RACE_CYBERSE)) and c:IsReleasable()
end
function s.thop(e,tp)
local c = rscf.GetSelf(e)
if c then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function s.exdfilter(c,tp)
return c:IsPreviousControler(1-tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE))
end
function s.tgcon(e,tp,eg)
return eg:IsExists(s.exdfilter,1,nil,tp)
end
function s.filter(c)
return c:IsCode(31300019) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function s.exfilter(c)
return c:IsFaceup() and c:IsCode(id-1)
end
function s.eqfilter(c)
return c:IsCode(id - 1)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1 = Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,0,1,nil)
local b2 = rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,0) and not Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_ONFIELD,0,1,nil)
if chkc then return s.eqfilter(chkc) and chkc:IsControler(tp) end
if chk == 0 then return b1 or b2 end
local op = rshint.SelectOption(tp,b1,{id,0},b2,{id,1})
if op == 1 then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
else
e:SetProperty(0)
rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,1)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
e:SetLabel(op)
end
function s.act(e,tp)
local c, tc = rscf.GetFaceUpSelf(e), rscf.GetTargetCard(Card.IsFaceup)
local op = e:GetLabel()
if op == 1 then
if c and tc then
Duel.Equip(tp,c,tc)
end
else
local sumcode = { id+1, 31300035, 31300036, 31300037, 31300038 }
s.Next_Sum = s.Next_Sum + 1
local code = sumcode[ s.Next_Sum ]
local ct, og , tk = rssf.SpecialSummonToken(e,tp,code)
if tk and c then
Duel.Equip(tp,c,tk)
end
end
end
--虚拟偶像小火鸡
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
aux.AddCodeList(c, 31300024)
c:EnableReviveLimit()
rscf.SetSummonCondition(c,false,aux.FALSE)
local e1 = rsef.FC(c,EVENT_ATTACK_ANNOUNCE,nil,nil,nil,LOCATION_MZONE,nil,s.regop)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetTarget(s.desreptg)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(s.acon)
e4:SetValue(1200)
c:RegisterEffect(e4)
--gain
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(s.eftg)
e5:SetLabelObject(e1)
c:RegisterEffect(e5)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e7:SetTarget(s.eftg)
e7:SetLabelObject(e2)
c:RegisterEffect(e7)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_EQUIP)
e9:SetCode(EFFECT_ADD_TYPE)
e9:SetCondition(s.acon)
e9:SetValue(TYPE_EFFECT)
c:RegisterEffect(e9)
end
function s.eftg(e,c)
return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget() == c and c:IsCode(31300024)
end
function s.acon(e)
local c = e:GetHandler()
local tc = c:GetEquipTarget()
return tc and tc:IsCode(31300024)
end
function s.regop(e,tp)
rshint.Card(id)
Duel.Recover(tp,1200,REASON_EFFECT)
end
function s.repfilter(c)
return c:IsLocation(LOCATION_SZONE) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=c:GetEquipGroup()
return not c:IsReason(REASON_REPLACE) and g:IsExists(s.repfilter,1,nil)
end
if Duel.SelectEffectYesNo(tp,c,96) then
local g=c:GetEquipGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,s.repfilter,1,1,nil)
Duel.SetTargetCard(sg)
return true
else return false end
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if Duel.SendtoGrave(tg,REASON_EFFECT+REASON_REPLACE) > 0 then
local e1 = rsef.FC_Easy({e:GetHandler(),tp},EVENT_PHASE+PHASE_END,nil,nil,s.eqcon,s.eqop,rsrst.ep)
e1:SetCountLimit(1)
end
end
function s.eqcon(e,tp)
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
function s.eqop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_SZONE) <= 0 then return end
local _,tc = rsop.SelectCards("eq",tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if not tc then return end
local _,tc2 = rsop.SelectCards("eq",tp,s.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil)
if not tc2 then return end
rsop.Equip(e,tc,tc2)
end
function s.eqfilter(c)
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,31300024)
end
function s.eqfilter2(c)
return c:IsFaceup() and c:IsCode(31300024)
end
--宝物箱子
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
aux.AddCodeList(c, 31300024)
local e3 = rsef.STO(c,EVENT_TO_GRAVE,"th",{1,id},"th,td","de,tg",s.thcon,nil,
rstg.target({s.thfilter,"th",LOCATION_GRAVE},{"opc",Card.IsAbleToDeck}),
s.thop)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(s.eqlimit)
c:RegisterEffect(e2)
end
function s.thcon(e,tp)
local c = e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.thfilter(c)
return not c:IsCode(id) and aux.IsCodeListed(c,31300024) and c:IsAbleToHand()
end
function s.thop(e,tp)
local c, tc = rscf.GetSelf(e), rscf.GetTargetCard()
if c and Duel.SendtoDeck(c,nil,2,REASON_EFFECT) > 0 and c:IsLocation(LOCATION_DECK) and tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function s.eqlimit(e,c)
return c:IsControler(1-e:GetHandlerPlayer())
end
function s.checkzone(e,tg)
if tg then
local c = e:GetHandler()
if c:IsLocation(LOCATION_HAND) then
return Duel.GetLocationCount(tp,LOCATION_SZONE) > 1
else
return Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
else
local c = rscf.GetSelf(e)
if not c then
return Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
else
return Duel.GetLocationCount(tp,LOCATION_SZONE) > 1
end
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.IsPlayerCanDiscardDeck(tp,3)
and s.checkzone(e,true) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then
if not Duel.IsPlayerCanDiscardDeck(tp,3) or Duel.GetLocationCount(tp,LOCATION_SZONE) <= 0 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
if g:IsExists(s.eqfilter,1,nil,tc,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,s.eqfilter,1,1,nil,tc,tp)
Duel.Equip(tp,sg:GetFirst(),tc)
g:Sub(sg)
end
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
end
end
end
function s.eqfilter(c,ec,tp)
return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp,LOCATION_ONFIELD)
end
--小鲨鱼 古拉
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
aux.AddCodeList(c, 31300024)
c:EnableReviveLimit()
rscf.SetSummonCondition(c,false,aux.FALSE)
local e1 = rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"eq",nil,"eq","de",nil,nil,
rsop.target(s.eqfilter,"eq",LOCATION_DECK),s.eqop)
local e2 = rsef.QO(c,nil,"des",1,"des","tg",LOCATION_MZONE,nil,nil,
rstg.target({s.desfilter,rsgf.dnpcheck},"des",LOCATION_ONFIELD,
LOCATION_ONFIELD,2,2),s.desop)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(s.acon)
e4:SetValue(1200)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(s.eftg)
e6:SetLabelObject(e2)
c:RegisterEffect(e6)
end
function s.acon(e)
local c = e:GetHandler()
local tc = c:GetEquipTarget()
return tc and tc:IsRace(RACE_SEASERPENT) and tc:IsAttribute(ATTRIBUTE_WATER) and tc:IsLevel(1)
end
function s.eftg(e,c)
return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget() == c and c:IsRace(RACE_SEASERPENT) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(1)
end
function s.desfilter(c,e,tp)
if c:IsControler(tp) then return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP)
else
return true
end
end
function s.desop(e,tp)
local dg = rsgf.GetTargetGroup()
Duel.Destroy(dg,REASON_EFFECT)
end
function s.eqfilter(c,e,tp)
return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) and c:CheckEquipTarget(e:GetHandler()) and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0 and c:CheckUniqueOnField(tp,LOCATION_ONFIELD)
end
function s.eqop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.Equip(tp,tc,c,true)
end
end
\ No newline at end of file
--开启宝箱
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
aux.AddCodeList(c, 31300024)
local e1 = rsef.A(c)
e1:SetCost(rscost.setlab(100))
e1:SetTarget(s.tg)
e1:SetOperation(s.act)
local e2 = rsef.FTO(c,EVENT_TO_GRAVE,"tg",{1,id},nil,"de,dsp",
LOCATION_GRAVE,s.thcon,nil,
rsop.target(Card.IsAbleToHand,"th"),s.thop)
end
function s.exdfilter(c,tp)
return c:IsPreviousControler(1-tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE))
end
function s.thcon(e,tp,eg)
return eg:IsExists(s.exdfilter,1,nil,tp)
end
function s.thop(e,tp)
local c = rscf.GetSelf(e)
if c then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
function s.filter(c)
return c:IsCode(31300019) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function s.resfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsReleasable()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
local b1 = (e:GetLabel() ~= 100 or Duel.IsExistingMatchingCard(s.resfilter,tp,LOCATION_SZONE,0,1,nil)) and Duel.IsPlayerCanDiscardDeck(tp,4)
local b2 = e:GetLabel()==100 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) and (not e:IsHasType(EFFECT_TYPE_ACTIVATE) or not c:IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE) > 1)
if chk == 0 then
e:SetLabel(0)
return b1 or b2
end
local op = rshint.SelectOption(tp,b1,"th",b2,"tg")
if op == 1 then
if e:GetLabel() == 100 then
rsop.OperateCards("res",tp,Card.IsType,tp,LOCATION_SZONE,0,1,1,nil,TYPE_EQUIP)()
end
e:SetCategory(CATEGORY_DECKDES+CATEGORY_SEARCH+CATEGORY_TOHAND)
else
e:SetCategory(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
e:SetLabel(0)
e:SetValue(op)
end
function s.thfilter(c)
return c:IsAbleToHand() and aux.IsCodeListed(c, 31300024)
end
function s.act(e,tp)
local op = e:GetValue()
if op == 1 then
if not Duel.IsPlayerCanDiscardDeck(tp,4) then return end
Duel.ConfirmDecktop(tp,4)
local g=Duel.GetDecktopGroup(tp,4)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
if g:IsExists(s.thfilter,1,nil) and rshint.SelectYesNo(tp,"th") then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,s.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
g:Sub(sg)
end
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
end
else
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
--虚拟偶像小祭司
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local s,id,o = GetID()
function s.initial_effect(c)
aux.AddCodeList(c, 31300024)
rscf.AddTokenList(c, id + 1)
c:EnableReviveLimit()
rscf.SetSummonCondition(c,false,aux.fuslimit)
local e1 = rsef.QO(c,nil,"res",1,"res,tk,sp",nil,LOCATION_MZONE,nil,nil,
rsop.target2(s.reg,s.resfilter,"res",
LOCATION_ONFIELD,LOCATION_ONFIELD),s.resop)
local e2,e3 = rsef.SV_Card(c,"atk+,def+",s.val,"sr",LOCATION_MZONE)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(s.acon)
e4:SetValue(1200)
c:RegisterEffect(e4)
--gain
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(s.eftg)
e6:SetLabelObject(e1)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e7:SetTarget(s.eftg)
e7:SetLabelObject(e2)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e8:SetRange(LOCATION_SZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(s.eftg)
e8:SetLabelObject(e3)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_EQUIP)
e9:SetCode(EFFECT_ADD_TYPE)
e9:SetCondition(s.acon)
e9:SetValue(TYPE_EFFECT)
c:RegisterEffect(e9)
end
function s.acon(e)
local c = e:GetHandler()
local tc = c:GetEquipTarget()
return tc and tc:IsCode(31300024)
end
function s.eftg(e,c)
return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget() == c and c:IsCode(31300024)
end
function s.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_TOKEN) * 1200
end
function s.resfilter(c,e,tp)
return c:IsReleasableByEffect() and rssf.CheckTokenSummonable(e,tp,id+1,POS_FACEUP,c:GetControler()) and Duel.GetMZoneCount(1-tp,c,tp) > 0
end
function s.reg(g,e,tp,eg,ep,ev,re,r,rp,chk)
rstg.token(id+1,1,POS_FACEUP,1)(e,tp,eg,ep,ev,re,r,rp,1)
end
function s.resop(e,tp)
local ct,og,tc = rsop.OperateCards("res",tp,s.resfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)()
if ct > 0 then
local _,_, tk = rssf.SpecialSummonToken(e,tp,id+1,1,1,POS_FACEUP,tc:GetPreviousControler())
if not tk then return end
local fid = tk:GetFieldID()
tk:RegisterFlagEffect(id,rsrst.std,0,1,fid)
local e1 = rsef.FC_Easy({e:GetHandler(),tp},EVENT_DESTROYED,nil,nil,s.reccon,s.recop)
e1:SetLabelObject(tk)
e1:SetLabel(fid)
end
end
function s.reccon(e,tp,eg)
local c = e:GetLabelObject()
return eg:IsContains(c) and c:GetFlagEffect(id) > 0 and c:GetFlagEffectLabel(id) == e:GetLabel()
end
function s.recop(e,tp)
Duel.Recover(tp,300,REASON_EFFECT)
end
\ No newline at end of file
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