Commit 57c19a56 authored by Nemo Ma's avatar Nemo Ma

240728 upd

parent 6dbe9931
No preview for this file type
expansions/pics/11451672.jpg

106 KB | W: | H:

expansions/pics/11451672.jpg

32.9 KB | W: | H:

expansions/pics/11451672.jpg
expansions/pics/11451672.jpg
expansions/pics/11451672.jpg
expansions/pics/11451672.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451673.jpg

119 KB | W: | H:

expansions/pics/11451673.jpg

35.1 KB | W: | H:

expansions/pics/11451673.jpg
expansions/pics/11451673.jpg
expansions/pics/11451673.jpg
expansions/pics/11451673.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451674.jpg

117 KB | W: | H:

expansions/pics/11451674.jpg

35.1 KB | W: | H:

expansions/pics/11451674.jpg
expansions/pics/11451674.jpg
expansions/pics/11451674.jpg
expansions/pics/11451674.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451675.jpg

113 KB | W: | H:

expansions/pics/11451675.jpg

34.3 KB | W: | H:

expansions/pics/11451675.jpg
expansions/pics/11451675.jpg
expansions/pics/11451675.jpg
expansions/pics/11451675.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451676.jpg

118 KB | W: | H:

expansions/pics/11451676.jpg

36.1 KB | W: | H:

expansions/pics/11451676.jpg
expansions/pics/11451676.jpg
expansions/pics/11451676.jpg
expansions/pics/11451676.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451677.jpg

114 KB | W: | H:

expansions/pics/11451677.jpg

35.1 KB | W: | H:

expansions/pics/11451677.jpg
expansions/pics/11451677.jpg
expansions/pics/11451677.jpg
expansions/pics/11451677.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010879.jpg

172 KB | W: | H:

expansions/pics/40010879.jpg

12.7 KB | W: | H:

expansions/pics/40010879.jpg
expansions/pics/40010879.jpg
expansions/pics/40010879.jpg
expansions/pics/40010879.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40011177.jpg

48.8 KB | W: | H:

expansions/pics/40011177.jpg

17.2 KB | W: | H:

expansions/pics/40011177.jpg
expansions/pics/40011177.jpg
expansions/pics/40011177.jpg
expansions/pics/40011177.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40011179.jpg

47.9 KB | W: | H:

expansions/pics/40011179.jpg

16.3 KB | W: | H:

expansions/pics/40011179.jpg
expansions/pics/40011179.jpg
expansions/pics/40011179.jpg
expansions/pics/40011179.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40011181.jpg

190 KB | W: | H:

expansions/pics/40011181.jpg

15 KB | W: | H:

expansions/pics/40011181.jpg
expansions/pics/40011181.jpg
expansions/pics/40011181.jpg
expansions/pics/40011181.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40011183.jpg

51.2 KB | W: | H:

expansions/pics/40011183.jpg

18 KB | W: | H:

expansions/pics/40011183.jpg
expansions/pics/40011183.jpg
expansions/pics/40011183.jpg
expansions/pics/40011183.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40011185.jpg

49 KB | W: | H:

expansions/pics/40011185.jpg

17.6 KB | W: | H:

expansions/pics/40011185.jpg
expansions/pics/40011185.jpg
expansions/pics/40011185.jpg
expansions/pics/40011185.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40011187.jpg

43.6 KB | W: | H:

expansions/pics/40011187.jpg

14.9 KB | W: | H:

