Commit f53721c1 authored by REIKAI's avatar REIKAI 💬

update 10.16

parent 8c2fab3d
No preview for this file type
expansions/pics/65080054.jpg

32.4 KB | W: | H:

expansions/pics/65080054.jpg

6.2 KB | W: | H:

expansions/pics/65080054.jpg
expansions/pics/65080054.jpg
expansions/pics/65080054.jpg
expansions/pics/65080054.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080055.jpg

32.3 KB | W: | H:

expansions/pics/65080055.jpg

6.24 KB | W: | H:

expansions/pics/65080055.jpg
expansions/pics/65080055.jpg
expansions/pics/65080055.jpg
expansions/pics/65080055.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080056.jpg

32.2 KB | W: | H:

expansions/pics/65080056.jpg

5.92 KB | W: | H:

expansions/pics/65080056.jpg
expansions/pics/65080056.jpg
expansions/pics/65080056.jpg
expansions/pics/65080056.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080057.jpg

33.2 KB | W: | H:

expansions/pics/65080057.jpg

6.01 KB | W: | H:

expansions/pics/65080057.jpg
expansions/pics/65080057.jpg
expansions/pics/65080057.jpg
expansions/pics/65080057.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080058.jpg

30.2 KB | W: | H:

expansions/pics/65080058.jpg

119 KB | W: | H:

expansions/pics/65080058.jpg
expansions/pics/65080058.jpg
expansions/pics/65080058.jpg
expansions/pics/65080058.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200604.jpg

14.6 KB | W: | H:

expansions/pics/67200604.jpg

12.4 KB | W: | H:

expansions/pics/67200604.jpg
expansions/pics/67200604.jpg
expansions/pics/67200604.jpg
expansions/pics/67200604.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67210102.jpg

14.4 KB | W: | H:

expansions/pics/67210102.jpg

12.5 KB | W: | H:

expansions/pics/67210102.jpg
expansions/pics/67210102.jpg
expansions/pics/67210102.jpg
expansions/pics/67210102.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400001.jpg

11.5 KB | W: | H:

expansions/pics/71400001.jpg

27 KB | W: | H:

expansions/pics/71400001.jpg
expansions/pics/71400001.jpg
expansions/pics/71400001.jpg
expansions/pics/71400001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400037.jpg

15.7 KB | W: | H:

expansions/pics/71400037.jpg

38.9 KB | W: | H:

expansions/pics/71400037.jpg
expansions/pics/71400037.jpg
expansions/pics/71400037.jpg
expansions/pics/71400037.jpg
  • 2-up
  • Swipe
  • Onion skin
