Commit 9dc9d18a authored by Nemo Ma's avatar Nemo Ma

lflist

parent 38d8d738
......@@ -1288,6 +1288,20 @@
14001218 0
14001219 0
14001220 0
#230318
189122 0
14000371 0
53750001 0
53750003 0
53750005 0
53750007 0
53750009 0
53750018 0
67200604 0
82208105 0
98920114 0
98920188 0
98920313 0
#230312
6103000 0
14000215 0
......@@ -1330,9 +1344,7 @@
11612609 0
11612618 0
11612619 0
11612620 0
11612621 0
11612623 0
11612624 0
15000231 0
31400140 0
......@@ -1451,7 +1463,6 @@
33200955 1
64800122 1
64800123 1
67200604 1
11451803 2
#221204
3679215 0
......@@ -2055,7 +2066,6 @@
64800023 0
65010578 0
82204224 0
9910443 1
33310103 1
40008717 1
82204215 1
......@@ -3112,7 +3122,6 @@
130006000 0
79034051 1
65010099 2
82208105 2
#210411
14010079 0
14010153 0
......@@ -5715,7 +5724,6 @@
9910258 1
9910349 1
9910433 0
9910443 1
9910476 0
9910479 0
9910482 0
......@@ -8287,7 +8295,6 @@
67200432 1
67200455 1
67200602 0
67200604 1
67200701 0
67200702 0
67200703 0
......@@ -8675,7 +8682,6 @@
82208101 0
82208103 0
82208104 0
82208105 2
82208106 0
82208107 0
82208108 0
......
No preview for this file type
No preview for this file type
......@@ -98,7 +98,8 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
if ft<=0 then return elseif ft>#og then ft=#og end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
for i=1,ft do
local tc=og:Select(tp,1,1,nil):GetFirst()
local tc=og:GetFirst()
if #og>1 then tc=og:Select(tp,1,1,nil):GetFirst() end
og:RemoveCard(tc)
if Duel.Equip(tp,tc,rc,false,true) then
local e1=Effect.CreateEffect(c)
......
--天球都市
function c130000745.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c130000745.target)
e1:SetOperation(c130000745.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000745,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c130000745.target2)
e2:SetOperation(c130000745.operation2)
c:RegisterEffect(e2)
end
function c130000745.filter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c130000745.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000745.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c130000745.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c130000745.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c130000745.filter2(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c130000745.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000745.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1)
end
function c130000745.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c130000745.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()==0 then return end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,Card.IsType,1,1,REASON_EFFECT+REASON_DISCARD,nil,TYPE_FIELD)
end
--星座岛
function c130000746.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c130000746.target)
e1:SetOperation(c130000746.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000746,0))
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_FZONE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DRAW)
e3:SetCost(c130000746.drcost)
e3:SetTarget(c130000746.drtg)
e3:SetOperation(c130000746.drop)
c:RegisterEffect(e3)
end
function c130000746.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c130000746.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.BreakEffect()
end
end
function c130000746.filter(c)
return c:IsType(TYPE_FIELD) and not c:IsPublic()
end
function c130000746.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ep==tp and eg:IsExists(c130000746.filter,1,nil) end
local g=eg:Filter(c130000746.filter,nil)
if g:GetCount()==1 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
end
function c130000746.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c130000746.drop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() or not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local g=eg:Filter(c130000746.filter,nil)
local tc=g:GetFirst()
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
--星结晶之谷
function c130000747.initial_effect(c)
--discard deck
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(c130000747.distarget)
e1:SetOperation(c130000747.disop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c130000747.target)
e3:SetOperation(c130000747.activate)
c:RegisterEffect(e3)
end
function c130000747.distarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function c130000747.disop(e,tp,eg,ep,ev,re,r,rp)
local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,val,REASON_EFFECT)
end
function c130000747.filter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToDeck()
end
function c130000747.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c130000747.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingTarget(c130000747.filter,tp,LOCATION_GRAVE,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c130000747.filter,tp,LOCATION_GRAVE,0,5,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c130000747.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
\ No newline at end of file
--阿提纳诺-被刮倒的巨大珊瑚
function c130000756.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000756,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000756,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000756.spcon)
e2:SetTarget(c130000756.target)
e2:SetOperation(c130000756.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000756,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000756.destg2)
e3:SetOperation(c130000756.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000756,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000756.spcost)
e4:SetTarget(c130000756.target3)
e4:SetOperation(c130000756.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000756,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000756.rectg)
e5:SetOperation(c130000756.recop)
c:RegisterEffect(e5)
end
function c130000756.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000756.filter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c130000756.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c130000756.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c130000756.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c130000756.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c130000756.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000756.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000756.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000756.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000756.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000756.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000756.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000756.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000756.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000756.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000756.filter3(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c130000756.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c130000756.filter3,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c130000756.activate3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c130000756.filter3,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c130000756.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000756.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000756.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000756.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000756.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
\ No newline at end of file
--阿提纳诺-海牛平原
function c130000757.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000757,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000757,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000757.spcon)
e2:SetTarget(c130000757.target)
e2:SetOperation(c130000757.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000757,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000757.destg2)
e3:SetOperation(c130000757.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000757,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000757.spcost)
e4:SetTarget(c130000757.target3)
e4:SetOperation(c130000757.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000757,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000757.rectg)
e5:SetOperation(c130000757.recop)
c:RegisterEffect(e5)
end
function c130000757.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000757.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0)
end
function c130000757.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,130000771,0,0x4011,0,0,3,RACE_AQUA,ATTRIBUTE_WATER) then
for i=1,3 do
local token=Duel.CreateToken(tp,130000771)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
function c130000757.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000757.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000757.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000757.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000757.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000757.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000757.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000757.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000757.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000757.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000757.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c130000757.activate3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,130000771,0,0x4011,0,0,3,RACE_AQUA,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,130000771)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c130000757.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000757.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000757.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000757.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000757.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
--阿提纳诺-巨大珊瑚之桥
function c130000758.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000758,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000758,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000758.spcon)
e2:SetTarget(c130000758.target)
e2:SetOperation(c130000758.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000758,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000758.destg2)
e3:SetOperation(c130000758.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000758,1))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000758.spcost)
e4:SetTarget(c130000758.target3)
e4:SetOperation(c130000758.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000758,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000758.rectg)
e5:SetOperation(c130000758.recop)
c:RegisterEffect(e5)
end
function c130000758.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000758.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c130000758.activate(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)
end
function c130000758.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000758.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000758.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000758.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000758.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000758.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000758.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000758.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000758.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000758.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000758.target3(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 c130000758.activate3(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)
end
function c130000758.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000758.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000758.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000758.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000758.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
--阿提纳诺-巨大珊瑚柱
function c130000759.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000759,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000759,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000759.spcon)
e2:SetTarget(c130000759.target)
e2:SetOperation(c130000759.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000759,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000759.destg2)
e3:SetOperation(c130000759.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000759,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000759.spcost)
e4:SetTarget(c130000759.target3)
e4:SetOperation(c130000759.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000759,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000759.rectg)
e5:SetOperation(c130000759.recop)
c:RegisterEffect(e5)
end
function c130000759.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000759.filter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c130000759.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c130000759.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c130000759.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c130000759.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
end
end
function c130000759.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000759.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000759.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000759.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000759.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000759.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000759.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000759.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000759.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000759.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000759.filter3(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c130000759.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c130000759.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c130000759.activate3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c130000759.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
end
end
function c130000759.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000759.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000759.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000759.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000759.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
--阿提纳诺-珊瑚湖
function c130000760.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000760,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000760,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000760.spcon)
e2:SetTarget(c130000760.target)
e2:SetOperation(c130000760.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000760,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000760.destg2)
e3:SetOperation(c130000760.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000760,1))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000760.spcost)
e4:SetTarget(c130000760.target3)
e4:SetOperation(c130000760.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000760,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000760.rectg)
e5:SetOperation(c130000760.recop)
c:RegisterEffect(e5)
end
function c130000760.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000760.filter(c)
return c:IsAbleToDeck()
end
function c130000760.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000760.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c130000760.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c130000760.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,3,nil)
if g:GetCount()==3 then
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
function c130000760.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000760.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000760.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000760.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000760.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000760.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000760.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000760.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000760.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000760.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000760.filter3(c)
return c:IsSetCard(0xacd9) and c:IsAbleToDeck()
end
function c130000760.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000760.filter3,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c130000760.activate3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c130000760.filter3,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,3,nil)
if g:GetCount()==3 then
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
function c130000760.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000760.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000760.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000760.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000760.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
\ No newline at end of file
--阿提纳诺-珊瑚岩的荒野
function c130000761.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000761,2))
c:RegisterEffect(e1)
--negate all
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000761,1))
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000761.spcon)
e2:SetOperation(c130000761.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000761,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000761.destg2)
e3:SetOperation(c130000761.activate2)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000761,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000761.spcost)
e4:SetTarget(c130000761.target3)
e4:SetOperation(c130000761.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000761,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000761.rectg)
e5:SetOperation(c130000761.recop)
c:RegisterEffect(e5)
end
function c130000761.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000761.filter(c)
return c:IsAbleToDeck()
end
function c130000761.disfilter(c)
return c:IsFaceup() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT))
end
function c130000761.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c130000761.disfilter,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c130000761.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000761.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000761.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000761.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000761.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000761.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000761.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000761.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000761.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000761.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000761.filter3(c)
return c:IsFaceup() and not c:IsDisabled() and not c:IsType(TYPE_NORMAL)
end
function c130000761.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c130000761.filter3,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c130000761.activate3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c130000761.filter3,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
function c130000761.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000761.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000761.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000761.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000761.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
\ No newline at end of file
--阿提纳诺-珊瑚圆顶
function c130000762.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000762,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000762,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000762.spcon)
e2:SetTarget(c130000762.target)
e2:SetOperation(c130000762.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000762,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000762.destg2)
e3:SetOperation(c130000762.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000762,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000762.spcost)
e4:SetTarget(c130000762.target3)
e4:SetOperation(c130000762.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000762,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000762.rectg)
e5:SetOperation(c130000762.recop)
c:RegisterEffect(e5)
end
function c130000762.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000762.filter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c130000762.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000762.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c130000762.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c130000762.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c130000762.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000762.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000762.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000762.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000762.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000762.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000762.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000762.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000762.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000762.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000762.filter3(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c130000762.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000762.filter3,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c130000762.activate3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c130000762.filter3,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c130000762.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000762.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000762.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000762.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000762.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
\ No newline at end of file
--阿提纳诺-水波
function c130000763.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000763,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000763,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000763.spcon)
e2:SetTarget(c130000763.target)
e2:SetOperation(c130000763.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000763,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000763.destg2)
e3:SetOperation(c130000763.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000763,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000763.spcost)
e4:SetTarget(c130000763.target3)
e4:SetOperation(c130000763.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000763,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000763.rectg)
e5:SetOperation(c130000763.recop)
c:RegisterEffect(e5)
end
function c130000763.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000763.filter(c)
return c:IsAbleToDeck()
end
function c130000763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c130000763.filter,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c130000763.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c130000763.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c130000763.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000763.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000763.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000763.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000763.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000763.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000763.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000763.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000763.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000763.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000763.filter3(c)
return c:IsAbleToHand()
end
function c130000763.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c130000763.filter3,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c130000763.activate3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c130000763.filter3,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c130000763.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000763.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000763.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000763.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000763.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
\ No newline at end of file
--阿提纳诺-水母群
function c130000764.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(130000764,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c130000764.sptg)
e1:SetOperation(c130000764.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000764,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetTarget(c130000764.destg)
e4:SetOperation(c130000764.desop)
c:RegisterEffect(e4)
end
function c130000764.filter(c,e,tp)
return c:IsCode(130000764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c130000764.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c130000764.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c130000764.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c130000764.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c130000764.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000764.filter3(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp)
end
function c130000764.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c130000764.filter2(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c130000764.filter2,tp,LOCATION_SZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c130000764.filter3,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000764.filter2,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000764.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=Duel.SelectMatchingCard(tp,c130000764.filter3,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
--阿提纳诺-水母竹的森林
function c130000765.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000765,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000765,1))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000765.spcon)
e2:SetTarget(c130000765.target)
e2:SetOperation(c130000765.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000765,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000765.destg2)
e3:SetOperation(c130000765.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000765,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000765.spcost)
e4:SetTarget(c130000765.target3)
e4:SetOperation(c130000765.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000765,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000765.rectg)
e5:SetOperation(c130000765.recop)
c:RegisterEffect(e5)
end
function c130000765.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000765.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsControlerCanBeChanged()
end
function c130000765.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
end
function c130000765.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc and not Duel.GetControl(tc,tp) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function c130000765.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000765.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000765.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000765.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000765.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000765.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000765.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000765.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000765.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000765.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000765.filter3(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c130000765.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c130000765.filter3,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c130000765.activate3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c130000765.filter3,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c130000765.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000765.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000765.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000765.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000765.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
\ No newline at end of file
--阿提纳诺-水寺院
function c130000766.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000766,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCategory(CATEGORY_TODECK)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c130000766.retcon)
e3:SetTarget(c130000766.targetr)
e3:SetOperation(c130000766.operationr)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000766,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetRange(LOCATION_MZONE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetTarget(c130000766.destg)
e4:SetCost(c130000766.spcost)
e4:SetOperation(c130000766.desop)
c:RegisterEffect(e4)
--destroy replace
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EFFECT_DESTROY_REPLACE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetTarget(c130000766.reptg)
c:RegisterEffect(e7)
end
function c130000766.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
end
function c130000766.filterd(c)
return c:IsFaceup()
end
function c130000766.targetr(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000766.filterd,tp,LOCATION_GRAVE,0,1,nil) end
end
function c130000766.operationr(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c130000766.filterd,tp,LOCATION_GRAVE,0,nil)
local c=e:GetHandler()
Duel.Overlay(e:GetHandler(),g)
end
function c130000766.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c130000766.filter2(c)
return c:IsAbleToHand() and c:GetSequence()==5
end
function c130000766.filter3(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp)
end
function c130000766.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c130000766.filter2(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c130000766.filter2,tp,LOCATION_SZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c130000766.filter3,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c130000766.filter2,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c130000766.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000766,1))
local tc2=Duel.SelectMatchingCard(tp,c130000766.filter3,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000766.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g2=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return true end
if Duel.SelectYesNo(tp,aux.Stringid(130000766,2)) and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.SendtoDeck(sg2,nil,2,REASON_COST)
return true
else return false end
end
--阿提纳诺-水之都
function c130000767.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000767,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCategory(CATEGORY_TODECK)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c130000767.retcon)
e3:SetTarget(c130000767.targetr)
e3:SetOperation(c130000767.operationr)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000767,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetRange(LOCATION_MZONE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetTarget(c130000767.destg)
e4:SetCost(c130000767.spcost)
e4:SetOperation(c130000767.desop)
c:RegisterEffect(e4)
--destroy replace
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EFFECT_DESTROY_REPLACE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetTarget(c130000767.reptg)
c:RegisterEffect(e7)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetCountLimit(1)
e5:SetCondition(c130000767.wincon)
e5:SetOperation(c130000767.winop)
c:RegisterEffect(e5)
end
function c130000767.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
end
function c130000767.filterd(c)
return c:IsFaceup()
end
function c130000767.targetr(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000767.filterd,tp,LOCATION_GRAVE,0,1,nil) end
end
function c130000767.operationr(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c130000767.filterd,tp,LOCATION_GRAVE,0,nil)
local c=e:GetHandler()
Duel.Overlay(e:GetHandler(),g)
end
function c130000767.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c130000767.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c130000767.desop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c130000767.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g2=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return true end
if Duel.SelectYesNo(tp,aux.Stringid(130000767,2)) and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.SendtoDeck(sg2,nil,2,REASON_COST)
return true
else return false end
end
function c130000767.filter0(c,e,tp)
return c:IsCode(130000766) and c:IsFaceup()
end
function c130000767.wincon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)>=50000 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 and
Duel.IsExistingMatchingCard(c130000767.filter0,tp,LOCATION_ONFIELD,0,1,c,e,tp)
end
function c130000767.winop(e,tp,eg,ep,ev,re,r,rp)
Duel.Win(tp,0x25)
end
--阿提纳诺-天空之港
function c130000768.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000768,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000768,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000768.spcon)
e2:SetTarget(c130000768.target)
e2:SetOperation(c130000768.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000768,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000768.destg2)
e3:SetOperation(c130000768.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000768,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000768.spcost)
e4:SetTarget(c130000768.target3)
e4:SetOperation(c130000768.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000768,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000768.rectg)
e5:SetOperation(c130000768.recop)
c:RegisterEffect(e5)
end
function c130000768.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000768.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c130000768.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c130000768.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000768.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000768.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000768.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000768.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000768.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000768.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000768.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000768.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000768.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000768.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c130000768.activate3(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c130000768.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000768.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000768.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000768.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000768.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
--阿提纳诺-天空之街
function c130000769.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000769,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000769,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000769.spcon)
e2:SetTarget(c130000769.target)
e2:SetOperation(c130000769.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000769,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000769.destg2)
e3:SetOperation(c130000769.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000769,1))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000769.spcost)
e4:SetTarget(c130000769.target3)
e4:SetOperation(c130000769.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000769,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000769.rectg)
e5:SetOperation(c130000769.recop)
c:RegisterEffect(e5)
end
function c130000769.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000769.filter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c130000769.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000769.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c130000769.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c130000769.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c130000769.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000769.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000769.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000769.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000769.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000769.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000769.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000769.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000769.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000769.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000769.filter3(c)
return c:IsSetCard(0xacd9) and c:IsAbleToHand()
end
function c130000769.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c130000769.filter3,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c130000769.activate3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c130000769.filter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c130000769.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000769.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000769.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000769.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000769.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
--阿提纳诺-天空之森
function c130000770.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(130000770,2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(130000770,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c130000770.spcon)
e2:SetTarget(c130000770.target)
e2:SetOperation(c130000770.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(130000770,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c130000770.destg2)
e3:SetOperation(c130000770.activate2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(130000770,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c130000770.spcost)
e4:SetTarget(c130000770.target3)
e4:SetOperation(c130000770.activate3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(130000770,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c130000770.rectg)
e5:SetOperation(c130000770.recop)
c:RegisterEffect(e5)
end
function c130000770.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c130000770.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c130000770.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c130000770.filter,tp,0,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c130000770.filter,tp,0,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c130000770.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c130000770.filter,tp,0,LOCATION_ONFIELD,e:GetHandler())
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
function c130000770.filter2(c)
return c:IsDestructable() and c:GetSequence()==5
end
function c130000770.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c130000770.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c130000770.filter2,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c130000770.filter2,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130000770.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(130000764,1))
local tc2=e:GetHandler()
if tc2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
local tep=tc2:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc2,EVENT_CHAIN_SOLVED,tc2:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c130000770.cfilter(c,e,tp)
return c:IsSetCard(0xacd9) and c:IsAbleToRemoveAsCost()
end
function c130000770.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c130000770.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c130000770.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c130000770.filter3(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c130000770.target3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c130000770.filter3,tp,0,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c130000770.filter3,tp,0,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c130000770.activate3(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c130000770.filter3,tp,0,LOCATION_ONFIELD,e:GetHandler())
Duel.SendtoHand(sg,nil,2,REASON_EFFECT)
end
function c130000770.refilter(c)
return c:IsFaceup() and c:IsSetCard(0xacd9)
end
function c130000770.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c130000770.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c130000770.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c130000770.refilter,tp,LOCATION_REMOVED,0,nil)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
--Vivid BAD SQUAD 小豆泽心羽
local m=131000000
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(131000000,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC_G)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,10000000)
e0:SetCondition(c131000000.pendcon)
e0:SetOperation(c131000000.pendop)
e0:SetValue(SUMMON_TYPE_PENDULUM)
c:RegisterEffect(e0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_PZONE)
e5:SetOperation(c131000000.cpop)
c:RegisterEffect(e5)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(131000000,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c131000000.target)
e1:SetOperation(c131000000.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--splimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,0)
e6:SetTarget(c131000000.splimit)
c:RegisterEffect(e6)
end
function c131000000.scfilter(c)
return c:IsCode(131000001,131000005)
end
function c131000000.pendcon(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
if aux.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil or (not Duel.IsExistingMatchingCard(c131000000.scfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())) then return false end
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
if og then
return og:IsExists(c131000000.PConditionFilter,1,nil,e,tp,lscale,rscale)
else
return Duel.IsExistingMatchingCard(c131000000.PConditionFilter,tp,loc,0,1,nil,e,tp,lscale,rscale)
end
end
function c131000000.PConditionFilter(c,e,tp,lscale,rscale)
local lv=0
if c.pendulum_level then
lv=c.pendulum_level
else
lv=c:GetLevel()
end
local bool=Auxiliary.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)) or (c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xacda) ))
and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)
and not c:IsForbidden()
end
function c131000000.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,131000000)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp)
local ft=Duel.GetUsableMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
local loc=0
local ct0=0
if ft1>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if ft2>0 then loc=loc+LOCATION_EXTRA end
local tg=nil
if og then
tg=og:Filter(Card.IsLocation,nil,loc):Filter(c131000000.PConditionFilter,nil,e,tp,lscale,rscale)
else
tg=Duel.GetMatchingGroup(c131000000.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale)
end
local tp=e:GetOwnerPlayer()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local ce=nil
local b1=aux.PendulumChecklist&(0x1<<tp)==0
local b2=#eset>0
if b1 and b2 then
local options={1163}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
if op>0 then
ce=eset[op]
end
elseif b2 and not b1 then
local options={}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
ce=eset[op+1]
end
ft0=1
ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK))
ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA))
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
while true do
local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
local ct=ft
if ct1>ft1 then ct=math.min(ct,ft1) end
if ct2>ft2 then ct=math.min(ct,ft2) end
if ct<=0 then break end
if sg:GetCount()>0 and not Duel.SelectYesNo(tp,210) then ft=0 break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,1,ct,nil)
tg:Sub(g)
sg:Merge(g)
if g:GetCount()<ct then ft=0 break end
ft=ft-g:GetCount()
ft1=ft1-g:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
ft2=ft2-g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
end
if ft>0 then
local tg1=tg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local tg2=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if ft1>0 and ft2==0 and tg1:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft1,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg1:Select(tp,1,ct,nil)
sg:Merge(g)
end
if ft1==0 and ft2>0 and tg2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg2:Select(tp,1,ct,nil)
sg:Merge(g)
end
end
if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
ce:Reset()
else
aux.PendulumChecklist=aux.PendulumChecklist|(0x1<<tp)
end
Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz))
end
function c131000000.cpop(e,tp,eg,ep,ev,re,r,rp)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(131000000,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10000000)
e1:SetCondition(c131000000.pendcon)
e1:SetOperation(c131000000.pendop)
e1:SetValue(SUMMON_TYPE_PENDULUM)
e1:SetReset(RESET_EVENT+0x1fe0000)
lpz:RegisterEffect(e1)
lpz:RegisterFlagEffect(131000000,RESET_EVENT+0x1fe0000,0,1)
end
function c131000000.filter(c)
return c:IsSetCard(0xacda) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c131000000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c131000000.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c131000000.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c131000000.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c131000000.splimit(e,c)
return not c:IsSetCard(0xacda)
end
\ No newline at end of file
--Vivid BAD SQUAD 白石杏
local m=131000001
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(131000001,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC_G)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,10000000)
e0:SetCondition(c131000001.pendcon)
e0:SetOperation(c131000001.pendop)
e0:SetValue(SUMMON_TYPE_PENDULUM)
c:RegisterEffect(e0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_PZONE)
e5:SetOperation(c131000001.cpop)
c:RegisterEffect(e5)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(131000001,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c131000001.target)
e1:SetOperation(c131000001.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--splimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,0)
e6:SetTarget(c131000001.splimit)
c:RegisterEffect(e6)
end
function c131000001.scfilter(c)
return c:IsCode(131000000,131000004)
end
function c131000001.pendcon(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
if aux.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil or (not Duel.IsExistingMatchingCard(c131000001.scfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())) then return false end
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
if og then
return og:IsExists(c131000001.PConditionFilter,1,nil,e,tp,lscale,rscale)
else
return Duel.IsExistingMatchingCard(c131000001.PConditionFilter,tp,loc,0,1,nil,e,tp,lscale,rscale)
end
end
function c131000001.PConditionFilter(c,e,tp,lscale,rscale)
local lv=0
if c.pendulum_level then
lv=c.pendulum_level
else
lv=c:GetLevel()
end
local bool=Auxiliary.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)) or (c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xacda) ))
and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)
and not c:IsForbidden()
end
function c131000001.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,131000001)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp)
local ft=Duel.GetUsableMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
local loc=0
local ct0=0
if ft1>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if ft2>0 then loc=loc+LOCATION_EXTRA end
local tg=nil
if og then
tg=og:Filter(Card.IsLocation,nil,loc):Filter(c131000001.PConditionFilter,nil,e,tp,lscale,rscale)
else
tg=Duel.GetMatchingGroup(c131000001.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale)
end
local tp=e:GetOwnerPlayer()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local ce=nil
local b1=aux.PendulumChecklist&(0x1<<tp)==0
local b2=#eset>0
if b1 and b2 then
local options={1163}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
if op>0 then
ce=eset[op]
end
elseif b2 and not b1 then
local options={}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
ce=eset[op+1]
end
ft0=1
ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK))
ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA))
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
while true do
local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
local ct=ft
if ct1>ft1 then ct=math.min(ct,ft1) end
if ct2>ft2 then ct=math.min(ct,ft2) end
if ct<=0 then break end
if sg:GetCount()>0 and not Duel.SelectYesNo(tp,210) then ft=0 break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,1,ct,nil)
tg:Sub(g)
sg:Merge(g)
if g:GetCount()<ct then ft=0 break end
ft=ft-g:GetCount()
ft1=ft1-g:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
ft2=ft2-g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
end
if ft>0 then
local tg1=tg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local tg2=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if ft1>0 and ft2==0 and tg1:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft1,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg1:Select(tp,1,ct,nil)
sg:Merge(g)
end
if ft1==0 and ft2>0 and tg2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg2:Select(tp,1,ct,nil)
sg:Merge(g)
end
end
if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
ce:Reset()
else
aux.PendulumChecklist=aux.PendulumChecklist|(0x1<<tp)
end
Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz))
end
function c131000001.cpop(e,tp,eg,ep,ev,re,r,rp)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(131000001,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10000000)
e1:SetCondition(c131000001.pendcon)
e1:SetOperation(c131000001.pendop)
e1:SetValue(SUMMON_TYPE_PENDULUM)
e1:SetReset(RESET_EVENT+0x1fe0000)
lpz:RegisterEffect(e1)
lpz:RegisterFlagEffect(131000001,RESET_EVENT+0x1fe0000,0,1)
end
function c131000001.filter(c)
return c:IsSetCard(0xacda) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceup()
end
function c131000001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c131000001.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c131000001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c131000001.filter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c131000001.splimit(e,c)
return not c:IsSetCard(0xacda)
end
\ No newline at end of file
--Vivid BAD SQUAD 东云彰人
local m=131000002
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(131000002,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC_G)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,10000000)
e0:SetCondition(c131000002.pendcon)
e0:SetOperation(c131000002.pendop)
e0:SetValue(SUMMON_TYPE_PENDULUM)
c:RegisterEffect(e0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_PZONE)
e5:SetOperation(c131000002.cpop)
c:RegisterEffect(e5)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(131000002,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c131000002.target)
e1:SetOperation(c131000002.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--splimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,0)
e6:SetTarget(c131000002.splimit)
c:RegisterEffect(e6)
end
function c131000002.scfilter(c)
return c:IsCode(131000003,131000007)
end
function c131000002.pendcon(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
if aux.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil or (not Duel.IsExistingMatchingCard(c131000002.scfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())) then return false end
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
if og then
return og:IsExists(c131000002.PConditionFilter,1,nil,e,tp,lscale,rscale)
else
return Duel.IsExistingMatchingCard(c131000002.PConditionFilter,tp,loc,0,1,nil,e,tp,lscale,rscale)
end
end
function c131000002.PConditionFilter(c,e,tp,lscale,rscale)
local lv=0
if c.pendulum_level then
lv=c.pendulum_level
else
lv=c:GetLevel()
end
local bool=Auxiliary.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)) or (c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xacda) ))
and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)
and not c:IsForbidden()
end
function c131000002.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,131000002)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp)
local ft=Duel.GetUsableMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
local loc=0
local ct0=0
if ft1>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if ft2>0 then loc=loc+LOCATION_EXTRA end
local tg=nil
if og then
tg=og:Filter(Card.IsLocation,nil,loc):Filter(c131000002.PConditionFilter,nil,e,tp,lscale,rscale)
else
tg=Duel.GetMatchingGroup(c131000002.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale)
end
local tp=e:GetOwnerPlayer()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local ce=nil
local b1=aux.PendulumChecklist&(0x1<<tp)==0
local b2=#eset>0
if b1 and b2 then
local options={1163}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
if op>0 then
ce=eset[op]
end
elseif b2 and not b1 then
local options={}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
ce=eset[op+1]
end
ft0=1
ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK))
ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA))
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
while true do
local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
local ct=ft
if ct1>ft1 then ct=math.min(ct,ft1) end
if ct2>ft2 then ct=math.min(ct,ft2) end
if ct<=0 then break end
if sg:GetCount()>0 and not Duel.SelectYesNo(tp,210) then ft=0 break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,1,ct,nil)
tg:Sub(g)
sg:Merge(g)
if g:GetCount()<ct then ft=0 break end
ft=ft-g:GetCount()
ft1=ft1-g:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
ft2=ft2-g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
end
if ft>0 then
local tg1=tg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local tg2=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if ft1>0 and ft2==0 and tg1:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft1,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg1:Select(tp,1,ct,nil)
sg:Merge(g)
end
if ft1==0 and ft2>0 and tg2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg2:Select(tp,1,ct,nil)
sg:Merge(g)
end
end
if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
ce:Reset()
else
aux.PendulumChecklist=aux.PendulumChecklist|(0x1<<tp)
end
Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz))
end
function c131000002.cpop(e,tp,eg,ep,ev,re,r,rp)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(131000002,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10000000)
e1:SetCondition(c131000002.pendcon)
e1:SetOperation(c131000002.pendop)
e1:SetValue(SUMMON_TYPE_PENDULUM)
e1:SetReset(RESET_EVENT+0x1fe0000)
lpz:RegisterEffect(e1)
lpz:RegisterFlagEffect(131000002,RESET_EVENT+0x1fe0000,0,1)
end
function c131000002.filter(c)
return c:IsSetCard(0xacda) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c131000002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c131000002.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c131000002.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c131000002.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c131000002.splimit(e,c)
return not c:IsSetCard(0xacda)
end
\ No newline at end of file
--Vivid BAD SQUAD 青柳冬弥
local m=131000003
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(131000003,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC_G)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,10000000)
e0:SetCondition(c131000003.pendcon)
e0:SetOperation(c131000003.pendop)
e0:SetValue(SUMMON_TYPE_PENDULUM)
c:RegisterEffect(e0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_PZONE)
e5:SetOperation(c131000003.cpop)
c:RegisterEffect(e5)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(131000003,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c131000003.target)
e1:SetOperation(c131000003.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--splimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,0)
e6:SetTarget(c131000003.splimit)
c:RegisterEffect(e6)
end
function c131000003.scfilter(c)
return c:IsCode(131000002,131000006)
end
function c131000003.pendcon(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
if aux.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil or (not Duel.IsExistingMatchingCard(c131000003.scfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())) then return false end
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
if og then
return og:IsExists(c131000003.PConditionFilter,1,nil,e,tp,lscale,rscale)
else
return Duel.IsExistingMatchingCard(c131000003.PConditionFilter,tp,loc,0,1,nil,e,tp,lscale,rscale)
end
end
function c131000003.PConditionFilter(c,e,tp,lscale,rscale)
local lv=0
if c.pendulum_level then
lv=c.pendulum_level
else
lv=c:GetLevel()
end
local bool=Auxiliary.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)) or (c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xacda) ))
and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)
and not c:IsForbidden()
end
function c131000003.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,131000003)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp)
local ft=Duel.GetUsableMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
local loc=0
local ct0=0
if ft1>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if ft2>0 then loc=loc+LOCATION_EXTRA end
local tg=nil
if og then
tg=og:Filter(Card.IsLocation,nil,loc):Filter(c131000003.PConditionFilter,nil,e,tp,lscale,rscale)
else
tg=Duel.GetMatchingGroup(c131000003.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale)
end
local tp=e:GetOwnerPlayer()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local ce=nil
local b1=aux.PendulumChecklist&(0x1<<tp)==0
local b2=#eset>0
if b1 and b2 then
local options={1163}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
if op>0 then
ce=eset[op]
end
elseif b2 and not b1 then
local options={}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
ce=eset[op+1]
end
ft0=1
ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK))
ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA))
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
while true do
local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
local ct=ft
if ct1>ft1 then ct=math.min(ct,ft1) end
if ct2>ft2 then ct=math.min(ct,ft2) end
if ct<=0 then break end
if sg:GetCount()>0 and not Duel.SelectYesNo(tp,210) then ft=0 break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,1,ct,nil)
tg:Sub(g)
sg:Merge(g)
if g:GetCount()<ct then ft=0 break end
ft=ft-g:GetCount()
ft1=ft1-g:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
ft2=ft2-g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
end
if ft>0 then
local tg1=tg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local tg2=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if ft1>0 and ft2==0 and tg1:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft1,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg1:Select(tp,1,ct,nil)
sg:Merge(g)
end
if ft1==0 and ft2>0 and tg2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg2:Select(tp,1,ct,nil)
sg:Merge(g)
end
end
if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
ce:Reset()
else
aux.PendulumChecklist=aux.PendulumChecklist|(0x1<<tp)
end
Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz))
end
function c131000003.cpop(e,tp,eg,ep,ev,re,r,rp)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(131000003,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10000000)
e1:SetCondition(c131000003.pendcon)
e1:SetOperation(c131000003.pendop)
e1:SetValue(SUMMON_TYPE_PENDULUM)
e1:SetReset(RESET_EVENT+0x1fe0000)
lpz:RegisterEffect(e1)
lpz:RegisterFlagEffect(131000003,RESET_EVENT+0x1fe0000,0,1)
end
function c131000003.filter(c)
return c:IsSetCard(0xacda) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c131000003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c131000003.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c131000003.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c131000003.filter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c131000003.splimit(e,c)
return not c:IsSetCard(0xacda)
end
\ No newline at end of file
--Vivid BAD SQUAD 小豆泽心羽☆
local m=131000004
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xacda),4,3,c131000004.ovfilter,aux.Stringid(131000004,2))
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(131000004,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC_G)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,10000000)
e0:SetCondition(c131000004.pendcon)
e0:SetOperation(c131000004.pendop)
e0:SetValue(SUMMON_TYPE_PENDULUM)
c:RegisterEffect(e0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_PZONE)
e5:SetOperation(c131000004.cpop)
c:RegisterEffect(e5)
--Search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(131000004,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c131000004.thcost)
e2:SetTarget(c131000004.thtg)
e2:SetOperation(c131000004.thop)
c:RegisterEffect(e2)
end
c131000004.pendulum_level=4
function c131000004.ovfilter(c)
return c:IsFaceup() and c:IsCode(131000000)
end
function c131000004.scfilter(c)
return c:IsCode(131000001,131000005)
end
function c131000004.pendcon(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
if aux.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil or (not Duel.IsExistingMatchingCard(c131000004.scfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())) then return false end
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
if og then
return og:IsExists(c131000004.PConditionFilter,1,nil,e,tp,lscale,rscale)
else
return Duel.IsExistingMatchingCard(c131000004.PConditionFilter,tp,loc,0,1,nil,e,tp,lscale,rscale)
end
end
function c131000004.PConditionFilter(c,e,tp,lscale,rscale)
local lv=0
if c.pendulum_level then
lv=c.pendulum_level
else
lv=c:GetLevel()
end
local bool=Auxiliary.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)) or (c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xacda) ))
and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)
and not c:IsForbidden()
end
function c131000004.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,131000004)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp)
local ft=Duel.GetUsableMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
local loc=0
local ct0=0
if ft1>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if ft2>0 then loc=loc+LOCATION_EXTRA end
local tg=nil
if og then
tg=og:Filter(Card.IsLocation,nil,loc):Filter(c131000004.PConditionFilter,nil,e,tp,lscale,rscale)
else
tg=Duel.GetMatchingGroup(c131000004.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale)
end
local tp=e:GetOwnerPlayer()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local ce=nil
local b1=aux.PendulumChecklist&(0x1<<tp)==0
local b2=#eset>0
if b1 and b2 then
local options={1163}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
if op>0 then
ce=eset[op]
end
elseif b2 and not b1 then
local options={}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
ce=eset[op+1]
end
ft0=1
ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK))
ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA))
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
while true do
local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
local ct=ft
if ct1>ft1 then ct=math.min(ct,ft1) end
if ct2>ft2 then ct=math.min(ct,ft2) end
if ct<=0 then break end
if sg:GetCount()>0 and not Duel.SelectYesNo(tp,210) then ft=0 break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,1,ct,nil)
tg:Sub(g)
sg:Merge(g)
if g:GetCount()<ct then ft=0 break end
ft=ft-g:GetCount()
ft1=ft1-g:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
ft2=ft2-g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
end
if ft>0 then
local tg1=tg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_DECK)
local tg2=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if ft1>0 and ft2==0 and tg1:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft1,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg1:Select(tp,1,ct,nil)
sg:Merge(g)
end
if ft1==0 and ft2>0 and tg2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg2:Select(tp,1,ct,nil)
sg:Merge(g)
end
end
if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
ce:Reset()
else
aux.PendulumChecklist=aux.PendulumChecklist|(0x1<<tp)
end
Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz))
end
function c131000004.cpop(e,tp,eg,ep,ev,re,r,rp)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(131000004,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10000000)
e1:SetCondition(c131000004.pendcon)
e1:SetOperation(c131000004.pendop)
e1:SetValue(SUMMON_TYPE_PENDULUM)
e1:SetReset(RESET_EVENT+0x1fe0000)
lpz:RegisterEffect(e1)
lpz:RegisterFlagEffect(131000004,RESET_EVENT+0x1fe0000,0,1)
end
function c131000004.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c131000004.thfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsLevelBelow(4)
and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand()
end
function c131000004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c131000004.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
end
function c131000004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c131000004.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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