Commit c0f08f68 authored by POLYMER's avatar POLYMER

fix

parent bcba760e
No preview for this file type
-- 渊灵-涡流鳐
function c10200000.initial_effect(c)
aux.EnablePendulumAttribute(c)
-- 自爆特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200000,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10200000)
e1:SetTarget(c10200000.tg1)
e1:SetOperation(c10200000.op1)
c:RegisterEffect(e1)
-- 双召炸卡
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200000,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,10200001)
e2:SetTarget(c10200000.tg2)
e2:SetOperation(c10200000.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
-- 遗言苏生
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10200000,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,10200002)
e4:SetTarget(c10200000.tg3)
e4:SetOperation(c10200000.op3)
c:RegisterEffect(e4)
end
-- 1
function c10200000.filter1(c,e,tp)
return c:IsSetCard(0xe21) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10200000.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200000.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200000.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10200000.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end
end
-- 2
function c10200000.filter2(c)
return c:IsSetCard(0xe21) and c:IsDestructable()
end
function c10200000.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200000.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200000.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c10200000.filter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then Duel.Destroy(g,REASON_EFFECT) end
end
-- 3
function c10200000.filter3(c,e,tp)
return c:IsSetCard(0xe21) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10200000.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10200000.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200000.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10200000.filter3),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleDeck(tp)
end
end
\ No newline at end of file
--渊灵-暗潮鮟鱇
function c10200003.initial_effect(c)
aux.EnablePendulumAttribute(c)
-- 自爆回收
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200003,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10200003)
e1:SetTarget(c10200003.tg1)
e1:SetOperation(c10200003.op1)
c:RegisterEffect(e1)
--双召盖放
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200003,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10200004)
e2:SetTarget(c10200003.tg2)
e2:SetOperation(c10200003.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--遗言回收
local e4 = Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10200003,2))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,10200005)
e4:SetTarget(c10200003.tg3)
e4:SetOperation(c10200003.op3)
c:RegisterEffect(e4)
end
-- 1
function c10200003.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200003.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200003.filter1,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200003.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200003.filter1,tp,LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
-- 2
function c10200003.filter2(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c10200003.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200003.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200003.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c10200003.filter2,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(10200003,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(10200003,3))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
--3
function c10200003.filter3(c)
return c:IsSetCard(0xe21) and c:IsAbleToDeck()
end
function c10200003.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200003.filter3,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200003.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c10200003.filter3,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
--渊灵-裂渊毒鮋
function c10200006.initial_effect(c)
aux.EnablePendulumAttribute(c)
-- 自爆炸卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200006,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10200006)
e1:SetTarget(c10200006.tg1)
e1:SetOperation(c10200006.op1)
c:RegisterEffect(e1)
--双召三选一
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200006,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10200007)
e2:SetTarget(c10200006.thtg)
e2:SetOperation(c10200006.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--遗言回收
local e4 = Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10200006,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,10200008)
e4:SetTarget(c10200006.tg3)
e4:SetOperation(c10200006.op3)
c:RegisterEffect(e4)
end
-- 1
function c10200006.filter1(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_MONSTER) and c:IsDestructable()
end
function c10200006.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200006.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200006.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c10200006.filter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then Duel.Destroy(g,REASON_EFFECT) end
end
-- 2
function c10200006.thfilter(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200006.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local dg=Duel.GetMatchingGroup(c10200006.thfilter,tp,LOCATION_DECK,0,nil)
return dg:GetClassCount(Card.GetCode)>=3
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200006.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c10200006.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.ConfirmCards(1-tp,sg1)
local cg=sg1:RandomSelect(1-tp,1)
local tc=cg:GetFirst()
tc:SetStatus(STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
-- 3
function c10200006.filter3(c)
return c:IsFaceup() and c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200006.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200006.filter3,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200006.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200006.filter3,tp,LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--渊灵-幽光水母
function c10200009.initial_effect(c)
aux.EnablePendulumAttribute(c)
--战破抗性
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200009,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c10200009.targt)
e1:SetValue(1)
c:RegisterEffect(e1)
--双召检索
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200009,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,10200009)
e2:SetTarget(c10200009.tg1)
e2:SetOperation(c10200009.op1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--遗言检索
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10200009,2))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,10200010)
e4:SetTarget(c10200009.tg2)
e4:SetOperation(c10200009.op2)
c:RegisterEffect(e4)
end
function c10200009.targt(e,c)
return c~=e:GetHandler() and c:IsSetCard(0xe21)
end
-- 1
function c10200009.filter1(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c10200009.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200009.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200009.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200009.filter1,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
-- 2
function c10200009.filter2(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200009.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200009.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200009.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200009.filter2,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
\ No newline at end of file
--渊灵-潜渊盲鳗
function c10200011.initial_effect(c)
aux.EnablePendulumAttribute(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200011,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe21))
e1:SetValue(500)
c:RegisterEffect(e1)
--双召检索
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200011,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,10200011)
e2:SetTarget(c10200011.tg1)
e2:SetOperation(c10200011.op1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--遗言检索
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10200011,2))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,10200012)
e4:SetTarget(c10200011.tg2)
e4:SetOperation(c10200011.op2)
c:RegisterEffect(e4)
end
-- 1
function c10200011.filter1(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200011.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200011.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200011.filter1,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
-- 2
function c10200011.filter2(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c10200011.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200011.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200011.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200011.filter2,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
\ No newline at end of file
-- 渊灵统御者-溟渊座头鲸
function c10200013.initial_effect(c)
aux.EnablePendulumAttribute(c)
-- 三色护航
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c10200013.con1)
e1:SetOperation(c10200013.op1)
c:RegisterEffect(e1)
-- 特召除外
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200013,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10200014)
e2:SetCondition(c10200013.con2)
e2:SetTarget(c10200013.tg2)
e2:SetOperation(c10200013.op2)
c:RegisterEffect(e2)
-- 墓地回收
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10200013,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,10200015)
e3:SetCost(c10200013.cost3)
e3:SetTarget(c10200013.tg3)
e3:SetOperation(c10200013.op3)
c:RegisterEffect(e3)
end
-- 1
function c10200013.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ev<1 then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return rp==1-tp and p==tp and te and te:GetHandler():IsSetCard(0xe21)
and Duel.GetFlagEffect(tp,10200013)==0
and Duel.IsChainDisablable(ev) and not Duel.IsChainDisabled(ev)
end
function c10200013.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,10200013)==0 and Duel.SelectYesNo(tp,aux.Stringid(10200013,1)) then
Duel.Hint(HINT_CARD,0,10200013)
Duel.RegisterFlagEffect(tp,10200013,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) then
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
end
-- 2
function c10200013.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c10200013.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200013.op2(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10200013,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10200013,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
if sg:GetCount()>0 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
-- 3
function c10200013.filter3(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c10200013.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c10200013.filter3,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c10200013.filter3,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c10200013.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)>0
and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,2,0,LOCATION_ONFIELD+LOCATION_HAND)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200013.op3(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
local sg2=g2:RandomSelect(1-tp,1)
Duel.HintSelection(sg2)
sg1:Merge(sg2)
Duel.Destroy(sg1,REASON_EFFECT)
end
end
\ No newline at end of file
-- 渊灵引导者-溟海星门
function c10200016.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xe21),2,2)
c:EnableReviveLimit()
-- 战吼检索
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200016,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,10200016)
e1:SetCondition(c10200016.con1)
e1:SetTarget(c10200016.tg1)
e1:SetOperation(c10200016.op1)
c:RegisterEffect(e1)
-- 抗性提供
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c10200016.etlimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
-- 效果无效
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10200016,2))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,10200017)
e3:SetCondition(c10200016.con3)
e3:SetCost(c10200016.cost3)
e3:SetTarget(c10200016.tg3)
e3:SetOperation(c10200016.op3)
c:RegisterEffect(e3)
end
-- 1
function c10200016.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10200016.filter1(c)
return c:IsSetCard(0xe21) and c:IsAbleToHand()
end
function c10200016.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c10200016.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200016.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200016.filter1,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
end
-- 2
function c10200016.etlimit(e,c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and e:GetHandler():GetLinkedGroup():IsContains(c)
end
-- 3
function c10200016.con3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
end
function c10200016.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c10200016.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200016.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
if #g > 0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e,false) 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+RESETS_STANDARD+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+RESETS_STANDARD+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+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
\ No newline at end of file
-- 深渊灵海
function c10200018.initial_effect(c)
-- 发动限制
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10200018+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
-- 卡组检索
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200018,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(c10200018.tg1)
e2:SetOperation(c10200018.op1)
c:RegisterEffect(e2)
-- 回复生命
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c10200018.con2)
e3:SetOperation(c10200018.op2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
-- 1
function c10200018.filter1(c)
return c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200018.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200018.filter1,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200018.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if dg:GetCount()==0 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200018.filter1,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
end
-- 2
function c10200018.filter2(c,tp)
return c:IsControler(tp) and c:IsSetCard(0xe21)
end
function c10200018.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200018.filter2,1,nil,tp)
end
function c10200018.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,e:GetHandler():GetOriginalCode())
Duel.Recover(tp,500,REASON_EFFECT)
end
\ No newline at end of file
-- 渊灵涡漩
function c10200019.initial_effect(c)
-- 卡组特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200019,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,10200019)
e1:SetTarget(c10200019.tg1)
e1:SetOperation(c10200019.op1)
c:RegisterEffect(e1)
-- 除外检索
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200019,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,10200020)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c10200019.tg2)
e2:SetOperation(c10200019.op2)
c:RegisterEffect(e2)
end
-- 1
function c10200019.filter(c,e,tp)
return c:IsSetCard(0xe21) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10200019.filter1(c,e)
return c:IsSetCard(0xe21) and c:IsDestructable() and c~=e:GetHandler() and c:IsFaceup()
end
function c10200019.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c10200019.filter1(chkc,e) end
if chk==0 then return Duel.IsExistingTarget(c10200019.filter1,tp,LOCATION_ONFIELD,0,1,nil,e)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10200019.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c10200019.filter1,tp,LOCATION_ONFIELD,0,1,1,nil,e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200019.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10200019.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end
end
end
-- 2
function c10200019.filter2(c)
return c:IsSetCard(0xe21) and c:IsAbleToHand()
end
function c10200019.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) then
return false
end
return Duel.IsExistingMatchingCard(c10200019.filter2,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200019.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
if #dg>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200019.filter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
-- 渊灵回流
function c10200021.initial_effect(c)
-- Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
-- 回收额外卡组表侧表示
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200021,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c10200021.con1)
e1:SetTarget(c10200021.tg1)
e1:SetOperation(c10200021.op1)
c:RegisterEffect(e1)
-- 回收墓地
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200021,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c10200021.con2)
e2:SetTarget(c10200021.tg2)
e2:SetOperation(c10200021.op2)
c:RegisterEffect(e2)
end
-- 1
function c10200021.con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSetCard,1,nil,0xe21)
end
function c10200021.filter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xe21) and c:IsAbleToHand()
and Duel.GetFlagEffect(tp,10200021+c:GetOriginalCode()) ==0
end
function c10200021.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk ==0 then
return Duel.IsExistingMatchingCard(c10200021.filter1,tp,LOCATION_EXTRA,0,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200021.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200021.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
local code=g:GetFirst():GetOriginalCode()
Duel.RegisterFlagEffect(tp,10200021+code,RESET_PHASE+PHASE_END,0,1)
end
end
-- 2
function c10200021.filter2(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsSetCard(0xe21) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c10200021.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200021.filter2,1,nil,tp)
end
function c10200021.filter3(c,tp)
return c:IsSetCard(0xe21) and c:IsAbleToHand() and Duel.GetFlagEffect(tp,10200022+c:GetOriginalCode()) ==0
end
function c10200021.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk ==0 then
return Duel.IsExistingMatchingCard(c10200021.filter3,tp,LOCATION_GRAVE,0,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200021.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200021.filter3,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local code=g:GetFirst():GetOriginalCode()
Duel.RegisterFlagEffect(tp,10200022+code,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
-- 渊灵归墟
function c10200022.initial_effect(c)
-- Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
-- 效果无效
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200022,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c10200022.con1)
e2:SetTarget(c10200022.tg1)
e2:SetOperation(c10200022.op1)
c:RegisterEffect(e2)
-- 遗言回收
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10200022,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(c10200022.tg2)
e3:SetOperation(c10200022.op2)
c:RegisterEffect(e3)
end
-- 1
function c10200022.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsSetCard(0xe21) end,tp,LOCATION_EXTRA,0,1,nil)
and ep==1-tp and Duel.IsChainDisablable(ev)
end
function c10200022.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0xe21) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200022.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_PZONE,0,1,1,nil,0xe21)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
if Duel.NegateEffect(ev) then end
end
end
-- 2
function c10200022.filter2(c)
return c:IsFaceup() and c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200022.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200022.filter2,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200022.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200022.filter2,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end
end
\ No newline at end of file
......@@ -158,7 +158,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.efilter(e,te)
if e:GetHandler():GetFlagEffect(m+0xffffff)>0 and te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) and te:IsHasType(EFFECT_TYPE_ACTIONS) then
if KOISHI_CHECK then
if 0==1 then
Duel.DisableActionCheck(true)
pcall(Duel.HintSelection,Group.FromCards(e:GetHandler()))
local tc=te:GetHandler()
......@@ -201,6 +201,7 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp)
pnfl_adjusting=true
Duel.Draw(e:GetLabel(),1,REASON_EFFECT)
pnfl_adjusting=false
e:Reset()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -74,7 +74,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
return rc:IsSetCard(0x836)
end
function cm.thfilter(c)
return c:IsSetCard(0x836) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand()
return c:IsSetCard(0x836) and c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -88,10 +88,10 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,cm.repop)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.SSet(tp,g,tp,true)
--Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
......@@ -45,7 +45,10 @@ function cm.initial_effect(c)
end
end
function cm.tgfilter(c,tp,sc)
return c:IsSetCard(0x836) and c:IsAbleToGraveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and #Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil,true)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or (c:IsLocation(LOCATION_SZONE) and c:GetSequence()<4))
return c:IsSetCard(0x836) and c:IsAbleToGraveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and #Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil,true)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or (c:IsLocation(LOCATION_SZONE) and c:GetSequence()<4) or #Duel.GetMatchingGroup(cm.setfilter0,tp,LOCATION_HAND,0,nil)>0)
end
function cm.setfilter0(c)
return c:IsSSetable(true) and c:IsType(TYPE_FIELD)
end
function cm.spcon(e,c)
if c==nil then return true end
......@@ -59,6 +62,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if not (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or (sg:GetFirst():IsLocation(LOCATION_SZONE) and sg:GetFirst():GetSequence()<4)) then g2=g2:Filter(cm.setfilter0,nil) end
local sg2=g2:Select(tp,1,1,nil)
if #sg>0 and #sg2>0 then
sg:Merge(sg2)
......@@ -71,8 +75,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
local sg=g:Filter(Card.IsOnField,nil)
Duel.SendtoGrave(sg,REASON_SPSUMMON+REASON_COST)
Duel.MoveToField((g-sg):GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEDOWN,false)
Duel.RaiseEvent((g-sg):GetFirst(),EVENT_SSET,e,REASON_SPSUMMON+REASON_COST,tp,tp,0)
local loc=LOCATION_SZONE
local tc=(g-sg):GetFirst()
if tc:IsType(TYPE_FIELD) then loc=LOCATION_FZONE end
Duel.MoveToField(tc,tp,tp,loc,POS_FACEDOWN,false)
tc:SetStatus(STATUS_SET_TURN,true)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_SPSUMMON+REASON_COST,tp,tp,0)
--Duel.SSet(tp,g-sg,tp,false)
g:DeleteGroup()
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment