Commit ef724b6e authored by POLYMER's avatar POLYMER

update 251110

parent 59fe38ab
...@@ -7128,6 +7128,9 @@ ...@@ -7128,6 +7128,9 @@
71688492 0 71688492 0
7419750 0 7419750 0
7473898 0 7473898 0
95004010 0
95004020 0
95019901 0
#limit #limit
33403513 1 33403513 1
82204250 0 82204250 0
......
No preview for this file type
No preview for this file type
expansions/pics/12866775.jpg

97.6 KB | W: | H:

expansions/pics/12866775.jpg

34 KB | W: | H:

expansions/pics/12866775.jpg
expansions/pics/12866775.jpg
expansions/pics/12866775.jpg
expansions/pics/12866775.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/12866890.jpg

35.2 KB | W: | H:

expansions/pics/12866890.jpg

35.2 KB | W: | H:

expansions/pics/12866890.jpg
expansions/pics/12866890.jpg
expansions/pics/12866890.jpg
expansions/pics/12866890.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66620025.jpg

58.9 KB | W: | H:

expansions/pics/66620025.jpg

59.1 KB | W: | H:

expansions/pics/66620025.jpg
expansions/pics/66620025.jpg
expansions/pics/66620025.jpg
expansions/pics/66620025.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66620220.jpg

55.2 KB | W: | H:

expansions/pics/66620220.jpg

55.4 KB | W: | H:

expansions/pics/66620220.jpg
expansions/pics/66620220.jpg
expansions/pics/66620220.jpg
expansions/pics/66620220.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66620230.jpg

60.3 KB | W: | H:

expansions/pics/66620230.jpg

61.2 KB | W: | H:

expansions/pics/66620230.jpg
expansions/pics/66620230.jpg
expansions/pics/66620230.jpg
expansions/pics/66620230.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66620510.jpg

56.1 KB | W: | H:

expansions/pics/66620510.jpg

56.4 KB | W: | H:

expansions/pics/66620510.jpg
expansions/pics/66620510.jpg
expansions/pics/66620510.jpg
expansions/pics/66620510.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66620513.jpg

54.9 KB | W: | H:

expansions/pics/66620513.jpg

55.9 KB | W: | H:

expansions/pics/66620513.jpg
expansions/pics/66620513.jpg
expansions/pics/66620513.jpg
expansions/pics/66620513.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66690240.jpg

67.2 KB | W: | H:

expansions/pics/66690240.jpg

283 KB | W: | H:

expansions/pics/66690240.jpg
expansions/pics/66690240.jpg
expansions/pics/66690240.jpg
expansions/pics/66690240.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/95016020.jpg

29.5 KB | W: | H:

expansions/pics/95016020.jpg

29.4 KB | W: | H:

expansions/pics/95016020.jpg
expansions/pics/95016020.jpg
expansions/pics/95016020.jpg
expansions/pics/95016020.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/95016030.jpg

28.1 KB | W: | H:

expansions/pics/95016030.jpg

27.9 KB | W: | H:

expansions/pics/95016030.jpg
expansions/pics/95016030.jpg
expansions/pics/95016030.jpg
expansions/pics/95016030.jpg
  • 2-up
  • Swipe
  • Onion skin
--黄泉津之巳剑
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--ritual summon
local e1=aux.AddRitualProcGreater2(c,s.filter,LOCATION_HAND+LOCATION_GRAVE,nil,aux.TRUE,true)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCondition(s.rscon)
c:RegisterEffect(e1)
--act
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetOperation(s.efop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(1190)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.filter(c,e,tp,chk)
return c:IsRace(RACE_REPTILE)
end
function s.rscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsMainPhase()
end
function s.efop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(s.actop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_REPTILE) then
Duel.SetChainLimit(s.chainlm)
end
end
function s.chainlm(e,rp,tp)
return tp==rp
end
function s.thfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x1c3) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if e:GetActivateLocation()==LOCATION_GRAVE then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsRelateToEffect(e)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and aux.NecroValleyFilter()(c)
and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
...@@ -109,7 +109,7 @@ function s.eqlimit(e,c) ...@@ -109,7 +109,7 @@ function s.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function s.negcon(e,tp,eg,ep,ev,re,r,rp) function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) return ep~=tp and Duel.IsChainDisablable(ev)
end end
function s.negfilter(c,g) function s.negfilter(c,g)
return c:IsFaceup() and g:IsContains(c) return c:IsFaceup() and g:IsContains(c)
...@@ -129,7 +129,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,7 +129,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and g:GetCount()>0 then if c:IsRelateToEffect(e) and g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.NegateActivation(ev) Duel.NegateEffect(ev)
end end
end end
end end
......
--咖啡店员 蕾塞
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12866670)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(1118)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,id)
e2:SetCondition(s.spcon)
e2:SetCost(s.spcost2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp)
local attr=c:GetAttribute()
return c:IsRace(RACE_FIEND) and not c:IsPublic() and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,attr)
end
function s.thfilter(c,attr)
return not c:IsSummonableCard() and c:IsRace(RACE_FIEND) and c:IsAttribute(attr)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
e:SetLabelObject(tc)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
Duel.BreakEffect()
local tc=e:GetLabelObject()
local attr=tc:GetAttribute()
if Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,attr)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_FIEND+RACE_WARRIOR)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable()
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.Release(c,REASON_COST)
end
function s.filter(c,e,tp,rc)
return c:IsCode(12866670) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
end
function s.sptg2(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_EXTRA)
end
function s.spop2(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,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:CompleteProcedure()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(s.descon)
e1:SetOperation(s.desop)
Duel.RegisterEffect(e1,tp)
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(id)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
\ No newline at end of file
--电次大人最棒!
local m=12866900
local cm=_G["c"..m]
if not Card.GetCardReigistered then
Card.GetCardReigistered = function ()
return {}
end
end
function cm.initial_effect(c)
aux.AddCodeList(c,12866605)
--public
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.hackfilter(e)
return (e:IsHasType(EFFECT_TYPE_TRIGGER_O) or e:IsHasType(EFFECT_TYPE_TRIGGER_F)) and e:IsHasType(EFFECT_TYPE_SINGLE) and e:GetCode()==EVENT_SPSUMMON_SUCCESS
end
function cm.tdcheck(c,e,tp,eg,ep,ev,re,r,rp,chk)
if c:IsSummonableCard() or c:IsAttribute(ATTRIBUTE_LIGHT) or not c:IsRace(RACE_FIEND) or not c:IsAbleToDeckOrExtraAsCost() then return false end
local tab={c:GetCardRegistered(cm.hackfilter,0xf)}
for _,ge in ipairs(tab) do
local target=ge:GetTarget()
if not target or target(e,tp,eg,ep,ev,re,r,rp,0) then
return true
end
end
return false
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdcheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdcheck,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local tc=g:GetFirst()
e:SetLabelObject(tc)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() end
local tc=e:GetLabelObject()
local tab={tc:GetCardRegistered(cm.hackfilter,0xf)}
local resolve_tab = {}
local resolve_tab_desc = {}
for _,ge in ipairs(tab) do
local target=ge:GetTarget()
if target(e,tp,eg,ep,ev,re,r,rp,0) then
local desc=ge:GetDescription() or aux.Stringid(m,3)
table.insert(resolve_tab_desc, desc)
table.insert(resolve_tab, ge)
end
end
local op=Duel.SelectOption(tp,table.unpack(resolve_tab_desc))+1
local te=resolve_tab[op]
local target=te:GetTarget()
if target then target(e,tp,eg,ep,ev,re,r,rp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
if tc:IsCode(12866605) then
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_CAN_FORBIDDEN|te:GetProperty())
else
e:SetProperty(te:GetProperty())
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
_relate=Card.IsRelateToEffect
function Card.IsRelateToEffect(card,effect)
if effect==te then
return _relate(card,e)
else
return _relate(card,effect)
end
end
if op then op(te,tp,eg,ep,ev,re,r,rp) end
Card.IsRelateToEffect=_relate
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.thfilter(c)
return c:IsSetCard(0x9a7c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
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:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if g:GetFirst():IsLocation(LOCATION_HAND) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil)
end
end
end
\ No newline at end of file
local m=15005462
local cm=_G["c"..m]
cm.name="炽烈的还魂诗"
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.atktg)
e1:SetCondition(cm.atkcon)
e1:SetValue(aux.TargetBoolFunction(Card.GetBaseDefense))
c:RegisterEffect(e1)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then
tc:RegisterFlagEffect(m,RESET_EVENT+0x1f20000+RESET_PHASE+PHASE_END,0,1)
elseif tc:IsLocation(LOCATION_EXTRA) then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
tc=eg:GetNext()
end
end
function cm.atktg(e,c)
return c:IsFaceup() and Duel.GetAttacker()==c
end
function cm.atkcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()~=nil
end
function cm.spfilter1(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:GetFlagEffect(m)~=0
and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c:GetCode(),e,tp)
end
function cm.spfilter2(c,code,e,tp)
return c:IsCode(code) and c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,0x70,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,0x70,0,nil,e,tp)
local sg=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
local ssg=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,tc:GetCode(),e,tp)
if (not sg:IsExists(Card.IsCode,1,nil,tc:GetCode())) and #ssg>0 then
sg:Merge(ssg)
end
tc=g:GetNext()
end
if #sg<=0 then return end
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),sg:GetClassCount(Card.GetCode))
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=sg:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if spg then
local ct=Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
if ct>0 then Duel.Damage(tp,ct*800,REASON_EFFECT) end
end
end
\ No newline at end of file
local m=15006127
local cm=_G["c"..m]
cm.name="『神秘』的谜梦-长夜月"
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_DARK),3,3)
c:EnableReviveLimit()
--cannot link material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--DiscardHand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.diccon)
e1:SetCost(cm.diccost)
e1:SetTarget(cm.dictg)
e1:SetOperation(cm.dicop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOKEN+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.tkcon)
e2:SetTarget(cm.tktg)
e2:SetOperation(cm.tkop)
c:RegisterEffect(e2)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(cm.dkcon)
e4:SetTarget(cm.dktg)
e4:SetOperation(cm.dkop)
c:RegisterEffect(e4)
end
function cm.diccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.diccost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,7)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==7 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function cm.dictg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=Duel.GetTurnPlayer()
if chk==0 then return Duel.GetFieldGroupCount(p,LOCATION_HAND,0)>0 end
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,p,1)
end
function cm.dicop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
local sg=g:Select(p,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
function cm.sfilter(c)
return c:IsCode(15006130) and c:IsFaceup()
end
function cm.tkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateMonsterFilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,15006130,nil,TYPES_TOKEN_MONSTER,2000,2000,7,RACE_PSYCHO,ATTRIBUTE_WATER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,15006130,nil,TYPES_TOKEN_MONSTER,2000,2000,7,RACE_PSYCHO,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,15006130)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
token:SetCardTarget(tc)
tc:CreateRelation(token,RESET_EVENT+RESETS_STANDARD)
--local e1=Effect.CreateEffect(token)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetCode(EFFECT_DISABLE)
--e1:SetCondition(cm.rcon)
--e1:SetReset(RESET_EVENT+RESETS_STANDARD)
--tc:RegisterEffect(e1)
--if tc:IsType(TYPE_TRAPMONSTER) then
-- local e2=e1:Clone()
-- e2:SetCode(EFFECT_DISABLE_TRAPMONSTER)
-- tc:RegisterEffect(e2)
--end
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e3=Effect.CreateEffect(token)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetCondition(cm.rcon)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(token)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetValue(RESET_TURN_SET)
e4:SetCondition(cm.rcon)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
if tc:IsType(TYPE_TRAPMONSTER) then
local e5=Effect.CreateEffect(token)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e5:SetCondition(cm.rcon)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5)
end
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_ADJUST)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cm.tokendescon)
e6:SetOperation(cm.tokendesop)
e6:SetLabelObject(tc)
e6:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e6,true)
end
Duel.SpecialSummonComplete()
end
end
end
function cm.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function cm.tokendescon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetLabelObject():IsRelateToCard(e:GetHandler())
end
function cm.tokendesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
function cm.dkfilter(c)
return c:IsFacedown()
end
function cm.dkcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.dkfilter,1,nil)
end
function cm.dktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.dkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--惊乐园的迎接人 <G双子>
local s,id=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
c:SetSPSummonOnce(id)
--extra material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(s.mattg)
e1:SetValue(s.matval)
c:RegisterEffect(e1)
--activated in hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15c))
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DECKDES+CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.lcheck(g)
return g:IsExists(Card.IsSetCard,1,nil,0x15b)
end
function s.eqfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0x15c)
end
function s.mattg(e,c)
local g=c:GetEquipGroup()
return g and g:IsExists(s.eqfilter,1,nil,tp)
end
function s.exmatcheck(c,lc,tp)
if not c:IsControler(1-tp) then return false end
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
local related,valid=f(te,lc,nil,c,tp)
if related and not te:GetHandler():IsCode(id) then return false end
end
return true
end
function s.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or not mg:IsExists(s.exmatcheck,1,nil,lc,tp)
end
function s.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local dg=Duel.GetDecktopGroup(tp,ct)
if chk==0 then return ct>0 and dg:FilterCount(Card.IsAbleToGrave,nil,tp)==ct
and dg:FilterCount(Card.IsAbleToDeck,nil)==ct end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function s.thfilter(c)
if not (c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand()) or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
return (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x15b)) or (c:IsType(TYPE_TRAP) and c:IsSetCard(0x15c))
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if not Duel.DiscardDeck(p,ct,REASON_EFFECT)==ct then return end
local g=Duel.GetOperatedGroup()
local sg=g:Filter(s.thfilter,nil)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=sg:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--凶导之破弃
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(s.target)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_TRIGGER)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,id)
e4:SetCost(s.thcost)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,id)
e4:SetCost(s.spcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
--act in set turn
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,0))
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e6:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e6:SetCondition(s.actcon)
c:RegisterEffect(e6)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SSET)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re or not re:GetHandler():IsSetCard(0x145) then return end
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function s.actfilter(c)
return c:IsFaceup() and c:IsAttackAbove(2500) and c:IsSummonLocation(LOCATION_EXTRA)
end
function s.actcon(e)
return e:GetHandler():GetFlagEffect(id)>0 or Duel.IsExistingMatchingCard(s.actfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function s.target(e,c)
local ct=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_EXTRA,0)
return c:IsLevelAbove(1) and c:IsLevelAbove(ct)
end
function s.cfilter(c,tp)
return (c:IsFaceup() or c:IsControler(tp)) and c:IsSetCard(0x145)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function s.thfilter(c,code)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x145) and not c:IsCode(code) and c:IsAbleToHand()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,tp) end
local rg=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,false,nil,nil,tp)
e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.rfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x145) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),c:GetAttack(),c:GetDefense())
end
function s.spfilter(c,e,tp,code,atk,def)
return c:IsSetCard(0x145) and c:IsAttack(atk) and c:IsDefense(def) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.rfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=Duel.SelectReleaseGroup(tp,s.rfilter,1,1,nil,e,tp):GetFirst()
e:SetLabel(tc:GetCode(),tc:GetAttack(),tc:GetDefense())
Duel.Release(tc,REASON_COST)
end
function s.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_DECK)
end
function s.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,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--幻透翼历战龙
local s,id=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
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(s.hspcon)
e2:SetTarget(s.hsptg)
e2:SetOperation(s.hspop)
c:RegisterEffect(e2)
--Negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.negcon)
e3:SetOperation(s.negop)
c:RegisterEffect(e3)
--Special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(0)
if a then
a:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1)
end
if d then
d:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1)
end
end
function s.hspfilter(c,tp,sc)
return c:IsSetCard(0xff) and c:GetFlagEffect(id)>0
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
end
function s.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),s.hspfilter,1,REASON_SPSUMMON,false,nil,c:GetControler(),c)
end
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(s.hspfilter,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
c:SetMaterial(Group.FromCards(tc))
Duel.Release(tc,REASON_SPSUMMON)
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():GetFlagEffect(id+1)>0 or Duel.GetFlagEffect(tp,id+1)>0 then return false end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(c) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.RegisterFlagEffect(tp+1,id,RESET_PHASE|PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4))
Duel.Hint(HINT_CARD,0,id)
if Duel.NegateEffect(ev) then
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
end
function s.spfilter(c,e,tp)
if not (c:IsSetCard(0xff) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end
if c:IsLocation(LOCATION_DECK) then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() then
return Duel.GetLocationCountFromEx(tp,tp,nil,c)
end
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--旋风的俯冲斩击
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--Search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
s.code_list0={}
s.code_list1={}
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetCondition(s.resetop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAINING)
ge2:SetCondition(s.chainop)
Duel.RegisterEffect(ge2,0)
end
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
s.code_list0={}
s.code_list1={}
return false
end
function s.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rp==0 then
table.insert(s.code_list0,rc:GetCode())
else
table.insert(s.code_list1,rc:GetCode())
end
end
function s.filter(c,tp)
if not (c:IsFaceup() and c:IsSetCard(0xff)) then return false end
if tp==0 then
return not c:IsCode(0,table.unpack(s.code_list0))
else
return not c:IsCode(0,table.unpack(s.code_list1))
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
--不好意思 插个队(
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE|PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,0,0)
end
function s.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=e:GetLabelObject()
local g=Duel.GetTargetsRelateToChain()
local tc=g:GetFirst()
if tc==dc then tc=g:GetNext() end
if dc:IsRelateToEffect(e) and dc:IsFaceup() and dc:IsCanBeDisabledByEffect(e) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e2)
if dc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e3)
end
Duel.AdjustInstantly()
Duel.NegateRelatedChain(dc,RESET_TURN_SET)
if Duel.Destroy(dc,REASON_EFFECT)>0 and tc and tc:IsFaceup() and tc:IsControler(tp) then
local atk=dc:GetBaseAttack()
Duel.BreakEffect()
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e4:SetValue(atk)
tc:RegisterEffect(e4)
end
end
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function s.thfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
--DDD 龙霸王 终结潘德拉刚
local s,id=GetID()
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ZOMBIE),2,4)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(s.val)
c:RegisterEffect(e2)
end
function s.getlrl(c)
if c:IsLevelAbove(1) then
return c:GetLevel()
elseif c:IsRankAbove(1) then
return c:GetRank()
elseif c:IsLinkAbove(1) then
return c:GetLink()
end
return NULL_VALUE
end
function s.GetScale(c)
if not c:IsType(TYPE_PENDULUM) then return NULL_VALUE end
local sc=NULL_VALUE
if c:IsLocation(LOCATION_PZONE) then
local seq=c:GetSequence()
if seq==0
or seq==6
then sc=c:GetLeftScale() else sc=c:GetRightScale() end
else
sc=c:GetLeftScale()
end
return sc
end
function s.GetScaleDiff(g)
if not #g==2 then return NULL_VALUE end
local tc1=g:GetFirst()
local tc2=g:GetNext()
if tc1 and tc2 then
local sc1,sc2=s.GetScale(tc1),s.GetScale(tc2)
return math.abs(sc1-sc2)
end
return NULL_VALUE
end
function s.thfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function s.thselect(g,diff)
return g and s.GetScaleDiff(g)<=diff
end
function s.cfilter(c,tp)
local diff=s.getlrl(c)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil)
return c:IsFaceup() and diff>0 and g:CheckSubGroup(s.thselect,2,2,diff)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return s.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.cfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK|LOCATION_EXTRA)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local diff=s.getlrl(tc)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil)
if Duel.Destroy(tc,REASON_EFFECT)>0 and diff>0 and g:CheckSubGroup(s.thselect,2,2,diff) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:SelectSubGroup(tp,s.thselect,false,2,2,diff)
if #tg==2 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
end
function s.val(e,c)
local g=Duel.GetFieldGroup(c:GetControler(),LOCATION_PZONE,0)
return g:GetSum(s.GetScale)*100
end
\ No newline at end of file
--OTK
local s,id=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,10000010)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Increase ATK
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(s.atkcost)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
end
function s.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsRace(RACE_DIVINE)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
--match kill
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetDescription(aux.Stringid(id,0))
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT)
e4:SetCode(EFFECT_MATCH_KILL)
e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
Duel.SpecialSummonComplete()
end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100,0)
local lp=Duel.GetLP(tp)
if chk==0 then return Duel.CheckLPCost(tp,lp-100,true) and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
e:SetLabel(100,lp-100)
Duel.PayLPCost(tp,lp-100,true)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsCode(10000010) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local label,atk=e:GetLabel()
if chk==0 then
e:SetLabel(0,0)
if label~=100 then return false end
return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil)
end
e:SetLabel(0,0)
Duel.SetTargetParam(atk)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--巨神龙骑士 闪耀
local s,id=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,1639384)
--xyz summon
aux.AddXyzProcedure(c,s.mfilter,8,2,s.ovfilter,aux.Stringid(id,0),99,s.xyzop)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.imcon)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(s.imcon)
e2:SetValue(s.indval)
c:RegisterEffect(e2)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_TODECK)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(s.cost)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.mfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsCode(1639384)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,is)==0 and Duel.IsPhase(PHASE_MAIN2) end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsLevel(7,8)
end
function s.imcon(e)
return Duel.IsExistingMatchingCard(s.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil)
end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function s.indval(e,c)
return not c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function s.tdfilter(c)
return c:IsFaceup() and not c:IsRace(RACE_DRAGON+RACE_WARRIOR) and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--神龙之预言者
local s,id=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,69868555)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCondition(s.condition)
e1:SetValue(0x1)
c:RegisterEffect(e1)
--decrease
local e2=e1:Clone()
e2:SetCode(EFFECT_DECREASE_TRIBUTE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.rfilter)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.cost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function s.condition(e)
return e:GetHandler():GetOverlayCount()>0
end
function s.rfilter(e,c)
return c:IsRace(RACE_DRAGON)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsCode(69868555)
end
function s.thfilter(c)
return c:IsLevel(7,8) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
if not tc:IsLocation(LOCATION_MZONE) then return end
if Duel.IsExistingMatchingCard(s.cfilter,0,0x1c,0x1c,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--装弹枪管强袭纵火龙
local s,id=GetID()
function s.initial_effect(c)
--summon with 1 tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.otcon)
e0:SetOperation(s.otop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,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:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) end)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--Tribute check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(s.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--Special Summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_DESTROYED)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.otfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.otcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(s.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function s.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(s.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x10f,0x102) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if chk==0 then return #g>0 end
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
Duel.SetChainLimit(s.chainlm)
end
function s.chainlm(e,rp,tp)
return tp==rp
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if e:GetLabel()==1 then
Duel.Destroy(g,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.tcfilter(c,e,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(1-tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT)
and c:IsCanBeEffectTarget(e) and not c:IsType(TYPE_TOKEN)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetAttack())
end
function s.spfilter(c,e,tp,atk)
return c:IsSetCard(0x102) and c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and s.tcfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(s.tcfilter,1,nil,e,tp) end
local g=eg:Filter(s.tcfilter,nil,e,tp)
local _,atk=g:GetMaxGroup(Card.GetAttack)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,atk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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