Commit 35527d53 authored by REIKAI's avatar REIKAI 💬

update pic and lua

parent 15ec5f3d
expansions/pics/33330400.jpg

91.3 KB | W: | H:

expansions/pics/33330400.jpg

60.7 KB | W: | H:

expansions/pics/33330400.jpg
expansions/pics/33330400.jpg
expansions/pics/33330400.jpg
expansions/pics/33330400.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330401.jpg

42.3 KB | W: | H:

expansions/pics/33330401.jpg

89.3 KB | W: | H:

expansions/pics/33330401.jpg
expansions/pics/33330401.jpg
expansions/pics/33330401.jpg
expansions/pics/33330401.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330402.jpg

37.3 KB | W: | H:

expansions/pics/33330402.jpg

81.9 KB | W: | H:

expansions/pics/33330402.jpg
expansions/pics/33330402.jpg
expansions/pics/33330402.jpg
expansions/pics/33330402.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330403.jpg

37.7 KB | W: | H:

expansions/pics/33330403.jpg

81 KB | W: | H:

expansions/pics/33330403.jpg
expansions/pics/33330403.jpg
expansions/pics/33330403.jpg
expansions/pics/33330403.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330404.jpg

38.2 KB | W: | H:

expansions/pics/33330404.jpg

80.4 KB | W: | H:

expansions/pics/33330404.jpg
expansions/pics/33330404.jpg
expansions/pics/33330404.jpg
expansions/pics/33330404.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330405.jpg

36.7 KB | W: | H:

expansions/pics/33330405.jpg

78.1 KB | W: | H:

expansions/pics/33330405.jpg
expansions/pics/33330405.jpg
expansions/pics/33330405.jpg
expansions/pics/33330405.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330406.jpg

38.4 KB | W: | H:

expansions/pics/33330406.jpg

80.9 KB | W: | H:

expansions/pics/33330406.jpg
expansions/pics/33330406.jpg
expansions/pics/33330406.jpg
expansions/pics/33330406.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330407.jpg

39.8 KB | W: | H:

expansions/pics/33330407.jpg

84.2 KB | W: | H:

expansions/pics/33330407.jpg
expansions/pics/33330407.jpg
expansions/pics/33330407.jpg
expansions/pics/33330407.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330408.jpg

38.1 KB | W: | H:

expansions/pics/33330408.jpg

79.7 KB | W: | H:

expansions/pics/33330408.jpg
expansions/pics/33330408.jpg
expansions/pics/33330408.jpg
expansions/pics/33330408.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330409.jpg

40.7 KB | W: | H:

expansions/pics/33330409.jpg

86.2 KB | W: | H:

expansions/pics/33330409.jpg
expansions/pics/33330409.jpg
expansions/pics/33330409.jpg
expansions/pics/33330409.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330410.jpg

45.2 KB | W: | H:

expansions/pics/33330410.jpg

94.4 KB | W: | H:

expansions/pics/33330410.jpg
expansions/pics/33330410.jpg
expansions/pics/33330410.jpg
expansions/pics/33330410.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330411.jpg

38.9 KB | W: | H:

expansions/pics/33330411.jpg

80.5 KB | W: | H:

expansions/pics/33330411.jpg
expansions/pics/33330411.jpg
expansions/pics/33330411.jpg
expansions/pics/33330411.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330412.jpg

41.4 KB | W: | H:

expansions/pics/33330412.jpg

91.9 KB | W: | H:

expansions/pics/33330412.jpg
expansions/pics/33330412.jpg
expansions/pics/33330412.jpg
expansions/pics/33330412.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330413.jpg

14.8 KB | W: | H:

expansions/pics/33330413.jpg

48.5 KB | W: | H:

expansions/pics/33330413.jpg
expansions/pics/33330413.jpg
expansions/pics/33330413.jpg
expansions/pics/33330413.jpg
  • 2-up
  • Swipe
  • Onion skin
