Commit 4cf012eb authored by Nemo Ma's avatar Nemo Ma

Upd 0406

192 cards
parent d67fa4ab
No preview for this file type
expansions/pics/11451895.jpg

16.3 KB | W: | H:

expansions/pics/11451895.jpg

90.8 KB | W: | H:

expansions/pics/11451895.jpg
expansions/pics/11451895.jpg
expansions/pics/11451895.jpg
expansions/pics/11451895.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/12866805.jpg

105 KB | W: | H:

expansions/pics/12866805.jpg

30.8 KB | W: | H:

expansions/pics/12866805.jpg
expansions/pics/12866805.jpg
expansions/pics/12866805.jpg
expansions/pics/12866805.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/12866880.jpg

28.5 KB | W: | H:

expansions/pics/12866880.jpg

30.5 KB | W: | H:

expansions/pics/12866880.jpg
expansions/pics/12866880.jpg
expansions/pics/12866880.jpg
expansions/pics/12866880.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348152.jpg

184 KB | W: | H:

expansions/pics/22348152.jpg

15.1 KB | W: | H:

expansions/pics/22348152.jpg
expansions/pics/22348152.jpg
expansions/pics/22348152.jpg
expansions/pics/22348152.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348153.jpg

192 KB | W: | H:

expansions/pics/22348153.jpg

15.7 KB | W: | H:

expansions/pics/22348153.jpg
expansions/pics/22348153.jpg
expansions/pics/22348153.jpg
expansions/pics/22348153.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348158.jpg

172 KB | W: | H:

expansions/pics/22348158.jpg

13.4 KB | W: | H:

expansions/pics/22348158.jpg
expansions/pics/22348158.jpg
expansions/pics/22348158.jpg
expansions/pics/22348158.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348169.jpg

212 KB | W: | H:

expansions/pics/22348169.jpg

17.7 KB | W: | H:

expansions/pics/22348169.jpg
expansions/pics/22348169.jpg
expansions/pics/22348169.jpg
expansions/pics/22348169.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348172.jpg

207 KB | W: | H:

expansions/pics/22348172.jpg

16.9 KB | W: | H:

expansions/pics/22348172.jpg
expansions/pics/22348172.jpg
expansions/pics/22348172.jpg
expansions/pics/22348172.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348247.jpg

213 KB | W: | H:

expansions/pics/22348247.jpg

17.2 KB | W: | H:

expansions/pics/22348247.jpg
expansions/pics/22348247.jpg
expansions/pics/22348247.jpg
expansions/pics/22348247.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65131050.jpg

49.9 KB | W: | H:

expansions/pics/65131050.jpg

49.7 KB | W: | H:

expansions/pics/65131050.jpg
expansions/pics/65131050.jpg
expansions/pics/65131050.jpg
expansions/pics/65131050.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65131051.jpg

53.1 KB | W: | H:

expansions/pics/65131051.jpg

53.1 KB | W: | H:

expansions/pics/65131051.jpg
expansions/pics/65131051.jpg
expansions/pics/65131051.jpg
expansions/pics/65131051.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390110.jpg

124 KB | W: | H:

expansions/pics/89390110.jpg

27.2 KB | W: | H:

expansions/pics/89390110.jpg
expansions/pics/89390110.jpg
expansions/pics/89390110.jpg
expansions/pics/89390110.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910802.jpg

50.8 KB | W: | H:

expansions/pics/9910802.jpg

50.1 KB | W: | H:

expansions/pics/9910802.jpg
expansions/pics/9910802.jpg
expansions/pics/9910802.jpg
expansions/pics/9910802.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910803.jpg

52.5 KB | W: | H:

expansions/pics/9910803.jpg

52 KB | W: | H:

expansions/pics/9910803.jpg
expansions/pics/9910803.jpg
expansions/pics/9910803.jpg
expansions/pics/9910803.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910823.jpg

55.9 KB | W: | H:

expansions/pics/9910823.jpg

53.3 KB | W: | H:

expansions/pics/9910823.jpg
expansions/pics/9910823.jpg
expansions/pics/9910823.jpg
expansions/pics/9910823.jpg
  • 2-up
  • Swipe
  • Onion skin
