Commit ec6af1d0 authored by Nemo Ma's avatar Nemo Ma

0827 upd wd

parent 30e7d511
No preview for this file type
No preview for this file type
expansions/pics/42620123.jpg

33.1 KB | W: | H:

expansions/pics/42620123.jpg

18.2 KB | W: | H:

expansions/pics/42620123.jpg
expansions/pics/42620123.jpg
expansions/pics/42620123.jpg
expansions/pics/42620123.jpg
  • 2-up
  • Swipe
  • Onion skin
--元素英雄 飓风战魂
function c10203046.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10203046,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c10203046.spcon)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10203046,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,10203046)
e2:SetTarget(c10203046.thtg)
e2:SetOperation(c10203046.thop)
c:RegisterEffect(e2)
--extra summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10203046,1))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e3:SetTarget(c10203046.exstg)
c:RegisterEffect(e3)
--revive
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10203046,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c10203046.target)
e4:SetOperation(c10203046.operation)
c:RegisterEffect(e4)
end
function c10203046.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c10203046.thfilter(c)
return c:IsSetCard(0x3008) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10203046.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10203046.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10203046.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10203046.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c10203046.exstg(e,c)
return c:IsSetCard(0x3008)
end
function c10203046.filter(c,e,tp)
return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10203046.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c10203046.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c10203046.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10203046.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10203046.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsSetCard(0x3008) and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -93,8 +93,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,8 +93,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,ct,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,ct,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummonStep(g,0,tp,tp,false,false,POS_FACEUP)
for tc in aux.Next(g) do for tc in aux.Next(g) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
......
...@@ -16,7 +16,7 @@ function cm.filter(c) ...@@ -16,7 +16,7 @@ function cm.filter(c)
return c:IsSetCard(0x9343) and c:IsAbleToHand() return c:IsSetCard(0x9343) and c:IsAbleToHand()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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_TOKEN,nil,1,0,0) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
...@@ -28,16 +28,16 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,16 +28,16 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x341,0x4011,0,0,4,RACE_AQUA,ATTRIBUTE_WATER) then if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x341,0x4011,0,0,4,RACE_AQUA,ATTRIBUTE_WATER) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local token=Duel.CreateToken(tp,m+1) local token=Duel.CreateToken(tp,m+1)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,0,LOCATION_MZONE,1,nil,0x341) if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x341) and (Duel.IsExistingMatchingCard(Card.IsSetCard,tp,0,LOCATION_MZONE,1,nil,0x341)
or ( Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and or ( Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and
(Duel.IsExistingMatchingCard(cm.cccfilter1,tp,LOCATION_ONFIELD,0,1,nil) or (Duel.IsExistingMatchingCard(cm.cccfilter1,tp,LOCATION_ONFIELD,0,1,nil) or
Duel.IsExistingMatchingCard(cm.cccfilter2,tp,LOCATION_MZONE,0,1,nil))) Duel.IsExistingMatchingCard(cm.cccfilter2,tp,LOCATION_MZONE,0,1,nil))) )
then then
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2))then if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -5,14 +5,14 @@ function cm.initial_effect(c) ...@@ -5,14 +5,14 @@ function cm.initial_effect(c)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon) e2:SetCondition(cm.handcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--standby --standby
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(0x01) e1:SetRange(0x01)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
...@@ -22,9 +22,7 @@ function cm.initial_effect(c) ...@@ -22,9 +22,7 @@ function cm.initial_effect(c)
--standby --standby
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_ACTIVATE) e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetTarget(cm.actg)
e3:SetOperation(cm.acop) e3:SetOperation(cm.acop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not cm.blue_check then if not cm.blue_check then
...@@ -45,7 +43,7 @@ function cm.initial_effect(c) ...@@ -45,7 +43,7 @@ function cm.initial_effect(c)
end end
function cm.handcon(e) function cm.handcon(e)
return Duel.GetFlagEffectLabel(e:GetHandlerPlayer(),m+1)//10>=15 return Duel.GetFlagEffectLabel(e:GetHandlerPlayer(),m+1)==1
end end
function cm.opafilter(c) function cm.opafilter(c)
...@@ -54,12 +52,13 @@ end ...@@ -54,12 +52,13 @@ end
function cm.adjop(e,tp,eg,ep,ev,re,r,rp) function cm.adjop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,m)==0 then if Duel.GetFlagEffect(0,m)==0 then
Duel.RegisterFlagEffect(0,m,0,0,1,0) Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1,0)
Duel.RegisterFlagEffect(1,m,0,0,1,0) Duel.RegisterFlagEffect(1,m,RESET_PHASE+PHASE_END,0,1,0)
end end
if eg:IsExists(cm.opafilter,1,nil) then if eg:IsExists(cm.opafilter,1,nil) then
for tc in aux.Next(eg:Filter(cm.opafilter,nil)) do for tc in aux.Next(eg:Filter(cm.opafilter,nil)) do
Duel.SetFlagEffectLabel(tc:GetControler(),m,Duel.GetFlagEffectLabel(tc:GetControler(),m)+1) local cp=tc:GetControler()
Duel.SetFlagEffectLabel(cp,m,Duel.GetFlagEffectLabel(cp,m)+1)
end end
end end
end end
...@@ -68,22 +67,15 @@ function cm.ckdeckop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,22 +67,15 @@ function cm.ckdeckop(e,tp,eg,ep,ev,re,r,rp)
local sg0=Duel.GetFieldGroup(0,0x03,0) local sg0=Duel.GetFieldGroup(0,0x03,0)
local sg1=Duel.GetFieldGroup(1,0x03,0) local sg1=Duel.GetFieldGroup(1,0x03,0)
if sg0:FilterCount(Card.IsSetCard,nil,0x71)>0 then if sg0:FilterCount(Card.IsSetCard,nil,0x71)>0 then
local n=sg0:FilterCount(Card.IsSetCard,nil,0x71) local n,per=sg0:FilterCount(Card.IsSetCard,nil,0x71),0
local per=0
if (#sg0)/n<=2 then per=1 end if (#sg0)/n<=2 then per=1 end
Duel.RegisterFlagEffect(0,m+1,0,0,1,10*n+per) Duel.RegisterFlagEffect(0,m+1,0,0,1,per)
else
Duel.RegisterFlagEffect(0,m+1,0,0,1,0)
end end
if sg1:FilterCount(Card.IsSetCard,nil,0x71)>0 then if sg1:FilterCount(Card.IsSetCard,nil,0x71)>0 then
local n=sg1:FilterCount(Card.IsSetCard,nil,0x71) local n,per=sg1:FilterCount(Card.IsSetCard,nil,0x71),0
local per=0
if (#sg1)/n<=2 then per=1 end if (#sg1)/n<=2 then per=1 end
Duel.RegisterFlagEffect(1,m+1,0,0,1,10*n+per) Duel.RegisterFlagEffect(1,m+1,0,0,1,per)
else
Duel.RegisterFlagEffect(1,m+1,0,0,1,0)
end end
e:Reset() e:Reset()
end end
...@@ -92,7 +84,7 @@ function cm.consfilter(c) ...@@ -92,7 +84,7 @@ function cm.consfilter(c)
end end
function cm.stcon(e,tp,eg,ep,ev,re,r,rp) function cm.stcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.consfilter,tp,0x01,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0x02,0,1,nil) and Duel.GetFlagEffectLabel(tp,m+1)%10==1 return Duel.IsExistingMatchingCard(cm.consfilter,tp,0x01,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0x02,0,1,nil) and cm.handcon(e)
end end
function cm.stop(e,tp,eg,ep,ev,re,r,rp) function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...@@ -109,15 +101,6 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,15 +101,6 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.chainlm(e,ep,tp)
return tp==ep
end
function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(cm.chainlm)
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp) function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() then
...@@ -172,11 +155,13 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -172,11 +155,13 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(cm.aclimit) e1:SetValue(cm.aclimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE) e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetValue(cm.efilter) e3:SetValue(cm.efilter)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
local e5=e3:Clone() local e5=e3:Clone()
......
--地狱恶魔的极端支配
local m=43999013
local cm=_G["c"..m]
function cm.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e0)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c43999013.cost)
e1:SetTarget(c43999013.target)
e1:SetOperation(c43999013.activate)
c:RegisterEffect(e1)
--apply effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(43999013,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,43999013)
-- e2:SetCondition(c43999013.effcon)
e2:SetTarget(c43999013.efftg)
e2:SetOperation(c43999013.effop)
c:RegisterEffect(e2)
--change effect type
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(43999013)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
c43999013.SetCard_diyuemo=true
end
function c43999013.costfilter(c)
return c.SetCard_diyuemo and c:IsAbleToRemoveAsCost()
end
function c43999013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
local bool=e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND)
if chk==0 then return Duel.IsExistingMatchingCard(c43999013.costfilter,tp,LOCATION_HAND,0,1,c) or not c:IsLocation(LOCATION_HAND) end
if bool then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c43999013.costfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c43999013.acfilter(c,tp)
return c:IsCode(94585852) and c:GetActivateEffect():IsActivatable(tp)
end
function c43999013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43999013.acfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c43999013.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c43999013.acfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
end
function c43999013.effcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_diyuemo
end
function c43999013.efffilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c.SetCard_diyuemo and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove())
then return false end
local te=c.onfield_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c43999013.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
if chk==0 then return (not (g:GetCount()==1 and g:GetFirst():IsCode(22348136)) and
Duel.IsExistingMatchingCard(c43999013.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,nil,e,tp,eg,ep,ev,re,r,rp))
or((g:GetCount()==1 and g:GetFirst():IsCode(22348136)) and
Duel.IsExistingMatchingCard(c43999013.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,g,e,tp,eg,ep,ev,re,r,rp))
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_MZONE)
end
function c43999013.effop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if g:GetCount()==1 and g:GetFirst():IsCode(22348136) then
local tg=Duel.SelectMatchingCard(tp,c43999013.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,1,g,e,tp)
local tc=tg:GetFirst()
local te=tc.onfield_effect
local op=te:GetOperation()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and op then op(e,tp,eg,ep,ev,re,r,rp) end
else
local tg=Duel.SelectMatchingCard(tp,c43999013.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
local te=tc.onfield_effect
local op=te:GetOperation()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
--地 狱 恶 魔 的 终 点 之 路
local m=43999014
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddRitualProcGreater2(c,c43999014.filter,LOCATION_REMOVED+LOCATION_HAND,c43999014.mfilter)
--apply effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(43999014,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,43999014)
-- e2:SetCondition(c43999014.effcon)
e2:SetTarget(c43999014.efftg)
e2:SetOperation(c43999014.effop)
c:RegisterEffect(e2)
c43999014.SetCard_diyuemo=true
end
function c43999014.filter(c)
return c:IsCode(43999015)
end
function c43999014.mfilter(c)
return c:IsSetCard(0x45)
end
function c43999014.effcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_diyuemo
end
function c43999014.efffilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c.SetCard_diyuemo and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove())
then return false end
local te=c.onfield_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c43999014.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
if chk==0 then return (not (g:GetCount()==1 and g:GetFirst():IsCode(22348136)) and
Duel.IsExistingMatchingCard(c43999014.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,nil,e,tp,eg,ep,ev,re,r,rp))
or((g:GetCount()==1 and g:GetFirst():IsCode(22348136)) and
Duel.IsExistingMatchingCard(c43999014.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,g,e,tp,eg,ep,ev,re,r,rp))
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_MZONE)
end
function c43999014.effop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if g:GetCount()==1 and g:GetFirst():IsCode(22348136) then
local tg=Duel.SelectMatchingCard(tp,c43999014.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,1,g,e,tp)
local tc=tg:GetFirst()
local te=tc.onfield_effect
local op=te:GetOperation()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and op then op(e,tp,eg,ep,ev,re,r,rp) end
else
local tg=Duel.SelectMatchingCard(tp,c43999014.efffilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
local te=tc.onfield_effect
local op=te:GetOperation()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
--终 级 的 地 狱 恶 魔 大 审 判 官
local m=43999015
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--cannot
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCost(c43999015.imcost)
e2:SetOperation(c43999015.imop)
c:RegisterEffect(e2)
--张 卡 破 坏
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.cost)
e3:SetTarget(c43999015.remtg)
e3:SetOperation(c43999015.remop)
c:RegisterEffect(e3)
--lp Recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(cm.lpcon)
e2:SetOperation(cm.lpop)
c:RegisterEffect(e2)
c43999015.onfield_effect=e3
c43999015.SetCard_diyuemo=true
end
function c43999015.lpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,14000041)==0 and e:GetHandler():IsFaceup()
end
function c43999015.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,14000041,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,0)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
if ct>0 then
Duel.Recover(tp,ct*600,REASON_EFFECT)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c43999015.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
function c43999015.remop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil,tp,POS_FACEDOWN)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
Duel.ShuffleExtra(1-tp)
end
function c43999015.cfilter(c)
return c.SetCard_diyuemo and c:IsAbleToRemoveAsCost()
end
function c43999015.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c43999015.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c43999015.cfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c43999015.imop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c43999015.imlimit)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c43999015.imlimit(e,c)
return c:IsFaceup() and c.SetCard_diyuemo
end
...@@ -37,11 +37,11 @@ function c72411740.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,11 +37,11 @@ function c72411740.operation(e,tp,eg,ep,ev,re,r,rp)
local sg3=Group.Filter(sg,Card.IsType,nil,TYPE_MONSTER):GetCount() local sg3=Group.Filter(sg,Card.IsType,nil,TYPE_MONSTER):GetCount()
local ct=Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) local ct=Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
if sg1>1 then if sg1>1 then
--Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,3,REASON_EFFECT) end Duel.Draw(tp,3,REASON_EFFECT) end
if sg2>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if sg2>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c72411740.filter,tp,LOCATION_DECK,0,2,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then and Duel.IsExistingMatchingCard(c72411740.filter,tp,LOCATION_DECK,0,2,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
--Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c72411740.filter,tp,LOCATION_DECK,0,2,2,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c72411740.filter,tp,LOCATION_DECK,0,2,2,nil,e,tp)
if g:GetCount()==2 then if g:GetCount()==2 then
...@@ -49,7 +49,7 @@ function c72411740.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c72411740.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if sg3>1 and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then if sg3>1 and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then
--Duel.BreakEffect() Duel.BreakEffect()
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local dg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
......
--虚空魔术师之杖 --虚空魔术师之杖
function c85551815.initial_effect(c) function c85551811.initial_effect(c)
aux.AddCodeList(c,46986414) aux.AddCodeList(c,46986414)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),3,2,c85551815.ovfilter,aux.Stringid(85551815,1)) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),3,2,c85551811.ovfilter,aux.Stringid(85551811,1))
c:EnableReviveLimit() c:EnableReviveLimit()
--xyzlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--xyz summon --xyz summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45702014,2)) e2:SetDescription(aux.Stringid(45702014,2))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,85551815) e2:SetCountLimit(1,85551811)
e2:SetHintTiming(TIMING_END_PHASE,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e2:SetHintTiming(TIMING_END_PHASE,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetTarget(c85551815.xyztg) e2:SetTarget(c85551811.xyztg)
e2:SetOperation(c85551815.xyzop) e2:SetOperation(c85551811.xyzop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--act qp/trap in hand --Activate in deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(85551811)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(1,0)
e1:SetTarget(c85551815.target) e1:SetCondition(c85551811.atcon)
e1:SetCondition(c85551815.handcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() --
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) if not c85551811.globle_check then
c:RegisterEffect(e2) c85551811.globle_check=true
local e3=e1:Clone() --Activate in deck
e3:SetCode(85551815) local e1=Effect.CreateEffect(c)
c:RegisterEffect(e3) e1:SetType(EFFECT_TYPE_FIELD)
--activate cost e1:SetCode(EFFECT_ACTIVATE_COST)
local e4=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetType(EFFECT_TYPE_FIELD) e1:SetTargetRange(1,0)
e4:SetCode(EFFECT_ACTIVATE_COST) e1:SetCost(c85551811.costchk)
e4:SetRange(LOCATION_MZONE) e1:SetTarget(c85551811.actarget)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetOperation(c85551811.costop)
e4:SetTargetRange(1,0) Duel.RegisterEffect(e1,0)
e4:SetCost(c85551815.costchk) local e2=e1:Clone()
e4:SetTarget(c85551815.costtg) Duel.RegisterEffect(e2,1)
e4:SetOperation(c85551815.costop) local g=Duel.GetMatchingGroup(c85551811.filter,0,0xff,0xff,nil)
c:RegisterEffect(e4) for tc in aux.Next(g) do
local te=tc:GetActivateEffect()
local e2=te:Clone()
e2:SetDescription(aux.Stringid(45702014,0))
e2:SetProperty(te:GetProperty(),EFFECT_FLAG2_COF)
e2:SetRange(LOCATION_DECK)
tc:RegisterEffect(e2)
end
end
end end
function c85551815.ovfilter(c) function c85551811.ovfilter(c)
return c:IsLevelBelow(3) and aux.IsCodeListed(c,46986414) and c:IsFaceup() return c:IsLevelBelow(3) and aux.IsCodeListed(c,46986414) and c:IsFaceup()
end end
function c85551815.xyzop(e,tp,chk) function c85551811.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,85551815)==0 end if chk==0 then return Duel.GetFlagEffect(tp,85551811)==0 end
Duel.RegisterFlagEffect(tp,85551815,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,85551811,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function c85551815.xyzfilter(c) function c85551811.xyzfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzSummonable(nil) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzSummonable(nil)
end end
function c85551815.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c85551811.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85551815.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) and e:GetHandler():IsAbleToExtra() end if chk==0 then return Duel.IsExistingMatchingCard(c85551811.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) and e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c85551815.xyzop(e,tp,eg,ep,ev,re,r,rp) function c85551811.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c85551815.xyzfilter,tp,LOCATION_EXTRA,0,nil) local g=Duel.GetMatchingGroup(c85551811.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_EXTRA) and g:GetCount()>0 then and c:IsLocation(LOCATION_EXTRA) and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(c85551815.xyzfilter,tp,LOCATION_EXTRA,0,nil) local g=Duel.GetMatchingGroup(c85551811.xyzfilter,tp,LOCATION_EXTRA,0,nil)
local tg=g:Select(tp,1,1,nil) local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil) Duel.XyzSummon(tp,tg:GetFirst(),nil)
end end
end end
function c85551815.handcon(e) function c85551811.atcon(e)
return e:GetHandler():GetOverlayCount()~=0 return e:GetHandler():GetOverlayCount()~=0
end end
function c85551815.target(e,c) function c85551811.filter(c)
return aux.IsCodeListed(c,46986414) return aux.IsCodeListed(c,46986414) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end end
function c85551815.costtg(e,te,tp) function c85551811.costchk(e,te_or_c,tp)
local tc=te:GetHandler() return Duel.IsPlayerAffectedByEffect(tp,85551811) and Duel.GetFlagEffect(tp,85551812)==0 and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT)
return tc:IsLocation(LOCATION_HAND) and tc:GetEffectCount(85551815)>0
and ((tc:GetEffectCount(EFFECT_QP_ACT_IN_NTPHAND)<=tc:GetEffectCount(85551815) and tc:IsType(TYPE_QUICKPLAY) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer())
or (tc:GetEffectCount(EFFECT_TRAP_ACT_IN_HAND)<=tc:GetEffectCount(85551815) and tc:IsType(TYPE_TRAP)))
end end
function c85551815.costchk(e,te_or_c,tp) function c85551811.actarget(e,te,tp)
return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) local tc=te:GetHandler()
e:SetLabelObject(tc)
return aux.IsCodeListed(tc,46986414) and te:IsHasType(EFFECT_TYPE_ACTIVATE) and tc:IsLocation(LOCATION_DECK)
end end
function c85551815.costop(e,tp,eg,ep,ev,re,r,rp) function c85551811.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,85551815) Duel.Hint(HINT_CARD,0,85551811)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)
local tc=e:GetLabelObject()
if tc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
Duel.RegisterFlagEffect(tp,85551812,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
--黑魔术师-千年大贤者
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,48680970)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp,re)
local rc=re:GetHandler()
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT) and rc:IsCode(48680970)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and eg:IsExists(s.cfilter,1,nil,tp,re)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
end
function s.filter1(c,tp)
return c:IsCode(48680970) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--破坏剑-帕拉丁之凯
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,46986414,78193831)
--link summon
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--atkall
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(1)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(s.atktg)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BATTLED)
e4:SetOperation(s.disop)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(s.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_SPELLCASTER)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
and (c:IsSetCard(0xd6) or aux.IsCodeListed(c,46986414))
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local m=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.SSet(tp,m)
if m:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
m:RegisterEffect(e1)
end
if m:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
m:RegisterEffect(e1)
end
end
function s.atktg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and aux.IsCodeListed(c,78193831)
end
function s.eftg(e,c)
local lg=e:GetHandler():GetLinkedGroup()
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,78193831) and lg:IsContains(c)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if not bc or not bc:IsStatus(STATUS_BATTLE_DESTROYED) then return end
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE)
bc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE_EFFECT)
bc:RegisterEffect(e3)
end
\ No newline at end of file
--黑魔导封印阵
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,46986414)
--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,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.chainop)
c:RegisterEffect(e2)
--todesk
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.totg)
e3:SetOperation(s.toop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(s.regop1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_CHAIN_NEGATED)
e5:SetOperation(s.regop2)
c:RegisterEffect(e5)
end
function s.filter(c)
return aux.IsCodeListed(c,46986414) and c:IsType(TYPE_CONTINUOUS) and not c:IsCode(id)
and c:IsAbleToHand()
end
function s.thtg(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.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
function s.chainop(e,tp,eg,ep,ev,re,r,rp)
if aux.IsCodeListed(re:GetHandler(),46986414) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and ep==tp then
Duel.SetChainLimit(s.chainlm)
end
end
function s.chainlm(e,rp,tp)
return tp==rp
end
function s.regop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
local flag=c:GetFlagEffectLabel(id)
if flag then
c:SetFlagEffectLabel(id,flag+1)
else
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
end
function s.regop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
local flag=c:GetFlagEffectLabel(id)
if flag and flag>0 then
c:SetFlagEffectLabel(id,flag-1)
end
end
end
function s.tofilter(c)
return (c:IsCode(46986414) or aux.IsCodeListed(c,46986414)) and c:IsAbleToDeck()
end
function s.totg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end
local ct=e:GetHandler():GetFlagEffectLabel(id)
if chk==0 then return ct and ct>0 and Duel.IsExistingTarget(s.tofilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.tofilter),tp,LOCATION_GRAVE,0,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,g:GetCount(),tp,LOCATION_GRAVE)
end
function s.toop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--守护神官 哈桑
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,46986414)
--link summon
aux.AddLinkProcedure(c,s.mfilter,1,1)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.condition1)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1)
e2:SetCondition(s.condition1)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.condition2)
e3:SetCost(s.cost)
e3:SetOperation(s.op)
c:RegisterEffect(e3)
end
function s.mfilter(c)
return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
end
function s.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(id) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function s.thfilter(c)
return aux.IsCodeListed(c,46986414) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
end
function s.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(46986414)
end
function s.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
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.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--传说之龙 蒂迈欧之眼
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,46986414,38033121,1784686)
--link summon
aux.AddLinkProcedure(c,s.lfilter,1,1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
end
function s.lfilter(c)
return c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
end
function s.tofilter(c)
return c:IsCode(1784686) and c:IsAbleToHand()
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:IsCode(46986414) or c:IsCode(38033121)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.tofilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker()
if chk==0 then return at:IsOnField() and at:IsControler(1-tp) and Duel.GetAttackTarget()==nil end
end
function s.filter(c,e,tp)
return c:IsSetCard(0x10a2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND) and Duel.GetMZoneCount(tp)>0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
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)
end
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
\ No newline at end of file
--不死之真红眼
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,39185163,4064256)
--hand synchro
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetValue(s.matval)
c:RegisterEffect(e1)
--register HOpT
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_PRE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetLabelObject(e1)
e2:SetCondition(s.hsyncon)
e2:SetOperation(s.hsynreg)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.con)
e3:SetTarget(s.tg)
e3:SetOperation(s.op)
c:RegisterEffect(e3)
end
function s.matval(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x3b)
end
function s.hsyncon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_SYNCHRO and s.matval(nil,c:GetReasonCard()) and c:IsPreviousLocation(LOCATION_HAND)
end
function s.hsynreg(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():UseCountLimit(tp)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(0x3b)
end
function s.filter1(c)
return c:IsCode(4064256) and c:IsAbleToHand()
end
function s.filter2(c)
return c:IsCode(39185163) and c:IsAbleToGrave()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
or Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if #g1>0 then
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
if #g2>0 then
Duel.SendtoGrave(g2,nil,REASON_EFFECT)
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:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.totg)
e2:SetOperation(s.toop)
c:RegisterEffect(e2)
--return replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_SEND_REPLACE)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(s.reptg)
e3:SetValue(s.repval)
c:RegisterEffect(e3)
end
function s.filter1(c,e,tp)
return c:IsSetCard(0x3b) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(7)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function s.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,s.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function s.filter2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x3b) and c:IsType(TYPE_MONSTER)
end
function s.totg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,nil,e,tp) end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE)
end
function s.toop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE,0,1,1,nil)
if #g~=0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.tofilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if tg:GetCount()>0 and Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,tg)
end
end
end
function s.tofilter(c,e,tp)
return c:IsSetCard(0x3b) and c:IsAbleToHand()
end
function s.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x3b)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re
and eg:IsExists(s.repfilter,1,nil,tp) end
local reg=eg:Filter(s.repfilter,nil,tp)
local undg=reg:Filter(Card.IsHasEffect,nil,EFFECT_INDESTRUCTABLE_BATTLE)
if #undg>0 then
reg:Sub(undg)
local tc=undg:GetFirst()
while tc do
Duel.Hint(HINT_CARD,0,tc:GetOriginalCodeRule())
tc=undg:GetNext()
end
end
if #reg>0 then
Duel.Destroy(reg,REASON_BATTLE)
local desg=Duel.GetOperatedGroup()
if #desg>0 then
Duel.RaiseEvent(desg,EVENT_DESTROYED,e,REASON_BATTLE,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(desg,EVENT_BATTLE_DESTROYED,e,REASON_BATTLE,tp,tp,Duel.GetCurrentChain())
local tc=desg:GetFirst()
while tc do
Duel.RaiseSingleEvent(tc,EVENT_DESTROYED,e,REASON_BATTLE,tp,tp,Duel.GetCurrentChain())
Duel.RaiseSingleEvent(tc,EVENT_BATTLE_DESTROYED,e,REASON_BATTLE,tp, tp,Duel.GetCurrentChain())
tc=desg:GetNext()
end
end
end
if (#reg+#undg)==0 then return false end
return true
end
function s.repval(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x3b)
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_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetCondition(s.con)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3b) and c:IsType(TYPE_MONSTER)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and rp==1-tp
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,rp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc:IsFaceup() then
local batk=tc:GetBaseAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(math.ceil(batk*2))
tc:RegisterEffect(e1)
end
end
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)
Duel.Destroy(g,REASON_EFFECT)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x3b) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()<=0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--希望之真红眼-弹丸拓展
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,s.mfilter,2)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.tocon)
e1:SetTarget(s.totg)
e1:SetOperation(s.toop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,id+o)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.mfilter(c)
return c:IsLinkRace(RACE_DRAGON) and c:IsLinkAttribute(ATTRIBUTE_DARK)
end
function s.tocon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.tofilter(c)
return c:IsSetCard(0x3b) and c:IsAbleToHand()
end
function s.totg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tofilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.toop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.tofilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
end
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3b) and c:IsType(TYPE_MONSTER) and not c:IsCode(id)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 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)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--希望之真红眼-枪管击速龙
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,6,s.lcheck)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--cannot release
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id)
e4:SetCondition(s.condition)
e4:SetTarget(s.target)
e4:SetOperation(s.operation)
c:RegisterEffect(e4)
end
function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3b)
end
function s.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp==1-tp
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_SPECIAL_SUMMON,eg,1,0,0)
end
Duel.SetChainLimit(s.chainlm)
end
function s.chainlm(e,rp,tp)
return tp==rp
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and c:IsRelateToEffect(e) and c:IsFaceup()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)local tc=g:GetFirst()
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetBaseAttack())
c:RegisterEffect(e1)
end
end
end
function s.spfilter(c,e,tp)
return (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_ZOMBIE))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
\ No newline at end of file
--真祖 奥西里斯之天空龙
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,46986414,10000020)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,s.lfilter,3,5)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(SUMMON_TYPE_LINK)
e1:SetCondition(s.lspcon)
e1:SetOperation(s.lspop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(s.spcon)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.lfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.lfilter1(c,tp)
return c:IsFaceup() and c:IsCode(46986414) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(s.lfilter2,tp,LOCATION_MZONE,0,2,c)
end
function s.lfilter2(c)
return not c:IsType(TYPE_TOKEN) and not c:IsLinkAbove(2) and c:IsAbleToGraveAsCost()
end
function s.lspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3
and Duel.IsExistingMatchingCard(s.lfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function s.lspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,s.lfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,s.lfilter2,tp,LOCATION_MZONE,0,2,2,g1:GetFirst())
g1:Merge(g2)
c:SetMaterial(g1)
Duel.SendtoGrave(g1,REASON_LINK)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.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:IsCode(10000020) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SPECIAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
--cannot trigger
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(s.val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e3)
--defdown
local e4=Effect.CreateEffect(tc)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(s.deftg)
e4:SetOperation(s.defop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
tc:RegisterEffect(e5)
if not tc:IsType(TYPE_EFFECT) then
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ADD_TYPE)
e6:SetValue(TYPE_EFFECT)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e6)
end
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.tofilter,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
Duel.SpecialSummonComplete()
end
function s.tofilter(c)
return (aux.IsCodeListed(c,10000020) or c:IsCode(10000040) or c:IsCode(74875003) or c:IsCode(59094601)) and c:IsAbleToHand()
end
function s.deffilter(c,tp)
return c:IsControler(tp) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function s.deftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.deffilter,1,nil,1-tp) end
local g=eg:Filter(s.deffilter,nil,1-tp)
Duel.SetTargetCard(g)
end
function s.defop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsFaceup,nil)
local dg=Group.CreateGroup()
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
local predef=tc:GetDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if predef~=0 and tc:IsDefense(0) then dg:AddCard(tc) end
tc=g:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
end
function s.val(e,re,tp,rc)
local c=e:GetHandler()
return re:IsHasCategory(CATEGORY_TOGRAVE) and re:GetOwner()==c
end
\ No newline at end of file
...@@ -54,8 +54,8 @@ function c98920472.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,8 +54,8 @@ function c98920472.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c98920472.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98920472.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp)) e:SetLabel(Duel.AnnounceType(tp))
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
...@@ -69,7 +69,7 @@ function c98920472.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function c98920472.desop(e,tp,eg,ep,ev,re,r,rp)
local opt=e:GetLabel() local opt=e:GetLabel()
if (opt==0 and tc:IsType(TYPE_MONSTER)) or (opt==1 and tc:IsType(TYPE_SPELL)) or (opt==2 and tc:IsType(TYPE_TRAP)) then if (opt==0 and tc:IsType(TYPE_MONSTER)) or (opt==1 and tc:IsType(TYPE_SPELL)) or (opt==2 and tc:IsType(TYPE_TRAP)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
......
--昆虫少女
function c98920485.initial_effect(c)
--race change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920485,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_DRAW_PHASE)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c98920485.cost)
e2:SetTarget(c98920485.target)
e2:SetOperation(c98920485.operation)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920485,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,98920485)
e3:SetCondition(c98920485.spcon2)
e3:SetTarget(c98920485.sptg2)
e3:SetOperation(c98920485.spop2)
c:RegisterEffect(e3)
end
function c98920485.costfilter(c)
return c:IsRace(RACE_INSECT) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c98920485.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920485.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98920485.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c98920485.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,98920485)==0 end
end
function c98920485.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,98920485,RESET_PHASE+PHASE_END,0,0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_INSECT)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e2g=e2:Clone()
e2g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e2g:SetCondition(c98920485.gravecon)
Duel.RegisterEffect(e2g,tp)
end
function c98920485.gravecon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end
function c98920485.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c98920485.spfilter2(c,e,tp)
return c:IsCode(91512835,37957847) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920485.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920485.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c98920485.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,c98920485.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE+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
--PSY骨架装备·原型
function c98920567.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c98920567.splimit)
c:RegisterEffect(e0)
--sps
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920567,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,98920567)
e3:SetCondition(c98920567.condition)
e3:SetCost(c98920567.cost)
e3:SetTarget(c98920567.target)
e3:SetOperation(c98920567.operation)
c:RegisterEffect(e3)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920567,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_REMOVE)
e1:SetCountLimit(1,98920567)
e1:SetTarget(c98920567.sstarget)
e1:SetOperation(c98920567.ssoperation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c98920567.sscon)
c:RegisterEffect(e2)
end
function c98920567.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c98920567.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,8802510))
end
function c98920567.sscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_RETURN)
end
function c98920567.cost(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 c98920567.spfilter(c,e,tp)
return c:IsSetCard(0xc1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920567.fselect(g,tp)
return Duel.IsExistingMatchingCard(c98920567.synfilter,tp,LOCATION_EXTRA,0,1,nil,g) or Duel.IsExistingMatchingCard(c98920567.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g) and g:IsExists(Card.IsCode,1,nil,49036338) and g:IsExists(Card.IsType,1,nil,TYPE_TUNER)
end
function c98920567.synfilter(c,g)
return c:IsSetCard(0xc1) and c:IsSynchroSummonable(nil,g)
end
function c98920567.lkfilter(c,g)
return c:IsSetCard(0xc1) and c:IsLinkSummonable(g,nil,2,2)
end
function c98920567.chkfilter(c,tp)
return (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_LINK)) and c:IsSetCard(0xc1) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c98920567.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return false end
local cg=Duel.GetMatchingGroup(c98920567.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg==0 then return false end
local g=Duel.GetMatchingGroup(c98920567.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
return g:CheckSubGroup(c98920567.fselect,2,2,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c98920567.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local cg=Duel.GetMatchingGroup(c98920567.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg>0 then
local g=Duel.GetMatchingGroup(c98920567.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c98920567.fselect,false,2,2,tp)
if sg then
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
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)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
local og=Duel.GetOperatedGroup()
Duel.AdjustAll()
if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local tg=Duel.GetMatchingGroup(c98920567.synfilter,tp,LOCATION_EXTRA,0,nil,og)
local lg=Duel.GetMatchingGroup(c98920567.lkfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==sg:GetCount() and tg:GetCount()>0 and Duel.SelectOption(tp,1164,1166)==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og)
elseif og:GetCount()==sg:GetCount() and lg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rrg=lg:Select(tp,1,1,nil)
Duel.LinkSummon(tp,rrg:GetFirst(),og,nil,#og,#og)
end
end
end
end
end
function c98920567.sspfilter(c,e,tp)
return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920567.sstarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c98920567.sspfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c98920567.ssoperation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98920567.sspfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(98920567,RESET_EVENT+RESETS_STANDARD,0,1,fid)
c:RegisterFlagEffect(98920567,RESET_EVENT+RESETS_STANDARD,0,1,fid)
Duel.SpecialSummonComplete()
g:AddCard(c)
g: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(g)
e1:SetCondition(c98920567.rmcon)
e1:SetOperation(c98920567.rmop)
Duel.RegisterEffect(e1,tp)
end
function c98920567.rmfilter(c,fid)
return c:GetFlagEffectLabel(98920567)==fid
end
function c98920567.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c98920567.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c98920567.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c98920567.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--小子同调士
function c98920620.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920620,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c98920620.hsptg)
e1:SetOperation(c98920620.hspop)
c:RegisterEffect(e1)
end
function c98920620.hspfilter(c,e,tp)
return not c:IsType(TYPE_TUNER) and c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c98920620.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920620.hspfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c98920620.hspop(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,c98920620.hspfilter,tp,LOCATION_HAND+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 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)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--多元春化精的花盛
function c98941000.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c98941000.condition)
e2:SetValue(1000)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98941000,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_FZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,98941000)
e3:SetCost(c98941000.spcost)
e3:SetTarget(c98941000.sptg)
e3:SetOperation(c98941000.spop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98941000,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,98942000)
e4:SetCondition(c98941000.thcon)
e4:SetTarget(c98941000.thtg)
e4:SetOperation(c98941000.thop)
c:RegisterEffect(e4)
--tofiled
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c98941000.damop)
c:RegisterEffect(e5)
end
function c98941000.atkfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
end
function c98941000.condition(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(c98941000.atkfilter,tp,LOCATION_MZONE,0,nil)>=5
end
function c98941000.costfilter(c)
return c:IsCode(98941008) and c:IsAbleToRemoveAsCost()
end
function c98941000.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941000.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98941000.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98941000.filter(c,e,tp)
return c:IsCode(98941006) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98941000.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98941000.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,c98941000.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98941000.cfilter(c,tp)
return c:IsSetCard(0xa182) and c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp)
end
function c98941000.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c98941000.cfilter,1,nil,tp)
end
function c98941000.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c98941000.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and c98941000.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98941000.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c98941000.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c98941000.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
function c98941000.csfilter(c)
return c:IsSetCard(0xa182)
end
function c98941000.damop(e,tp,eg,ep,ev,re,r,rp)
if eg:FilterCount(c98941000.csfilter,nil,tp)>0 and Duel.GetFieldCard(tp,LOCATION_FZONE,0)==nil then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--山与雪解的多元春化精
function c98941001.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98941001)
e1:SetCost(c98941001.drcost)
e1:SetTarget(c98941001.drtg)
e1:SetOperation(c98941001.drop)
c:RegisterEffect(e1)
--atk twice
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98941001,3))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,98942001)
e2:SetCondition(c98941001.atkcon)
e2:SetTarget(c98941001.atktg)
e2:SetOperation(c98941001.atkop)
c:RegisterEffect(e2)
--xyz
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98941001,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,98943001)
e3:SetTarget(c98941001.xyztg)
e3:SetOperation(c98941001.xyzop)
c:RegisterEffect(e3)
end
function c98941001.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0xa182)) and c:IsDiscardable()
end
function c98941001.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,98941003)
local b2=Duel.IsExistingMatchingCard(c98941001.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(98941003,0))) then
Duel.Hint(HINT_CARD,0,98941003)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98941001.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c98941001.drtg(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 c98941001.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941001.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 sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98941001.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(98941001,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c98941001.aclimit)
Duel.RegisterEffect(e1,tp)
end
function c98941001.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c98941001.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c98941001.atkfilter(c)
return c:IsSetCard(0x182) and c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function c98941001.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98941001.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98941001.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c98941001.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c98941001.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(98941001,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
function c98941001.xyzfilter(c)
return c:IsXyzSummonable(nil) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98941001.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941001.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98941001.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c98941001.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
\ No newline at end of file
--丘与发芽的多元春化精
function c98941002.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98941002)
e1:SetCost(c98941002.thcost)
e1:SetTarget(c98941002.thtg)
e1:SetOperation(c98941002.thop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c98941002.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--syr
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,98943002)
e3:SetTarget(c98941002.xyztg)
e3:SetOperation(c98941002.xyzop)
c:RegisterEffect(e3)
end
function c98941002.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0xa182)) and c:IsDiscardable()
end
function c98941002.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,98941003)
local b2=Duel.IsExistingMatchingCard(c98941002.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(98941003,0))) then
Duel.Hint(HINT_CARD,0,98941003)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98941002.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c98941002.thfilter(c)
return c:IsSetCard(0xa182) and not c:IsCode(98941002) and c:IsAbleToHand()
end
function c98941002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98941002.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98941002.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98941002.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(98941002,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c98941002.aclimit)
Duel.RegisterEffect(e1,tp)
end
function c98941002.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c98941002.indtg(e,c)
return c:IsSetCard(0xa182) and c:IsFaceup()
end
function c98941002.xyzfilter(c)
return c:IsSynchroSummonable(nil) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98941002.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941002.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98941002.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c98941002.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
\ No newline at end of file
--多元春化精的花冠
function c98941003.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add setcode
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH))
e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetValue(0xa182)
c:RegisterEffect(e2)
--change cost
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(98941003)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
--tofiled
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c98941003.damop)
c:RegisterEffect(e5)
end
function c98941003.cfilter(c)
return c:IsCode(98941003) and c:IsFaceup()
end
function c98941003.csfilter(c)
return c:IsCode(98941006)
end
function c98941003.damop(e,tp,eg,ep,ev,re,r,rp)
if eg:FilterCount(c98941003.csfilter,nil,tp)>0 and not Duel.IsExistingMatchingCard(c98941003.cfilter,tp,LOCATION_SZONE,0,1,nil) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--森与觉醒的多元春化精
function c98941004.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetRange(LOCATION_HAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,98941004)
e1:SetCost(c98941004.tgcost)
e1:SetTarget(c98941004.tgtg)
e1:SetOperation(c98941004.tgop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98941004,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,98942004)
e2:SetTarget(c98941004.atktg)
e2:SetOperation(c98941004.atkop)
c:RegisterEffect(e2)
--link
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98941004,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,98943004)
e3:SetTarget(c98941004.xyztg)
e3:SetOperation(c98941004.xyzop)
c:RegisterEffect(e3)
end
function c98941004.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0xa182)) and c:IsDiscardable()
end
function c98941004.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,98941003)
local b2=Duel.IsExistingMatchingCard(c98941004.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(98941003,0))) then
Duel.Hint(HINT_CARD,0,98941003)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98941004.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c98941004.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSummonableCard() and c:IsAbleToGrave()
end
function c98941004.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941004.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98941004.spfilter(c,e,tp,code)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941004.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98941004.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98941004.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,tc:GetCode())
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(98941004,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c98941004.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98941004.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c98941004.atkfilter(c)
return c:IsSetCard(0xa182) and c:IsFaceup()
end
function c98941004.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98941004.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98941004.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c98941004.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c98941004.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c98941004.xyzfilter(c)
return c:IsLinkSummonable(nil) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98941004.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941004.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98941004.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c98941004.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil)
end
end
\ No newline at end of file
--多元春化精的历替
function c98941005.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,98941005)
e1:SetTarget(c98941005.target)
e1:SetOperation(c98941005.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,98942005)
e2:SetCondition(c98941005.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c98941005.sptg)
e2:SetOperation(c98941005.spop)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c98941005.handcon)
c:RegisterEffect(e3)
end
function c98941005.filter(c,e,tp)
return c:IsSetCard(0xa182) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c98941005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98941005.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c98941005.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c98941005.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
end
function c98941005.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end
if not aux.NecroValleyFilter()(tc) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function c98941005.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
end
function c98941005.spfilter(c,e,tp)
return c:IsSetCard(0xa182) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98941005.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c98941005.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98941005.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or g:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ct=math.min(g:GetClassCount(Card.GetCode),ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if not sg then return end
local fid=e:GetHandler():GetFieldID()
local tc=sg:GetFirst()
while tc do
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:RegisterFlagEffect(98941005,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
e1:SetCondition(c98941005.thcon)
e1:SetOperation(c98941005.thop)
Duel.RegisterEffect(e1,tp)
end
function c98941005.thfilter(c,fid)
return c:GetFlagEffectLabel(98941005)==fid
end
function c98941005.thcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local g=e:GetLabelObject()
if not g:IsExists(c98941005.thfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c98941005.thop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c98941005.thfilter,nil,e:GetLabel())
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
function c98941005.hfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98941005.handcon(e)
return Duel.IsExistingMatchingCard(c98941005.hfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--多元春化精的女神 春
function c98941006.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98941006,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetRange(LOCATION_MZONE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,98941006)
e1:SetTarget(c98941006.cttg)
e1:SetOperation(c98941006.ctop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98941006,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,98942006)
e2:SetTarget(c98941006.sptg)
e2:SetOperation(c98941006.spop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c98941006.discon)
e3:SetOperation(c98941006.disop)
c:RegisterEffect(e3)
end
function c98941006.ctfilter(c)
return c:IsControlerCanBeChanged() and c:IsFaceup()
end
function c98941006.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c98941006.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98941006.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c98941006.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c98941006.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_EARTH)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c98941006.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c98941006.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98941006.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98941006.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98941006.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98941006.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
function c98941006.disfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
end
function c98941006.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.GetMatchingGroupCount(c98941006.disfilter,tp,LOCATION_MZONE,0,nil)>=5
and e:GetHandler():GetFlagEffect(98941006)<=0
end
function c98941006.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(98941006,2)) then
Duel.Hint(HINT_CARD,0,98941006)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(98941006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(98941006,3))
end
end
\ No newline at end of file
--花与原野的多元春化精
local s,id,o=GetID()
function c98941007.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98941007)
e1:SetCost(c98941007.thcost)
e1:SetTarget(c98941007.thtg)
e1:SetOperation(c98941007.thop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c98941007.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--fusion summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function c98941007.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0xa182)) and c:IsDiscardable()
end
function c98941007.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,98941003)
local b2=Duel.IsExistingMatchingCard(c98941007.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(98941003,0))) then
Duel.Hint(HINT_CARD,0,98941003)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98941007.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c98941007.thfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsCode(98941007) and c:IsAbleToHand()
end
function c98941007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941007.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c98941007.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941007.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98941007.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98941007.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(98941007,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c98941007.aclimit)
Duel.RegisterEffect(e1,tp)
end
function c98941007.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c98941007.tgtg(e,c)
return c:IsSetCard(0xa182) and c:IsFaceup()
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_EARTH) 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.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if #sg1>0 or (sg2~=nil and #sg2>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
--多元春化精与花蕾
function c98941008.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,98941008+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c98941008.target)
e1:SetOperation(c98941008.activate)
c:RegisterEffect(e1)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c98941008.handcon)
c:RegisterEffect(e3)
end
function c98941008.cfilter(c)
return c:IsSummonLocation(LOCATION_GRAVE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
end
function c98941008.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c98941008.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c98941008.thfilter(chkc) end
local g=Duel.GetMatchingGroup(c98941008.cfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #g>0 and Duel.IsExistingTarget(c98941008.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local ct=g:GetClassCount(Card.GetCode)
local sg=Duel.SelectTarget(tp,c98941008.thfilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount()*2,0,0)
end
function c98941008.sfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() and c:IsAbleToHand()
end
function c98941008.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local ct=g:GetCount()
local g2=Duel.GetMatchingGroup(c98941008.sfilter,tp,LOCATION_MZONE,0,nil)
if g2:GetCount()<ct then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g2:Select(tp,ct,ct,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
function c98941008.hfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa182)
end
function c98941008.handcon(e)
return Duel.IsExistingMatchingCard(c98941008.hfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--苗与霞的多元春化精
function c98941009.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98941009)
e1:SetCost(c98941009.thcost)
e1:SetTarget(c98941009.thtg)
e1:SetOperation(c98941009.thop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c98941009.atktg)
e2:SetValue(-600)
c:RegisterEffect(e2)
--summom
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,98943009)
e3:SetTarget(c98941009.xyztg)
e3:SetOperation(c98941009.xyzop)
c:RegisterEffect(e3)
end
function c98941009.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0xa182)) and c:IsDiscardable()
end
function c98941009.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,98941003)
local b2=Duel.IsExistingMatchingCard(c98941009.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(98941003,0))) then
Duel.Hint(HINT_CARD,0,98941003)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98941009.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c98941009.thfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() and not c:IsCode(98941009)
end
function c98941009.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941009.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98941009.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98941009.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98941009.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98941009.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(98941009,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c98941009.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98941009.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c98941009.atktg(e,c)
return not c:IsSetCard(0xa182)
end
function c98941009.xyzfilter(c)
return c:IsSummonable(true,nil) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98941009.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98941009.xyzfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
end
function c98941009.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c98941009.xyzfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
\ No newline at end of file
--暗黑骑士-
function c9990119.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,9990119)
e1:SetTarget(c9990119.sptg)
e1:SetOperation(c9990119.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c9990119.star_knight_summon_effect=e1
end
function c9990119.filter(c,e,tp)
return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9990119.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9990119.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c9990119.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,c9990119.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c9990119.checkop)
Duel.RegisterEffect(e1,tp)
--cannot announce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c9990119.atkcon)
e2:SetTarget(c9990119.atktg)
e1:SetLabelObject(e2)
Duel.RegisterEffect(e2,tp)
end
function c9990119.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,9990119)~=0 then return end
local fid=eg:GetFirst():GetFieldID()
Duel.RegisterFlagEffect(tp,9990119,RESET_PHASE+PHASE_END,0,1)
e:GetLabelObject():SetLabel(fid)
end
function c9990119.atkcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),9990119)>0
end
function c9990119.atktg(e,c)
return c:GetFieldID()~=e:GetLabel()
end
\ No newline at end of file
...@@ -1040,6 +1040,8 @@ ...@@ -1040,6 +1040,8 @@
#渔人 888 0xc00-0xc0f #渔人 888 0xc00-0xc0f
!setname 0xc00 战钢 !setname 0xc00 战钢
!setname 0xc01 黄巾 !setname 0xc01 黄巾
!setname 0xc02 山田组
!setname 0xc05 废都
#Derren 910 0x9d0~0x9df #Derren 910 0x9d0~0x9df
!setname 0x9d0 真神 !setname 0x9d0 真神
......
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