--天灾领域
local m=12001500
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(m)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.spfilter(c)
return c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,REASON_EFFECT)
end
end
--天外之灾 骨骸鱼
local m=12001501
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),2,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天外之灾 浮游蛇
local m=12001502
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),3,LOCATION_DECK)
end
end
end
end
end
\ No newline at end of file
--天外之灾 赤衣虿
local m=12001503
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),4,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天外之灾 白丝蛭
local m=12001504
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_REMOVED)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),2,LOCATION_REMOVED)
end
end
end
end
\ No newline at end of file
--天灾少女 零
local m=12001508
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,68468459)
--special summon self
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.sspcon)
c:RegisterEffect(e1)
--special summon other monsters
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.spcon)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.sspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
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.spfilter(c,e,tp)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thfilter(c)
return c:IsCode(12001500) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,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
--天外之灾龙 终结
local m=12001510
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.sprcon)
e1:SetTarget(cm.sprtg)
e1:SetOperation(cm.sprop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.sprfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeckAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and g:GetClassCount(Card.GetAttribute)==#g and g:GetClassCount(Card.GetRace)==#g
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
return rg:CheckSubGroup(cm.fselect,3,3,tp)
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=rg:SelectSubGroup(tp,cm.fselect,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_COST)
g:DeleteGroup()
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.filter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
end
function cm.searchfilter(c)
return c:IsSetCard(0x6fb9) and c:IsAbleToHand() and c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.searchfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function cm.dfilter(c,att)
return c:IsAttribute(att) and c:IsFaceup()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.searchfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local att=g:GetFirst():GetAttribute()
local mg=Duel.GetMatchingGroup(cm.dfilter,tp,0,LOCATION_MZONE,nil,att)
if #mg>0 then
if Duel.Destroy(mg,REASON_EFFECT)==0 then Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) end
else
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--天外之灾龙 降临
local m=12001511
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.sprcon)
e1:SetTarget(cm.sprtg)
e1:SetOperation(cm.sprop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001510,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.sprfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeckAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and g:GetClassCount(Card.GetAttribute)==#g and g:GetClassCount(Card.GetRace)==#g
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
return rg:CheckSubGroup(cm.fselect,3,3,tp)
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=rg:SelectSubGroup(tp,cm.fselect,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_COST)
g:DeleteGroup()
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.filter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.rfilter(c,att)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and c:IsAttribute(att)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local att=re:GetHandler():GetAttribute()
if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_DECK,0,1,nil,att) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local att=re:GetHandler():GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_DECK,0,1,1,nil,att)
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_DECK)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,att))
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
--天外之灾神 混沌的零形
local m=12001515
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x6fb9),3,true)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.desreptg)
e2:SetValue(cm.desrepval)
e2:SetOperation(cm.desrepop)
c:RegisterEffect(e2)
end
function cm.sprfilter1(c,sc,tp)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.IsExistingMatchingCard(cm.sprfilter2,tp,LOCATION_MZONE,0,1,nil,tp,sc,c)
end
function cm.sprfilter2(c,tp,sc,tc)
return c:IsSetCard(0x6fb9) and c:IsLevel(11) and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and c:GetRace()~=tc:GetRace() and c:GetAttribute()~=tc:GetAttribute()
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.sprfilter1,tp,LOCATION_HAND,0,1,nil,c,tp)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.sprfilter1,tp,LOCATION_HAND,0,1,1,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.sprfilter2,tp,LOCATION_MZONE,0,1,1,nil,tp,c,g1:GetFirst())
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.filter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) 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)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
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)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local att=g:GetFirst();GetAttribute()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetTarget(function()
return c:IsAttribute(att)
end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,2,nil) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.desrepval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_CARD,0,m)
end
--天灾蠢动
local m=12001520
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsPlayerCanRemove(tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or not Duel.IsPlayerCanRemove(tp) then return end
local g=Duel.GetDecktopGroup(tp,1)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and g:GetFirst():IsType(TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp,g)
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),3,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天灾接触
local m=12001521
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,Group.FromCards(c))
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),3,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天灾融合
local m=12001522
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=1
end
function cm.filter0(c)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.filter1(c,e)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function cm.gcheck(sg)
return sg:GetClassCount(Card.GetRace)==#sg and sg:GetClassCount(Card.GetAttribute)==#sg
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_THUNDER+RACE_AQUA+RACE_ROCK+RACE_PYRO) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
Auxiliary.GCheckAdditional=cm.gcheck
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
Auxiliary.GCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter1),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
Auxiliary.GCheckAdditional=cm.gcheck
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
Auxiliary.GCheckAdditional=nil
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
......@@ -56,12 +56,6 @@ function c12005012.matfilter(c)
return c:IsSetCard(0xfb0) and c:IsReleasable() and c:IsFaceup()
end
function c12005012.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetTargetRange(0,LOCATION_DECK)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -3,7 +3,7 @@ function c12013001.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12013001,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,12013001)
......@@ -28,19 +28,20 @@ function c12013001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c12013001.filter(c)
return c:IsSetCard(0xfb6) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c12013001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12013001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c12013001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12013001.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local ct=Duel.Draw(p,d,REASON_EFFECT)
if ct~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c12013001.reccon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -91,7 +91,7 @@ end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.retreg(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -59,7 +59,7 @@ function cm.remop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.thfilter(c)
return c:IsAbleToHand()
return c:IsAbleToHand() and c:IsSetCard(0x6fa6)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
......
......@@ -37,10 +37,20 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end
unction cm.splimit(e,c)
return not c:IsAttackBelow(1500)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsCanTurnSet()
end
......
......@@ -40,7 +40,7 @@ function c12030008.initial_effect(c)
end
function c12030008.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ( Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil) or Duel.GetTurnPlayer()==tp ) and re:GetHandler():GetLocation()==LOCATION_GRAVE
return ( Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil) or Duel.GetTurnPlayer()==tp ) and re:GetHandler():GetLocation()==LOCATION_GRAVE and Duel.GetCurrentChain()>=3
end
function c12030008.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -25,12 +25,12 @@ function c12037000.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_TO_HAND)
e3:SetCode(EFFECT_CANNOT_DRAW)
e3:SetTargetRange(1,1)
e3:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c12037000.con3)
c:RegisterEffect(e3)
--
end
--
......
......@@ -39,6 +39,17 @@ function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,63,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE) and not tc:IsSetCard(0x1fb5) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
tc=g:GetNext()
end
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
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