--别在这理发店!
local m=12400000
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x2a0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.counter)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(cm.atktg)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
--cannot target & indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetCondition(cm.condition)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e6:SetValue(aux.indoval)
c:RegisterEffect(e6)
end
function cm.cfilter(c)
return c:IsRace(RACE_THUNDER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup() )
end
function cm.counter(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(cm.cfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0x2a0,ct,true)
end
end
function cm.atkfilter(c)
return c:IsRace(RACE_THUNDER) and c:IsFaceup()
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and e:GetHandler():IsCanRemoveCounter(tp,0x2a0,1,REASON_COST) end
local ct=e:GetHandler():GetCounter(0x2a0)
local lvt={}
for i=1,ct do
lvt[i]=i
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.RemoveCounter(tp,1,0,0x2a0,lv,REASON_COST)
e:SetLabel(lv)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local gc=g:GetCount()
if gc>0 then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*100)
local ct2=1
if Duel.GetTurnPlayer()==1-tp then
ct2=2
end
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,ct2)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
\ No newline at end of file
--澄闪-精一
local m=12400001
local cm=_G["c"..m]
function cm.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.MatFilter,2,2)
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetCondition(cm.linkcon)
e1:SetValue(cm.linklimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.MatFilter(c)
return c:IsLinkRace(RACE_THUNDER)
end
function cm.linkcon(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.linklimit(e,c)
if not c then return false end
return not c:IsRace(RACE_THUNDER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_THUNDER) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
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)
tc:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
--澄闪
local m=12400002
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_THUNDER),3)
--race
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(cm.indtg)
e1:SetValue(RACE_THUNDER)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetCondition(cm.negcon)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--disable attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCost(cm.cost)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.indtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_THUNDER) and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil)
local b2=e:GetHandler():IsAttackAbove(2000)
if chk==0 then return b1 or b2 end
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))==0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-2000)
e:GetHandler():RegisterEffect(e1)
end
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker():GetControler()~=tp end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if Duel.NegateAttack() and tc:IsOnField() then
Duel.BreakEffect()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--澄闪-理发
local m=12400003
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c)
return c:IsCode(12400000) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(3) and c:IsRace(RACE_THUNDER) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_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)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--苏茜·格里特的理发店
local m=12400005
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Decrease Atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
--Decrease Atk
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--Leave Field Destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,m+10000)
e4:SetCondition(cm.descon)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x32a0) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_THUNDER)
end
function cm.atkval(e)
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil)*-200
end
function cm.cfilter(c)
return c:IsRace(RACE_THUNDER)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--澄净闪耀 澄闪-酒保
local m=12400006
local cm=_G["c"..m]
function cm.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--revive
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+10000+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsRace(RACE_THUNDER)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSequence()>4
end
function cm.thfilter(c)
return c:IsCode(12400005) 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)
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 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_THUNDER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--铳影-殷妮
local s,id,o=GetID()
function c12825601.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(1109)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c12825601.thcost)
e1:SetTarget(c12825601.thtg)
e1:SetOperation(c12825601.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,12825601)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c12825601.spcost)
e2:SetTarget(c12825601.sptg)
e2:SetOperation(c12825601.spop)
c:RegisterEffect(e2)
end
function c12825601.cfilter(c,tp)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
and Duel.IsExistingMatchingCard(c12825601.thfilter,tp,LOCATION_DECK,0,1,nil,c)
end
function c12825601.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,12825601)==0
and Duel.IsExistingMatchingCard(c12825601.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.RegisterFlagEffect(tp,12825601,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c12825601.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c12825601.thfilter(c,mc)
return c:IsType(TYPE_QUICKPLAY) and aux.IsCodeListed(c,mc:GetCode()) and c:IsAbleToHand()
end
function c12825601.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 c12825601.thop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12825601.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c12825601.rcfilter(c,e,tp)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_QUICKPLAY) and not c:IsCode(12825610,12825611)
and Duel.IsExistingMatchingCard(c12825601.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c12825601.spfilter(c,e,tp,mc)
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(mc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12825601.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable()
and Duel.IsExistingMatchingCard(c12825601.rcfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c12825601.rcfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
g:AddCard(e:GetHandler())
Duel.Release(g,REASON_COST)
end
function c12825601.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA)
end
function c12825601.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local rc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12825601.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rc)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--铳影-朴景丽
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825602.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c)
chiki.c4a71kang(c,c12825602.discon,c12825602.distg,c12825602.disop,CATEGORY_NEGATE,12825602,1131,12825607)
end
function c12825602.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(12825612)>0
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c12825602.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c12825602.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--铳影-唐莹
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825603.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c)
chiki.c4a71kang(c,nil,c12825603.rmtg,c12825603.rmop,CATEGORY_REMOVE,12825603,1102,12825608)
end
function c12825603.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToRemove() and not rc:IsLocation(LOCATION_REMOVED) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,0,0)
end
function c12825603.rmop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--铳影-王昕研
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825604.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c,c12825604.tgtg,c12825604.tgop,CATEGORY_TOGRAVE)
chiki.c4a71kang2(c,nil,c12825604.settg,c12825604.setop,nil,12825604,1109,12825609)
end
function c12825604.filter(c)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function c12825604.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825604.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c12825604.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c12825604.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c12825604.tgfilter(c)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c12825604.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825604.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c12825604.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12825604.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--铳影-浅仓绘里
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825605.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c,c12825605.tgtg,c12825605.tgop,CATEGORY_TOGRAVE)
chiki.c4a71kang2(c,nil,c12825605.destg,c12825605.desop,CATEGORY_DESTROY,12825605,1101,12825610)
end
function c12825605.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c12825605.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function c12825605.tgfilter(c)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c12825605.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825605.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c12825605.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12825605.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--铳影-安娜
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825606.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c,c12825606.target,c12825606.activate)
chiki.c4a71kang2(c,nil,c12825606.hdtg,c12825606.hdop,CATEGORY_REMOVE,12825606,1106,12825611)
end
function c12825606.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function c12825606.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c12825606.filter(c)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c12825606.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825606.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12825606.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12825606.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--铳影-行动代号一
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825607.initial_effect(c)
aux.AddCodeList(c,12825602)
chiki.c4a71rankup(c,c12825607.filter1,c12825607.filter2,12825607)
chiki.chikiav(c,EFFECT_FLAG_CARD_TARGET,nil,c12825607.effcon,c12825607.target,c12825607.operation,CATEGORY_DISABLE,12825607,1131)
end
function c12825607.filter1(c)
return c:GetOverlayCount()>1 and c:IsSetCard(0x4a76) and not c:IsCode(12825602)
end
function c12825607.filter2(c)
return c:IsCode(12825602)
end
function c12825607.cfilter(c)
return c:IsFaceup() and c:IsCode(12825602)
end
function c12825607.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825607.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825607.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c12825607.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--铳影-行动代号二
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825608.initial_effect(c)
aux.AddCodeList(c,12825603)
chiki.c4a71rankup(c,c12825608.filter1,c12825608.filter2,12825608)
chiki.chikiav(c,EFFECT_FLAG_CARD_TARGET,nil,c12825608.effcon,c12825608.target,c12825608.operation,CATEGORY_REMOVE,12825608,1102)
end
function c12825608.filter1(c)
return c:IsSetCard(0x4a76) and not c:IsCode(12825603)
end
function c12825608.filter2(c)
return c:IsCode(12825603)
end
function c12825608.cfilter(c)
return c:IsFaceup() and c:IsCode(12825603)
end
function c12825608.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825608.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825608.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end
function c12825608.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--铳影-行动代号三
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825609.initial_effect(c)
aux.AddCodeList(c,12825604)
chiki.c4a71rankup(c,c12825609.filter1,c12825609.filter2,12825609)
chiki.chikiav(c,nil,nil,c12825609.effcon,c12825609.target,c12825609.operation,nil,12825609,1102)
end
function c12825609.filter1(c)
return c:IsSetCard(0x4a76) and not c:IsCode(12825604)
end
function c12825609.filter2(c)
return c:IsCode(12825604)
end
function c12825609.cfilter(c)
return c:IsFaceup() and c:IsCode(12825604)
end
function c12825609.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825609.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825609.setfilter(c)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function c12825609.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825609.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function c12825609.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c12825609.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
\ No newline at end of file
--铳影-行动代号四
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825610.initial_effect(c)
aux.AddCodeList(c,12825605)
chiki.c4a71rankup(c,c12825610.filter1,c12825610.filter2,12825610)
chiki.chikiav(c,nil,nil,c12825610.effcon,c12825610.target,c12825610.operation,CATEGORY_DESTROY,12825610,1101)
end
function c12825610.filter1(c)
return c:GetOverlayCount()>3 and c:IsSetCard(0x4a76) and not c:IsCode(12825605)
end
function c12825610.filter2(c)
return c:IsCode(12825605)
end
function c12825610.cfilter(c)
return c:IsFaceup() and c:IsCode(12825605)
end
function c12825610.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825610.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825610.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c12825610.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--铳影-行动代号五
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825611.initial_effect(c)
aux.AddCodeList(c,12825606)
chiki.c4a71rankup(c,c12825611.filter1,c12825611.filter2,12825611)
chiki.chikiav(c,LOCATION_GRAVE,nil,c12825611.effcon,c12825611.target,c12825611.operation,CATEGORY_DESTROY,12825611,1100)
end
function c12825611.filter1(c)
return c:GetOverlayCount()>1 and c:IsSetCard(0x4a76) and not c:IsCode(12825606)
end
function c12825611.filter2(c)
return c:IsCode(12825606)
end
function c12825611.cfilter(c)
return c:IsFaceup() and c:IsCode(12825606)
end
function c12825611.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825611.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825611.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c12825611.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c12825611.desfilter,tp,0,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c12825611.desfilter,tp,0,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c12825611.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c12825611.desfilter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT)
end
--铳影-度假
function c12825612.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12825612+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12825612.target)
e1:SetOperation(c12825612.activate)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_CHAINING)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c12825612.discon)
e2:SetOperation(c12825612.disop)
c:RegisterEffect(e2)
end
function c12825612.filter(c)
return c:IsSetCard(0x4a76) and c:IsAbleToHand()
end
function c12825612.tdfilter(c)
return not c:IsPublic()
end
function c12825612.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825612.tdfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c12825612.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12825612.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,c12825612.tdfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
if g1:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c12825612.filter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 and Duel.SendtoHand(g2,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g2)
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c12825612.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsSetCard(0x4a76) and te:IsActiveType(TYPE_MONSTER) and p==tp and rp==1-tp
end
function c12825612.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e2:SetValue(c12825612.efilter)
te:GetHandler():RegisterEffect(e2)
end
function c12825612.efilter(e,te)
return te:IsActivated() and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--铳影-蛇
function c12825613.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c12825613.spcon)
e1:SetTarget(c12825613.sptg)
e1:SetOperation(c12825613.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(1108)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,12825613)
e2:SetTarget(c12825613.drtg)
e2:SetOperation(c12825613.drop)
c:RegisterEffect(e2)
end
function c12825613.cfilter(c)
return c:IsSetCard(0x4a76) and c:IsFaceup()
end
function c12825613.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or Duel.IsExistingMatchingCard(c12825613.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c12825613.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,12825613)==0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,1-tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.RegisterFlagEffect(tp,12825613,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c12825613.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c12825613.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c12825613.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c12825613.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function c12825613.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if c:GetOwner()~=e:GetHandlerPlayer() then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.GetControl(c,1-tp)
else
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
function c12825613.xcf(e,c)
return c==e:GetHandler()
end
function c12825613.rettg(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--铳影-紧急行动
function c12825614.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:SetCondition(c12825614.condition)
e1:SetTarget(c12825614.target)
e1:SetOperation(c12825614.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(1109)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,12825614)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12825614.thtg)
e2:SetOperation(c12825614.thop)
c:RegisterEffect(e2)
end
function c12825614.cfilter(c)
return c:IsFacedown() or not c:IsType(TYPE_XYZ)
end
function c12825614.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c12825614.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c12825614.filter(c,e,tp)
return c:IsSetCard(0x4a76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c12825614.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825614.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12825614.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12825614.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c12825614.thfilter(c)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand()
end
function c12825614.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825614.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
end
function c12825614.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12825614.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g1,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
local m=14790024
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) then
Duel.BreakEffect
Duel.Remove(g:Filter(Card.IsAbleToRemove),POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--圣天之威严
local m=14790025
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--SkipPhase
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.skcon)
e1:SetOperation(cm.skop)
c:RegisterEffect(e1)
end
function cm.skcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.skop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
if Duel.GetTurnPlayer()~=tp and ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1)
end
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.skipcon)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
function cm.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
\ No newline at end of file
--圣天之威严
local m=14790026
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,1,1)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
--destroyself
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,0)
end
function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -1247,7 +1247,7 @@ function Chikichikibanban.c4a71Limitsplimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
function Chikichikibanban.c4a71Limitsplimit2(e,se,sp,st)
return se:GetHandler():IsSetCard(0x3a73)
return se:GetHandler():IsSetCard(0x4a76)
end
--铳影通用回收(代写)
function Chikichikibanban.c4a71tohand(c,tg,op,category)
......@@ -1269,7 +1269,7 @@ function Chikichikibanban.c4a71tohand(c,tg,op,category)
c:RegisterEffect(e1)
end
function Chikichikibanban.c4a71tohandthfilter(c)
return c:IsSetCard(0x3a73) and c:IsAbleToHand()
return c:IsSetCard(0x4a76) and c:IsAbleToHand()
end
function Chikichikibanban.c4a71tohandthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Chikichikibanban.c4a71tohandthfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
--云图计划-安东尼娜
local m=26100001
local cm=_G["c"..m]
function c26100001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(cm.atkcon)
e2:SetTarget(cm.atktg)
e2:SetValue(cm.adval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetCondition(cm.condition)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
--放置指示物
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1f81,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f81,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f81,1)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
tc:AddCounter(0x1f81,1)
end
end
--降低攻击力
function cm.atkcon(e,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local a,d=Duel.GetBattleMonster(tp)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and a and d and a:IsSetCard(0xf80)
end
function cm.atktg(e,c)
local tp=e:GetHandlerPlayer()
local a,d=Duel.GetBattleMonster(tp)
return c==d
end
function cm.adval(e,c)
return -(c:GetCounter(0x1f81)*300)
end
--卡组检索
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function cm.filter(c)
return c:IsSetCard(0xf80) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--云图计划-帕斯卡
local m=26100002
local cm=_G["c"..m]
function c26100002.initial_effect(c)
c:SetUniqueOnField(1,0,m)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+200)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1,m+100)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.discon)
e4:SetCost(cm.discost)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
end
--检索
function cm.thfilter(c)
return c:IsSetCard(0xf80) 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)
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 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--回血
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local rt=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)*500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rt,REASON_EFFECT)
end
--反击
function cm.actcfilter(c)
return c:IsSetCard(0xf80) and c:IsLocation(LOCATION_MZONE)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,2000)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--云图计划-巧可
local m=26100003
local cm=_G["c"..m]
function c26100003.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+200)
e3:SetCost(cm.thcost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
--回血
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local rt=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rt,REASON_EFFECT)
end
\ No newline at end of file
--云图计划-阿比盖尔
local m=26100004
local cm=_G["c"..m]
function c26100004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
end
--手卡特招
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
--特招手卡
function cm.spfilter1(c,e,tp)
return c:IsLevelBelow(3) and c:IsOriginalSetCard(0xf80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--云图计划-绿洲
local m=26100005
local cm=_G["c"..m]
function c26100005.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetValue(200)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf80))
c:RegisterEffect(e3)
--Def
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf80))
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_FZONE)
e6:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e6:SetCountLimit(1)
e6:SetValue(cm.valcon)
c:RegisterEffect(e6)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xf80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
\ No newline at end of file
--艾吉斯之盾
local m=26100006
local cm=_G["c"..m]
function c26100006.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-400)
c:RegisterEffect(e2)
--def down
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_EQUIP_LIMIT)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(1)
c:RegisterEffect(e7)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(400)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCondition(cm.recon)
e5:SetValue(LOCATION_HAND)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetCategory(CATEGORY_DAMAGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_BATTLE_DESTROYED)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(cm.damcon)
e6:SetTarget(cm.damtg)
e6:SetOperation(cm.damop)
c:RegisterEffect(e6)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xf80)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.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 tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
--离场回手
function cm.recon(e)
return e:GetHandler():IsFaceup()
end
--火焰翼人!
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
local des=eg:GetFirst()
local rc=des:GetReasonCard()
return des:IsLocation(LOCATION_GRAVE) and des:IsType(TYPE_MONSTER) and rc:IsRelateToBattle() and rc==tc
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local damp=eg:GetFirst():GetPreviousControler()
local damg=eg:GetFirst():GetBaseAttack()
Duel.SetTargetPlayer(damp)
Duel.SetTargetParam(damg)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,damp,damg)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p,v=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,v,REASON_EFFECT)
end
\ No newline at end of file
--黑客入侵
local m=26100007
local cm=_G["c"..m]
function c26100007.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1)
e3:SetCost(cm.setcost)
e3:SetCondition(cm.discon)
e3:SetTarget(aux.nbtg)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(cm.val)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
local g=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f81,1)
if re:IsActiveType(TYPE_SPELL+TYPE_MONSTER+TYPE_TRAP) then
g:GetFirst():AddCounter(0x1f81,1)
end
end
--效果无效
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1f81,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1f81,3,REASON_COST)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEDOWN,REASON_EFFECT)
end
end
--攻击力下降
function cm.val(e)
return Duel.GetCounter(0,1,1,0x1f81)*-400
end
\ No newline at end of file
--完形投影-安东尼娜
local m=26100008
local cm=_G["c"..m]
function c26100008.initial_effect(c)
aux.AddSynchroProcedure(c,cm.sfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCountLimit(1,m)
e1:SetCost(cm.atkcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.setcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+200)
e3:SetCost(cm.atkcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(80532587,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.sfilter(c)
return c:IsSetCard(0xf80)
end
--攻击力下降
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1f81,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1f81,3,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if g then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(math.ceil(tc:GetAttack()/2))
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(math.ceil(tc:GetDefense()/2))
tc:RegisterEffect(e2)
end
end
--放置木马指示物
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1f81,4) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f81,4) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f81,4)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
tc:AddCounter(0x1f81,4)
end
end
--不会被战破
function cm.filter(c)
return c:GetCounter(0x1f81)>0
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local t=g:GetFirst()
while t do
t:RemoveCounter(tp,0x1f81,t:GetCounter(0x1f81),REASON_COST)
t=g:GetNext()
end
Duel.SetTargetCard(g)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.indtg)
e4:SetValue(cm.indct)
Duel.RegisterEffect(e4,tp)
end
function cm.indtg(e,c)
return c:IsSetCard(0xf80)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
\ No newline at end of file
--完形投影-帕斯卡
local m=26100009
local cm=_G["c"..m]
function c26100009.initial_effect(c)
aux.AddSynchroProcedure(c,cm.sfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon)
e1:SetTarget(cm.rectg)
e1:SetOperation(cm.recop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_REVERSE_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(cm.reptg)
e5:SetValue(cm.repval)
e5:SetOperation(cm.repop)
c:RegisterEffect(e5)
end
function cm.sfilter(c)
return c:IsSetCard(0xf80)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then
Duel.Recover(tp,tc:GetAttack()/2,REASON_EFFECT)
end
end
--代替破坏
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0xf80) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(26100009)==0 and not c:IsReason(REASON_REPLACE)
end
function cm.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsType(TYPE_MONSTER)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp)
and eg:IsExists(cm.repfilter,1,nil,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local g=eg:Filter(cm.repfilter,nil,tp)
if g:GetCount()==1 then
e:SetLabelObject(g:GetFirst())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local cg=g:Select(tp,1,1,nil)
e:SetLabelObject(cg:GetFirst())
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local tg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SetTargetCard(tg)
tg:GetFirst():RegisterFlagEffect(26100009,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
tg:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function cm.repval(e,c)
return c==e:GetLabelObject()
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,26100009)
local tc=Duel.GetFirstTarget()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
--芙洛伦药物的副作用
local m=26100010
local cm=_G["c"..m]
local t={}
function c26100010.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(cm.reccon)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local des=ev
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetDescription(aux.Stringid(m,1))
e1:SetOperation(cm.desop)
e1:SetCountLimit(1)
e1:SetLabel(des)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCountLimit(1)
e2:SetCondition(cm.turncon)
e2:SetOperation(cm.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCondition(cm.damgecon)
e3:SetOperation(cm.damgeop)
e3:SetCountLimit(1)
e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e3,tp)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(aux.Stringid(m,1),0,m)
if ep==e:GetOwnerPlayer() then return end
local des=Duel.Recover(1-tp,e:GetLabel(),REASON_EFFECT)
table.insert(t,des)
end
function cm.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function cm.turnop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(aux.Stringid(m,2),0,m)
Duel.RegisterFlagEffect(tp,26100010,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
local ct=Duel.GetFlagEffect(tp,26100010)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetOwner():ResetFlagEffect(26100010)
end
end
function cm.damgecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFlagEffect(tp,26100010)==3
end
function cm.damgeop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(aux.Stringid(m,3),0,m)
local ct=Duel.GetFlagEffect(tp,26100010)
local d1,d2,d3=table.unpack(t)
if ct==3 then
Duel.Damage(1-tp,d1+d2+d3,REASON_EFFECT)
e:GetOwner():ResetFlagEffect(26100010)
end
end
\ No newline at end of file
--沉寂之冬
local m=26100011
local cm=_G["c"..m]
function c26100011.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(aux.nbtg)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
--效果无效
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf80) and c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--卡组特招
function cm.filter(c,e,tp)
return c:IsSetCard(0xf80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,3,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,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 ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if g:GetCount()<=0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
--魔导器具商人
local m=30005180
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.lcf,3,3,cm.lcheck)
c:EnableReviveLimit()
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(cm.lmlimit)
c:RegisterEffect(e1)
--Effect 1 equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
end
--link summon
function cm.lcf(c)
return not c:IsLinkType(TYPE_TOKEN)
end
function cm.lcheck(g)
return g:GetClassCount(Card.GetLinkAttribute)==g:GetCount() and g:GetClassCount(Card.GetLinkRace)==g:GetCount()
end
--cannot link material
function cm.lmlimit(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK)
end
--Effect 1
function cm.cfilter(c,tp)
return c:IsFaceup()
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetOriginalAttribute(),c:GetOriginalRace(),tp)
end
function cm.eqfilter(c,att,race,tp)
return c:IsType(TYPE_MONSTER) and (c:GetOriginalAttribute()==att or c:GetOriginalRace()==race)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_EXTRA)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetOriginalAttribute(),tc:GetOriginalRace(),tp)
local sc=g:GetFirst()
if not sc then return end
if not Duel.Equip(tp,sc,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(cm.eqlimit)
sc:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(sc)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0)
e3:SetLabel(sc:GetCode())
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function cm.splimit(e,c)
return c:IsCode(e:GetLabel())
end
--白厄 诺纷斯
local m=30005195
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_TOEXTRA+CATEGORY_TOGRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
--Effect 3
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e12:SetProperty(EFFECT_FLAG_DELAY)
e12:SetCode(EVENT_MOVE)
e12:SetCountLimit(1,m+m)
e12:SetCondition(cm.spcon2)
e12:SetTarget(cm.sptg2)
e12:SetOperation(cm.spop2)
c:RegisterEffect(e12)
end
--Effect 1
function cm.tfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.GetMZoneCount(tp,c)>0
and (c:IsAbleToGrave() or c:IsAbleToExtra())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tfilter(chkc,tp) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,cm.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local res=nil
if tc:IsAbleToGrave()
and (not tc:IsAbleToExtra() or Duel.SelectOption(tp,1193,1191)==1) then
res=Duel.SendtoGrave(tc,REASON_EFFECT)
else
res=Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
local b1=res~=0 and not tc:IsLocation(LOCATION_MZONE+LOCATION_EXTRA)
local b2=res~=0 and tc:IsLocation(LOCATION_EXTRA)
if c:IsRelateToEffect(e) and (b1 or b2) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--Effect 2
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
local hg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT)
if #hg==0 then return end
if #hg>=2 then
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD)
else
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
end
--Effect 3
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_OVERLAY)
end
function cm.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.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,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
--时空龙·刻神指令龙
local m=30900000
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--Effect 1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--Effect 2
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_TOHAND)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e12:SetCode(EVENT_REMOVE)
e12:SetProperty(EFFECT_FLAG_DELAY)
e12:SetCountLimit(1,m+m)
e12:SetCondition(cm.thcon)
e12:SetTarget(cm.thtg)
e12:SetOperation(cm.thop)
c:RegisterEffect(e12)
end
--Effect 1
function cm.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 cm.negfilter(c)
return aux.NegateAnyFilter(c) and c:IsType(TYPE_SPELL)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp)
and cm.negfilter(chkc) end
if chk==0 then return c:IsAbleToRemove() and Duel.IsExistingTarget(cm.negfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,cm.negfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e)
and (tc:IsFaceup() and not tc:IsDisabled())
and not tc:IsImmuneToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc: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)
tc:RegisterEffect(e2)
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
end
--Effect 2
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re and rc:IsOriginalCodeRule(30900000)
end
function cm.thfilter(c,tp)
return c:IsAbleToHand(tp) and c:IsType(TYPE_SPELL) and c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_ALL,LOCATION_REMOVED)
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_REMOVED,LOCATION_REMOVED,1,1,nil,tp)
if #g>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
--时刻小龙
local m=30900001
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
--Effect 1
function cm.filter(c)
return c:IsLevelAbove(5) and c:IsSetCard(0xc80)
and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) and c:IsLevelAbove(1) and not c:IsLevel(7) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsLocation(LOCATION_HAND)
and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
end
--Effect 2
function cm.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc8f)
end
function cm.sptg(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 c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--蒸汽吐息龙
local m=30900002
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.efilter)
e3:SetValue(1)
c:RegisterEffect(e3)
--Effect 2
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
--Effect 1
function cm.efilter(e,c)
local ec=e:GetHandler()
local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0xc80)
and lg:IsContains(ec)
end
--Effect 2
function cm.thfilter(c)
return c:IsSetCard(0xc80) 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)
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 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--蒸汽少女 阿璐莉姆
local m=30900003
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--Effect 2
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.con)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
--Effect 1
function cm.sf(c,lv)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsLevelAbove(1)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local lv=c:GetLevel()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.sf(chkc,lv)
and chkc:IsControler(tp) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.sf,tp,LOCATION_MZONE,0,1,nil,lv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.sf,tp,LOCATION_MZONE,0,1,1,nil,lv)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(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 Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--Effect 2
function cm.con(e)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()~=tp
end
function cm.cf(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_CYBERSE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.cf,tp,LOCATION_GRAVE,0,c)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and #g>0 and c:IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:Select(tp,1,1,nil)
rg:AddCard(c)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local atk=Duel.GetOperatedGroup():GetSum(Card.GetAttack)
Duel.SetTargetParam(atk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--Effect 3
--Effect 4
--Effect 5
\ No newline at end of file
--激微波齿轮龙
local m=30900004
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m+m)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
--Effect 1
function cm.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_CYBERSE)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--Effect 2
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local lg1=Duel.GetLinkedGroup(tp,1,1)
local lg2=Duel.GetLinkedGroup(1-tp,1,1)
lg1:Merge(lg2)
return lg1 and lg1:IsContains(e:GetHandler())
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--Effect 3
--Effect 4
--Effect 5
--烟雾齿轮龙
local m=30900005
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--Effect 2
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_SPECIAL_SUMMON)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e12:SetCode(EVENT_REMOVE)
e12:SetProperty(EFFECT_FLAG_DELAY)
e12:SetCountLimit(1,m+m)
e12:SetTarget(cm.sptg)
e12:SetOperation(cm.spop)
c:RegisterEffect(e12)
--Effect 3
--Effect 4
--Effect 5
end
--Effect 1
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local lg1=Duel.GetLinkedGroup(tp,1,1)
local lg2=Duel.GetLinkedGroup(1-tp,1,1)
lg1:Merge(lg2)
return lg1 and lg1:IsContains(e:GetHandler())
end
function cm.thfilter(c)
return c:IsSetCard(0xc80) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--Effect 2
function cm.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc80)
end
function cm.sptg(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 c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--Effect 3
--Effect 4
--Effect 5
\ No newline at end of file
--时刻喷射龙
local m=30900006
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.hspcon)
e2:SetTarget(cm.hsptg)
e2:SetOperation(cm.hspop)
c:RegisterEffect(e2)
--Effect 2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(cm.atkcon)
e4:SetValue(1000)
c:RegisterEffect(e4)
--Effect 3
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(m,0))
e12:SetCategory(CATEGORY_REMOVE)
e12:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EVENT_SPSUMMON_SUCCESS)
e12:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e12:SetCountLimit(1,m)
e12:SetCondition(cm.con)
e12:SetTarget(cm.tg)
e12:SetOperation(cm.op)
c:RegisterEffect(e12)
end
--Effect 1
function cm.hspfilter(c)
return c:IsLevelAbove(1) and c:IsRace(RACE_CYBERSE)
and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
function cm.hspcheck(g,tp)
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLevel,8) and aux.mzctcheck(g,tp)
end
function cm.hspgcheck(g)
if g:GetSum(Card.GetLevel)<=8 then return true end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLevel,8)
end
function cm.hspcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(cm.hspfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
aux.GCheckAdditional=cm.hspgcheck
local res=g:CheckSubGroup(cm.hspcheck,1,#g,tp)
aux.GCheckAdditional=nil
return res
end
function cm.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local tsp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(cm.hspfilter,tsp,LOCATION_HAND+LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tsp,HINTMSG_REMOVE)
aux.GCheckAdditional=cm.hspgcheck
local sg=g:SelectSubGroup(tsp,cm.hspcheck,true,1,#g,tsp)
aux.GCheckAdditional=nil
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
Duel.Remove(sg,POS_FACEUP,REASON_COST)
sg:DeleteGroup()
end
--Effect 2
function cm.atkcon(e)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and bc and bc:IsSummonLocation(LOCATION_EXTRA)
end
--Effect 3
function cm.check(c)
return c:IsLinkSetCard(0xc80)
end
function cm.lck(c)
local mg=c:GetMaterial()
return c:IsType(TYPE_LINK)
and c:IsSummonType(SUMMON_TYPE_LINK)
and mg:IsExists(cm.check,1,nil)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.lck,1,nil)
end
function cm.rm(c)
return c:IsAbleToRemove() and c:GetSequence()<5
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.rm,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(cm.rm,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,cm.rm,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,cm.rm,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--时刻喷射龙·G
local m=30900007
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(cm.tgtg)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
--Effect 2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
--Effect 1
function cm.tgtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) or c==e:GetHandler()
end
function cm.rf(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE)
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.rf,e:GetHandlerPlayer(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*200
end
--Effect 2
function cm.f1(c)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsAbleToRemove()
end
function cm.f2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.f1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(cm.f2,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.f1,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,cm.f2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
local fid=c:GetFieldID()
local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
local og=Group.CreateGroup()
if tc==hc then tc=g:GetNext() end
if hc:IsRelateToEffect(e) or tc:IsRelateToEffect(e) then
if hc:IsRelateToEffect(e)
and Duel.Remove(hc,POS_FACEUP,REASON_EFFECT)>0
and hc:IsLocation(LOCATION_REMOVED)
and hc:IsFaceup() then
hc:RegisterFlagEffect(m+m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
og:AddCard(hc)
end
if tc:IsRelateToEffect(e)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
og:AddCard(tc)
end
end
if #og>0 then
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(cm.rmcon)
e1:SetOperation(cm.rmop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.rmfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
end
function cm.rmfilter3(c,fid)
return c:GetFlagEffectLabel(m+m)==fid
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
local g=e:GetLabelObject()
local tg=g:Filter(cm.rmfilter,nil,e:GetLabel())
local tc=g:Filter(cm.rmfilter3,nil,e:GetLabel()):GetFirst()
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)>0
and c:IsFaceup() and zone>0
and tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) then
Duel.Hint(HINT_CARD,0,m)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--蒸汽少女 美愣
local m=30900008
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--Effect 2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.con)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
--Effect 1
function cm.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0xc80)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsLevel(1) and c:IsRace(RACE_CYBERSE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,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)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--Effect 2
function cm.con(e)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()~=tp
end
function cm.cf(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_CYBERSE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.cf,tp,LOCATION_GRAVE,0,c)
if chk==0 then return #g>0 and c:IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:Select(tp,1,1,nil)
rg:AddCard(c)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local atk=Duel.GetOperatedGroup():GetSum(Card.GetAttack)
Duel.SetTargetParam(atk)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(cm.atktg)
e1:SetLabel(atk)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.atktg(e,c)
return c:IsAttackBelow(e:GetLabel())
end
--超时空的次元旅行
local m=30900009
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Effect 1
function cm.f1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0xc80)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(cm.cf1,tp,LOCATION_GRAVE,0,1,c)
end
function cm.f2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xc80)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(cm.cf2,tp,LOCATION_GRAVE,0,1,c)
end
function cm.cf1(c)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0xc80)
and c:GetAttack()>0
and c:IsAbleToRemoveAsCost()
end
function cm.cf2(c)
return c:IsType(TYPE_LINK) and c:IsSetCard(0xc80)
and c:GetAttack()>0
and c:IsAbleToRemoveAsCost()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then
return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.f1(chkc,e,tp)
else
return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.f2(chkc,e,tp)
end
end
local b1=Duel.IsExistingTarget(cm.f1,tp,LOCATION_REMOVED,0,1,nil,e,tp)
local b2=Duel.IsExistingTarget(cm.f2,tp,LOCATION_REMOVED,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,cm.cf1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local atk=Duel.GetOperatedGroup():GetSum(Card.GetAttack)
Duel.SetTargetParam(atk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.f1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local srg=Duel.SelectMatchingCard(tp,cm.cf2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(srg,POS_FACEUP,REASON_COST)
local atk=Duel.GetOperatedGroup():GetSum(Card.GetAttack)
Duel.SetTargetParam(atk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local ag=Duel.SelectTarget(tp,cm.f2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,ag,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if atk<=0 then atk=0 end
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc: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)
tc:RegisterEffect(e2)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_UPDATE_ATTACK)
e11:SetValue(atk)
e11:SetReset(RESET_EVENT+RESETS_STANDARD+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e11)
end
Duel.SpecialSummonComplete()
else
local tc=Duel.GetFirstTarget()
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if atk<=0 then atk=0 end
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc: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)
tc:RegisterEffect(e2)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_UPDATE_ATTACK)
e11:SetValue(atk)
e11:SetReset(RESET_EVENT+RESETS_STANDARD+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e11)
end
Duel.SpecialSummonComplete()
end
end
--齿轮编年史 超越之力
local m=30900010
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Effect 1
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.cgfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK)
and c:IsLinkAbove(1) and c:IsAbleToRemoveAsCost()
end
function cm.cefilter(c,tc,ct,e,tp)
if not c:IsType(TYPE_XYZ) then return false end
local r=c:GetRank()-tc:GetLink()
return c:IsSetCard(0xc80) and tc:IsCanBeXyzMaterial(c)
and r>0 and ct>=r
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function cm.cfilter(c,e,tp)
local g=Duel.GetMatchingGroup(cm.cgfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetSum(Card.GetLink)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK)
and c:IsFaceup() and c:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(cm.cefilter,tp,LOCATION_EXTRA,0,1,nil,c,ct,e,tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function cm.tgefilter(c,tc,e,tp,rank)
if not c:IsType(TYPE_XYZ) then return false end
local r=c:GetRank()-tc:GetLink()
return c:IsSetCard(0xc80) and tc:IsCanBeXyzMaterial(c) and r==rank
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function cm.tgfilter(c,e,tp,rank)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK)
and Duel.IsExistingMatchingCard(cm.tgefilter,tp,LOCATION_EXTRA,0,1,nil,c,e,tp,rank)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.cfilter(chkc,e,tp) end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
end
e:SetLabel(0)
local avail={}
local availbool={}
local rg=Duel.GetMatchingGroup(cm.cgfilter,tp,LOCATION_GRAVE,0,nil)
local ct=rg:GetSum(Card.GetLink)
local gfield=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil,e,tp)
for tc in aux.Next(gfield) do
local gextra=Duel.GetMatchingGroup(cm.cefilter,tp,LOCATION_EXTRA,0,nil,tc,ct,e,tp)
for ex in aux.Next(gextra) do
local r=ex:GetRank()-tc:GetLink()
if not availbool[r] then
availbool[r]=true
table.insert(avail,r)
end
end
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local num=Duel.AnnounceNumber(tp,table.unpack(avail))
e:SetLabel(num)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=rg:SelectWithSumEqual(tp,Card.GetLink,num,1,99)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,num)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) and tc:IsFaceup()
and tc:IsRelateToEffect(e) and tc:IsControler(tp) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tgefilter,tp,LOCATION_EXTRA,0,1,1,nil,tc,e,tp,e:GetLabel())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return 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)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA)
end
--齿轮编年史 时空解放
local m=30900011
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
c:RegisterEffect(e1)
end
--Effect 1
function cm.sp1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc80)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(cm.lkf,tp,LOCATION_EXTRA,0,1,nil,c)
end
function cm.sp2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc80)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.lkf(c,mc)
return c:IsSetCard(0xc80) and c:IsLinkSummonable(nil,mc)
end
function cm.fselect(sg,tp)
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,0,nil)
mg:Merge(sg)
return mg:CheckSubGroup(cm.matfilter,1,#mg,tp,sg)
end
function cm.filter2(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function cm.matfilter(sg,tp,g)
if sg:Filter(aux.IsInGroup,nil,g):GetCount()~=g:GetCount() then return false end
return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,sg)
end
function cm.xyzfilter(c,mg)
return c:IsSetCard(0xc80) and c:IsXyzSummonable(mg,#mg,#mg)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.sp2,tp,LOCATION_REMOVED,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b1=Duel.IsPlayerCanSpecialSummonCount(tp,2) and ft>0
and Duel.IsExistingMatchingCard(cm.sp1,tp,LOCATION_REMOVED,0,1,nil,e,tp)
local b2=Duel.IsPlayerCanSpecialSummonCount(tp,2) and ft>0
and mg:CheckSubGroup(cm.fselect,1,1,tp)
if chk==0 then return b1 or b2 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(m,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,1)
opval[off-1]=2
off=off+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetProperty(0)
e:SetOperation(cm.linkop)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_REMOVED+LOCATION_EXTRA)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetProperty(0)
e:SetOperation(cm.xyzop)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_REMOVED+LOCATION_EXTRA)
end
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sp1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc or not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Duel.AdjustInstantly()
if not tc:IsLocation(LOCATION_MZONE) then return end
local tg=Duel.GetMatchingGroup(cm.lkf,tp,LOCATION_EXTRA,0,nil,tc)
if tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.LinkSummon(tp,sc,nil,tc)
end
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) or ft<=0 then return end
local mg=Duel.GetMatchingGroup(cm.sp2,tp,LOCATION_REMOVED,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=mg:SelectSubGroup(tp,cm.fselect,false,1,1,tp)
if not g then return end
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
Duel.AdjustInstantly()
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<#g then return end
local exg=Duel.GetMatchingGroup(cm.xyzfilter2,tp,LOCATION_EXTRA,0,nil)
local xyzg=exg:Filter(cm.ovfilter,nil,tp,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
local fg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,0,nil)
local sg=fg:SelectSubGroup(tp,cm.gselect,false,1,7,xyz,g)
Duel.XyzSummon(tp,xyz,sg)
end
end
function cm.xyzfilter2(c)
return c:IsSetCard(0xc80)
end
function cm.ovfilter(c,tp,sg)
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,0,nil)
mg:Merge(sg)
return mg:CheckSubGroup(cm.gselect,1,#mg,c,sg)
end
function cm.gselect(sg,c,g)
if sg:Filter(aux.IsInGroup,nil,g):GetCount()~=g:GetCount() then return false end
return c:IsXyzSummonable(sg,#sg,#sg)
end
--Effect 2
--Effect 3
--Effect 4
--Effect 5
--齿轮编年史
local m=30900012
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Effect 1
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,m)
e3:SetCost(cm.cost)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
--Effect 2
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,m+m)
e1:SetCondition(cm.atkcon)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
end
--Effect 1
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsType(TYPE_LINK)
end
function cm.checkzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
end
return bit.band(zone,0x1f)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function cm.cf(c,e,tp,zone)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsSetCard(0xc80)
and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.sp,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalLevel(),zone)
end
function cm.sp(c,e,tp,lv,zone)
return c:IsLevel(lv+1) and c:IsSetCard(0xc80)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=cm.checkzone(e:GetHandlerPlayer())
local cg=Duel.GetMatchingGroup(cm.cf,tp,LOCATION_MZONE,0,nil,e,tp,zone)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and #cg>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=cg:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local lv=Duel.GetOperatedGroup():GetFirst():GetOriginalLevel()
Duel.SetTargetParam(lv)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=cm.checkzone(e:GetHandlerPlayer())
local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if zone<=0 or lv<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sp,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv,zone)
if #g>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--Effect 2
function cm.ctf(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:GetBaseAttack()>0 and c:IsAbleToRemoveAsCost()
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not a or not d then return false end
if a:IsControler(1-tp) then a,d=d,a end
return a:IsFaceup() and a:IsLevelAbove(5) and a:IsSetCard(0xc80)
and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle()
and Duel.IsExistingMatchingCard(cm.ctf,tp,LOCATION_MZONE,0,1,a)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(1-tp) then a,d=d,a end
local g=Duel.GetMatchingGroup(cm.ctf,tp,LOCATION_MZONE,0,a)
if chk==0 then return #g>0 and c:IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:Select(tp,1,1,a)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local atk=Duel.GetOperatedGroup():GetFirst():GetBaseAttack()
Duel.SetTargetParam(atk)
Debug.Message(atk)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not a or not d then return false end
if a:IsControler(1-tp) then a,d=d,a end
if a:IsFaceup() and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() and atk~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(atk)
a:RegisterEffect(e1)
end
end
\ No newline at end of file
--历史创造龙
local m=30900013
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,2,cm.lcheck)
c:EnableReviveLimit()
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCost(cm.cost)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,m+m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xc80)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsType(TYPE_LINK)
end
function cm.checkzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
end
return bit.band(zone,0x1f)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function cm.cf(c,e,tp,zone)
return c:IsLevelBelow(4) and c:IsSetCard(0xc80)
and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.sp,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalLevel(),zone)
end
function cm.sp(c,e,tp,lv,zone)
return c:IsLevel(lv+1) and c:IsSetCard(0xc80)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=cm.checkzone(e:GetHandlerPlayer())
local cg=Duel.GetMatchingGroup(cm.cf,tp,LOCATION_HAND,0,nil,e,tp,zone)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and #cg>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=cg:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local lv=Duel.GetOperatedGroup():GetFirst():GetOriginalLevel()
Duel.SetTargetParam(lv)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=cm.checkzone(e:GetHandlerPlayer())
local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if zone<=0 or lv<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sp,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv,zone)
if #g>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--节流管径龙
local m=30900014
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m+m)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local lg1=Duel.GetLinkedGroup(tp,1,1)
local lg2=Duel.GetLinkedGroup(1-tp,1,1)
lg1:Merge(lg2)
return lg1 and lg1:IsContains(e:GetHandler())
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:GetSequence()<5 and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.Remove(tc,0,REASON_EFFECT)
end
end
function cm.thfilter(c)
return c:IsSetCard(0xc80) and c:IsType(TYPE_SPELL+TYPE_TRAP)
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)
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 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--节流管径龙
local m=30900015
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--lv
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.lvtg)
e3:SetOperation(cm.lvop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.efilter)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
function cm.efilter(e,c)
local ec=e:GetHandler()
local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0xc80)
and lg:IsContains(ec)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsRace(RACE_CYBERSE)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.lvfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc80) and not c:IsLevel(8) and c:IsLevelAbove(1)
end
function cm.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.lvfilter,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.lvfilter,tp,LOCATION_MZONE,0,2,2,nil)
end
function cm.tgfilter(c,e)
return c:IsFaceup() and c:IsRelateToEffect(e)
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(cm.tgfilter,nil,e)
if g:GetCount()<=0 then return end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--分歧龙
local m=30900016
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28270534,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.immtg)
e3:SetOperation(cm.immop)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.efilter)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
end
function cm.efilter(e,c)
local ec=e:GetHandler()
local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0xc80)
and lg:IsContains(ec)
end
function cm.indval(e,c)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function cm.cfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_CYBERSE) and c:IsAbleToRemoveAsCost()
end
function cm.mzfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
if chk==0 then return ft>-2 and rg:GetCount()>1 and (ft>0 or rg:IsExists(cm.mzfilter,ct,nil,tp)) end
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=rg:Select(tp,2,2,nil)
elseif ft==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=rg:FilterSelect(tp,cm.mzfilter,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=rg:Select(tp,1,1,g:GetFirst())
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=rg:FilterSelect(tp,cm.mzfilter,2,2,nil,tp)
end
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local atk=c:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(math.ceil(atk/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
function cm.immfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK)
end
function cm.immtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.immfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.immop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.immfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function cm.efilter(e,te,c)
return te:GetOwner()~=c
end
--齿轮编年史 无尽之力
local m=30900017
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.target1)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.filter(c)
return c:IsSetCard(0xc80) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--齿轮编年史 朝着未来飞翔
local m=30900018
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22555834+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.cost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate1)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc80) and c:IsAbleToRemove()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--齿轮编年史 开辟的未来
local m=30900019
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(cm.handcon)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetCost(cm.remcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc8f)
end
function cm.handcon(e)
return Duel.IsExistingMatchingCard(cm.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.counterfilter(c)
return c:IsRace(RACE_CYBERSE)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc80) and c:IsAbleToRemoveAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(rc)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc80) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if g:GetCount()>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_DEFENSE)
end
end
\ No newline at end of file
--时空龙·秘焰龙·G
function c30900020.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--disable attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30900020,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCost(c30900020.atkcost)
e1:SetTarget(c30900020.atktg)
e1:SetOperation(c30900020.atkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c30900020.regcon)
e2:SetOperation(c30900020.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c30900020.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_ATTACK_DISABLED)
e5:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL)
e5:SetCondition(c30900020.effcon)
e5:SetOperation(c30900020.operation)
c:RegisterEffect(e5)
end
function c30900020.atkcost(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 c30900020.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(Duel.GetAttacker())
end
function c30900020.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.NegateAttack() and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c30900020.value)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c30900020.value(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED)*200
end
function c30900020.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c30900020.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(30900020,RESET_EVENT+RESETS_STANDARD,0,1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(30900020,3))
end
function c30900020.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,1,nil,TYPE_LINK) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c30900020.effcon(e)
return e:GetHandler():GetFlagEffect(30900020)>0
end
function c30900020.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SkipPhase(tp,PHASE_BATTLE_STEP,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_EP)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_SELF_TURN)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--枪手齿轮幼龙
local m=30900021
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.atkcon)
e3:SetCost(aux.bfgcost)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.spfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
local tc=Duel.GetAttackTarget()
if not ac:IsControler(tp) then ac,tc=tc,ac end
return ac and ac:IsControler(tp) and ac:IsFaceup() and ac:IsType(TYPE_LINK) and tc and tc:IsControler(1-tp) and tc:IsFaceup()
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc80)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc:IsControler(tp) then tc=Duel.GetAttackTarget() end
if Duel.NegateAttack() then
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
local ac=g:GetFirst()
if ac then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
ac:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--齿轮编年史·邂逅
local m=30900022
local cm=_G["c"..m]
function cm.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:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsLevel(1) and c:IsLinkRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp)
end
Duel.SpecialSummonComplete()
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then
return true
else
e:Reset()
return false
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
--计时器幼龙
local m=30900023
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,1,1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,m+m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkRace(RACE_CYBERSE)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter(c)
return c:IsCode(30900012) 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)
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 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--时空龙·命运驾驭龙
local m=30900024
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),8,2)
c:EnableReviveLimit()
--Effect 1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--Effect 2
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_TOHAND)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e12:SetCode(EVENT_REMOVE)
e12:SetProperty(EFFECT_FLAG_DELAY)
e12:SetCountLimit(1,m+m)
e12:SetCondition(cm.thcon)
e12:SetTarget(cm.thtg)
e12:SetOperation(cm.thop)
c:RegisterEffect(e12)
end
--Effect 1
function cm.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 cm.negfilter(c)
return aux.NegateAnyFilter(c) and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp)
and cm.negfilter(chkc) end
if chk==0 then return c:IsAbleToRemove() and Duel.IsExistingTarget(cm.negfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,cm.negfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e)
and (tc:IsFaceup() and not tc:IsDisabled())
and not tc:IsImmuneToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc: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)
tc:RegisterEffect(e2)
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
end
--Effect 2
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re and rc:IsOriginalCodeRule(30900024)
end
function cm.thfilter(c,tp)
return c:IsAbleToHand(tp) and c:IsRace(RACE_CYBERSE) and c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_ALL,LOCATION_REMOVED)
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_REMOVED,LOCATION_REMOVED,1,1,nil,tp)
if #g>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--星遗物的觉醒 夏娃
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,s.matfilter,1,1)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_SZONE+LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.tgtg)
e1:SetValue(s.val)
c:RegisterEffect(e1)
--link sm
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetCondition(s.con)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
end
function s.matfilter(c)
return c:IsLinkRace(RACE_CYBERSE) and c:IsLinkType(TYPE_LINK)
end
--e1
function s.tgtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function s.val(e,c)
return c:GetLink()*500
end
--e2
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,1-tp,id)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local g=Duel.GetMatchingGroup(s.lkfilter,tp,LOCATION_EXTRA,0,nil)
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_CONTINUOUS+TYPE_SPELL)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_LINK_SPELL_KOISHI)
e2:SetValue(LINK_MARKER_TOP)
c:RegisterEffect(e2)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil)
end
end
end
function s.lkfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsLinkSummonable(nil)
end
\ No newline at end of file
--天穿之圣骑 时契装机
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),3)
--multi attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(function(e,c) return c:GetFlagEffect(id) end)
c:RegisterEffect(e1)
--link sm
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetCondition(s.con)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
--Damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(s.bdcon)
e3:SetOperation(s.damop)
c:RegisterEffect(e3)
end
--e2
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,1-tp,id)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
for tc1 in aux.Next(g1) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc1:RegisterEffect(e1)
tc1:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
end
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc2 in aux.Next(g2) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc2:RegisterEffect(e1)
tc2:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
end
end
--e3
function s.filter(c)
return c:IsCode(33201105) and c:IsFaceup()
end
function s.bdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsRelateToBattle() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,nil,1,nil)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,1-tp,id)
local dam=e:GetHandler():GetBattleTarget():GetBaseAttack()
if dam>0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1)
end
--砾岩丽禽-栖崖砾岩灵雀
local m=33331711
local cm=_G["c"..m]
function cm.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--flip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_FLIP)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) and c:IsType(TYPE_MONSTER) and c:IsPreviousControler(tp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,1-tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,c)
end
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,2,0,0)
local tc= g:GetFirst()
while tc do
Duel.SetChainLimit(cm.limit(tc))
tc=g:GetNext()
end
end
function cm.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
tc=g:GetNext()
end
end
\ No newline at end of file
--砾岩玄陆-镇冥砾岩巨龟
local m=33331712
local cm=_G["c"..m]
function cm.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--flip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_FLIP)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) and c:IsType(TYPE_MONSTER) and c:IsPreviousControler(tp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,1-tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,c)
end
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
local tc= g:GetFirst()
while tc do
Duel.SetChainLimit(cm.limit(tc))
tc=g:GetNext()
end
end
function cm.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
tc=g:GetNext()
end
end
end
\ No newline at end of file
--砾岩山谷深入
local m=33331713
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_FLIP)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetLabelObject(e1)
e2:SetCondition(function(e,tp,eg) return eg:IsExists(function(c) return c:IsControler(tp) and c:IsRace(RACE_ROCK) end,1,nil) and e1:CheckCountLimit(tp) end)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.cost(e,tp)
e:SetLabel(1)
return true
end
function cm.check(c,tp)
return not c:IsPublic() and c:IsRace(RACE_ROCK) and Duel.IsExistingMatchingCard(cm.thcheck,tp,LOCATION_DECK,0,1,nil)
end
function cm.thcheck(c)
return c:IsAbleToHand() and c:IsSetCard(0x565) and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==1 then
return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_HAND,0,1,nil,tp)
else
return false
end
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0)
end
function cm.activate(e,tp)
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thcheck,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
local num=Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if num>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and tc:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
end
function cm.tg(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,tp,LOCATION_GRAVE)
end
function cm.op(e,tp)
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
\ No newline at end of file
......@@ -14,15 +14,15 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
end
function cm.spfilter0(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() and c:IsLevelBelow(3)
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() and c:IsLevel(3)
end
function cm.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_ONFIELD)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return ft>-1 and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return ft>-1 and Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.spfilter0,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -79,9 +79,9 @@ function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(code)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
--local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil)
-- Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
end
......
......@@ -27,12 +27,31 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
cm.material_type=TYPE_SYNCHRO
function cm.counterfilter(c)
return c:IsRace(RACE_SPELLCASTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_SPELLCASTER)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......@@ -73,15 +92,4 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
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(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsRace(RACE_SPELLCASTER)
end
\ No newline at end of file
--使命的改写
local m=33502920
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(33502900)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.filter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.filter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.sumfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
\ No newline at end of file
--AI人格的重写
local m=33502922
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp,mc)
if Duel.GetLocationCountFromEx(tp,tp,mc,c)<1 then return false end
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function cm.thfilter(c,e,tp)
return aux.IsCodeListed(c,33502900) and c:IsAbleToGrave() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and Duel.IsExistingMatchingCard(cm.spfilter,tp,0,LOCATION_MZONE,1,nil,e,tp,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,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_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
if g2:GetCount()>0 then
if Duel.SendtoGrave(g2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp,g2)
if g1:GetCount()>0 then
local tc=g1:GetFirst()
if Duel.GetControl(tc,tp) then
local reset_flag=RESET_EVENT+0x1fe0000
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(reset_flag)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(33502900)
tc:RegisterEffect(e1)
end
end
end
end
end
\ No newline at end of file
--流星河的妖精千式
local m=35801151
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2)
c:EnableReviveLimit()
--zone limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_MUST_USE_MZONE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetTargetRange(1,0)
e0:SetValue(cm.zonelimit)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.atktg1)
e1:SetOperation(cm.atkop1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+1)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.zonelimit(e)
return 0x7f007f & ~e:GetHandler():GetLinkedZone()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.filter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsSetCard(0x3b82,0x3a04)
end
function cm.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 and e:GetHandler():GetMutualLinkedGroupCount()>0 and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0x3b82,0x3a04) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function cm.spfilter(c,e,tp,mc)
return c:IsType(TYPE_LINK) and not c:IsType(TYPE_EFFECT) and c:IsSetCard(0xb81) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SPECIAL,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--回荡于交界的苑憬之歌
local m=35801153
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetLabel(0)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,1))
e2:SetLabel(1)
c:RegisterEffect(e2)
end
function cm.disfilter(c,e)
if e:GetLabel()==1 then
return c:IsOnField() and c:IsAbleToDeck() and c:IsSetCard(0xb81)
else
return c:IsOnField() and c:IsAbleToDeck() and c:IsSetCard(0x3a04)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.disfilter(chkc,e) end
if chk==0 then return Duel.IsExistingTarget(cm.disfilter,tp,LOCATION_MZONE,0,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,cm.disfilter,tp,LOCATION_MZONE,0,1,1,nil,e)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
if g then Duel.SendtoHand(g,nil,REASON_EFFECT) end
end
Duel.ShuffleHand(tp)
end
end
\ No newline at end of file
--妖精乡的无名妖精
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id0)
e2:SetTarget(s.thtg1)
e2:SetOperation(s.thop1)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id0+1)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.thfilter1(c)
return c:IsCode(47344566) and c:IsAbleToHand()
end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function s.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)>0 end
end
function s.spfilter(c)
return c:IsCode(47344568) or c:IsCode(47344566)
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 Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc= Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--妖精骑士 高文
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
local id0=id*10
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id0)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id0+1)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCountLimit(1,id0+2)
e3:SetCondition(s.atkcon)
e3:SetOperation(s.atkop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFacedown() or not (c:IsSetCard(0x43f) or c:IsSetCard(0x43e))
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return (Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil))
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function s.thfilter(c)
return c:IsSetCard(0x43e) and c:IsType(TYPE_SPELL) and not c:IsType(TYPE_FIELD) 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)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(rc:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
rc:RegisterEffect(e2,true)
end
\ No newline at end of file
--妖精骑士 崔斯坦
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id0)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id0+1)
e2:SetTarget(s.thtg1)
e2:SetOperation(s.thop1)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--to hand2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id0+2)
e3:SetCondition(s.descon)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFacedown() or not (c:IsSetCard(0x43f) or c:IsSetCard(0x43e))
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function s.thfilter1(c)
return c:IsSetCard(0x43f) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function s.thfilter2(c)
return c:IsSetCard(0x43e) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--妖精骑士之主 摩根
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
c:EnableReviveLimit()
--non tuner
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_NONTUNER)
e0:SetValue(s.tnval)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.sprcon)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id0)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id0+1)
e4:SetTarget(s.thtg2)
e4:SetOperation(s.thop2)
c:RegisterEffect(e4)
--tohand2
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,id0+2)
e5:SetCost(aux.bfgcost)
e5:SetTarget(s.thtg3)
e5:SetOperation(s.thop3)
c:RegisterEffect(e5)
end
function s.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function s.sprfilter(c)
return c:IsFaceup() and c:IsLevel(5) and (c:IsAbleToGraveAsCost() or c:IsType(TYPE_TOKEN))
end
function s.sprfilter1(c,tp,g,sc)
return c:IsType(TYPE_TUNER) and g:IsExists(s.sprfilter2,1,c,tp,c,sc)
end
function s.sprfilter2(c,tp,mc,sc)
local sg=Group.FromCards(c,mc)
return (not c:IsType(TYPE_TUNER)) and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(s.sprfilter1,1,nil,tp,g,c)
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,s.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,s.sprfilter2,1,1,mc,tp,mc,c)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function s.thfilter(c)
return c:IsCode(47344563) 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
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)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
function s.thfilter2(c)
return c:IsSetCard(0x43e) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.tgfilter(c)
return (c:IsSetCard(0x43e) or c:IsSetCard(0x43f)) and c:IsAbleToGrave()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil)end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
function s.thfilter3(c)
return c:IsSetCard(0x43e) and c:IsAbleToHand() and c:IsType(TYPE_FIELD)
end
function s.thtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter3,tp,LOCATION_GRAVE,0,1,nil) and aux.exccon(e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.thfilter3),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
end
function s.thop3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--妖精乡 不列颠
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(s.atkfilter)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,id)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.atkfilter(e,c)
return c:IsSetCard(0x43f) or c:IsSetCard(0x43e)
end
function s.cfilter(c)
return (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ)) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil) and rp==tp
end
function s.filter(c)
return c:IsSetCard(0x43f) and c:IsType(TYPE_MONSTER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e)
local b2=Duel.GetMZoneCount(tp,c)>0
if chk==0 then return b1 and b2 end
local off=1
local ops,opval={},{}
if b1 and b2 then
ops[off]=aux.Stringid(id,0)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,1)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
if sel==0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
end
function s.splimit(e,c)
return not (c:IsSetCard(0x43f) or c:IsSetCard(0x43e)) and c:IsLocation(LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47344599,0x43e,TYPES_TOKEN_MONSTER,0,0,5,RACE_FAIRY,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,47344599)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
else
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--妖精骑士 哈贝特洛特
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id0)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--special summon other
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id0+1)
e4:SetCost(s.spcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id0+2)
e2:SetTarget(s.reptg)
e2:SetValue(s.repval)
e2:SetOperation(s.repop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFacedown() or not (c:IsSetCard(0x43f) or c:IsSetCard(0x43e))
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return (c:IsSetCard(0x43e) or c:IsSetCard(0x43f)) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.splimit(e,c)
return not (c:IsSetCard(0x43f) or c:IsSetCard(0x43e))
end
function s.spop(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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and (c:IsSetCard(0x43e) or c:IsSetCard(0x43f)) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.repfilter,1,c,tp) and c:IsAbleToRemove()
and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function s.repval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--妖精乡的预言之子 阿尔托莉雅·卡斯特
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id0)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.discon)
e1:SetCost(s.discost)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCountLimit(1,id0+1)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.cost)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,id0+2)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSetCard(0x43f)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
return re:IsHasCategory(CATEGORY_DISABLE)
end
function s.costfilter(c)
return (c:IsSetCard(0x43f) or c:IsSetCard(0x43e)) and c:IsAbleToGraveAsCost()
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and
Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x43f) or c:IsSetCard(0x43e)) and c:IsAbleToHand()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.filter(c)
return c:IsSetCard(0x43e) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)>0
end
function s.sptg(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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--妖精乡的妖精王 奥博龙
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,id0)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.rmcon)
e1:SetCost(s.rmcost)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--attach
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id0+1)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD+LOCATION_HAND)
e2:SetTarget(s.xtg)
e2:SetOperation(s.xop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,id0+2)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSetCard(0x43e)
end
function s.cfilter(c,tp)
return c:IsControler(tp) and c:IsReason(REASON_EFFECT)
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,1-tp) and rp==1-tp
end
function s.rmfilter(c)
return (c:IsSetCard(0x43f) or c:IsSetCard(0x43e)) and c:IsAbleToGraveAsCost()
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and
Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
function s.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsSetCard(0x43f) or c:IsSetCard(0x43e)) and c:IsAbleToHand()
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g = eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if g:GetCount()>0 then
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then
Duel.BreakEffect()
local g2 = Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
Duel.ShuffleHand(tp)
end
end
end
function s.xfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and (c:IsSetCard(0x43e) or c:IsSetCard(0x43f))
end
function s.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.xfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(s.xfilter,tp,LOCATION_MZONE,0,1,c)
and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.xfilter,tp,LOCATION_MZONE,0,1,1,c)
end
function s.xop(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
Duel.Overlay(tc,c)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)>0
end
function s.sptg(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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--乐园妖精 阿尔托莉雅·阿瓦隆
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x43f),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1,1)
c:EnableReviveLimit()
--code
aux.EnableChangeCode(c,47344566,LOCATION_MZONE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(0x43e)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--immue
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id0)
e2:SetHintTiming(0,TIMING_DRAW_PHASE)
e2:SetCost(s.imcost)
e2:SetTarget(s.imtg)
e2:SetOperation(s.imop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,id0+1)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,c)
e:SetLabel(tc:GetFirst():GetType()&0x7)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function s.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.efilter(e,te)
local rctype=e:GetLabel()
return te:GetHandler():IsType(rctype) and e:GetHandlerPlayer()~=te:GetOwnerPlayer()
end
function s.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetLabel(e:GetLabel())
e1:SetValue(s.efilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.thfilter(c)
return (c:IsSetCard(0x43e) or c:IsSetCard(0x43f)) and c:IsAbleToHand()
end
function s.rmfilter(c,cty)
return c:IsType(cty)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil,tc:GetType()&0x7)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--妖精骑士/芭万·希
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0))
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id0)
e1:SetCondition(s.spcon)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id0+1)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x43e) and c:IsType(TYPE_SYNCHRO)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
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.spfilter(c,e,tp,mc)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsSetCard(0x43e)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc and Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
function s.filter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return eg:IsExists(s.filter,1,nil,1-tp) and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--妖精骑士/巴格斯特
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2,s.ovfilter,aux.Stringid(id,0))
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id0)
e1:SetCondition(s.spcon)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id0+1)
e2:SetCondition(s.atkcon)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x43e) and c:IsType(TYPE_SYNCHRO)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
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.spfilter(c,e,tp,mc)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsSetCard(0x43e)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc and Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
function s.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_DRAW)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,1-tp) and rp==1-tp
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.cfilter,1,nil,1-tp) and rp==1-tp end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c:GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--妖精乡的创成
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.chainfilter(re,tp,cid)
local rc=re:GetHandler()
local loc=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)
return not (re:IsActiveType(TYPE_MONSTER) and (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and not (rc:IsSetCard(0x43e) or rc:IsSetCard(0x43f)))
end
function s.cfilter(c,tp)
return c:IsAbleToGrave() and c:IsLevel(9,10) and c:IsType(TYPE_SYNCHRO)
end
function s.plfilter(c)
return c:IsCode(47344564)
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and (rc:IsLocation(LOCATION_HAND) or rc:IsLocation(LOCATION_GRAVE)) and not (rc:IsSetCard(0x43e) or rc:IsSetCard(0x43f))
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
Duel.SSet(tp,tc)
end
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47344599,0x43e,TYPES_TOKEN_MONSTER,0,0,5,RACE_FAIRY,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,47344599)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function s.splimit(e,c)
return not (c:IsSetCard(0x43f) or c:IsSetCard(0x43e)) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--妖精乡的光之地平线
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(s.indestg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function s.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x43f) and not c:IsPublic()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sc=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
sc:CreateEffectRelation(e)
e:SetLabelObject(sc)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
end
function s.splimit(e,c)
return not (c:IsSetCard(0x43f) or c:IsSetCard(0x43e)) and c:IsLocation(LOCATION_EXTRA)
end
function s.op(e,tp,eg,ep,ev,re,r,rp,chk)
local sc = e:GetLabelObject()
Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
local dr=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,dr)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if dr:IsSetCard(0x43e) or dr:IsSetCard(0x43f) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47344599,0x43e,TYPES_TOKEN_MONSTER,0,0,5,RACE_INSECT,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,47344599)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function s.indestg(e,c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
\ No newline at end of file
--妖精乡的灾厄
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) and
Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil)
end
end
function s.rmfilter(c,tp)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemove(tp)
end
function s.spfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x43e)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetOperation(s.rdop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e2,tp)
end
end
end
function s.rdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)
end
\ No newline at end of file
--圣剑,拔刀
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil)
and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0
end
end
function s.rmfilter(c,tp)
return c:IsSetCard(0x43e) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN,REASON_EFFECT)
Duel.Remove(g2,POS_FACEDOWN,REASON_EFFECT)
end
end
function s.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x43f) or c:IsSetCard(0x43e))
end
function s.handcon(e,tp,eg,ep,ev,re,r,rp)
local fuc = Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_ONFIELD,0,nil)
local fuc2 = Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_ONFIELD,0,nil)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
return ct>0 and fuc==fuc2
end
\ No newline at end of file
--奈落之虫 奥博龙·伏提庚
local s,id,o=GetID()
function s.initial_effect(c)
local id0=id*10
c:EnableCounterPermit(0x43f)
c:SetCounterLimit(0x43f,5)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),10,2)
--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:SetValue(s.efilter)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id0)
e2:SetCondition(s.discon)
e2:SetCost(s.cost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
--special summon other
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id0+1)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.efilter(e,te)
return not te:GetHandler():GetColumnGroup():IsContains(e:GetHandler()) and e:GetHandlerPlayer()~=te:GetOwnerPlayer()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
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.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(84815190,3))
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
local g=Duel.GetDecktopGroup(1-tp,3)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup()
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 Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--拟尘妖巢穴
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
-- spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,id0+1)
e2:SetCost(s.cost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.thfilter(c)
return c:IsSetCard(0x430) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
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 Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local ra=Duel.AnnounceRace(tp,1,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0x7f)
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp,1,4)
e:SetLabel(ra,att,lv)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.totuner(c,rc)
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>=2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local c=e:GetHandler()
local ra,att,lv=e:GetLabel()
local ct=1
if ft>1 then
local num={}
local i=1
while i<=ft do
num[i]=i
i=i+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
ct=Duel.AnnounceNumber(tp,table.unpack(num))
end
local g=Group.CreateGroup()
repeat
local token=Duel.CreateToken(tp,47364499)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(ra)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
g:AddCard(token)
ct=ct-1
until ct==0
Duel.SpecialSummonComplete()
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
g:ForEach(s.totuner,c)
end
end
--拟尘妖显现
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0+1)
e2:SetCost(s.cost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id0+2)
e3:SetCondition(aux.exccon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
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 Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0x7f)
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local c=e:GetHandler()
local att=e:GetLabel()
local token=Duel.CreateToken(tp,47364499)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
Duel.SpecialSummonComplete()
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local lv=Duel.AnnounceLevel(tp,0,7)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
token:RegisterEffect(e1)
end
end
function s.thfilter(c)
if c:IsCode(47364401) or not (c:IsSetCard(0x430) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc = Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc then
if 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
end
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--拟尘妖化形
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOKEN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0+1)
e2:SetCost(s.cost)
e2:SetTarget(s.chtg)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id0+2)
e3:SetCondition(aux.exccon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
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 Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local ra=Duel.AnnounceRace(tp,1,RACE_ALL)
e:SetLabel(ra)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local c=e:GetHandler()
local ra=e:GetLabel()
local token=Duel.CreateToken(tp,47364499)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(ra)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
Duel.SpecialSummonComplete()
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local lv=Duel.AnnounceLevel(tp,0,7)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
token:RegisterEffect(e1)
end
end
function s.change(token,c,co,ra,att,lv)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(ra)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
end
function s.totuner(c,rc)
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_TOKEN) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local ra=Duel.AnnounceRace(tp,1,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0x7f)
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp,1,8)
e:SetLabel(ra,att,lv)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local tc = Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_ONFIELD,0,1,2,nil,TYPE_TOKEN)
local c=e:GetHandler()
local ra,att,lv=e:GetLabel()
tc:ForEach(s.change,c,ra,att,lv)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
g:ForEach(s.totuner,c)
end
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--拟尘妖融合
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_ANNOUNCE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id0)
e3:SetCondition(aux.exccon)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
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 Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local ra=Duel.AnnounceRace(tp,1,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0x7f)
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp,1,8)
e:SetLabel(ra,att,lv)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.fufilter(c,e)
return c:IsLocation(LOCATION_ONFIELD) and not c:IsImmuneToEffect(e)
end
function s.filter(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 s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local c=e:GetHandler()
local ra,att,lv=e:GetLabel()
local token=Duel.CreateToken(tp,47364499)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(ra)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_FUSION_SUBSTITUTE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e4)
Duel.SpecialSummonComplete()
Duel.BreakEffect()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.fufilter,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local ce=Duel.GetChainMaterial(tp)
local mg2=nil
local sg2=nil
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter,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.Release(mat1,POS_FACEUP,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 s.thfilter(c)
return c:IsSetCard(0x430) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--拟尘妖分解
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0)
e2:SetCost(s.cost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id0+1)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
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 Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local c=e:GetHandler()
local token=Duel.CreateToken(tp,47364499)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local lv=Duel.AnnounceLevel(tp,0,7)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
token:RegisterEffect(e1)
end
end
function s.thfilter(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function s.thfilter2(c)
return c:IsSetCard(0x430) 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_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc = Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,tc,1,tp,LOCATION_MZONE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Release(tc,REASON_EFFECT)>0 then
local g = Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
end
function s.drfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.drfilter,tp,LOCATION_GRAVE,0,1,nil) end
local tc = Duel.SelectTarget(tp,s.drfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,LOCATION_GRAVE)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--拟尘妖聚合
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- sp summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0)
e2:SetCost(s.cost2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id0+1)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
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 Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local c=e:GetHandler()
local token=Duel.CreateToken(tp,47364499)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local lv=Duel.AnnounceLevel(tp,0,7)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
token:RegisterEffect(e1)
end
end
function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.costfilter(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function s.spfilter(c,e,tp,race)
return c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsRace(race) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.fselect(g,tg)
return tg:IsExists(Card.IsLink,1,nil,#g)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
local race=0
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
local cg=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_MZONE,0,nil)
local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,race)
local _,maxlink=tg:GetMaxGroup(Card.GetLink)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
if #tg==0 then return false end
return cg:CheckSubGroup(s.fselect,1,maxlink,tg)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=cg:SelectSubGroup(tp,s.fselect,false,1,maxlink,tg)
Duel.Release(rg,REASON_COST)
e:SetLabel(rg:GetCount(),race)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spfilter1(c,e,tp,lk,race)
return s.spfilter(c,e,tp,race) and c:IsLink(lk)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local lk,race=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk,race)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.drfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.drfilter,tp,LOCATION_GRAVE,0,1,nil) end
local tc = Duel.SelectTarget(tp,s.drfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,LOCATION_GRAVE)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--升阶魔法-拟尘妖升变
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,id0+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- rank up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(2,id0+EFFECT_COUNT_CODE_OATH)
e2:SetCost(s.cost)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id0+1)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_TOKEN)
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),c:GetRace(),c:GetCode())
end
function s.filter2(c,e,tp,rk,rc,code)
if c:GetOriginalCode()==6165656 and code~=48995978 then return false end
return c:IsRank(rk) and c:IsRace(rc) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc = Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
e:SetLabel(tc:GetLevel(),tc:GetRace())
Duel.Release(tc,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local lv,rc=e:GetLabel()
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,rc,0)
local sc=g:GetFirst()
if sc then
sc:SetMaterial(nil)
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.Overlay(sc,c)
end
end
end
function s.filter3(c,e,tp)
local rk=c:GetRank()
return rk>0 and c:IsFaceup()
and Duel.IsExistingMatchingCard(s.filter4,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,c:GetAttribute())
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function s.filter4(c,e,tp,mc,rk,att)
if c:GetOriginalCode()==6165656 and not mc:IsCode(48995978) then return false end
return c:IsRank(rk) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter3(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter3,tp,LOCATION_MZONE,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter3,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetAttribute())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function s.drfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.drfilter,tp,LOCATION_GRAVE,0,1,nil) end
local tc = Duel.SelectTarget(tp,s.drfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,LOCATION_GRAVE)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--拟尘妖筑巢
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.target)
e2:SetValue(s.indct)
c:RegisterEffect(e2)
-- todeck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_TODECK)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetTarget(s.tdtg)
e4:SetOperation(s.tdop)
c:RegisterEffect(e4)
-- search
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,id0)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(s.thcon)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.target(e,c)
return c:IsType(TYPE_TOKEN)
end
function s.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function s.tdfilter(c)
return c:IsSetCard(0x430) 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_GRAVE+LOCATION_REMOVED,0,1,nil) end
local tc = Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function s.cfilter(c,tp)
return c:IsSetCard(0x430) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.thfilter(c)
return c:IsSetCard(0x430)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.thfilter,1,nil) and 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)
if not Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
\ No newline at end of file
--拟尘妖进化
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
-- sp summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id0)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
-- change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.chcon)
e3:SetTarget(s.chtg)
e3:SetOperation(s.chop)
c:RegisterEffect(e3)
end
function s.cfilter(c,tp)
return c:IsType(TYPE_TOKEN) and c:IsSummonPlayer(tp)
end
function s.exfilter(c,link,ra,att)
return c:IsLink(link+1) and c:IsRace(ra) and c:IsAttribute(att)
end
function s.linkfilter(c,tp)
return Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLink(),c:GetRace(),c:GetAttribute())
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg = Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_LINK)
local mg2=mg:Filter(s.linkfilter,nil,tp)
if chk==0 then return mg2:GetCount()>0 end
if mg2:GetCount()==1 then
Duel.SetTargetCard(mg2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=mg2:Select(tp,1,1,nil)
Duel.SetTargetCard(tg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 then
local g=Duel.SelectMatchingCard(tp,s.exfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetLink(),tc:GetRace(),tc:GetAttribute())
local c=g:GetFirst()
if c then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function s.chfilter(c,tp)
return c:IsType(TYPE_LINK) and c:IsSummonPlayer(tp)
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.chfilter,1,nil,tp)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local ra = Duel.AnnounceRace(tp,1,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att = Duel.AnnounceAttribute(tp,1,0x7f)
e:SetLabel(ra,att)
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local ra,att=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,TYPE_MONSTER)
local tc=g:GetFirst()
local c=e:GetHandler()
if tc then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(ra)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
--拟尘妖化
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0+1)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.chtg)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local own = Duel.CheckReleaseGroup(tp,s.costfilter,1,nil)
local enemy = Duel.CheckReleaseGroup(1-tp,s.costfilter,1,nil)
if chk==0 then return own or enemy end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
local att=tc:GetOriginalAttribute()
local ra=tc:GetOriginalRace()
local atk=math.max(tc:GetTextAttack(),0)
local def=math.max(tc:GetTextDefense(),0)
e:SetLabel(ra,att,tc:GetControler(),atk,def)
Duel.Release(tc,REASON_COST)
end
function s.costfilter(c)
local rp = c:GetControler()
return c:IsFaceup() and Duel.GetMZoneCount(rp,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ra,att,p,atk,def = e:GetLabel()
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,atk,def,1,RACE_INSECT,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,p) end
e:SetLabel(ra,att,p,atk,def)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ra,att,p,atk,def = e:GetLabel()
if Duel.GetLocationCount(p,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,47364499,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,p) then return end
local c=e:GetHandler()
local token=Duel.CreateToken(p,47364499)
Duel.SpecialSummonStep(token,0,tp,p,false,false,POS_FACEUP_DEFENSE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(att)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(ra)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_ATTACK)
e4:SetValue(atk)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SET_DEFENSE)
e5:SetValue(def)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e5)
Duel.SpecialSummonComplete()
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local ra=Duel.AnnounceRace(tp,1,RACE_ALL)
e:SetLabel(ra)
end
function s.change(c,ra,rc)
local e3=Effect.CreateEffect(rc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(ra)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
return
end
local g = Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local ra=e:GetLabel()
g:ForEach(s.change,ra,e:GetHandler())
end
\ No newline at end of file
--拟尘妖鸣
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
-- change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0+1)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.chtg)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
end
function s.tgfilter(c,race)
return c:IsFaceup() and c:IsRace(race)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
local race=0
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local rc=Duel.AnnounceRace(tp,1,race)
e:SetLabel(rc)
local dg=Duel.GetMatchingGroup(s.tgfilter,tp,0,LOCATION_MZONE,nil,rc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,dg,dg:GetCount(),0,0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local race=e:GetLabel()
local dg=Duel.GetMatchingGroup(s.tgfilter,tp,0,LOCATION_MZONE,nil,race)
if dg:GetCount()>0 then
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceRace(tp,1,0x7f)
e:SetLabel(att)
end
function s.change(c,att,rc)
local e3=Effect.CreateEffect(rc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
return
end
local g = Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local att=e:GetLabel()
g:ForEach(s.change,att,e:GetHandler())
end
--拟尘妖湮
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
-- disable
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id0)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
-- change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.chtg)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
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 aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g = Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
e:SetLabel(tc:GetAttribute())
end
function s.filter(c,att)
return c:IsAttribute(att) and c:IsFaceup() and not c:IsImmuneToEffect(e) and not c:IsDisabled()
end
function s.disable(tc,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() and not tc:IsImmuneToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
s.disable(tc,c)
local att=e:GetLabel()
local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,tc,att)
g:ForEach(s.disable,c)
end
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp,1,8)
e:SetLabel(lv)
end
function s.change(c,lv,rc)
if c:IsType(TYPE_XYZ) then
local e3=Effect.CreateEffect(rc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_RANK)
e3:SetValue(lv)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
else
local e3=Effect.CreateEffect(rc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(lv)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
return
end
local g = Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local lv=e:GetLabel()
g:ForEach(s.change,lv,e:GetHandler())
end
--拟尘妖亡
local s,id,o=GetID()
function s.initial_effect(c)
local id0 = id*10
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id0)
e1:SetCondition(s.con)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
-- set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id0)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.setg)
e2:SetOperation(s.seop)
c:RegisterEffect(e2)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and
Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function s.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.filter(c)
return c:IsSetCard(0x430) and c:IsAbleToGrave()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if Duel.Destroy(eg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function s.sefilter(c)
return c:IsSetCard(0x430) and c:IsSSetable() and not c:IsCode(47364412)
end
function s.setg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sefilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.seop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g = Duel.SelectTarget(tp,s.sefilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SSet(tp,g)
end
\ No newline at end of file
--沙土巨人
function c65080054.initial_effect(c)
aux.AddCodeList(c,65080060)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,65080054)
e1:SetCondition(c65080054.condition)
e1:SetTarget(c65080054.tg)
e1:SetOperation(c65080054.op)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c65080054.condition2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65080054,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e2:SetTarget(c65080054.thtg)
e2:SetOperation(c65080054.thop)
c:RegisterEffect(e2)
end
function c65080054.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) and Duel.IsPlayerCanDraw(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsCanTurnSet() end
if chk==0 then return true end
local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil)
end
function c65080054.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
function c65080054.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c65080054.spcfil(c,tp)
return c:GetSummonPlayer()~=tp
end
function c65080054.condition2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65080054.spcfil,1,nil,tp)
end
function c65080054.spfilter(c,e,tp)
return c:IsRace(RACE_ROCK) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and (aux.IsCodeListed(c,65080060) or (Duel.IsEnvironment(65080060) and c:IsRace(RACE_ROCK) and c:IsAttribute(ATTRIBUTE_EARTH)))
end
function c65080054.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanTurnSet() and Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c65080054.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>1 and Duel.IsExistingMatchingCard(c65080054.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,e:GetHandler(),e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c65080054.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 then
if Duel.GetMZoneCount(tp)>1 and e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
local g=Duel.SelectMatchingCard(tp,c65080054.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
if g:GetCount()>0 then
g:Merge(e:GetHandler())
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==2 then
Duel.ConfirmCards(1-tp,g)
if e:GetHandler():IsCanTurnSet() then
Duel.ChangePosition(e:GetHandler(),POS_FACEDOWN_DEFENSE)
end
end
end
......
--失落看守者
function c65080055.initial_effect(c)
--attack0
aux.AddCodeList(c,65080060)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,65080055)
e1:SetCondition(c65080055.condition)
e1:SetTarget(c65080055.target)
e1:SetOperation(c65080055.activate)
e1:SetTarget(c65080055.tg)
e1:SetOperation(c65080055.op)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c65080055.condition2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65080055,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e2:SetTarget(c65080055.thtg)
e2:SetOperation(c65080055.thop)
c:RegisterEffect(e2)
end
function c65080055.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end
if chk==0 then return true end
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c65080055.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c65080055.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
return ep~=tp
end
function c65080055.filter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFacedown()
function c65080055.spcfil(c,tp)
return c:GetSummonPlayer()~=tp
end
function c65080055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return c65080055.filter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c65080055.filter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetMZoneCount(tp)>0 end
Duel.SelectTarget(tp,c65080055.filter,tp,LOCATION_MZONE,0,1,1,nil)
function c65080055.condition2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65080055.spcfil,1,nil,tp)
end
function c65080055.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
if tc:IsAttribute(ATTRIBUTE_EARTH) and tc:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetMZoneCount(tp)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c65080055.atklimit)
e1:SetLabel(c:GetRealFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(65080055,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,0)
if c:GetSummonLocation()==LOCATION_GRAVE then
local e1=Effect.CreateEffect(c)
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_REMOVED)
c:RegisterEffect(e1,true)
end
function c65080055.spfilter(c,e,tp)
return aux.IsCodeListed(c,65080060) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden()
end
function c65080055.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c65080055.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsRelateToEffect(e) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,e:GetHandler())
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c65080055.spfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsEnvironment(65080060) and Duel.SelectYesNo(tp,aux.Stringid(65080055,0)) then
local g=Duel.SelectMatchingCard(tp,c65080055.spfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
end
\ No newline at end of file
function c65080055.atklimit(e,c)
return c:GetRealFieldID()==e:GetLabel()
end
\ No newline at end of file
--失控石人
function c65080056.initial_effect(c)
aux.AddCodeList(c,65080060)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65080056)
e1:SetCondition(c65080056.spcon)
e1:SetCost(c65080056.spcost)
e1:SetTarget(c65080056.sptg)
e1:SetOperation(c65080056.spop)
e1:SetCost(c65080056.cost)
e1:SetTarget(c65080056.tg)
e1:SetOperation(c65080056.op)
c:RegisterEffect(e1)
--attcktg
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c65080056.con)
e2:SetOperation(c65080056.op)
e2:SetDescription(aux.Stringid(65080056,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e2:SetTarget(c65080056.thtg)
e2:SetOperation(c65080056.thop)
c:RegisterEffect(e2)
--sp
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCountLimit(1,65080056)
e3:SetCondition(c65080056.spcon)
e3:SetTarget(c65080056.sptg)
e3:SetOperation(c65080056.spop)
c:RegisterEffect(e3)
if not c65080056.global_check then
c65080056.global_check=true
--flip flag
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_FLIP)
ge4:SetProperty(EFFECT_FLAG_DELAY)
ge4:SetOperation(c65080056.flipop)
Duel.RegisterEffect(ge4,0)
end
end
function c65080056.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c65080056.op(e,tp,eg,ep,ev,re,r,rp)
--cannot be target
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c65080056.atlimit)
Duel.RegisterEffect(e2,tp)
end
function c65080056.atlimit(e,c)
return c:IsFacedown()
function c65080056.flipop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(65080056,RESET_EVENT+RESETS_STANDARD,0,1)
tc=eg:GetNext()
end
end
function c65080056.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c65080056.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c65080056.thfil(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_ROCK) and c:IsAbleToHand()
return bit.band(re:GetHandler():GetRace(),RACE_ROCK)==RACE_ROCK and re:GetHandler():GetFlagEffect(65080056)~=0
end
function c65080056.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) and Duel.IsExistingMatchingCard(c65080056.thfil,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetTargetCard(e:GetHandler())
end
function c65080056.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c65080056.thfil,tp,LOCATION_DECK,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,c65080056.thfil,tp,LOCATION_DECK,0,1,1,nil)
if Duel.GetMZoneCount(tp)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
function c65080056.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_ONFIELD)
end
function c65080056.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
function c65080056.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c65080056.spfilter(c)
return c:IsAbleToHand() and aux.IsCodeListed(c,65080060) and c:IsType(TYPE_MONSTER)
end
function c65080056.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080056.spfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65080056.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65080056.spfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if c:GetSummonLocation()==LOCATION_GRAVE then
local e1=Effect.CreateEffect(c)
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_REMOVED)
c:RegisterEffect(e1,true)
end
end
end
\ No newline at end of file
--遗迹守护神
function c65080057.initial_effect(c)
c:EnableReviveLimit()
aux.AddCodeList(c,65080060)
--special summon
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_FIELD)
e10:SetCode(EFFECT_SPSUMMON_PROC)
e10:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e10:SetRange(LOCATION_HAND)
e10:SetCondition(c65080057.spcon)
c:RegisterEffect(e10)
--spsummon limit
local e20=Effect.CreateEffect(c)
e20:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e20:SetType(EFFECT_TYPE_SINGLE)
e20:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e20)
--turn facedown
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c65080057.spcon)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c65080057.cost)
e1:SetTarget(c65080057.tg)
e1:SetOperation(c65080057.op)
c:RegisterEffect(e1)
--spsummon limit
--cannot be target
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e7:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(c65080057.wuditg)
e7:SetValue(aux.imval1)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e8:SetValue(aux.tgoval)
c:RegisterEffect(e8)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c65080057.chainop)
c:RegisterEffect(e2)
--turn facedown
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c65080057.condition)
e3:SetTarget(c65080057.target)
e3:SetOperation(c65080057.activate)
c:RegisterEffect(e3)
--wudi
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_DRAW)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c65080057.wudicon)
e4:SetOperation(c65080057.wudiop)
c:RegisterEffect(e4)
if not c65080057.global_check then
c65080057.global_check=true
--flip flag
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_FLIP)
ge4:SetProperty(EFFECT_FLAG_DELAY)
ge4:SetOperation(c65080057.flipop)
Duel.RegisterEffect(ge4,0)
end
end
function c65080057.wudicon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil)
function c65080057.flipop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(65080057,RESET_EVENT+RESETS_STANDARD,0,1)
tc=eg:GetNext()
end
end
function c65080057.wudiop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,65080057)
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsAttribute(ATTRIBUTE_EARTH) and tc:IsRace(RACE_ROCK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c65080057.wdcon)
e1:SetTarget(c65080057.wdop)
e1:SetValue(c65080057.efilter)
e1:SetOwnerPlayer(tp)
e1:SetLabelObject(e:GetHandler())
Duel.RegisterEffect(e1,tp)
function c65080057.chainop(e,tp,eg,ep,ev,re,r,rp)
if bit.band(re:GetHandler():GetRace(),RACE_ROCK)==RACE_ROCK and re:GetHandler():GetFlagEffect(65080057)~=0 and ep==tp then
Duel.SetChainLimit(c65080057.chainlm)
end
end
function c65080057.wdcon(e,c)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil)
function c65080057.chainlm(e,rp,tp)
return tp==rp
end
function c65080057.wdop(e,c)
return c==e:GetLabelObject() or c:IsFacedown()
function c65080057.wuditg(e,c)
return c:IsFacedown()
end
function c65080057.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
function c65080057.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c65080057.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc:IsControler(tp) and rc:IsLocation(LOCATION_MZONE) and rc:IsRace(RACE_ROCK) and rc:IsCanTurnSet() and rc~=e:GetHandler()
function c65080057.spfilter(c,e,tp)
return c:IsCode(65080060) and not c:IsForbidden()
end
function c65080057.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return e:GetHandler():GetFlagEffect(65080057)==0 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,rc,1,0,0)
e:GetHandler():RegisterFlagEffect(65080057,RESET_CHAIN,0,1)
function c65080057.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080057.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
end
function c65080057.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and rc:IsCanTurnSet() then
Duel.ChangePosition(rc,POS_FACEDOWN_DEFENSE)
function c65080057.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65080057.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
function c65080057.spcon(e,c)
......
--岩石机关触动
function c65080058.initial_effect(c)
--Activate
aux.AddCodeList(c,65080060)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,65080057)
e1:SetCondition(c65080058.condition1)
e1:SetTarget(c65080058.tg)
e1:SetOperation(c65080058.op)
c:RegisterEffect(e1)
--change pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65080058,1))
e2:SetCategory(CATEGORY_POSITION)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c65080058.poscon2)
e2:SetTarget(c65080058.postg)
e2:SetOperation(c65080058.posop)
e2:SetCountLimit(1,65080058)
e2:SetCondition(c65080058.condition2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c65080058.poscon)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,65080059)
e3:SetCondition(c65080058.condition3)
c:RegisterEffect(e3)
--select
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65080058,0))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,65080058)
e4:SetTarget(c65080058.tg1)
e4:SetOperation(c65080058.op1)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(65080058,1))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetCountLimit(1,65080059)
e5:SetTarget(c65080058.tg2)
e5:SetOperation(c65080058.op2)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetDescription(aux.Stringid(65080058,2))
e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e6:SetCountLimit(1,65080060)
e6:SetTarget(c65080058.tg3)
e6:SetOperation(c65080058.op3)
c:RegisterEffect(e6)
--turn facedown
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_QUICK_O)
e10:SetRange(LOCATION_HAND)
e10:SetCode(EVENT_FREE_CHAIN)
e10:SetCost(c65080058.tfcost)
e10:SetTarget(c65080058.tftg)
e10:SetOperation(c65080058.tfop)
c:RegisterEffect(e10)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
end
function c65080058.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) and e:GetHandler():GetFlagEffect(65080058)==0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_MZONE)
e:GetHandler():RegisterFlagEffect(65080058,RESET_CHAIN,0,1)
function c65080058.condition1(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c65080058.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function c65080058.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c65080058.mfilter(c)
return c:IsType(TYPE_EFFECT) and not c:IsDisabled()
function c65080058.spcfil(c,tp)
return c:GetSummonPlayer()~=tp
end
function c65080058.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080058.mfilter,tp,0,LOCATION_MZONE,1,nil) and e:GetHandler():GetFlagEffect(65080058)==0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
e:GetHandler():RegisterFlagEffect(65080058,RESET_CHAIN,0,1)
function c65080058.condition3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65080058.spcfil,1,nil,tp)
end
function c65080058.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c65080058.mfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.HintSelection(g)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
function c65080058.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and (aux.IsCodeListed(c,65080060) or (Duel.IsEnvironment(65080060) and c:IsRace(RACE_ROCK) and c:IsAttribute(ATTRIBUTE_EARTH)))
end
function c65080058.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_ROCK) and c:IsAbleToHand()
function c65080058.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c65080058.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c65080058.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080058.mfilter2,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():GetFlagEffect(65080058)==0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(65080058,RESET_CHAIN,0,1)
end
function c65080058.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65080058.mfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
function c65080058.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)>0 then
local g=Duel.SelectMatchingCard(tp,c65080058.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,g)
end
end
end
function c65080058.poscon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
function c65080058.poscon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
function c65080058.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c65080058.filter(c)
return c:IsRace(RACE_ROCK) and c:IsFacedown() and c:IsDefensePos()
function c65080058.tffilter(c,e,tp)
return c:IsCode(65080060) and not c:IsForbidden()
end
function c65080058.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080058.filter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():GetFlagEffect(65080058)==0 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
e:GetHandler():RegisterFlagEffect(65080058,RESET_CHAIN,0,1)
function c65080058.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080058.tffilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
end
function c65080058.posop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c65080058.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
function c65080058.tfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65080058.tffilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--遗迹漫游神
function c65080059.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
aux.AddCodeList(c,65080060)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c65080059.con)
e1:SetTarget(c65080059.tg)
e1:SetOperation(c65080059.op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65080059,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c65080059.con2)
e2:SetTarget(c65080059.tg2)
e2:SetOperation(c65080059.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(65080059,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetTarget(c65080059.tg3)
e3:SetOperation(c65080059.op3)
c:RegisterEffect(e3)
if not c65080059.global_check then
c65080059.global_check=true
--flip flag
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_FLIP)
ge4:SetProperty(EFFECT_FLAG_DELAY)
ge4:SetOperation(c65080059.flipop)
Duel.RegisterEffect(ge4,0)
end
end
function c65080059.flipop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(65080059,RESET_EVENT+RESETS_STANDARD,0,1)
tc=eg:GetNext()
end
end
function c65080059.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(65080060) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c65080059.tgfil(c)
return c:GetFlagEffect(65080059)~=0 and c:IsFaceup()
end
function c65080059.gfil(c,tp)
return c:IsControler(1-tp) and not c:IsAbleToChangeControler()
end
function c65080059.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c65080059.tgfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if chk==0 then return g:GetCount()>0 and g:FilterCount(c65080059.gfil,nil,tp)==0 end
end
function c65080059.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c65080059.tgfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if g:GetCount()>0 then
Duel.Overlay(e:GetHandler(),g)
end
end
function c65080059.con2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():GetFlagEffect(65080057)~=0
end
function c65080059.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsCanTurnSet() and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
end
function c65080059.op2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and re:GetHandler():IsRelateToEffect(re) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.ChangePosition(re:GetHandler(),POS_FACEDOWN_DEFENSE)
end
end
function c65080059.thfil(c)
return c:IsAbleToHand() and c:IsRace(RACE_ROCK)
end
function c65080059.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayGroup():IsExists(c65080059.thfil,1,nil) end
end
function c65080059.op3(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetOverlayGroup():FilterSelect(tp,c65080059.thfil,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--古尘迹 沙之陨城
function c65080060.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_FZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c65080060.spcon1)
e1:SetValue(c65080060.efilter)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetRange(LOCATION_FZONE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetCondition(c65080060.spcon3)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c65080060.tg2)
e2:SetValue(c65080060.efilter)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetRange(LOCATION_FZONE)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(c65080060.spcon2)
e3:SetTarget(c65080060.tg1)
e3:SetValue(c65080060.efilter)
c:RegisterEffect(e3)
if not c65080060.global_check then
c65080060.global_check=true
c65080060.counter=true
c65080060[0]=0
c65080060[1]=0
c65080060[2]=0
c65080060[3]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c65080060.checkop)
ge1:SetLabelObject(c)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_TURN_END)
ge3:SetOperation(c65080060.checkop2)
Duel.RegisterEffect(ge3,0)
--flip flag
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_FLIP)
ge4:SetProperty(EFFECT_FLAG_DELAY)
ge4:SetOperation(c65080060.flipop)
Duel.RegisterEffect(ge4,0)
end
end
function c65080060.flipop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(65080060,RESET_EVENT+RESETS_STANDARD,0,1)
tc=eg:GetNext()
end
end
function c65080060.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
c65080060[tc:GetSummonPlayer()+2]=c65080060[tc:GetSummonPlayer()+2]+1
tc=eg:GetNext()
end
end
function c65080060.checkop2(e,tp,eg,ep,ev,re,r,rp)
c65080060[0]=c65080060[2]
c65080060[1]=c65080060[3]
c65080060[2]=0
c65080060[3]=0
end
function c65080060.spcon1(e)
local tp=e:GetHandlerPlayer()
return (c65080060[3-tp]>=2 and Duel.GetTurnPlayer()==1-tp) or (c65080060[1-tp]>=2 and Duel.GetTurnPlayer()==tp)
end
function c65080060.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c65080060.spcon2(e)
local tp=e:GetHandlerPlayer()
return (c65080060[3-tp]>=4 and Duel.GetTurnPlayer()==1-tp) or (c65080060[1-tp]>=4 and Duel.GetTurnPlayer()==tp)
end
function c65080060.tg1(e,c)
return c:IsFacedown()
end
function c65080060.spcon3(e)
local tp=e:GetHandlerPlayer()
return (c65080060[3-tp]>=6 and Duel.GetTurnPlayer()==1-tp) or (c65080060[1-tp]>=6 and Duel.GetTurnPlayer()==tp)
end
function c65080060.tg2(e,c)
return c:IsRace(RACE_ROCK) and c:GetFlagEffect(65080060)~=0
end
\ No newline at end of file
......@@ -22,11 +22,9 @@ function c67200604.initial_effect(c)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200604,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c67200604.sscon)
e2:SetTarget(c67200604.sstg)
e2:SetOperation(c67200604.ssop)
......@@ -61,11 +59,9 @@ function c67200604.stop(e,tp,eg,ep,ev,re,r,rp)
end
end
--
function c67200604.cfilter2(c,tp)
return c:GetSummonPlayer()==tp and c:IsSetCard(0x677) and c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c67200604.sscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200604.cfilter2,1,nil,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c67200604.setfilter(c)
return c:IsSetCard(0x677) and bit.band(c:GetType(),0x82)==0x82 and c:IsSSetable()
......
......@@ -76,23 +76,29 @@ function c67210102.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local reg=Card.RegisterEffect
Card.RegisterEffect=function(sc,se,bool)
if se:GetRange()&LOCATION_PZONE>0 then
se:SetRange(LOCATION_SZONE)
se:SetReset(RESET_EVENT+RESETS_STANDARD)
end
reg(sc,se,bool)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(67210102,0))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c67210102.tgcon)
e2:SetOperation(c67210102.tgop)
tc:RegisterEffect(e2)
end
end
function c67210102.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
if tc.initial_effect then
local ini=c67210102.initial_effect
c67210102.initial_effect=function() end
tc:ReplaceEffect(67210102,0)
c67210102.initial_effect=ini
tc.initial_effect(tc)
function c67210102.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:RandomSelect(tp,1)
Duel.Hint(HINT_CARD,0,67210102)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 and e:GetHandler():IsAbleToDeck() then
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
Card.RegisterEffect=reg
end
end
--炫丽之影 无限剑制·蓝
function c70700306.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(70700306,0))
e0:SetCategory(CATEGORY_SEARCH+CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCost(c70700306.cost)
e0:SetTarget(c70700306.target)
e0:SetOperation(c70700306.activate)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(500)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE+LOCATION_HAND)
e1:SetCost(c70700306.cost1)
e1:SetTarget(c70700306.target)
e1:SetOperation(c70700306.activate)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(70700306,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,70700306)
e2:SetLabel(0)
e2:SetCost(c70700306.tfcost)
e2:SetTarget(c70700306.tftg)
e2:SetOperation(c70700306.tfop)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(70700306,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c70700306.e3tg)
e3:SetOperation(c70700306.e3op)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(70700306,ACTIVITY_CHAIN,c70700306.chainfilter)
end
function c70700306.chainfilter(re,tp,cid)
return not (re:GetHandler():IsSetCard(0x903) and re:GetHandler():IsType(TYPE_SPELL))
end
function c70700306.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.GetCustomActivityCount(70700306,tp,ACTIVITY_CHAIN)==0 end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone(e1)
e2:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e2,tp)
end
function c70700306.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() or (e:GetHandler():IsDiscardable(REASON_COST+REASON_RELEASE)) end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c70700306.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c70700306.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(70700306,0))
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetTarget(c70700306.settg)
e0:SetOperation(c70700306.setop)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70700306,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(c70700306.eftg)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(e0)
Duel.RegisterEffect(e1,tp)
end
function c70700306.eftg(e,c)
return c:IsSetCard(0x903) and c:IsType(TYPE_SPELL) and not c:IsForbidden()
end
function c70700306.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local ae=e:GetHandler():GetActivateEffect()
local ftg=ae:GetTarget()
if chk==0 then
return (not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk)) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFlagEffect(tp,70700306)==0
end
if ae:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
else e:SetProperty(0) end
if ftg then
ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.RegisterFlagEffect(tp,70700306,RESET_PHASE+PHASE_END,0,1)
end
function c70700306.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_CARD,1-tp,70700306)
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
c:SetStatus(STATUS_EFFECT_ENABLED,true)
c:RegisterFlagEffect(70700301,RESET_EVENT+RESETS_REDIRECT,0,1)
local ae=e:GetHandler():GetActivateEffect()
local fop=ae:GetOperation()
if fop then
fop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c70700306.tffilter1(c)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0x903)
end
function c70700306.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c70700306.tffilter2(c)
return not c:IsForbidden() and c:IsSetCard(0x903) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)
end
function c70700306.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1
and Duel.IsExistingMatchingCard(c70700306.tffilter1,tp,LOCATION_ONFIELD,0,2,nil)
and Duel.IsExistingMatchingCard(c70700306.tffilter2,tp,LOCATION_DECK,0,1,nil) end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c70700306.tffilter1,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c70700306.tfop(e,tp,eg,ep,ev,re,r,rp)
local fct=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c70700306.tffilter2,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and fct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=g:Select(tp,1,1,nil)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,false)
sg:GetFirst():SetStatus(STATUS_EFFECT_ENABLED,true)
sg:GetFirst():RegisterFlagEffect(70700301,RESET_EVENT+RESETS_REDIRECT,0,1)
end
end
function c70700306.e3tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c70700306.e3op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g and g:GetCount()>0 and (re:GetHandler():IsType(TYPE_TRAP) and re:GetHandler():IsSetCard(0x903)) then
Duel.Hint(HINT_CARD,1-tp,70700306)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetDescription(aux.Stringid(70700306,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sg:GetFirst():RegisterEffect(e1)
end
end
\ No newline at end of file
--炫丽之影 月影斩
function c70700307.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70700307,3))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCondition(c70700307.condition)
e1:SetTarget(c70700307.target)
e1:SetOperation(c70700307.activate)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(70700307,3))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c70700307.rmtg)
e2:SetOperation(c70700307.rmop)
c:RegisterEffect(e2)
end
function c70700307.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function c70700307.target(e,tp,eg,ep,ev,re,r,rp,chk)
local turnplayer=Duel.GetTurnPlayer()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
or (turnplayer==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0) end
end
function c70700307.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local turnplayer=Duel.GetTurnPlayer()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local opsel=2
if not c:IsRelateToEffect(e) then return end
if turnplayer==tp and g:GetCount()<=0 then
opsel=1
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(70700307,1))
elseif turnplayer==tp and g:GetCount()>0 then
opsel=0
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(70700307,0))
elseif turnplayer~=tp and g:GetCount()>0 then
opsel=0
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(70700307,0))
end
if opsel==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
local atk = sg:GetFirst():GetAttack()
Duel.Destroy(g:Filter(Card.IsAttackBelow,nil,3000),REASON_EFFECT)
if atk<=3000 then
Duel.Damage(1-tp,3000-atk,REASON_EFFECT)
else
Duel.Damage(tp,atk-3000,REASON_EFFECT)
Duel.Destroy(c,REASON_EFFECT)
end
elseif opsel==1 then
Duel.Damage(1-tp,3000,REASON_EFFECT)
end
end
function c70700307.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c70700307.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,nil)
local opsel=2
local phasect=1
local fid=e:GetHandler():GetFieldID()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=g:Select(tp,1,2,nil)
Duel.HintSelection(sg)
if Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_END then
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(70700307,4))
opsel=opsel+1
else opsel=Duel.SelectOption(tp,aux.Stringid(70700307,3),aux.Stringid(70700307,4)) end
if opsel==0 then phasect=1
elseif opsel==1 then phasect=2 end
local sgm=Group.CreateGroup()
local ct=Duel.GetTurnCount()+phasect-1
if Duel.Remove(sg,0,REASON_COST+REASON_TEMPORARY)~=0 then
local og=Duel.GetOperatedGroup()
for oc in aux.Next(og) do
if oc:IsLocation(LOCATION_MZONE) then sgm:AddCard(tc) end
oc:RegisterFlagEffect(70700307,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE_START,0,phasect,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetReset(RESET_PHASE+PHASE_BATTLE_START)
e1:SetLabel(ct)
e1:SetLabelObject(og)
e1:SetCountLimit(1)
e1:SetOperation(c70700307.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c70700307.retfilter(c)
return c:GetFlagEffect(70700307)~=0
end
function c70700307.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(c70700307.retfilter,nil)
local sgm=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_MZONE)
if sgm:GetCount()>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)==1 then
Duel.Hint(HINT_SELECTMSG,tp,574)
local tc=sgm:Select(tp,1,1,nil):GetFirst()
Duel.ReturnToField(tc)
else
local tc=sgm:GetFirst()
while tc do
Duel.ReturnToField(tc)
tc=sgm:GetNext()
end
end
local sgo=Group.__sub(sg,sgm)
local loc=LOCATION_SZONE
if sgo:GetCount()>1 and Duel.GetLocationCount(tp,LOCATION_SZONE)==1 then
Duel.Hint(HINT_SELECTMSG,tp,574)
local tc2=sgo:Select(tp,1,1,nil):GetFirst()
Duel.MoveToField(tc2,tp,tp,loc,POS_FACEUP,false)
tc2:SetStatus(STATUS_EFFECT_ENABLED,true)
else
for tc3 in aux.Next(sgo) do
if tc3:IsType(TYPE_PENDULUM) then loc=LOCATION_PZONE end
Duel.MoveToField(tc3,tp,tp,loc,POS_FACEUP,false)
tc3:SetStatus(STATUS_EFFECT_ENABLED,true)
end
end
end
\ No newline at end of file
......@@ -5,53 +5,57 @@ if c71400001 then
function c71400001.initial_effect(c)
--Activate(nofield)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400001,1))
e1:SetDescription(aux.Stringid(71400001,2))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.nonYumeCon)
e1:SetTarget(yume.YumeFieldCheckTarget(0,1))
e1:SetTarget(c71400001.tg1)
e1:SetCost(c71400001.cost)
e1:SetOperation(c71400001.activate1)
e1:SetOperation(c71400001.op1)
e1:SetCountLimit(1,71400001+EFFECT_COUNT_CODE_OATH)
e1:SetCategory(0)
c:RegisterEffect(e1)
--Activate(field)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400001,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(yume.YumeCon)
e2:SetTarget(c71400001.target2)
e2:SetCost(c71400001.cost)
e2:SetOperation(c71400001.activate2)
e2:SetCountLimit(1,71400001+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e2)
end
function c71400001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c71400001.activate1(e,tp,eg,ep,ev,re,r,rp)
yume.ActivateYumeField(e,tp,nil,1)
function c71400001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=yume.YumeFieldCheck(tp,0,1)
local b2=yume.IsYumeFieldOnField(tp) and Duel.IsExistingMatchingCard(c71400001.filter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aaux.Stringid(71400001,2),aux.Stringid(71400001,0))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(71400001,2))
else
op=Duel.SelectOption(tp,aux.Stringid(71400001,0))+1
end
if op==0 then
e:SetCategory(0)
if not Duel.CheckPhaseActivity() then e:SetLabel(1,op) else e:SetLabel(0,op) end
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c71400001.activate2(e,tp,eg,ep,ev,re,r,rp)
function c71400001.op1(e,tp,eg,ep,ev,re,r,rp)
local act,op=e:GetLabel()
if op==0 then
yume.ActivateYumeField(e,tp,nil,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400001.filter2,tp,LOCATION_DECK,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,c71400001.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c71400001.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0xb714)
end
function c71400001.filter2(c,tp)
function c71400001.filter(c)
return c:IsSetCard(0x714) and c:IsAbleToHand() and not c:IsCode(71400001)
end
function c71400001.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400001.filter2,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
--global part
table=require("table")
......
......@@ -34,22 +34,44 @@ function c71400037.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetDescription(aux.Stringid(71400037,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(aux.imval1)
tc:RegisterEffect(e1)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
tc:RegisterEffect(e2)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BECOME_TARGET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetCondition(c71400037.tgcon)
e4:SetOperation(c71400037.tgop)
c:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
e5:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e5,true)
end
Duel.SpecialSummonComplete()
end
function c71400037.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c71400037.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
\ No newline at end of file
--延迟?!欲降于此
local m=92369075
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,92369005)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--Effect 2
local e01=Effect.CreateEffect(c)
e01:SetCategory(CATEGORY_SPECIAL_SUMMON)
e01:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e01:SetCode(EVENT_TO_DECK)
e01:SetCountLimit(1,m+m)
e01:SetCondition(cm.spcon)
e01:SetTarget(cm.sptg)
e01:SetOperation(cm.spop)
c:RegisterEffect(e01)
end
--Effect 1
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,nil)
if #tg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=tg:Select(tp,1,1,nil)
local tc=g:GetFirst()
Duel.HintSelection(g)
if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsRelateToEffect(e)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
tg:AddCard(c)
tg:RemoveCard(tc)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and #tg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=tg:Select(tp,1,1,nil)
Duel.HintSelection(g1)
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
--Effect 2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.sp(c,e,tp)
return c:IsSetCard(0x3a44) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.hd(c)
return not c:IsPublic()
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(cm.sp,tp,LOCATION_DECK,0,nil,e,tp)
local hg=Duel.GetMatchingGroup(cm.hd,tp,0,LOCATION_HAND,nil)
if #sg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=sg:Select(tp,1,1,nil)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,92369005) and #hg>0 then
Duel.BreakEffect()
Duel.Hint(HINT_CARD,0,m)
local tc=hg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=hg:GetNext()
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.tdcon)
e1:SetOperation(cm.tdop)
e1:SetReset(RESET_PHASE+PHASE_END,7)
Duel.RegisterEffect(e1,tp)
end
function cm.hd1(c)
return c:IsPublic() and c:IsAbleToDeck()
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()+5
return Duel.GetTurnCount()==ct
and Duel.IsExistingMatchingCard(cm.hd1,tp,0,LOCATION_HAND,1,nil)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetMatchingGroup(cm.hd1,tp,0,LOCATION_HAND,nil)
if #hg==0 then return end
Duel.Hint(HINT_CARD,0,m)
Duel.SendtoDeck(hg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
--星云迸发
local m=92369076
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Effect 1
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.negcon)
e3:SetOperation(cm.negop)
c:RegisterEffect(e3)
--Effect 2
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(3,m)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
--Effect 1
function cm.tog(c)
return c:IsRace(RACE_ROCK) and c:IsAbleToGrave()
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local te,race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_RACE)
local tsp=te:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(cm.tog,1-tsp,LOCATION_DECK,0,nil)
return bit.band(race,RACE_ROCK)~=0
and #g>0 and Duel.IsChainDisablable(ev)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT)
local tsp=te:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(cm.tog,1-tsp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(1-tsp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m)
local tg=g:Select(1-tsp,1,1,nil)
if Duel.SendtoGrave(tg,REASON_EFFECT)>0 then
Duel.NegateEffect(ev)
end
end
end
--Effect 2
function cm.mf(c)
return not c:IsRace(RACE_ROCK) and c:IsFaceup()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.mf(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.mf,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.mf,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(RACE_ROCK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
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