-- 渊灵-涡流鳐
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)
c10200000.zhanhou_effect=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)
c10200000.yiyan_effect=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)
c10200003.zhanhou_effect=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)
c10200003.yiyan_effect=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)
c10200006.zhanhou_effect=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)
c10200006.yiyan_effect=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() and not c:IsCode(10200006)
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)
c10200009.zhanhou_effect=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)
c10200009.yiyan_effect=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:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10200011)
e2:SetTarget(c10200011.tg1)
e2:SetOperation(c10200011.op1)
c:RegisterEffect(e2)
c10200011.zhanhou_effect=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_TOGRAVE)
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)
c10200011.yiyan_effect=e4
end
-- 1
function c10200011.filter1(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0xe21) and c:IsAbleToGrave()) then return false end
local te=c.yiyan_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c10200011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local check=true
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
if ct then
for i=1,ct do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:GetHandler()==e:GetHandler() then check=false end
end
end
if chk==0 then return Duel.IsExistingMatchingCard(c10200011.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,eg,ep,ev,re,r,rp) and check end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function c10200011.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c10200011.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
local te=tc.yiyan_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
-- 2
function c10200011.filter2(c)
if not (c:IsSetCard(0xe21) and c:IsAbleToGrave()) then return false end
local te=c.zhanhou_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c10200011.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local check=true
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
if ct then
for i=1,ct do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:GetHandler()==e:GetHandler() then check=false end
end
end
if chk==0 then return Duel.IsExistingMatchingCard(c10200011.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,eg,ep,ev,re,r,rp) and check end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function c10200011.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c10200011.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
local te=tc.zhanhou_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
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,0)) 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:SetCountLimit(1,10200021)
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:SetCountLimit(1,10200022)
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 c10200030.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(10200030,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c10200030.con1)
e2:SetTarget(c10200030.tg1)
e2:SetOperation(c10200030.op1)
c:RegisterEffect(e2)
-- 遗言回收
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10200030,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(c10200030.tg2)
e3:SetOperation(c10200030.op2)
c:RegisterEffect(e3)
end
-- 1
function c10200030.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 c10200030.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 c10200030.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 c10200030.filter2(c)
return c:IsFaceup() and c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200030.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200030.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 c10200030.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200030.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
......@@ -17,17 +17,15 @@ function c10201000.initial_effect(c)
e2g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e2g:SetCondition(c10201000.gravecon)
c:RegisterEffect(e2g)
--summon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(c10201000.sumlimit)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_MSET)
--todeck and draw
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetTarget(c10201000.drtg)
e4:SetOperation(c10201000.drop)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
......@@ -40,11 +38,38 @@ function c10201000.initial_effect(c)
e5:SetValue(RACE_WARRIOR)
c:RegisterEffect(e5)
end
function c10201000.sumlimit(e,c,tp,sumtp)
return bit.band(sumtp,SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:GetRace()~=RACE_WARRIOR
end
--1
function c10201000.gravecon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end
--2
function c10201000.tdfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c10201000.thfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() and c:IsLevelAbove(5)
end
function c10201000.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10201000.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10201000.tdfilter,tp,LOCATION_GRAVE,0,10,nil)
and Duel.IsExistingMatchingCard(c10201000.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c10201000.tdfilter,tp,LOCATION_GRAVE,0,10,10,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10201000.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c10201000.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
\ No newline at end of file
--堕天使 克里斯提亚
function c10203053.initial_effect(c)
c:SetSPSummonOnce(10203053)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10203053,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10203053)
e1:SetCost(c10203053.srcost)
e1:SetTarget(c10203053.srtg)
e1:SetOperation(c10203053.srop)
c:RegisterEffect(e1)
--copy effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10203053,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,10203054)
e2:SetCost(c10203053.cpcost)
e2:SetTarget(c10203053.cptg)
e2:SetOperation(c10203053.cpop)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
c:RegisterEffect(e3)
end
function c10203053.filter(c)
return c:IsSetCard(0xef) and c:IsDiscardable()
end
function c10203053.srfilter(c)
return c:IsSetCard(0xef) and c:IsAbleToHand()
end
function c10203053.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c10203053.filter,tp,LOCATION_HAND,0,1,c) and c:IsDiscardable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c10203053.filter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c10203053.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10203053.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10203053.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10203053.srfilter,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 c10203053.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10203053.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c10203053.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c10203053.cpfilter(c)
return c:IsSetCard(0xef) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil
end
function c10203053.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(c10203053.cpfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c10203053.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c10203053.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
if not te:GetHandler():IsRelateToEffect(e) then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect()
Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
This diff is collapsed.
......@@ -87,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local operation=c:GetOperation()
if operation then operation(e,tp,eg,ep,ev,re,r,rp) end
if r and not e:GetHandler():IsLocation(LOCATION_GRAVE) and not e:GetHandler():IsLocation(LOCATION_REMOVED) then
Duel.BreakEffect()
--Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
......@@ -95,8 +95,8 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and Duel.GetCurrentChain()~=0
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
--0xc780000=RESET_MSCHANGE+RESET_OVERLAY+RESET_REMOVE+RESET_TEMP_REMOVE+RESET_TOHAND+RESET_TODECK
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc780000+RESET_CHAIN,0,1)
--0xc7a0000=RESET_MSCHANGE+RESET_OVERLAY+RESET_REMOVE+RESET_TEMP_REMOVE+RESET_TOHAND+RESET_TODECK+RESET_TURN_SET
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_CHAIN,0,1)
end
function cm.condition4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0 and Duel.GetCurrentChain()==1
......
......@@ -55,7 +55,7 @@ function cm.filter(c,tp)
return c:IsSetCard(0x6978) and bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.filter2(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x6978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
......@@ -86,7 +86,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local operation=c:GetOperation()
if operation then operation(e,tp,eg,ep,ev,re,r,rp) end
if r and not e:GetHandler():IsLocation(LOCATION_GRAVE) and not e:GetHandler():IsLocation(LOCATION_REMOVED) then
Duel.BreakEffect()
--Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
......@@ -94,7 +94,7 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and Duel.GetCurrentChain()~=0
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc780000+RESET_CHAIN,0,1)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_CHAIN,0,1)
end
function cm.condition4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0 and Duel.GetCurrentChain()==1
......
......@@ -86,7 +86,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local operation=c:GetOperation()
if operation then operation(e,tp,eg,ep,ev,re,r,rp) end
if r and not e:GetHandler():IsLocation(LOCATION_GRAVE) and not e:GetHandler():IsLocation(LOCATION_REMOVED) then
Duel.BreakEffect()
--Duel.BreakEffect()
local ph=Duel.GetCurrentPhase()
if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)~=0 and e:GetHandler():IsLocation(LOCATION_GRAVE) then -- and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then
--Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
......@@ -106,7 +106,7 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and Duel.GetCurrentChain()~=0
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc780000+RESET_CHAIN,0,1)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_CHAIN,0,1)
end
function cm.condition4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0 and Duel.GetCurrentChain()==1
......
......@@ -15,7 +15,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e1
cm.hand_effect[c]=e1
--effect2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -61,7 +61,7 @@ end
function cm.check(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
for tc in aux.Next(eg) do
if (tc:IsLocation(LOCATION_MZONE) or (not tc:IsOnField() and tc:GetOriginalType()&0x1>0)) and tc:IsSetCard(0x6978) and tc:IsReason(REASON_RELEASE) then
if (tc:IsLocation(LOCATION_MZONE) or (not tc:IsOnField() and tc:GetOriginalType()&0x1>0)) and tc:IsRace(RACE_SEASERPENT) and tc:IsReason(REASON_RELEASE) then
local p=tc:GetReasonPlayer()
cm[p]=cm[p]+1
end
......@@ -93,7 +93,7 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and Duel.GetCurrentChain()~=0
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc780000+RESET_CHAIN,0,1)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_CHAIN,0,1)
end
function cm.condition4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0 and Duel.GetCurrentChain()==1
......
--waking of dragon palace
local m=11451416
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=aux.AddRitualProcGreater2(c,nil,LOCATION_HAND+LOCATION_GRAVE,nil,cm.matfilter)
......@@ -10,7 +9,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
......@@ -24,7 +23,7 @@ function cm.matfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.filter(c,tp)
return c:IsPreviousSetCard(0x6978) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetReasonPlayer()==tp
return c:IsPreviousSetCard(0x6978) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetReasonPlayer()==tp and c:IsPreviousControler(1-tp)
end
function cm.filter1(c)
return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand()
......@@ -33,11 +32,12 @@ function cm.filter2(c)
return c:IsSetCard(0x6978) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp)
return eg:IsExists(cm.filter,1,nil,1-tp) and not eg:IsContains(e:GetHandler())
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -69,7 +69,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local operation=c:GetOperation()
if operation then operation(e,tp,eg,ep,ev,re,r,rp) end
if r and not e:GetHandler():IsLocation(LOCATION_GRAVE) and not e:GetHandler():IsLocation(LOCATION_REMOVED) then
Duel.BreakEffect()
--Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -39,6 +39,7 @@ function cm.initial_effect(c)
e5:SetCost(cm.cost2)
c:RegisterEffect(e5)
--set
--local custom_code=cm.RegisterMergedEvent_ToSingleCard(c,m,EVENT_LEAVE_FIELD)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451631,6))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
......@@ -84,6 +85,110 @@ function cm.initial_effect(c)
end
end
end
function cm.RegisterMergedEvent_ToSingleCard(c,code,events)
local g=Group.CreateGroup()
g:KeepAlive()
local mt=getmetatable(c)
local seed=0
if type(events) == "table" then
for _, event in ipairs(events) do
seed = seed + event
end
else
seed = events
end
while(mt[seed]==true) do
seed = seed + 1
end
mt[seed]=true
local event_code_single = (code ~ (seed << 16)) | EVENT_CUSTOM
if type(events) == "table" then
for _, event in ipairs(events) do
cm.RegisterMergedEvent_ToSingleCard_AddOperation(c,g,event,event_code_single)
end
else
cm.RegisterMergedEvent_ToSingleCard_AddOperation(c,g,events,event_code_single)
end
--listened to again
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EVENT_MOVE)
e3:SetLabelObject(g)
e3:SetOperation(cm.ThisCardMovedToPublicResetCheck_ToSingleCard)
c:RegisterEffect(e3)
return event_code_single
end
function cm.RegisterMergedEvent_ToSingleCard_AddOperation(c,g,event,event_code_single)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(event)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(0xff)
e1:SetLabel(event_code_single)
e1:SetLabelObject(g)
e1:SetOperation(cm.MergedDelayEventCheck1_ToSingleCard)
c:RegisterEffect(e1)
--[[local _GetCode=Effect.GetCode
function Effect.GetCode(e,...)
return _GetCode(e,...)==event_code_single and event or _GetCode(e,...)
end--]]
local ec={
EVENT_CHAIN_ACTIVATING,
EVENT_CHAINING,
EVENT_ATTACK_ANNOUNCE,
EVENT_BREAK_EFFECT,
EVENT_CHAIN_SOLVING,
EVENT_CHAIN_SOLVED,
EVENT_CHAIN_END,
EVENT_SUMMON,
EVENT_SPSUMMON
}
for _,code in ipairs(ec) do
local ce=e1:Clone()
ce:SetCode(code)
ce:SetOperation(cm.MergedDelayEventCheck2_ToSingleCard)
c:RegisterEffect(ce)
end
end
function cm.MergedDelayEventCheck1_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local c=e:GetOwner()
g:Merge(eg)
if Duel.CheckEvent(EVENT_MOVE) then
local _,meg=Duel.CheckEvent(EVENT_MOVE,true)
if meg:IsContains(c) and (c:IsFaceup() or c:IsPublic()) then
g:Clear()
end
end
if Duel.GetCurrentChain()==0 and #g>0 then
local _eg=g:Clone()
Duel.RaiseEvent(_eg,e:GetLabel(),re,r,rp,ep,ev)
g:Clear()
end
end
function cm.MergedDelayEventCheck2_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if Duel.CheckEvent(EVENT_MOVE) then
local _,meg=Duel.CheckEvent(EVENT_MOVE,true)
local c=e:GetOwner()
if meg:IsContains(c) and (c:IsFaceup() or c:IsPublic()) then
g:Clear()
end
end
if #g>0 then
local _eg=g:Clone()
Duel.RaiseEvent(_eg,e:GetLabel(),re,r,rp,ep,ev)
g:Clear()
end
end
function cm.ThisCardMovedToPublicResetCheck_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local g=e:GetLabelObject()
if c:IsFaceup() or c:IsPublic() then
g:Clear()
end
end
function cm.handcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
......
......@@ -69,7 +69,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local operation=c:GetOperation()
if operation then operation(e,tp,eg,ep,ev,re,r,rp) end
if r and not e:GetHandler():IsLocation(LOCATION_GRAVE) and not e:GetHandler():IsLocation(LOCATION_REMOVED) then
Duel.BreakEffect()
--Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -244,18 +244,18 @@ function cm.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
local ct=0
for i=0,2 do if typ&(1<<i)>0 then ct=ct+1 end end
if chk==0 then return (b1 or b2 or b3 or b4) or q1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 or q1 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,tp,LOCATION_DECK)
end
function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bool=c:IsRelateToEffect(e) --and c:IsControler(tp) and c:IsFaceup()
local bool=c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsFaceup()
local seq=c:GetSequence()
local b1=seq>0 and seq<5 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
local q1=#g>0
local mg=Group.CreateGroup()
......@@ -281,7 +281,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
if q2 then
Duel.BreakEffect()
local flag=0
......@@ -290,7 +290,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
end
......@@ -301,7 +301,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
......
......@@ -236,18 +236,18 @@ function cm.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=0
for i=0,2 do if typ&(1<<i)>0 then ct=ct+1 end end
local q1=#g>0 and Duel.IsPlayerCanDraw(tp,ct)
if chk==0 then return (b1 or b2 or b3 or b4) or q1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 or q1 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bool=c:IsRelateToEffect(e) --and c:IsControler(tp) and c:IsFaceup()
local bool=c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsFaceup()
local seq=c:GetSequence()
local b1=seq>0 and seq<5 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
local typ=0
for fc in aux.Next(g) do
......@@ -268,7 +268,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
if q2 then
Duel.BreakEffect()
local flag=0
......@@ -277,7 +277,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
end
......@@ -288,7 +288,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
......
......@@ -198,17 +198,17 @@ function cm.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
local q1=#g>0
if chk==0 then return (b1 or b2 or b3 or b4) or q1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 or q1 end
end
function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bool=c:IsRelateToEffect(e) --and c:IsControler(tp) and c:IsFaceup()
local bool=c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsFaceup()
local seq=c:GetSequence()
local b1=seq>0 and seq<5 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
local q1=#g>0
if not q1 and not q2 then return end
......@@ -243,7 +243,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
if q2 then
Duel.BreakEffect()
local flag=0
......@@ -252,7 +252,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
end
......@@ -263,7 +263,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
......
......@@ -198,17 +198,17 @@ function cm.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
local q1=#g>0
if chk==0 then return (b1 or b2 or b3 or b4) or q1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 or q1 end
end
function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bool=c:IsRelateToEffect(e) --and c:IsControler(tp) and c:IsFaceup()
local bool=c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsFaceup()
local seq=c:GetSequence()
local b1=seq>0 and seq<5 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
local q1=#g>0
if not q1 and not q2 then return end
......@@ -223,7 +223,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
if q2 then
Duel.BreakEffect()
local flag=0
......@@ -232,7 +232,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
end
......@@ -243,7 +243,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c,tp,false)
......
......@@ -206,18 +206,18 @@ function cm.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local q1=#g>0
if chk==0 then return (b1 or b2 or b3 or b4) or q1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 or q1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bool=c:IsRelateToEffect(e) --and c:IsControler(tp) and c:IsFaceup()
local bool=c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsFaceup()
local seq=c:GetSequence()
local b1=seq>0 and seq<5 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local q1=#g>0
if not q1 and not q2 then return end
......@@ -241,7 +241,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
local b2=seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)
local b3=(seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1)) or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
local b4=(seq==1 and Duel.CheckLocation(tp,LOCATION_MZONE,5)) or (seq==3 and Duel.CheckLocation(tp,LOCATION_MZONE,6))
local q2=bool and (b1 or b2 or b3 or b4)
local q2=bool and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
if q2 then
Duel.BreakEffect()
local flag=0
......@@ -250,7 +250,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
end
......@@ -261,7 +261,7 @@ function cm.mop(e,tp,eg,ep,ev,re,r,rp)
if b3 then if seq==5 then flag=flag|0x2 else flag=flag|0x8 end end
if b4 then if seq==1 then flag=flag|0x20 else flag=flag|0x40 end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,~flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s&0xff,2)
Duel.MoveSequence(c,nseq)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
......
......@@ -137,7 +137,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if op then op(e,tp,eg,ep,ev,re,r,rp) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,nil)
if #g>0 then --and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
--Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
g=g:Select(tp,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
--笑点解析
local cm,m=GetID()
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--reveal
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_ADJUST)
e3:SetCondition(cm.adcon)
e3:SetOperation(cm.adop)
c:RegisterEffect(e3)
--immune
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(LOCATION_ONFIELD)
ge2:SetLabelObject(c)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetValue(cm.chkval0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge3:SetTargetRange(LOCATION_ONFIELD,0)
ge3:SetRange(LOCATION_SZONE)
ge3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
ge3:SetLabelObject(ge2)
c:RegisterEffect(ge3)
end
function cm.chkval0(e,te)
local c=e:GetLabelObject()
local tp=e:GetHandlerPlayer()
if te and te:IsActivated() then
local attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_ATTRIBUTE) or 0
local typ=te:GetActiveType()
if typ&TYPE_SPELL>0 then attr=attr|0x80 end
if typ&TYPE_TRAP>0 then attr=attr|0x100 end
for i=0,8 do
if attr&(1<<i)>0 then
if c:IsLocation(LOCATION_HAND+LOCATION_SZONE) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,i))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(0)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetLabel(1<<i)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(cm.efilter)
Duel.RegisterEffect(e2,tp)
end
end
end
return false
end
function cm.efilter(e,te)
if not te:IsActivated() then return false end
local attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_ATTRIBUTE) or 0
local typ=te:GetActiveType()
if typ&TYPE_SPELL>0 then attr=attr|0x80 end
if typ&TYPE_TRAP>0 then attr=attr|0x100 end
if attr&e:GetLabel()>0 then
Duel.Hint(HINT_CARD,0,m)
return true
end
return false
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsPublic()
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(m,10)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,9))
end
end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)==0
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsPublic() and c:GetFlagEffect(m-1)==0 then
c:RegisterFlagEffect(m-1,RESET_EVENT+RESETS_STANDARD,0,1)
elseif c:GetFlagEffect(m-1)>0 then
c:ResetFlagEffect(m-1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,11))
--immune
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetLabelObject(c)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
ge2:SetValue(cm.chkval0)
ge2:SetTargetRange(LOCATION_ONFIELD,0)
ge2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(ge2,tp)
end
end
\ No newline at end of file
--笑点解析
--虚无之结界像
local cm,m=GetID()
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--reveal
--pendulum summon
aux.EnablePendulumAttribute(c)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetTarget(function(e,c)
return c:IsAttack(1000) and c:IsDefense(1000)
end)
c:RegisterEffect(e2)
--[[local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_PZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(function(e)
local ac,bc=Duel.GetBattleMonster(e:GetHandlerPlayer())
return (ac and ac:IsAttack(1000) and ac:IsDefense(1000)) or (bc and bc:IsAttack(1000) and bc:IsDefense(1000))
end)
c:RegisterEffect(e2)--]]
--remove
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e0:SetRange(LOCATION_PZONE)
e0:SetCondition(cm.recon)
e0:SetOperation(cm.reop)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_ADJUST)
e3:SetCondition(cm.adcon)
e3:SetOperation(cm.adop)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_PZONE)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--immune
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(LOCATION_ONFIELD)
ge2:SetLabelObject(c)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetValue(cm.chkval0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge3:SetTargetRange(LOCATION_ONFIELD,0)
ge3:SetRange(LOCATION_SZONE)
ge3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
ge3:SetLabelObject(ge2)
c:RegisterEffect(ge3)
end
function cm.chkval0(e,te)
local c=e:GetLabelObject()
local tp=e:GetHandlerPlayer()
if te and te:IsActivated() then
local attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_ATTRIBUTE) or 0
local typ=te:GetActiveType()
if typ&TYPE_SPELL>0 then attr=attr|0x80 end
if typ&TYPE_TRAP>0 then attr=attr|0x100 end
for i=0,8 do
if attr&(1<<i)>0 then
if c:IsLocation(LOCATION_HAND+LOCATION_SZONE) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,i))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(0)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetLabel(1<<i)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(cm.efilter)
Duel.RegisterEffect(e2,tp)
--replace
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e5:SetCountLimit(1,11451896+EFFECT_COUNT_CODE_DUEL)
e5:SetRange(LOCATION_HAND+LOCATION_DECK)
e5:SetOperation(cm.rep)
c:RegisterEffect(e5)
if not cm.global_check then
cm.global_check=true
local _SpecialSummon=Duel.SpecialSummon
Duel.SpecialSummon=function(g,typ,sp,...)
local sc=g
if aux.GetValueType(g)=="Group" then
if #g>1 then return _SpecialSummon(g,typ,sp,...) end
sc=g:GetFirst()
end
if sc:GetOriginalCode()~=m or not (Duel.CheckLocation(sp,LOCATION_PZONE,0) or Duel.CheckLocation(sp,LOCATION_PZONE,1)) or not Duel.SelectEffectYesNo(sp,sc,aux.Stringid(m,0)) then return _SpecialSummon(g,typ,sp,...) end
Duel.MoveToField(sc,sp,sp,LOCATION_PZONE,POS_FACEUP,true)
return false
end
end
return false
end
function cm.efilter(e,te)
if not te:IsActivated() then return false end
local attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_ATTRIBUTE) or 0
local typ=te:GetActiveType()
if typ&TYPE_SPELL>0 then attr=attr|0x80 end
if typ&TYPE_TRAP>0 then attr=attr|0x100 end
if attr&e:GetLabel()>0 then
Duel.Hint(HINT_CARD,0,m)
return true
function cm.rep(e,tp,eg,ep,ev,re,r,rp)
local table={19740112,10963799,47961808,73356503,46145256,84478195}
for i,code in ipairs(table) do
local cn=_G["c"..code]
if type(cn)=="table" and type(cn.sumlimit)=="function" then
cn.sumlimit=function(e,c,sump,sumtype,sumpos,targetp)
return not c:IsAttribute(1<<(i-1))
end
end
local g=Duel.GetMatchingGroup(aux.FilterEqualFunction(Card.GetOriginalCode,code),0,0xff,0xff,nil)
for tc in aux.Next(g) do tc:ReplaceEffect(code,0) end
end
return false
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsPublic()
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
local tp=Duel.GetTurnPlayer()
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.CheckReleaseGroupEx(tp,cm.filter,1,REASON_COST,true,nil) and Duel.GetFlagEffect(tp,m)==0
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(m,10)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,9))
end
local tp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.filter,1,1,REASON_COST,true,nil)
local seq=g:GetFirst():IsOnField() and aux.GetColumn(g:GetFirst()) or 100
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,e,seq,0,0,g:GetFirst():GetAttribute())
Duel.Release(g,REASON_COST)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)==0
function cm.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
function cm.cclfilter(c,seq,attr)
local seq1=aux.GetColumn(c)
return c:IsFaceup() and (seq1==seq or (c:IsType(TYPE_MONSTER) and c:IsAttribute(attr)))
end
function cm.thfilter(c)
return c:IsAttack(1000) and c:IsDefense(1000) and c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.cclfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,r,ev)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsPublic() and c:GetFlagEffect(m-1)==0 then
c:RegisterFlagEffect(m-1,RESET_EVENT+RESETS_STANDARD,0,1)
elseif c:GetFlagEffect(m-1)>0 then
c:ResetFlagEffect(m-1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,11))
--immune
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetLabelObject(c)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
ge2:SetValue(cm.chkval0)
ge2:SetTargetRange(LOCATION_ONFIELD,0)
ge2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(ge2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local g=Duel.GetMatchingGroup(cm.cclfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,r,ev)
if #g>0 then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--创生之结界像
local cm,m=GetID()
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTarget(cm.etg)
e2:SetValue(cm.eval)
c:RegisterEffect(e2)
--remove
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e0:SetRange(LOCATION_PZONE)
e0:SetCondition(cm.recon)
e0:SetOperation(cm.reop)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_PZONE)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--replace
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e5:SetCountLimit(1,11451896+EFFECT_COUNT_CODE_DUEL)
e5:SetRange(LOCATION_HAND+LOCATION_DECK)
e5:SetOperation(cm.rep)
c:RegisterEffect(e5)
if not cm.global_check then
cm.global_check=true
local _SpecialSummon=Duel.SpecialSummon
Duel.SpecialSummon=function(g,typ,sp,...)
local sc=g
if aux.GetValueType(g)=="Group" then
if #g>1 then return _SpecialSummon(g,typ,sp,...) end
sc=g:GetFirst()
end
if sc:GetOriginalCode()~=m or not (Duel.CheckLocation(sp,LOCATION_PZONE,0) or Duel.CheckLocation(sp,LOCATION_PZONE,1)) or not Duel.SelectEffectYesNo(sp,sc,aux.Stringid(m,0)) then return _SpecialSummon(g,typ,sp,...) end
Duel.MoveToField(sc,sp,sp,LOCATION_PZONE,POS_FACEUP,true)
return false
end
end
end
function cm.etg(e,c)
return c:GetFlagEffect(m+0xffffff+e:GetFieldID())==0
end
function cm.eval(e,te,c)
local res=c:GetFlagEffect(m+0xffffff+e:GetFieldID())==0 and te:IsActivated() --and te:GetOwner()~=e:GetOwnerPlayer()
if res then
Duel.Hint(HINT_CARD,0,m)
c:RegisterFlagEffect(m+0xffffff+e:GetFieldID(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
return res
end
function cm.rep(e,tp,eg,ep,ev,re,r,rp)
local table={19740112,10963799,47961808,73356503,46145256,84478195}
for i,code in ipairs(table) do
local cn=_G["c"..code]
if type(cn)=="table" and type(cn.sumlimit)=="function" then
cn.sumlimit=function(e,c,sump,sumtype,sumpos,targetp)
return not c:IsAttribute(1<<(i-1))
end
end
local g=Duel.GetMatchingGroup(aux.FilterEqualFunction(Card.GetOriginalCode,code),0,0xff,0xff,nil)
for tc in aux.Next(g) do tc:ReplaceEffect(code,0) end
end
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
local tp=Duel.GetTurnPlayer()
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.CheckReleaseGroupEx(tp,cm.filter,1,REASON_COST,true,nil) and Duel.GetFlagEffect(tp,m)==0
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.filter,1,1,REASON_COST,true,nil)
local seq=g:GetFirst():IsOnField() and aux.GetColumn(g:GetFirst()) or 100
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,e,seq,0,0,g:GetFirst():GetAttribute())
Duel.Release(g,REASON_COST)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.cclfilter(c,seq,attr)
local seq1=aux.GetColumn(c)
return c:IsFaceup() and (seq1==seq or (c:IsType(TYPE_MONSTER) and c:IsAttribute(attr)))
end
function cm.spfilter(c,e,tp,attr)
return c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) --and c:IsAttribute(attr)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,ev)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(function(e,c) return cm.cclfilter(c,r,ev) and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)) end)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local loc,seq,attr,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE,CHAININFO_TRIGGERING_ATTRIBUTE,CHAININFO_TRIGGERING_CONTROLER)
if seq==5 then seq=1 elseif seq==6 then seq=3 end
if p~=0 then seq=4-seq end
return bit.band(loc,LOCATION_ONFIELD)~=0 and (seq==r or (re:IsActiveType(TYPE_MONSTER) and attr&ev>0))
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
\ No newline at end of file
--秘计螺旋 重启
local cm,m=GetID()
function cm.initial_effect(c)
--effect1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--effect2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetCost(cm.cost)
e3:SetDescription(aux.Stringid(m,2))
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return #g>0 end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.IsPlayerCanDraw(tp,ct+1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
local og=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
if og:IsExists(Card.IsControler,1,nil,tp) then Duel.ShuffleDeck(tp) end
if og:IsExists(Card.IsControler,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
Duel.BreakEffect()
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.Draw(tp,ct+1,REASON_EFFECT)
end
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil) and cm.tg(e,tp,eg,ep,ev,re,r,rp,0) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
\ No newline at end of file
--火灵佑佐 希塔
local cm,m=GetID()
function cm.initial_effect(c)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.discon)
e3:SetOperation(cm.disop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_MZONE)
e2:SetLabelObject(e3)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_EFFECT))
c:RegisterEffect(e2)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop)
local e4=e2:Clone()
e4:SetLabelObject(e1)
c:RegisterEffect(e4)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==1
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op,loc,seq2,pos=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE,CHAININFO_TRIGGERING_POSITION)
if loc&LOCATION_SZONE~=0 and seq2>4 then return false end
local seq1=aux.MZoneSequence(c:GetSequence())
seq2=aux.MZoneSequence(seq2)
return pos&POS_FACEUP>0 and bit.band(loc,LOCATION_ONFIELD)~=0 and (op==tp and seq1==seq2)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.NegateEffect(ev)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lv=c:GetLevel()|c:GetRank()|c:GetLink()
local fg=c:GetColumnGroup()
local dg=Duel.GetDecktopGroup(tp,lv)
if chk==0 then return #dg==lv or #fg>0 end
local lv=c:GetPreviousLevelOnField()|c:GetPreviousRankOnField()|c:GetLink()
local fg=Duel.GetMatchingGroup(function(c) return aux.GetColumn(c,tp)==aux.MZoneSequence(c:GetPreviousSequence()) end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local dg=Duel.GetDecktopGroup(tp,lv)
e:SetLabel(lv,aux.MZoneSequence(c:GetPreviousSequence()))
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,fg+dg,#(fg+dg),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local lv,seq=e:GetLabel()
local fg=Duel.GetMatchingGroup(function(c) return aux.GetColumn(c,tp)==seq end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local dg=Duel.GetDecktopGroup(tp,lv)
Duel.Destroy(fg+dg,REASON_EFFECT)
end
\ No newline at end of file
......@@ -52,10 +52,6 @@ function c11513054.tdop(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetOperatedGroup()
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
if og:FilterCount(Card.IsSetCard,nil,0x115)==5 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(11513054,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c11513054.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,7 +27,7 @@ function c11533703.initial_effect(c)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
......@@ -80,7 +80,7 @@ function c11533703.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533703.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c11533703.bgfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToGrave()
return c:IsAbleToGrave()
end
function c11533703.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
......
......@@ -137,7 +137,7 @@ function c11533706.xthop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,lv*500,REASON_EFFECT)
local mg=Duel.GetRitualMaterial(tp):Filter(function(c) return false end,nil)
local dg=Duel.GetMatchingGroup(c11533706.xrlfil,tp,LOCATION_GRAVE,0,nil)
local xxg=Duel.GetMatchingGroup(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,nil,c11533706.xspfil,e,tp,mg,dg,Card.GetLevel,"Equal"):Filter(function(c,lv) return c:IsLevelBelow(lv) end,nil,lv)
local xxg=Duel.GetMatchingGroup(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,nil,c11533706.xspfil,e,tp,mg,dg,Card.GetLevel,"Equal")
if xxg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11533706,0)) then
local tc=xxg:Select(tp,1,1,nil):GetFirst()
local mat=Group.CreateGroup()
......
......@@ -185,7 +185,7 @@ end
function c11533716.srfil(c,e,tp)
if not (c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return ft>0 and ((c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)) or (not c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c11533716.tdsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533716.srfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
......@@ -194,8 +194,14 @@ end
function c11533716.tdspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(c11533716.srfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) then
local tc=Duel.SelectMatchingCard(tp,c11533716.srfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c11533716.srfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc and tc:IsType(TYPE_RITUAL) then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
elseif tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c11533716.rckfil(c,e,tp)
......
......@@ -57,7 +57,7 @@ function c11533717.initial_effect(c)
c:RegisterEffect(e2)
end
function c11533717.filter(c,e,tp)
return c:IsSetCard(0x3a) and c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
return c:IsSetCard(0x3a) and ((c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)) or (not c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c11533717.ssptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(c11533717.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
......@@ -67,7 +67,14 @@ function c11533717.sspop(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,aux.NecroValleyFilter(c11533717.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
if tc and tc:IsType(TYPE_RITUAL) then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
elseif tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11533717.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -82,7 +82,7 @@ function c11560720.xyzcheck(g)
return g:GetClassCount(Card.GetRace)==g:GetCount() and g:GetClassCount(Card.GetAttribute)==g:GetCount()
end
function c11560720.ovfil(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsControler(1-tp)
return c:IsType(TYPE_MONSTER) and c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c11560720.ovcon(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c11560720.ovfil,nil,tp)
......
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.
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