expansions/pics/40011187.jpg
expansions/pics/40011187.jpg
expansions/pics/40011187.jpg
expansions/pics/40011187.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMING_ATTACK,0x11e0)
e3:SetCountLimit(1,m-40)
e3:SetCondition(function(e,tp) return Duel.GetTurnPlayer()==tp end)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
......@@ -170,7 +171,7 @@ function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,0,nil)
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,nil)
local sg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil,e,tp)
local tg=Group.CreateGroup()
for sc in aux.Next(sg) do
......@@ -181,12 +182,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
return false
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,PLAYER_ALL,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.filter22,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,0,nil,e)
local mg=Duel.GetMatchingGroup(cm.filter22,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,nil,e)
local sg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil,e,tp)
local tg=Group.CreateGroup()
for sc in aux.Next(sg) do
......
......@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMING_ATTACK,0x11e0)
e3:SetCountLimit(1,m-40)
e3:SetCondition(function(e,tp) return Duel.GetTurnPlayer()==tp end)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
......@@ -151,7 +152,7 @@ function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,0,nil)
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,nil)
local sg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil,e,tp)
local tg=Group.CreateGroup()
for sc in aux.Next(sg) do
......@@ -162,12 +163,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
return false
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,PLAYER_ALL,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.filter22,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,0,nil,e)
local mg=Duel.GetMatchingGroup(cm.filter22,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,nil,e)
local sg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil,e,tp)
local tg=Group.CreateGroup()
for sc in aux.Next(sg) do
......
......@@ -5,18 +5,18 @@ function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.thcost)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
......@@ -32,7 +32,7 @@ function cm.initial_effect(c)
end
end
function cm.geop(e,tp,eg,ep,ev,re,r,rp)
for _,code in ipairs{11451578,11451579,11451580} do
for _,code in ipairs{11451578,11451579,11451580,11451610} do
if not _G["c"..code] then Duel.CreateToken(0,code) end
end
e:Reset()
......@@ -59,7 +59,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.filter(c)
for _,code in ipairs{11451578,11451579,11451580,11451610} do
if _G["c"..code].card_code_list[c:GetCode()] then return c:IsAbleToHand() end
if _G["c"..code].card_code_list and _G["c"..code].card_code_list[c:GetCode()] then return c:IsAbleToHand() end
end
return false
end
......
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--c:RegisterEffect(e0)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
......
--云魔物-巨大喷流
local m=11451697
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
......@@ -116,12 +115,12 @@ function cm.spfilter(c,e,tp)
return c:IsSetCard(0x18) 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.IsCanRemoveCounter(tp,1,0,0x1019,1,REASON_EFFECT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.RemoveCounter(tp,1,0,0x1019,1,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 then
if Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--血雳强袭·玉响舞散
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e5=e1:Clone()
e5:SetDescription(aux.Stringid(m,0))
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e5)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ACTIVATE_COST)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetTarget(cm.actarget)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
--immune
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
--e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(cm.efilter)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE)
e6:SetOperation(cm.eop)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(cm.eftg)
e5:SetLabelObject(e6)
c:RegisterEffect(e5)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_CHAIN_SOLVING)
e9:SetRange(LOCATION_MZONE)
e9:SetOperation(cm.desop)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e7:SetTarget(cm.eftg)
e7:SetLabelObject(e9)
c:RegisterEffect(e7)
--become effect
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_ADD_TYPE)
e8:SetValue(TYPE_EFFECT)
e8:SetRange(LOCATION_SZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(cm.eftg)
c:RegisterEffect(e8)
if not cm.global_check then
cm.global_check=true
cm.activate_sequence={}
--hint
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_ADJUST)
ge0:SetOperation(cm.adop)
Duel.RegisterEffect(ge0,0)
local _GetActivateLocation=Effect.GetActivateLocation
local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
end
function Duel.NegateActivation(ev)
local re=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT)
local res=_NegateActivation(ev)
if res and aux.GetValueType(re)=="Effect" then
local rc=re:GetHandler()
if rc and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) and re:GetDescription()==aux.Stringid(m,0) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
return res
end
end
end
function cm.actarget(e,te,tp)
e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler()
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
cm.activate_sequence[te]=c:GetSequence()
c:CreateEffectRelation(te)
local ev0=Duel.GetCurrentChain()+1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return ft>0 or c:IsLocation(LOCATION_SZONE) end
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(cm.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function cm.eftg(e,c)
return e:GetHandler():GetEquipTarget() and c:GetSequence()<5 and math.abs(aux.GetColumn(c)-aux.GetColumn(e:GetHandler()))==1
end
function cm.cfilter(c)
return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP) and c:IsAbleToDeck()
end
function cm.dfilter(c,tp)
return c:IsRace(RACE_PYRO) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,0,nil)
local lg2=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_DECK,0,nil,tp)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(function(c) return c:IsCode(m) and c:IsFaceup() end,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return false end
return #lg>0 and #lg2>0
end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g==0 then return end
local tc=g:GetFirst():GetEquipTarget()
if Duel.SendtoDeck(g,nil,2,REASON_COST)>0 and c:IsRelateToEffect(e) and c:IsLocation(LOCATION_SZONE) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,cm.dfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local ec=sg:GetFirst()
if ec then
Duel.Equip(tp,c,tc,true,true)
Duel.Equip(tp,ec,tc,true,true)
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(cm.eqlimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
ec:RegisterEffect(e2)
Duel.EquipComplete()
end
end
end
function cm.eqlimit(e,c)
return e:GetLabelObject()==c
end
function cm.efilter(e,te)
if te:IsActivated() then
local ct=Duel.GetCurrentChain()
local c=e:GetHandler()
local eset={c:IsHasEffect(EFFECT_FLAG_EFFECT+m)}
if #eset==0 then return true end
local flag=eset[1]
local tab=cm[flag]
return not tab[ct] or tab[ct]~=e:GetHandler():GetSequence()
end
return false
end
function cm.eop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
local c=e:GetHandler()
local eset={c:IsHasEffect(EFFECT_FLAG_EFFECT+m)}
if #eset==0 then c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end
eset={c:IsHasEffect(EFFECT_FLAG_EFFECT+m)}
local flag=eset[1]
cm[flag]=cm[flag] or {}
local tab=cm[flag]
tab[ct]=e:GetHandler():GetSequence()
end
function cm.imfilter(c)
local eset={c:IsHasEffect(EFFECT_IMMUNE_EFFECT)}
for _,te in pairs(eset) do
if te:GetValue()==cm.efilter then return true end
end
return false
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ig=g:Filter(cm.imfilter,nil)
g:Sub(ig)
g:ForEach(Card.ResetFlagEffect,m+1)
ig:ForEach(Card.RegisterFlagEffect,m+1,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local bool=false
local ct=Duel.GetCurrentChain()
local c=e:GetHandler()
local eset={c:IsHasEffect(EFFECT_FLAG_EFFECT+m)}
if #eset==0 then
bool=true
else
local flag=eset[1]
local tab=cm[flag]
if not tab[ct] or tab[ct]~=e:GetHandler():GetSequence() then bool=true end
end
if bool then
Duel.Hint(HINT_CARD,0,m)
Duel.Destroy(c:GetColumnGroup():Filter(Card.IsControler,nil,1-c:GetControler()),REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
--e2:SetCountLimit(1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
......@@ -53,7 +53,7 @@ function cm.filter(c,ec)
return (c:GetType()&TYPE_QUICKPLAY>0 or c:GetType()==TYPE_TRAP) and not c:IsReason(REASON_RETURN) and cm.fieldid(c)<cm.fieldid(ec)
end
function cm.filter2(c,ec,sc)
return cm.filter(c,ec) and cm.fieldid(c)==cm.fieldid(sc) and c:IsAbleToRemoveAsCost() and ((c:GetType()&TYPE_QUICKPLAY>0 and c:CheckActivateEffect(true,true,false)~=nil) or (c:GetType()==TYPE_TRAP>0 and c:CheckActivateEffect(false,true,false)~=nil))
return cm.filter(c,ec) and cm.fieldid(c)==cm.fieldid(sc) and c:IsAbleToRemoveAsCost() and ((c:GetType()&TYPE_QUICKPLAY>0 and c:CheckActivateEffect(true,true,false)~=nil) or (c:GetType()&TYPE_TRAP>0 and c:CheckActivateEffect(false,true,false)~=nil))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
......@@ -66,7 +66,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:GetFlagEffect(m)==0 then return end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e:GetHandler())
if #g<=0 then return end
if #g<=Duel.GetCurrentChain() then return end
local ct=math.min(#g,Duel.GetCurrentChain()+1)
local maxc=g:GetMaxGroup(cm.fieldid):GetFirst()
for i=1,ct do
......
......@@ -194,7 +194,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.tgfilter,nil,re)
local ng=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g>0 and #ng>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(11451858,4)) then
if #g>0 and #ng>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(11451858,5)) then
local tc=g:GetFirst()
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
......
......@@ -208,7 +208,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local fg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ng=Duel.GetMatchingGroup(cm.dsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
g=g:Filter(cm.nfilter,nil,ng)
if #g>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(11451858,4)) then
if #g>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(11451858,6)) then
local tc=g:GetFirst()
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
......
......@@ -215,7 +215,7 @@ end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.tgfilter,nil,re)
if #g>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(11451858,4)) then
if #g>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(11451858,7)) then
local tg=g
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......@@ -233,7 +233,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetLabelObject(tc)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
tc:CreateEffectRelation(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,0,1,0,aux.Stringid(m,4))
......@@ -242,8 +243,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and tc:IsRelateToEffect(e)
local code=e:GetLabel()
return re:GetHandler():IsCode(code) --and tc:IsRelateToEffect(e)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -65,37 +65,52 @@ function cm.spfilter3(c,e,tp,g)
return cm.spfilter1(c,e,tp) and g:FilterCount(cm.spfilter2,c,e,tp)==#g-1
end
function cm.spfilter4(c,e,tp)
return cm.spfilter1(c,e,tp) and c:IsLevel(8)
return cm.spfilter(c,e,tp) and c:IsLevel(8)
end
function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then
if g:IsExists(cm.spfilter4,1,nil,e,tp) then return true end
local ft=Duel.GetMZoneCount(tp)
return not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:CheckSubGroup(cm.fselect,1,math.min(#g,ft+1),e,tp)
local ft1=Duel.GetMZoneCount(1-tp)
local ft2=Duel.GetMZoneCount(tp)
local ft=ft1+ft2
return not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:CheckSubGroup(cm.fselect,2,math.min(#g,ft),e,tp,ft1,ft2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.fselect(g,e,tp)
return g:GetSum(Card.GetLevel)==8 and g:IsExists(cm.spfilter3,1,nil,e,tp,g)
function cm.fselect(g,e,tp,ft1,ft2)
return g:GetSum(Card.GetLevel)==8 and g:CheckSubGroup(cm.fselect1,math.max(0,#g-ft2),math.min(#g,ft1),e,tp,g,ft1,ft2)
end
function cm.fselect1(g,e,tp,mg,ft1,ft2)
local g2=mg-g
return g:FilterCount(cm.spfilter1,nil,e,tp)==#g and g2:FilterCount(cm.spfilter2,nil,e,tp)==#g2
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetMZoneCount(tp)
if g:IsExists(cm.spfilter4,1,nil,e,tp) or (not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:CheckSubGroup(cm.fselect,1,math.min(#g,ft+1),e,tp)) then
local ft1=Duel.GetMZoneCount(1-tp)
local ft2=Duel.GetMZoneCount(tp)
local ft=ft1+ft2
if g:IsExists(cm.spfilter4,1,nil,e,tp) or (not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:CheckSubGroup(cm.fselect,2,math.min(#g,ft),e,tp,ft1,ft2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.fselect,false,1,math.min(#g,ft+1),e,tp)
local sg=g:SelectSubGroup(tp,cm.fselect,false,1,math.min(#g,ft),e,tp,ft1,ft2)
local tg=sg
if #sg>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
tg=sg:FilterSelect(tp,cm.spfilter3,1,1,nil,e,tp,sg)
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
tg=sg:FilterSelect(tp,cm.spfilter1,math.max(0,#sg-ft2),math.min(#sg,ft1),nil,e,tp,sg,ft1,ft2)
sg:Sub(tg)
Duel.SpecialSummonStep(tg:GetFirst(),0,tp,1-tp,false,false,POS_FACEUP)
for tc in aux.Next(tg) do
Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
for sc in aux.Next(sg) do
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
local g1=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g1:Select(tp,1,1,nil):GetFirst()
Duel.SynchroSummon(tp,sc,nil)
end
end
end
function cm.adcon2(e,tp,eg,ep,ev,re,r,rp)
......
--反转世界
function c210000000.initial_effect(c)
--activate
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_ACTIVATE)
e01:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e01)
--cost
local e02=Effect.CreateEffect(c)
e02:SetType(EFFECT_TYPE_FIELD)
e02:SetCode(EFFECT_ACTIVATE_COST)
e02:SetRange(LOCATION_EXTRA)
e02:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e02:SetTargetRange(1,0)
e02:SetTarget(c210000000.actarget)
e02:SetOperation(c210000000.costop)
c:RegisterEffect(e02)
--fusion activate
local e03=Effect.CreateEffect(c)
e03:SetType(EFFECT_TYPE_ACTIVATE)
e03:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e03:SetCode(EVENT_FREE_CHAIN)
e03:SetRange(LOCATION_EXTRA)
e03:SetCost(c210000000.facost)
e03:SetOperation(c210000000.faop)
c:RegisterEffect(e03)
--pos change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(210000000,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,210000000)
e1:SetTarget(c210000000.pctarget)
e1:SetOperation(c210000000.pcoperation)
c:RegisterEffect(e1)
--turn facedown
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(210000000,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,210000001)
e2:SetTarget(c210000000.chtg2)
e2:SetOperation(c210000000.chop2)
c:RegisterEffect(e2)
--return to ex
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,210000002)
e3:SetCondition(c210000000.rtcon)
e3:SetTarget(c210000000.rttg)
e3:SetOperation(c210000000.rtop)
c:RegisterEffect(e3)
end
--cost
function c210000000.actarget(e,te,tp)
e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler()
end
function c210000000.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,false)
e:GetHandler():CreateEffectRelation(te)
local c=e:GetHandler()
local ev0=Duel.GetCurrentChain()+1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(c210000000.rsop)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
function c210000000.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
--fusion activate
function c210000000.filter(c)
return c:IsType(TYPE_FLIP) and c:IsAbleToGraveAsCost()
end
function c210000000.facost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c210000000.filter,tp,LOCATION_ONFIELD,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c210000000.filter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c210000000.faop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=c:GetActivateEffect()
local tep=c:GetControler()
end
--pos change
function c210000000.pctarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefensePos() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENSE)
local g=Duel.SelectTarget(tp,Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c210000000.pcoperation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsDefensePos() then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
end
--turn facedown
function c210000000.chtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c210000000.chop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
--return to ex
function c210000000.rtcfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end
function c210000000.rtcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c210000000.rtcfilter,1,nil)
end
function c210000000.rttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c210000000.rtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
......@@ -27,8 +27,9 @@ end
function c28315844.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28315844,3))) then
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28315844,3))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
......@@ -60,7 +61,8 @@ function c28315844.detg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c28315844.deop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)~=0 and Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28315844,2)) then
Duel.Damage(p,d,REASON_EFFECT)
if Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28315844,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
......
......@@ -27,8 +27,9 @@ end
function c28316051.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28316051,3))) then
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28316051,3))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
......@@ -66,9 +67,10 @@ function c28316051.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c28316051.tgop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
local b1=Duel.IsExistingMatchingCard(c28316051.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c28316051.refilter,tp,LOCATION_DECK,0,1,nil)
if Duel.Damage(p,d,REASON_EFFECT)~=0 and Duel.GetLP(tp)<=3000 and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(28316051,2)) then
if Duel.GetLP(tp)<=3000 and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(28316051,2)) then
Duel.BreakEffect()
if b1 and (not b2 or Duel.SelectOption(tp,1191,1192)==0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
......@@ -27,8 +27,9 @@ end
function c28316149.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28316149,3))) then
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28316149,3))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
......@@ -63,7 +64,8 @@ function c28316149.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c28316149.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)~=0 and Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(c28316149.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28316149,2)) then
Duel.Damage(p,d,REASON_EFFECT)
if Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(c28316149.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28316149,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28316149.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -28,8 +28,9 @@ end
function c28316558.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28316558,4))) then
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28316558,4))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
......@@ -72,7 +73,8 @@ function c28316558.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c28316558.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)~=0 and Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(c28316558.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28316558,2)) then
Duel.Damage(p,d,REASON_EFFECT)
if Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(c28316558.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28316558,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28316558.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -27,8 +27,9 @@ end
function c28317560.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28317560,3))) then
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28317560,3))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
......@@ -63,7 +64,8 @@ function c28317560.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c28317560.spop2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)~=0 and Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c28317560.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(28317560,2)) then
Duel.Damage(p,d,REASON_EFFECT)
if Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c28317560.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(28317560,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28317560.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
--沉醉的古之谣 纯白梦想曲
function c28333723.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c28333723.cost)
e1:SetTarget(c28333723.target)
e1:SetOperation(c28333723.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c28333723.setcon)
e2:SetTarget(c28333723.settg)
e2:SetOperation(c28333723.setop)
c:RegisterEffect(e2)
end
function c28333723.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28333723,0))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
end
end
function c28333723.spfilter(c,e,tp)
return c:IsSetCard(0x285) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c28333723.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local loc=LOCATION_HAND+LOCATION_GRAVE
if Duel.GetLP(tp)<=3000 then loc=loc+LOCATION_DECK end
return Duel.IsExistingMatchingCard(c28333723.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c28333723.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local loc=LOCATION_HAND+LOCATION_GRAVE
if Duel.GetLP(tp)<=3000 then loc=loc+LOCATION_DECK end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28333723.spfilter),tp,loc,0,1,1,nil,e,tp):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_HAND)
sc:RegisterEffect(e1,true)
sc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(28333723,1))
end
end
function c28333723.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000
end
function c28333723.filter(c)
return c:IsSetCard(0x285) and c:IsRace(RACE_FIEND) and c:IsFaceup()
end
function c28333723.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28333723.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28333723.filter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsSSetable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c28333723.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c28333723.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_RACE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetValue(RACE_FAIRY)
tc:RegisterEffect(e0)
end
end
--盛装的古之邀 千夜咏叹调
function c28362718.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c28362718.cost)
e1:SetTarget(c28362718.target)
e1:SetOperation(c28362718.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c28362718.fscon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c28362718.fstg)
e2:SetOperation(c28362718.fsop)
c:RegisterEffect(e2)
end
function c28362718.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28362718,0))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
end
end
function c28362718.thfilter(c)
return c:IsSetCard(0x285) and c:IsType(TYPE_SPELL) and (c:IsAbleToHand() or c:IsSSetable())
end
function c28362718.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c28362718.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c28362718.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c28362718.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
if Duel.GetLP(tp)<=3000 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(28362718,1)) then
Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c28362718.filter1(c,e)
return not c:IsImmuneToEffect(e) and c:IsSetCard(0x285)
end
function c28362718.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c28362718.fscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000
end
function c28362718.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c28362718.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(c28362718.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c28362718.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c28362718.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c28362718.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c28362718.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c28362718.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
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 mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--堕天的古之妖 漆黑幻想颂
function c28366277.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c28366277.cost)
e1:SetTarget(c28366277.target)
e1:SetOperation(c28366277.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c28366277.spcon)
e2:SetTarget(c28366277.sptg)
e2:SetOperation(c28366277.spop)
c:RegisterEffect(e2)
end
function c28366277.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28366277,0))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
end
end
function c28366277.thfilter(c)
return c:IsSetCard(0x285) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c28366277.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28366277.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c28366277.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28366277.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if Duel.GetLP(tp)<=3000 and tc:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(28366277,1)) then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_RACE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetValue(RACE_FIEND)
tc:RegisterEffect(e0)
Duel.SpecialSummonComplete()
elseif Duel.GetLP(tp)>3000 then
local fid=tc:GetFieldID()
tc:RegisterFlagEffect(9822220,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(28366277,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_PHASE+RESETS_STANDARD+RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND)
e2:SetLabel(fid)
e2:SetLabelObject(tc)
e2:SetCondition(c28366277.dacon)
e2:SetTarget(c28366277.datg)
e2:SetOperation(c28366277.daop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
function c28366277.dacon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:IsPublic() and tc:GetFlagEffectLabel(9822220)==e:GetLabel() and eg:IsExists(Card.IsControler,1,nil,tp)
end
function c28366277.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,e:GetHandler():GetAttack())
end
function c28366277.daop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc:IsRelateToEffect(e) then return end
Duel.Damage(tp,tc:GetAttack(),REASON_EFFECT)
if Duel.GetLP(tp)<=3000 then
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_RACE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e0:SetValue(RACE_FIEND)
tc:RegisterEffect(e0)
end
end
function c28366277.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000 and eg:IsExists(Card.IsControler,1,nil,tp)
end
function c28366277.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,28366277,0x285,TYPES_NORMAL_TRAP_MONSTER,1600,1650,3,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c28366277.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
end
if Duel.Destroy(g,REASON_EFFECT)==0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,28366277,0x285,TYPES_NORMAL_TRAP_MONSTER,1600,1650,3,RACE_FIEND,ATTRIBUTE_DARK) then
Duel.BreakEffect()
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(0x283)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
--挽留的古之药 罪蝶镇魂歌
function c28368431.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c28368431.cost)
e1:SetOperation(c28368431.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c28368431.thcon)
e2:SetTarget(c28368431.thtg)
e2:SetOperation(c28368431.thop)
c:RegisterEffect(e2)
if not c28368431.global_check then
c28368431.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetCondition(c28368431.checkcon)
ge1:SetOperation(c28368431.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c28368431.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x285)
end
function c28368431.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c28368431.ctfilter,1,nil)
end
function c28368431.checkop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c28368431.ctfilter,nil)
local tc=sg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),28368431,RESET_PHASE+PHASE_END,0,1)
tc=sg:GetNext()
end
end
function c28368431.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1500)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28368431,0))) then
Duel.PayLPCost(tp,500)
else
Duel.PayLPCost(tp,1500)
end
end
function c28368431.activate(e,tp,eg,ep,ev,re,r,rp)
--costchange
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_LPCOST_CHANGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c28368431.costchange)
Duel.RegisterEffect(e1,tp)
--code
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(28368431)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c28368431.condition)
Duel.RegisterEffect(e2,tp)
--recover
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetCondition(c28368431.rccon)
e3:SetOperation(c28368431.rcop)
Duel.RegisterEffect(e3,tp)
end
function c28368431.costchange(e,re,rp,val)
if re and re:GetHandler():IsSetCard(0x285) and Duel.GetLP(rp)<=3000 then
return 0
else
return val
end
end
function c28368431.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000
end
function c28368431.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,28368431)>0
end
function c28368431.thfilter(c)
return c:IsSetCard(0x285) and c:IsAbleToHand()
end
function c28368431.rcop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,28368431)
local val=Duel.Recover(tp,ct*500,REASON_EFFECT)
local tct=math.floor(val/1500)
if tct>0 and Duel.IsExistingMatchingCard(c28368431.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28368431,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28368431.thfilter,tp,LOCATION_DECK,0,1,tct,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c28368431.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000 and ep==tp
end
function c28368431.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c28368431.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--L'Antica秘密基地
function c28372877.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_RECOVER+CATEGORY_DAMAGE)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(c28372877.activate)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(c28372877.indescon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,1)
e2:SetTarget(c28372877.rmlimit)
e2:SetCondition(c28372877.indescon)
c:RegisterEffect(e2)
--damage reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(1,0)
e3:SetCondition(c28372877.drcon)
e3:SetValue(c28372877.damval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e4)
--to deck
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetTarget(c28372877.tdtg)
e5:SetOperation(c28372877.tdop)
c:RegisterEffect(e5)
end
function c28372877.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectOption(tp,aux.Stringid(28372877,0),aux.Stringid(28372877,1))==0 then
Duel.Recover(tp,500,REASON_EFFECT)
else
Duel.Damage(tp,500,REASON_EFFECT,true)
Duel.Damage(1-tp,500,REASON_EFFECT,true)
Duel.RDComplete()
end
end
function c28372877.indescon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000
end
function c28372877.rmlimit(e,c,tp,r,re)
return c==e:GetHandler() and r&REASON_EFFECT>0
end
function c28372877.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x285)
end
function c28372877.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(c28372877.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c28372877.damval(e,re,val,r,rp,rc)
return 0
end
function c28372877.tdfilter(c)
return c:IsSetCard(0x285) and c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c28372877.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28372877.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28372877.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c28372877.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c28372877.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c28372877.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28372877.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,99,nil)
if g:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local tc=Duel.GetFirstTarget()
if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
end
end
--古之钥的序曲 蒸汽交响
function c28381783.initial_effect(c)
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x285),2,99,true)
c:EnableReviveLimit()
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(SUMMON_TYPE_FUSION)
e0:SetCountLimit(1,28381783+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(c28381783.hspcon)
e0:SetOperation(c28381783.hspop)
c:RegisterEffect(e0)
--to grave and remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c28381783.tgcon)
e1:SetTarget(c28381783.tgtg)
e1:SetOperation(c28381783.tgop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c28381783.thtg)
e2:SetOperation(c28381783.thop)
c:RegisterEffect(e2)
--L'Antica SetCode
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetValue(0x283)
c:RegisterEffect(e3)
--L'Antica Race
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e4:SetValue(RACE_FIEND)
c:RegisterEffect(e4)
end
function c28381783.matfilter(c)
return c:IsAbleToDeckOrExtraAsCost() and c:IsFusionSetCard(0x285) and c:IsCanBeFusionMaterial()
end
function c28381783.hspcon(e,c)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c28381783.matfilter,c:GetOwner(),LOCATION_MZONE,0,nil)
return mg:GetCount()>=2 and Duel.GetLP(c:GetOwner())<=3000
end
function c28381783.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.SelectMatchingCard(tp,c28381783.matfilter,tp,LOCATION_MZONE,0,2,99,nil)
c:SetMaterial(mg)
Duel.SendtoDeck(mg,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c28381783.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c28381783.cfilter(c)
return c:IsSetCard(0x285) and (c:IsAbleToGrave() or c:IsAbleToRemove())
end
function c28381783.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ct=c:GetMaterialCount()
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c28381783.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
if Duel.GetLP(tp)<=3000 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE)
else e:SetProperty(EFFECT_FLAG_DELAY) end
end
function c28381783.tgfilter(c)
return c:IsSetCard(0x285) and c:IsAbleToGrave()
end
function c28381783.refilter(c)
return c:IsSetCard(0x285) and c:IsAbleToRemove()
end
function c28381783.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterialCount()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(300*ct)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local tct=Duel.GetMatchingGroupCount(c28381783.tgfilter,tp,LOCATION_DECK,0,nil)
local rct=Duel.GetMatchingGroupCount(c28381783.refilter,tp,LOCATION_DECK,0,nil)
if tct==0 and rct==0 then return end
if tct>0 and (rct==0 or Duel.SelectOption(tp,1191,1192)==0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c28381783.tgfilter,tp,LOCATION_DECK,0,1,math.min(tct,ct),nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c28381783.refilter,tp,LOCATION_DECK,0,1,math.min(tct,ct),nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
function c28381783.dthfilter(c)
return c:IsSetCard(0x285) and c:IsAbleToHand()
end
function c28381783.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28381783.dthfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c28381783.gthfilter(c)
return c:IsSetCard(0x285) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c28381783.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c28381783.dthfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
if Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c28381783.gthfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28381783,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28381783.gthfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--古之钥的主歌 深渊冲突
function c28382113.initial_effect(c)
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x285),2,99,true)
c:EnableReviveLimit()
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(SUMMON_TYPE_FUSION)
e0:SetCountLimit(1,28382113+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(c28382113.hspcon)
e0:SetOperation(c28382113.hspop)
c:RegisterEffect(e0)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c28382113.tdcon)
e1:SetTarget(c28382113.tdtg)
e1:SetOperation(c28382113.tdop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c28382113.dscon)
e2:SetTarget(c28382113.dstg)
e2:SetOperation(c28382113.dsop)
c:RegisterEffect(e2)
--L'Antica SetCode
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetValue(0x283)
c:RegisterEffect(e3)
--L'Antica Race
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e4:SetValue(RACE_FIEND)
c:RegisterEffect(e4)
end
function c28382113.matfilter(c)
return c:IsReleasable(REASON_SPSUMMON) and c:IsFusionSetCard(0x285) and c:IsCanBeFusionMaterial()
end
function c28382113.hspcon(e,c)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c28382113.matfilter,c:GetOwner(),LOCATION_MZONE,0,nil)
return mg:GetCount()>=2 and Duel.GetLP(c:GetOwner())<=3000
end
function c28382113.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.SelectMatchingCard(tp,c28382113.matfilter,tp,LOCATION_MZONE,0,2,99,nil)
c:SetMaterial(mg)
Duel.Release(mg,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c28382113.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c28382113.tdfilter(c)
return c:IsSetCard(0x285) and c:IsAbleToDeck()
end
function c28382113.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ct=c:GetMaterialCount()
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c28382113.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
if Duel.GetLP(tp)<=3000 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE)
else e:SetProperty(EFFECT_FLAG_DELAY) end
end
function c28382113.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterialCount()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(300*ct)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28382113.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ct,nil)
if g:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function c28382113.dscon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c28382113.ctfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FIEND)
end
function c28382113.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28382113.ctfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c28382113.dsop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c28382113.ctfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct>0 and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,ct,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
if Duel.GetLP(tp)<=3000 and Duel.IsChainNegatable(ev) and Duel.SelectYesNo(tp,aux.Stringid(28382113,0)) then
Duel.NegateActivation(ev)
end
end
--古之钥的最强音 假面狂欢
function c28384553.initial_effect(c)
aux.AddFusionProcFunRep2(c,c28384553.mfilter,2,99,true)
c:EnableReviveLimit()
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(SUMMON_TYPE_FUSION)
e0:SetCountLimit(1,28384553+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(c28384553.hspcon)
e0:SetOperation(c28384553.hspop)
c:RegisterEffect(e0)
--indes
local ce1=Effect.CreateEffect(c)
ce1:SetType(EFFECT_TYPE_SINGLE)
ce1:SetCode(EFFECT_MATERIAL_CHECK)
ce1:SetValue(c28384553.valcheck)
c:RegisterEffect(ce1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c28384553.regcon)
e1:SetOperation(c28384553.regop)
e1:SetLabelObject(ce1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetTarget(c28384553.dstg)
e2:SetOperation(c28384553.dsop)
c:RegisterEffect(e2)
--L'Antica SetCode
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetValue(0x283)
c:RegisterEffect(e3)
--L'Antica Race
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e4:SetValue(RACE_FIEND)
c:RegisterEffect(e4)
end
function c28384553.mfilter(c)
return c:IsType(TYPE_FUSION) and c:IsFusionSetCard(0x285)
end
function c28384553.matfilter(c)
return c:IsAbleToExtraAsCost() and c:IsFusionSetCard(0x285) and c:IsCanBeFusionMaterial()
end
function c28384553.hspcon(e,c)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c28384553.matfilter,c:GetOwner(),LOCATION_MZONE,0,nil)
return mg:GetCount()>=2 and Duel.GetLP(c:GetOwner())<=3000
end
function c28384553.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.SelectMatchingCard(tp,c28384553.matfilter,tp,LOCATION_MZONE,0,2,99,nil)
c:SetMaterial(mg)
Duel.SendtoDeck(mg,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c28384553.valcheck(e,c)
local val=c:GetMaterial():GetClassCount(Card.GetCode)
e:SetLabel(val)
end
function c28384553.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabelObject():GetLabel()~=0
end
function c28384553.regop(e,tp,eg,ep,ev,re,r,rp)
local vt=e:GetLabelObject():GetLabel()
local c=e:GetHandler()
if vt>=2 then
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
ge1:SetRange(LOCATION_MZONE)
ge1:SetTargetRange(LOCATION_MZONE,0)
ge1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY+RACE_FIEND))
ge1:SetValue(aux.tgoval)
c:RegisterEffect(ge1)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD)
ge2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ge2:SetRange(LOCATION_MZONE)
ge2:SetTargetRange(LOCATION_MZONE,0)
ge2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY+RACE_FIEND))
ge2:SetValue(1)
c:RegisterEffect(ge2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(300*vt)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(28384553,0))
end
end
function c28384553.ctfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FIEND)
end
function c28384553.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28384553.ctfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c28384553.dsop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c28384553.ctfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct>0 and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,ct,nil)
Duel.HintSelection(dg)
for sc in aux.Next(dg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
Duel.Destroy(sc,REASON_EFFECT)
end
end
if Duel.GetLP(tp)~=3000 and Duel.SelectYesNo(tp,aux.Stringid(28384553,1)) then
Duel.BreakEffect()
Duel.SetLP(tp,3000)
end
end
......@@ -15,7 +15,7 @@ function c28385399.initial_effect(c)
c:RegisterEffect(e0)
--to grave and remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -33,7 +33,7 @@ function c28385399.initial_effect(c)
c:RegisterEffect(e2)
end
function c28385399.matfilter(c)
return c:IsAbleToDeckAsCost() and c:IsFusionSetCard(0x283) and c:IsCanBeFusionMaterial()
return c:IsAbleToDeckOrExtraAsCost() and c:IsFusionSetCard(0x283) and c:IsCanBeFusionMaterial()
end
function c28385399.hspcon(e,c)
if c==nil then return true end
......@@ -68,13 +68,18 @@ function c28385399.refilter(c)
return c:IsSetCard(0x283) and c:IsAbleToRemove()
end
function c28385399.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetMaterialCount()
local e1=Effect.CreateEffect(e:GetHandler())
local c=e:GetHandler()
local ct=c:GetMaterialCount()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(200*ct)
e:GetHandler():RegisterEffect(e1)
e1:SetValue(300*ct)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local tct=Duel.GetMatchingGroupCount(c28385399.tgfilter,tp,LOCATION_DECK,0,nil)
local rct=Duel.GetMatchingGroupCount(c28385399.refilter,tp,LOCATION_DECK,0,nil)
if tct==0 and rct==0 then return end
......
--重量级的女帝 盾甲虫
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
--target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.tglimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--Equip
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e4:SetCountLimit(1)
e4:SetCondition(s.ndcon)
e4:SetTarget(s.eqtg)
e4:SetOperation(s.eqop)
c:RegisterEffect(e4)
end
--e1
function s.cfilter(c,tp,f)
return f(c) and Duel.GetMZoneCount(tp,c)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,tp,Card.IsAbleToGraveAsCost)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,Card.IsAbleToGraveAsCost)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
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.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
--e2
function s.tglimit(e,c)
return c~=e:GetHandler()
end
--e4
function s.ndcon(e)
return e:GetHandler():GetEquipCount()==0
end
function s.eqfilter(c,tp)
return c:IsRace(RACE_INSECT) and c:IsLevelBelow(3) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,tp)
local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(s.eqlimit)
tc:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--地底之国的兵士 彻甲虫
local s,id,o=GetID()
function s.initial_effect(c)
aux.EnableUnionAttribute(c,s.filter)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,id)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
end
s.has_text_type=TYPE_UNION
function s.filter(c)
return c:IsRace(RACE_INSECT)
end
function s.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner()
and te:IsActiveType(TYPE_SPELL)
end
function s.thfilter(c)
return c:IsRace(RACE_INSECT) and c:IsLevel(5) 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:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT) then
Duel.ConfirmCards(1-tp,g)
local c=e:GetHandler()
if not c:IsLevel(5) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(5)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
end
end
\ No newline at end of file
--暗影的捕食者 影蜘蛛
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT),5,2)
c:EnableReviveLimit()
--spsm
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetCondition(s.con)
e0:SetTarget(s.tg)
e0:SetOperation(s.op)
c:RegisterEffect(e0)
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.ovcon1)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(s.ovcon2)
c:RegisterEffect(e3)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.reptg)
c:RegisterEffect(e2)
end
function s.filter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsLevel(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,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
end
--e2
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,c,96) then
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end
--Overlay
function s.ovcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0
end
function s.ovcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0
end
function s.ovfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ovfilter(chkc) end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingTarget(s.ovfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,s.ovfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end
\ No newline at end of file
......@@ -112,9 +112,10 @@ function cm.costfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PLANT) end
local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PLANT)
Duel.Release(rg,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -11,6 +11,7 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.sphcon)
e1:SetTarget(cm.sphtg)
e1:SetOperation(cm.sphop)
c:RegisterEffect(e1)
--search
......@@ -38,20 +39,27 @@ function cm.initial_effect(c)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.sphfilter(c,ft,tp)
function cm.sphfilter(c,tp)
return c:IsType(TYPE_TOKEN)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function cm.sphcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,cm.sphfilter,1,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,cm.sphfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function cm.sphtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.sphfilter,nil,tp)
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 cm.sphop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,cm.sphfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function cm.cfilter0(c)
return c:IsCode(40011181) and c:IsFaceup()
......
......@@ -48,6 +48,9 @@ function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,10,e:GetHandler(),TYPE_MONSTER)
local ct=Duel.Release(g,REASON_COST)
e:SetLabel(ct)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -2,7 +2,7 @@
local m=40011183
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,40011177)
aux.AddCodeList(c,40011177)
--synchro summon
aux.AddSynchroMixProcedure(c,cm.matfilter1,nil,nil,cm.matfilter2,1,99)
c:EnableReviveLimit()
......@@ -85,13 +85,13 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsReleasable,1-tp,LOCATION_MZONE,0,nil,REASON_EFFECT)
local g=Duel.SelectReleaseGroup(1-tp,LOCATION_MZONE,1,1,REASON_EFFECT,true,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RELEASE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Release(sg,REASON_EFFECT)
Duel.HintSelection(g)
Duel.Release(g,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -69,9 +69,13 @@ function cm.costfilter(c)
return c:IsCode(40010878)
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,40010878) end
local rg=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,40010878)
Duel.Release(rg,REASON_COST)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) 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.
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