Commit 633117bf authored by Tachibana's avatar Tachibana

eme

parent 4573d79d
Pipeline #6040 passed with stage
in 25 minutes and 12 seconds
No preview for this file type
......@@ -90,15 +90,6 @@
#93
09310039 1 --幻兽界神 圣单调白翼
09310042 2 --简单调和
09300100 0 --暗之一族的石鬼面
09300315 0 --替身使者-命运之轮
09300324 0 --替身使者-欧因哥
09300325 1 --替身使者-波因哥
09300329 0 --替身使者-丹尼尔·J·达比
09300405 1 --替身使者-虹村形兆
09300420 1 --替身使者-猜拳小子大柳贤
09300513 1 --后被称为龟的替身使者
09300699 1 --特殊技能暂抽取
09310030 1 --扭曲植物 形单调味树
09320004 1 --三首翼龙王
09330001 1 --陷阵营首-高顺
......@@ -133,7 +124,6 @@
10222035 1 --GGO 抛弃自卑 莲
10222045 1 --GGO 疯狂的杀戮 林鵙鹟
#104
10400014 0 --绝界剑·剑理阴阳
10401154 1 --梦之海
10401167 0 --毒草
10401170 0 --复杂世界
......
local m=10400001
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400001)
e1:SetOperation(c10400001.activate)
c:RegisterEffect(e1)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10400001,0))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_FZONE)
e4:SetTarget(c10400001.target)
e4:SetOperation(c10400001.operation)
c:RegisterEffect(e4)
--sp
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e5:SetDescription(aux.Stringid(10400001,1))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,10400001)
e5:SetCost(c10400001.spcost)
e5:SetTarget(c10400001.sptg)
e5:SetOperation(c10400001.spop)
c:RegisterEffect(e5)
end
function c10400001.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x680) and c:IsAbleToHand()
end
function c10400001.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10400001.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400001,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c10400001.filter(c)
return c:IsSetCard(0x680) and c:IsAbleToDeck() and not c:IsPublic()
end
function c10400001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(c10400001.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c10400001.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,c10400001.filter,p,LOCATION_HAND,0,1,99,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,ct-1,REASON_EFFECT)
Duel.ShuffleHand(p)
end
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
function c10400001.thfilter2(c,e,tp)
return c:IsSetCard(0x680) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_FIELD)
end
function c10400001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400001.thfilter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10400001.thfilter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10400001.spfilter(c,e,tp)
return c:IsSetCard(0x680) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function c10400001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400001.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c10400001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10400001.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=10400002
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400002)
e1:SetTarget(c10400002.target)
e1:SetOperation(c10400002.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c10400002.spcost)
e2:SetTarget(c10400002.sptg)
e2:SetOperation(c10400002.spop)
c:RegisterEffect(e2)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetDescription(aux.Stringid(10400002,1))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,10400002)
e5:SetCost(c10400002.tscost)
e5:SetTarget(c10400002.tstg)
e5:SetOperation(c10400002.tsop)
c:RegisterEffect(e5)
end
function c10400002.filter(c,e,tp)
return c:IsSetCard(0x680) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function c10400002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c10400002.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10400002.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400002,2)) then
local sg=g:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c10400002.spcost(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
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10400002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c10400002.filter,tp,LOCATION_GRAVE,0,1,exc,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c10400002.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10400002.filter,tp,LOCATION_GRAVE,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()
Duel.Destroy(c,REASON_EFFECT)
end
function c10400002.thfilter(c)
return c:IsSetCard(0x680) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_FIELD)
end
function c10400002.tscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400002.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10400002.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10400002.tsfilter(c,e,tp)
return c:IsSetCard(0x680) and c:IsType(TYPE_FIELD)
end
function c10400002.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400002.tsfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c10400002.tsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400002.tsfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,1)
end
end
\ No newline at end of file
local m=10400003
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400003)
e1:SetOperation(c10400003.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c10400003.thcost)
e2:SetTarget(c10400003.thtg)
e2:SetOperation(c10400003.thop)
c:RegisterEffect(e2)
--[[
dectroy
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,10400003)
e5:SetCost(c10400003.descost)
e5:SetTarget(c10400003.destg)
e5:SetOperation(c10400003.deop)
c:RegisterEffect(e5)
]]
end
function c10400003.thfilter(c)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0x680) and c:IsAbleToHand()
end
function c10400003.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10400003.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400003,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c10400003.thcost(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
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10400003.thfilter2(c,e,tp)
return c:IsSetCard(0x680) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c10400003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c10400003.thfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10400003.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400003.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,1)
end
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
function c10400003.desfilter(c)
return c:IsSetCard(0x680) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_FIELD)
end
function c10400003.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400003.desfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10400003.desfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10400003.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c10400003.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c10400003.filter,tp,0,LOCATION_ONFIELD,1,c) end
local g=Duel.GetMatchingGroup(c10400003.filter,tp,0,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c10400003.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c10400003.filter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
local m=10400004
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400004)
e1:SetTarget(c10400004.target)
e1:SetOperation(c10400004.activate)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(10400004,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,10400004)
e2:SetCost(c10400004.thcost)
e2:SetTarget(c10400004.thtg)
e2:SetOperation(c10400004.thop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10400004,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c10400004.spcon)
e3:SetTarget(c10400004.sptg)
e3:SetOperation(c10400004.spop)
c:RegisterEffect(e3)
end
function c10400004.filter(c,e,tp)
return c:IsSetCard(0x680) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10400004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c10400004.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10400004.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400004,2)) then
local sg=g:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c10400004.cfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA) and c:IsSetCard(0x680)
end
function c10400004.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10400004.cfilter,1,nil,tp)
end
function c10400004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
--and Duel.IsExistingMatchingCard(c10400004.filter,tp,LOCATION_HAND,0,1,exc,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c10400004.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10400004.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
function c10400004.thfilter(c)
return c:IsSetCard(0x680) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_FIELD)
end
function c10400004.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400004.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10400004.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10400004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c10400004.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
local m=10400005
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400005)
e1:SetOperation(c10400005.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(10400005,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,10400005)
e2:SetCost(c10400005.cost)
e2:SetTarget(c10400005.target2)
e2:SetOperation(c10400005.activate)
c:RegisterEffect(e2)
--Draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10400005,0))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c10400005.drcon)
e3:SetTarget(c10400005.drtg)
e3:SetOperation(c10400005.drop)
c:RegisterEffect(e3)
end
function c10400005.filter2(c)
return c:IsSetCard(0x680) and c:IsAbleToHand()
end
function c10400005.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400005.filter2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c10400005.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10400005.filter2,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400005,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c10400005.cfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA) and c:IsSetCard(0x680)
end
function c10400005.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function c10400005.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 c10400005.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
function c10400005.thfilter2(c)
return c:IsSetCard(0x680) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_FIELD)
end
function c10400005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400005.thfilter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10400005.thfilter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
\ No newline at end of file
local m=10400006
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100000130)
e1:SetOperation(c10400006.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,10400006)
e2:SetTarget(c10400006.sptg)
e2:SetOperation(c10400006.spop)
c:RegisterEffect(e2)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x680))
e4:SetValue(500)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function c10400006.thfilter(c)
return c:IsSetCard(0x680) and c:IsAbleToHand()
end
function c10400006.activate(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(1)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10400006.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400006,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c10400006.filter(c,e,tp)
return c:IsSetCard(0x3680) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10400006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c10400006.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,exc,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c10400006.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10400006.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=10400007
local cm=_G["c"..m]
function cm.initial_effect(c)
--destroy and set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10400007)
e1:SetTarget(c10400007.target)
e1:SetOperation(c10400007.operation)
c:RegisterEffect(e1)
end
function c10400007.filter(c,ignore)
return c:IsSetCard(0x680) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore) and not c:IsType(TYPE_FIELD)
end
function c10400007.tafilter(c)
return c:IsSetCard(0x680) and c:IsType(TYPE_FIELD)
end
function c10400007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c10400007.tafilter,tp,LOCATION_FZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c10400007.tafilter,tp,LOCATION_FZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c10400007.operation(e,tp,eg,ep,ev,re,r,rp,tc)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c10400007.filter,tp,LOCATION_DECK,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
end
\ No newline at end of file
local m=10400008
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400008,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,10400008)
e1:SetCost(c10400008.spcost)
e1:SetTarget(c10400008.sptg1)
e1:SetOperation(c10400008.spop1)
c:RegisterEffect(e1)
end
function c10400008.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x3680)
end
function c10400008.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c10400008.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingTarget(c10400008.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10400008.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10400008.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if not tc or not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
function c10400008.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c10400008.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c10400008.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
local m=10400009
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10400009)
e1:SetCondition(c10400009.hspcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10400009)
e2:SetTarget(c10400009.target)
e2:SetOperation(c10400009.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c10400009.filter(c)
return c:IsType(TYPE_FIELD)
end
function c10400009.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(c10400009.filter,tp,LOCATION_FZONE,0,1,nil)
end
function c10400009.filter2(c)
return c:IsSetCard(0x680) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c10400009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400009.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c10400009.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400009.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
local m=10400010
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10400010)
e1:SetCondition(c10400010.hspcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10400010)
e2:SetCost(c10400010.cost)
e2:SetTarget(c10400010.target)
e2:SetOperation(c10400010.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c10400010.filter(c)
return c:IsType(TYPE_FIELD)
end
function c10400010.cfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToGraveAsCost() and c:IsFaceup()
end
function c10400010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400010.cfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10400010.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,1)
end
function c10400010.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(c10400010.filter,tp,LOCATION_FZONE,0,1,nil)
end
function c10400010.filter2(c)
return c:IsSetCard(0x680) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c10400010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400010.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10400010.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400010.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
local m=10400011
local cm=_G["c"..m]
function cm.initial_effect(c)
--level up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10400011,0))
e2:SetCategory(CATEGORY_LVCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,10400011)
e2:SetOperation(c10400011.lvop)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400011,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100000120)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCost(c10400011.cost)
e1:SetTarget(c10400011.target)
e1:SetOperation(c10400011.operation)
c:RegisterEffect(e1)
end
function c10400011.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74644400,2))
local lv=Duel.AnnounceNumber(tp,1,2,3,4)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c10400011.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() and c:IsFaceup() and c:IsSetCard(0x680)
end
function c10400011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400011.cfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10400011.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,1)
end
function c10400011.filter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x680)
end
function c10400011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10400011.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c10400011.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 then ft=1 end
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10400011.filter2,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=10400012
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,10400012)
e1:SetCost(c10400012.spcost)
e1:SetTarget(c10400012.sptg)
e1:SetOperation(c10400012.spop)
c:RegisterEffect(e1)
end
function c10400012.spcfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHandAsCost()
end
function c10400012.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400012.spcfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c10400012.spcfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c10400012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10400012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
local m=10400013
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(10400013,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(c10400013.target)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400013,1))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,10400013)
e1:SetCondition(c10400013.thcon)
e1:SetTarget(c10400013.thtg)
e1:SetOperation(c10400013.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10400013,2))
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,10400013)
e3:SetCondition(c10400013.spcon)
e3:SetTarget(c10400013.sptg)
e3:SetOperation(c10400013.spop)
c:RegisterEffect(e3)
end
function c10400013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c10400013.stgcon)
e1:SetOperation(c10400013.stgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function c10400013.stgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c10400013.stgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==1 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c10400013.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3680) and c:GetSummonPlayer()==tp
end
function c10400013.tgfilter(c,tp,g)
return g:IsContains(c) and Duel.IsExistingMatchingCard(c10400013.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c10400013.thfilter(c,code)
return c:IsSetCard(0x680) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsAbleToHand()
end
function c10400013.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and eg:IsExists(c10400013.cfilter,1,nil,tp)
end
function c10400013.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c10400013.cfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10400013.tgfilter(chkc,tp,g) end
if chk==0 then return Duel.IsExistingTarget(c10400013.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,g) end
if g:GetCount()==1 then
Duel.SetTargetCard(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c10400013.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,g)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10400013.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400013.thfilter,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c10400013.spfilter(c,e,tp)
return c:IsSetCard(0x3680) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10400013.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function c10400013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10400013.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c10400013.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,c10400013.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=10400014
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--deck
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(c10400014.activate)
c:RegisterEffect(e3)
--actlimit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(c10400014.actcon)
e5:SetOperation(c10400014.actop)
c:RegisterEffect(e5)
end
function c10400014.actcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
return tc and tc:IsControler(tp) and tc:IsSetCard(0x680)
end
function c10400014.actop(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_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c10400014.limit)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c10400014.thfilter(c)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0x680) and c:IsAbleToHand()
end
function c10400014.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10400014.thfilter,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400014,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c10400014.limit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
end
\ No newline at end of file
local m=10400015
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400015,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400015+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c10400015.target)
e1:SetOperation(c10400015.activate)
c:RegisterEffect(e1)
end
function c10400015.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0x680)
end
function c10400015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400015.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10400015.activate(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400015.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
e:SetLabel(g:GetFirst():GetCode())
end
function c10400015.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
\ No newline at end of file
local m=10400016
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400016,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400016+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c10400016.cost)
e1:SetTarget(c10400016.target)
e1:SetOperation(c10400016.activate)
c:RegisterEffect(e1)
end
function c10400016.cofilter(c)
return c:IsSetCard(0x680) and c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c10400016.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400016.cofilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10400016.cofilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,c10400016.cofilter,2,REASON_COST)
end
function c10400016.filter(c)
return c:IsFaceup()
end
function c10400016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400016.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c10400016.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c10400016.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c10400016.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
local m=10400017
local cm=_G["c"..m]
function cm.initial_effect(c)
--to Remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400017,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10400017)
e1:SetTarget(c10400017.target1)
e1:SetOperation(c10400017.operation1)
c:RegisterEffect(e1)
--to deck top
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10400017,2))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,10400017)
e2:SetTarget(c10400017.target2)
e2:SetOperation(c10400017.operation2)
c:RegisterEffect(e2)
end
function c10400017.fliter1(c)
return c:IsSetCard(0x680) and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function c10400017.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400017.fliter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c10400017.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10400017.fliter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c10400017.fliter2(c)
return c:IsSetCard(0x680) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c10400017.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400017.fliter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c10400017.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10400017.fliter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
local m=10400019
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3680),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400019,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,10400019)
e1:SetCondition(c10400019.secon)
e1:SetTarget(c10400019.setg)
e1:SetOperation(c10400019.seop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10400019,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100000129)
e2:SetCondition(c10400019.con2)
e2:SetTarget(c10400019.tg2)
e2:SetOperation(c10400019.op2)
c:RegisterEffect(e2)
--industructable_effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c10400019.secon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c10400019.sefilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand() and c:IsSetCard(0x680)
end
function c10400019.setg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400019.sefilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10400019.seop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400019.sefilter,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 c10400019.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c10400019.spfil(c,e,tp)
return c:IsSetCard(0x3680) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10400019.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400019.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c10400019.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c10400019.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=10400020
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3680),2,2)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10400020,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCountLimit(1,10400020)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c10400020.secon)
e2:SetTarget(c10400020.target)
e2:SetOperation(c10400020.operation)
c:RegisterEffect(e2)
--spsommom
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,10400020)
e3:SetTarget(c10400020.target2)
e3:SetOperation(c10400020.operation2)
c:RegisterEffect(e3)
end
function c10400020.secon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10400020.filter2(c,e,tp)
return c:IsSetCard(0x3680) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10400020.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10400020.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c10400020.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 then ft=1 end
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10400020.filter2,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c10400020.filter(c,e,sp)
return c:IsSetCard(0x3680) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) and not c:IsCode(10400020)
end
function c10400020.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10400020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c10400020.operation2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10400020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=10400021
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3680),2)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10400021,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,10400021)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(aux.bfgcost)
e1:SetCondition(c10400021.discon)
e1:SetTarget(c10400021.distg)
e1:SetOperation(c10400021.disop)
c:RegisterEffect(e1)
--grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c10400021.target)
e2:SetOperation(c10400021.activate)
c:RegisterEffect(e2)
end
function c10400021.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c10400021.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c10400021.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c10400021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c10400021.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
local m=10400022
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3680),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10400022)
e2:SetTarget(c10400022.target2)
e2:SetOperation(c10400022.operation2)
c:RegisterEffect(e2)
--immune
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function c10400022.filter2(c)
return c:IsCode(10400015,10400016) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c10400022.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400022.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10400022.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10400022.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
local m=10400023
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3680),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
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)
e4:SetCondition(c10400023.discon)
e4:SetCost(c10400023.discost)
e4:SetTarget(c10400023.distg)
e4:SetOperation(c10400023.disop)
c:RegisterEffect(e4)
end
function c10400023.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c10400023.cfilter(c)
return c:IsSetCard(0x680) and c:IsType(TYPE_FIELD) and c:IsDiscardable()
end
function c10400023.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10400023.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c10400023.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c10400023.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c10400023.ffilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c10400023.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local fg=Duel.GetMatchingGroup(c10400023.ffilter,tp,LOCATION_DECK,0,nil)
if fg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10400023,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=fg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
local m=10400024
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3680),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c10400024.efilter)
c:RegisterEffect(e1)
--attack all
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ATTACK_ALL)
e4:SetValue(1)
c:RegisterEffect(e4)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
end
function c10400024.efilter(e,te)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--凶镬沿袭
function c10401184.initial_effect(c)
c:SetUniqueOnField(1,1,10401184)
c:EnableCounterPermit(0x1942)
c:EnableCounterPermit(0x680)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
......@@ -43,20 +43,20 @@ end
function c10401184.operation1(e,tp,eg,ep,ev,re,r,rp)
if chkc then return chkc:IsOnField() and c10401184.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsCanAddCounter(tp,0x1942,3,c) end
c:AddCounter(0x1942,3)
if chk==0 then return Duel.IsCanAddCounter(tp,0x680,3,c) end
c:AddCounter(0x680,3)
end
function c10401184.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x1942,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1942,1) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x680,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x680,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1942,1)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x680,1)
end
function c10401184.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
e:GetHandler():RemoveCounter(tp,0x1942,1,REASON_EFFECT)
tc:AddCounter(0x1942,1)
e:GetHandler():RemoveCounter(tp,0x680,1,REASON_EFFECT)
tc:AddCounter(0x680,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -67,10 +67,10 @@ function c10401184.operation2(e,tp,eg,ep,ev,re,r,rp)
end
end
function c10401184.cfilter(e)
return e:GetHandler():GetCounter(0x1942)>0
return e:GetHandler():GetCounter(0x680)>0
end
function c10401184.cfilter2(c)
return c:GetCounter(0x1942)>0
return c:GetCounter(0x680)>0
end
function c10401184.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c10401184.cfilter2,1,nil) then
......@@ -81,7 +81,7 @@ function c10401184.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()==1
end
function c10401184.thfilter(c)
return c:GetCounter(0x1942)>0
return c:GetCounter(0x680)>0
end
function c10401184.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
local m=50220135
local cm=_G["c"..m]
cm.name="龙王的契约"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50220135,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,50220135)
e1:SetTarget(c50220135.mattg1)
e1:SetOperation(c50220135.matop1)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50220135,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,50220135)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c50220135.mattg2)
e2:SetOperation(c50220135.matop2)
c:RegisterEffect(e2)
end
function c50220135.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c50220135.matfilter1(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)
end
function c50220135.mattg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c50220135.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c50220135.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c50220135.matfilter1,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c50220135.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c50220135.matop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c50220135.matfilter1,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
function c50220135.matfilter2(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_XYZ)
end
function c50220135.mattg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c50220135.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c50220135.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c50220135.matfilter2,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c50220135.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c50220135.matop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c50220135.matfilter2,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
\ No newline at end of file
local m=50220140
local cm=_G["c"..m]
cm.name="龙王的震怒"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50220140,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_TOGRAVE)
e1:SetCountLimit(1,50220140)
e1:SetCost(c50220140.rmcost1)
e1:SetTarget(c50220140.rmtg1)
e1:SetOperation(c50220140.rmop1)
c:RegisterEffect(e1)
--hand remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50220140,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMING_TOGRAVE)
e2:SetCountLimit(1,50220140)
e2:SetCost(c50220140.rmcost2)
e2:SetTarget(c50220140.rmtg2)
e2:SetOperation(c50220140.rmop2)
c:RegisterEffect(e2)
end
function c50220140.cfilter1(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
end
function c50220140.rmcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50220140.cfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c50220140.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c50220140.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()~=tp and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c50220140.rmop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c50220140.cfilter2(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost()
end
function c50220140.rmcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c50220140.cfilter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c50220140.cfilter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c50220140.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function c50220140.rmop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--Virtual UP-花留
local m=81011138
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.costfilter(c,tp)
return c:IsAttack(1550) and c:IsDefense(1050) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_PZONE,0,nil)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.sslimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.sslimit(e,c)
return not (c:IsAttack(1550) or (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)))
end
--暗之一族的石鬼面
function c9300100.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9300100,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9300100)
e1:SetTarget(c9300100.target)
e1:SetOperation(c9300100.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300100,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,9300100)
e2:SetCondition(c9300100.spcon)
e2:SetCost(c9300100.afcost)
e2:SetTarget(c9300100.target2)
e2:SetOperation(c9300100.activate2)
c:RegisterEffect(e2)
end
function c9300100.filter(c,e,tp)
local lv=c:GetOriginalLevel()
return c:IsFaceup() and not c:IsRace(RACE_ZOMBIE) and not c:IsRace(RACE_MACHINE) and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(c9300100.ffilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,lv)
end
function c9300100.ffilter(c,e,tp,clv)
local lv=c:GetOriginalLevel()
return lv>0 and lv==clv+2 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9300100.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9300100.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c9300100.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c9300100.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function c9300100.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.Release(tc,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c9300100.ffilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,tc:GetOriginalLevel())
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9300100.ctkfilter(c)
return c:IsFaceup() and c:IsCode(9300200)
end
function c9300100.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9300100.ctkfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c9300100.afcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c9300100.filter2(c,e,tp)
local lv=c:GetOriginalLevel()
return c:IsFaceup() and not c:IsRace(RACE_MACHINE) and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(c9300100.ffilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,lv)
end
function c9300100.ffilter2(c,e,tp,clv)
local lv=c:GetOriginalLevel()
return lv>0 and lv==clv+2 and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9300100.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9300100.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c9300100.filter2,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c9300100.filter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function c9300100.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.Release(tc,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c9300100.ffilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetOriginalLevel())
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--替身使者-波鲁纳雷夫
function c9300307.initial_effect(c)
aux.AddCodeList(c,9300500)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300307+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300307.sprcon)
c:RegisterEffect(e1)
--destory
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300307,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetCondition(c9300307.rmcon)
e2:SetTarget(c9300307.rmtg)
e2:SetOperation(c9300307.rmop)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9300307,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9300307)
e3:SetOperation(c9300307.adop)
c:RegisterEffect(e3)
--direct attack
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9300307,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,9300307)
e4:SetCondition(c9300307.sccon)
e4:SetOperation(c9300307.dirop)
c:RegisterEffect(e4)
--Search
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9300307,3))
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e6:SetCountLimit(1,9302307)
e6:SetTarget(c9300307.thtg)
e6:SetOperation(c9300307.thop)
c:RegisterEffect(e6)
end
function c9300307.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300307
end
function c9300307.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300307.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300307.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return c==Duel.GetAttacker() and bc and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsOnField() and bc:IsRelateToBattle()
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c9300307.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0)
end
function c9300307.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsControler(1-tp) then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function c9300307.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(-800)
c:RegisterEffect(e2)
end
end
function c9300307.sccon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c9300307.dirop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
c:RegisterFlagEffect(9301307,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCountLimit(1)
e2:SetLabelObject(c)
e2:SetCondition(c9300307.tgcon)
e2:SetOperation(c9300307.posop1)
Duel.RegisterEffect(e2,tp)
end
end
function c9300307.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if c:GetFlagEffect(9301307)~=0 then
return true
else
e:Reset()
return false
end
end
function c9300307.posop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if c:IsAttackPos() then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e2)
end
end
function c9300307.thfilter(c)
return c:IsCode(09300500) and c:IsAbleToHand()
end
function c9300307.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300307.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD)
end
function c9300307.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9300307.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--替身使者-命运之轮
function c9300315.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c9300315.matfilter1,1,1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9300315)
e1:SetTarget(c9300315.sptg)
e1:SetOperation(c9300315.spop)
c:RegisterEffect(e1)
--get effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetCondition(c9300315.condition)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1100)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
e4:SetValue(1100)
c:RegisterEffect(e4)
--immu--
local e5=e2:Clone()
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(c9300315.efilter)
c:RegisterEffect(e5)
--to grave
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetCountLimit(1,9301315)
e6:SetOperation(c9300315.regop)
c:RegisterEffect(e6)
end
function c9300315.matfilter1(c)
return not c:IsLinkType(TYPE_TOKEN)
end
function c9300315.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9300315.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9300315.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanOverlay()
and Duel.IsExistingTarget(c9300315.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c9300315.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c9300315.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
Duel.Overlay(tc,Group.FromCards(c))
end
end
function c9300315.condition(e)
return e:GetHandler():GetOriginalRace()==RACE_MACHINE
end
function c9300315.efilter(e,te)
return te:IsActiveType(TYPE_FIELD)
end
function c9300315.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9300315,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,9300315)
e1:SetTarget(c9300315.thtg)
e1:SetOperation(c9300315.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c9300315.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300315.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c9300315.filter(c)
return c:IsSetCard(0x1f99) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(6) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c9300315.thfilter2(c)
return c9300315.filter(c) and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c9300315.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9300315.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
function c9300315.thop(e,tp,eg,ep,ev,re,r,rp)
local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_CARD,0,9300315)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c9300315.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,res):GetFirst()
if tc then
if tc:GetLeftScale()==2 and res 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)
Duel.ConfirmCards(1-tp,tc)
end
end
end
\ No newline at end of file
--替身使者-欧因哥
function c9300324.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300324+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300324.sprcon)
c:RegisterEffect(e1)
--special summon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300324,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9300324)
e2:SetCondition(c9300324.spcon)
e2:SetTarget(c9300324.sptg)
e2:SetOperation(c9300324.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e4:SetCondition(c9300324.tgcon)
e4:SetValue(aux.imval1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
--to hand/spsummon
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCountLimit(1,9301324)
e6:SetCondition(c9300324.recon)
e6:SetTarget(c9300324.regtg)
e6:SetOperation(c9300324.regop)
c:RegisterEffect(e6)
--name change
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(9300324,1))
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e7:SetCountLimit(1,9302324)
e7:SetTarget(c9300324.nametg)
e7:SetOperation(c9300324.nameop)
c:RegisterEffect(e7)
end
function c9300324.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300324
end
function c9300324.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300324.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300324.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
end
function c9300324.spfilter(c,e,tp)
return c:IsCode(9300325) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9300324.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300324.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c9300324.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,c9300324.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9300324.spfilter2(c,e,tp,code)
return c:IsFaceup() and c:IsCode(code)
end
function c9300324.tgcon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c9300324.spfilter2,tp,0,LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,1,nil,c:GetCode())
and not Duel.IsExistingMatchingCard(c9300324.spfilter2,tp,0,LOCATION_MZONE,1,nil,c:GetCode())
end
function c9300324.recon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9300324.thfilter(c)
return c:IsLevelBelow(6) and c:IsSetCard(0x1f99) and c:IsType(TYPE_MONSTER) and c:GetCode()~=9300324
and c:GetCode()~=9300325 and c:IsAttribute(ATTRIBUTE_DARK)
end
function c9300324.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300324.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c9300324.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c9300324.thcon)
e1:SetOperation(c9300324.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9300324.thfilter2(c)
return c9300324.thfilter(c) and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c9300324.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9300324.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
function c9300324.thop(e,tp,eg,ep,ev,re,r,rp)
local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_CARD,0,9300324)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c9300324.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,res):GetFirst()
if tc then
if tc:GetLeftScale()==9 and res 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)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c9300324.nametg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local code=e:GetHandler():GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp,TYPE_MONSTER,OPCODE_ISTYPE)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function c9300324.nameop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(ac)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c9300324.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c9300324.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x1f99) and c:IsLocation(LOCATION_EXTRA)
end
--替身使者-波因哥
function c9300325.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300325+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300325.sprcon)
c:RegisterEffect(e1)
--special summon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300325,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9300325)
e2:SetCondition(c9300325.spcon)
e2:SetTarget(c9300325.sptg)
e2:SetOperation(c9300325.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--pendulum
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9300325,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,9301325)
e4:SetCondition(c9300325.pencon)
e4:SetTarget(c9300325.pentg)
e4:SetOperation(c9300325.penop)
c:RegisterEffect(e4)
--to hand/spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,9302325)
e5:SetCondition(c9300325.recon)
e5:SetTarget(c9300325.regtg)
e5:SetOperation(c9300325.regop)
c:RegisterEffect(e5)
--sort decktop
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9300325,2))
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e6:SetCountLimit(1,9303325)
e6:SetTarget(c9300325.sttg)
e6:SetOperation(c9300325.stop)
c:RegisterEffect(e6)
end
function c9300325.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300325
end
function c9300325.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300325.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300325.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
end
function c9300325.spfilter(c,e,tp)
return c:IsCode(9300324) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9300325.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300325.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c9300325.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,c9300325.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9300325.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c9300325.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c9300325.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c9300325.recon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9300325.thfilter(c)
return c:IsLevelBelow(6) and c:IsSetCard(0x1f99) and c:IsType(TYPE_MONSTER) and c:GetCode()~=9300325
and c:GetCode()~=9300324 and c:IsAttribute(ATTRIBUTE_DARK)
end
function c9300325.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300325.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c9300325.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c9300325.thcon)
e1:SetOperation(c9300325.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9300325.thfilter2(c)
return c9300325.thfilter(c) and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c9300325.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9300325.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
function c9300325.thop(e,tp,eg,ep,ev,re,r,rp)
local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_CARD,0,9300325)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c9300325.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,res):GetFirst()
if tc then
if tc:GetLeftScale()==9 and res 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)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c9300325.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end
end
function c9300325.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.SortDecktop(tp,1-tp,3)
end
\ No newline at end of file
--替身使者-丹尼尔·J·达比
function c9300329.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2,nil,nil,99)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Coin
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9300329,0))
e1:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9300329)
e1:SetTarget(c9300329.mattg)
e1:SetOperation(c9300329.mtop)
c:RegisterEffect(e1)
--Toss Again
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e2:SetCode(EVENT_TOSS_COIN_NEGATE)
e2:SetCondition(c9300329.coincon)
e2:SetOperation(c9300329.coinop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9300329.imcon)
e3:SetValue(c9300329.efilter)
c:RegisterEffect(e3)
--cannot be battle target
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetValue(aux.imval1)
c:RegisterEffect(e4)
--attack limit
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e6)
--to hand/spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(9300329,2))
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,9302329)
e5:SetCondition(c9300329.recon)
e5:SetTarget(c9300329.regtg)
e5:SetOperation(c9300329.regop)
c:RegisterEffect(e5)
end
c9300329.pendulum_level=4
c9300329.toss_coin=true
function c9300329.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
c:RegisterFlagEffect(9300329,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c9300329.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN)
local coin=Duel.AnnounceCoin(tp)
local res=Duel.TossCoin(tp,1)
if coin~=res then
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_XMATERIAL)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Overlay(c,sg)
end
else
local og=e:GetHandler():GetOverlayGroup()
if og:GetCount()>0
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local bg=og:Select(tp,1,1,nil)
Duel.SendtoDeck(bg,nil,2,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
end
end
end
c9300329.toss_coin=true
function c9300329.coincon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ep==tp and Duel.GetFlagEffect(tp,9301329)==0 and e:GetHandler():GetFlagEffect(9300329)>0 and ph==PHASE_STANDBY
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c9300329.coinop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,9301329)~=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(9300329,0)) then
Duel.Hint(HINT_CARD,0,9300329)
Duel.RegisterFlagEffect(tp,9301329,RESET_PHASE+PHASE_END,0,1)
Duel.TossCoin(tp,ev)
end
end
function c9300329.matfil(c,e)
return c:GetOwner()~=e:GetHandlerPlayer()
end
function c9300329.imcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(c9300329.matfil,1,nil,e)
end
function c9300329.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_MONSTER)
end
function c9300329.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c9300329.recon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9300329.thfilter(c)
return c:IsLevelBelow(6) and c:IsSetCard(0x1f99) and c:IsType(TYPE_MONSTER) and c:GetCode()~=9300329 and c:IsAttribute(ATTRIBUTE_DARK)
end
function c9300329.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300329.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c9300329.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c9300329.thcon)
e1:SetOperation(c9300329.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9300329.thfilter2(c)
return c9300329.thfilter(c) and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c9300329.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9300329.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
function c9300329.thop(e,tp,eg,ep,ev,re,r,rp)
local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_CARD,0,9300329)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c9300329.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,res):GetFirst()
if tc then
if tc:GetLeftScale()==9 and res 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)
Duel.ConfirmCards(1-tp,tc)
end
end
end
--替身使者-佩特夏
function c9300330.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300330+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300330.sprcon)
c:RegisterEffect(e1)
--special summon 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300330,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c9300330.spcon2)
e2:SetTarget(c9300330.sptg)
e2:SetOperation(c9300330.spop)
c:RegisterEffect(e2)
--immune effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e3:SetTargetRange(LOCATION_FZONE,0)
e3:SetValue(c9300330.efilter)
c:RegisterEffect(e3)
--atk def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetValue(c9300330.adval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
--add counter
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9300330,0))
e6:SetCategory(CATEGORY_COUNTER)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetHintTiming(0xc)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e6:SetTarget(c9300330.target)
e6:SetOperation(c9300330.operation)
c:RegisterEffect(e6)
--add counter self
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(9300330,1))
e7:SetCategory(CATEGORY_COUNTER)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetHintTiming(0xc)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1,93003301)
e7:SetTarget(c9300330.chtg)
e7:SetOperation(c9300330.indop)
c:RegisterEffect(e7)
--to hand/spsummon
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCountLimit(1,93003302)
e8:SetCondition(c9300330.recon)
e8:SetTarget(c9300330.regtg)
e8:SetOperation(c9300330.regop)
c:RegisterEffect(e8)
end
function c9300330.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300330
end
function c9300330.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300330.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300330.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,0,1,nil) and Duel.GetAttacker():GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c9300330.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c9300330.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c9300330.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c9300330.adval(e,c)
return c:GetCounter(0x1015)*-500
end
function c9300330.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsCanAddCounter(0x1015,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1015,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x1015,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0)
end
function c9300330.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1015,1) then
tc:AddCounter(0x1015,1)
end
end
function c9300330.filter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c9300330.cfilter,tp,LOCATION_EXTRA,0,1,nil,c)
end
function c9300330.chtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9300330.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c9300330.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9300330.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c9300330.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1015,1)
then tc:AddCounter(0x1015,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(9300330,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetCountLimit(1)
e2:SetValue(c9300330.valcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c9300330.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c9300330.recon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9300330.thfilter(c)
return c:IsLevelBelow(6) and c:IsSetCard(0x1f99) and c:IsType(TYPE_MONSTER) and c:GetCode()~=9300330 and c:IsAttribute(ATTRIBUTE_DARK)
end
function c9300330.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300330.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c9300330.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c9300330.thcon)
e1:SetOperation(c9300330.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9300330.thfilter2(c)
return c9300330.thfilter(c) and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c9300330.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9300330.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
function c9300330.thop(e,tp,eg,ep,ev,re,r,rp)
local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_CARD,0,9300330)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c9300330.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,res):GetFirst()
if tc then
if tc:GetLeftScale()==9 and res 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)
Duel.ConfirmCards(1-tp,tc)
end
end
end
\ No newline at end of file
--替身使者合体二人组
function c9300399.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x1f99),2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c9300399.atkop)
c:RegisterEffect(e1)
--extra att
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
c:RegisterEffect(e2)
--copy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9300399,0))
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(2)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c9300399.target)
e3:SetOperation(c9300399.operation)
c:RegisterEffect(e3)
end
function c9300399.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
local s=0
local tc=g:GetFirst()
while tc do
local a=tc:GetAttack()
if a<0 then a=0 end
s=s+a
tc=g:GetNext()
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(s)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c9300399.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:IsAbleToDeck()
end
function c9300399.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300399.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_EXTRA)
end
function c9300399.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local cg=Duel.SelectMatchingCard(tp,c9300399.thfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if cg:GetCount()==0 then return end
Duel.SendtoDeck(cg,nil,2,REASON_EFFECT)
local tc=cg:GetFirst()
local code=tc:GetOriginalCode()
local reset_flag=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
c:CopyEffect(code, RESET_EVENT+RESETS_STANDARD, 1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(reset_flag)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
end
end
--替身使者-虹村形兆
function c9300405.initial_effect(c)
aux.AddCodeList(c,9300300)
aux.AddCodeList(c,9300404)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300405+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300405.sprcon)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c9300405.tgcon)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9300405,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_HAND+LOCATION_MZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c9300405.spcost)
e4:SetOperation(c9300405.indop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetRange(LOCATION_GRAVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,9300405+EFFECT_COUNT_CODE_DUEL)
e5:SetTarget(c9300405.target)
e5:SetOperation(c9300405.regop)
c:RegisterEffect(e5)
if not c9300405.global_check then
c9300405.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c9300405.checkop)
Duel.RegisterEffect(ge1,0)
end
--token
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e6:SetDescription(aux.Stringid(9300405,2))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e6:SetCountLimit(1,9300405)
e6:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e6:SetTarget(c9300405.sptg2)
e6:SetOperation(c9300405.spop2)
c:RegisterEffect(e6)
--Search
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(9300405,0))
e7:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e7:SetCountLimit(1,9301405)
e7:SetTarget(c9300405.thtg)
e7:SetOperation(c9300405.thop)
c:RegisterEffect(e7)
end
function c9300405.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300405
end
function c9300405.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300405.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300405.tgfilter(c)
return c:GetOriginalCode()==9300499
end
function c9300405.tgcon(e)
return Duel.IsExistingMatchingCard(c9300405.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c9300405.thfilter(c)
return c:IsCode(9300300) and c:IsAbleToHand()
end
function c9300405.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300405.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD)
end
function c9300405.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9300405.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c9300405.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 c9300405.indop(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_ONFIELD,LOCATION_ONFIELD)
e1:SetValue(1)
e1:SetTarget(c9300405.immtg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c9300405.immtg)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
function c9300405.immtg(e,c)
return c:IsCode(9300404)
end
function c9300405.callback(c)
local tp=c:GetPreviousControler()
if c:IsCode(9300404) and c:IsControler(tp) then
c:RegisterFlagEffect(9300405,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c9300405.checkop(e,tp,eg,ep,ev,re,r,rp)
eg:ForEach(c9300405.callback)
end
function c9300405.filter(c,e,tp)
return c:GetFlagEffect(9300405)~=0 and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9300405.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c9300405.filter(chkc,e,tp) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(c9300405.filter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,c9300405.filter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c9300405.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c9300405.activate)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9300405.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9300405.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,9300499,0,0x4011,2000,1000,4,RACE_MACHINE,ATTRIBUTE_DARK) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function c9300405.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,9300499,0,0x4011,2000,1000,4,RACE_MACHINE,ATTRIBUTE_DARK) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local fid=e:GetHandler():GetFieldID()
local g=Group.CreateGroup()
for i=1,ft do
local token=Duel.CreateToken(tp,9300499)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e3,true)
local e4=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e5,true)
token:RegisterFlagEffect(9300405,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
g:AddCard(token)
end
Duel.SpecialSummonComplete()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c9300405.descon)
e1:SetOperation(c9300405.desop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c9300405.damval)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c9300405.damval(e,re,val,r,rp,rc)
return math.floor(val/5)
end
function c9300405.desfilter(c,fid)
return c:GetFlagEffectLabel(9300405)==fid
end
function c9300405.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c9300405.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c9300405.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c9300405.desfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.Destroy(tg,REASON_EFFECT)
end
function c9300412.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300412+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300412.sprcon)
c:RegisterEffect(e1)
--pendulum
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300412,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9301412)
e2:SetCondition(c9300412.pencon)
e2:SetTarget(c9300412.pentg)
e2:SetOperation(c9300412.penop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9300412,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e3:SetCountLimit(1,9302412)
e3:SetTarget(c9300412.tg)
e3:SetOperation(c9300412.op)
c:RegisterEffect(e3)
--clean
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9300412,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,9303412)
e4:SetTarget(c9300412.indtg)
e4:SetOperation(c9300412.desop)
c:RegisterEffect(e4)
end
function c9300412.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300412
end
function c9300412.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300412.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300412.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c9300412.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c9300412.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c9300412.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function c9300412.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c9300412.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c9300412.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(atk+100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(def+100)
tc:RegisterEffect(e2)
if tc:GetCounter(0)~=0 and Duel.SelectYesNo(tp,aux.Stringid(9300412,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tc:RemoveCounter(tp,0,0,REASON_EFFECT)
end
end
end
--替身使者-辻彩
function c9300417.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300417+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300417.sprcon)
c:RegisterEffect(e1)
--change1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300417,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+CATEGORY_TOGRAVE)
e2:SetCountLimit(1,9300417)
e2:SetCost(c9300417.cost)
e2:SetTarget(c9300417.chtg)
e2:SetOperation(c9300417.chop)
c:RegisterEffect(e2)
--change2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9300417,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+CATEGORY_TODECK)
e3:SetCountLimit(1,9301417)
e3:SetCost(c9300417.cost2)
e3:SetTarget(c9300417.chtg2)
e3:SetOperation(c9300417.chop2)
c:RegisterEffect(e3)
end
function c9300417.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300415
end
function c9300417.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300417.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300417.filter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c9300417.cfilter,tp,LOCATION_EXTRA+LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,nil,c)
end
function c9300417.cfilter(c,tc)
return (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_ONFIELD) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() --and (not c:IsCode(tc:GetCode()) or not c:IsAttribute(tc:GetAttribute()))
end
function c9300417.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1500) end
Duel.PayLPCost(tp,1500)
end
function c9300417.chtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9300417.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c9300417.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9300417.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c9300417.chop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,c9300417.cfilter,tp,LOCATION_EXTRA+LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tc)
if cg:GetCount()==0 then return end
Duel.SendtoGrave(cg,REASON_EFFECT)
local ec=cg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ec:GetCode())
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ec:GetAttribute())
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(1,0)
e3:SetValue(c9300417.aclimit)
e3:SetLabel(ec:GetCode())
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
if tc:IsOriginalSetCard(0x1f99) then
local e4=Effect.CreateEffect(tc)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ADD_SETCODE)
e4:SetValue(0x1f99)
tc:RegisterEffect(e4)
end
end
function c9300417.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end
function c9300417.filter2(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c9300417.cfilter2,tp,LOCATION_EXTRA+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c)
end
function c9300417.cfilter2(c,tc)
return (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() --and not c:IsCode(tc:GetCode())
end
function c9300417.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c9300417.chtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9300417.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c9300417.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9300417.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c9300417.chop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local cg=Duel.SelectMatchingCard(tp,c9300417.cfilter2,tp,LOCATION_EXTRA+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tc)
if cg:GetCount()==0 then return end
Duel.SendtoDeck(cg,nil,2,REASON_EFFECT)
local ec=cg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ec:GetCode())
tc:RegisterEffect(e1)
if tc:IsOriginalSetCard(0x1f99) then
local e4=Effect.CreateEffect(tc)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ADD_SETCODE)
e4:SetValue(0x1f99)
tc:RegisterEffect(e4)
end
end
--替身使者-大柳贤
function c9300420.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,3,c9300420.ovfilter,aux.Stringid(9300420,1),c9300420.xyzop)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--untargetable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--RockPaperScissors
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300420,0))
e2:SetCategory(CATEGORY_COUNTER+EFFECT_TYPE_SINGLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,9300420)
e2:SetTarget(c9300420.cttg)
e2:SetOperation(c9300420.mtop)
c:RegisterEffect(e2)
--copy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9300420,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9301420)
e3:SetCondition(c9300420.imcon)
e3:SetTarget(c9300420.thtg)
e3:SetOperation(c9300420.copyop)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c9300420.efilter)
c:RegisterEffect(e4)
--copy2
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(9300420,3))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e5:SetCountLimit(1,9302420)
e5:SetCost(c9300420.copycost)
e5:SetTarget(c9300420.copytg)
e5:SetOperation(c9300420.copyop2)
c:RegisterEffect(e5)
--des
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DESTROY)
e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCondition(c9300420.descon)
e6:SetTarget(c9300420.destg)
e6:SetOperation(c9300420.desop)
c:RegisterEffect(e6)
end
c9300420.pendulum_level=2
function c9300420.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf99) and not c:IsCode(9300420)
end
function c9300420.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1f93,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f93,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f93,1)
end
function c9300420.filter3(c)
return c:IsFaceup() and c:GetCounter(0x1f93)>0
end
function c9300420.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1f93,1) and c:IsRelateToEffect(e) and c:IsCanAddCounter(0x1f93,1) then
local res=Duel.RockPaperScissors()
if res==tp then
tc:AddCounter(0x1f93,1)
if tc:GetCounter(0x1f93)==3 and tc:IsCanBeXyzMaterial(c) then
Duel.Overlay(c,tc) end
else
c:AddCounter(0x1f93,1)
if c:GetCounter(0x1f93)==3 and c:IsCanRemoveCounter(tp,0x1f93,1,REASON_EFFECT) then
local g=Duel.GetMatchingGroup(c9300420.filter3,tp,0,LOCATION_ONFIELD,nil)
local ac=c:GetCounter(0x1f93)
c:RemoveCounter(tp,0x1f93,ac,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
local cc=tc:GetCounter(0x1f93)
tc:RemoveCounter(tp,0x1f93,cc,REASON_EFFECT)
tc=g:GetNext()
end
if c:IsRelateToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()==0 then return end
Duel.SendtoDeck(og,nil,2,REASON_EFFECT)
end
end
end
end
end
function c9300420.matfil(c,e)
return c:GetOwner()~=e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER)
end
function c9300420.imcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(c9300420.matfil,1,nil,e)
end
function c9300420.filter2(c,e)
return c:IsType(TYPE_EFFECT) and c:IsLocation(LOCATION_OVERLAY)
end
function c9300420.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup()
if chk==0 then return og:GetCount()>0 end
local g=og:FilterSelect(tp,c9300420.filter2,1,1,nil,e)
Duel.SetTargetCard(g)
end
function c9300420.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
local code=tc:GetOriginalCode()
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
end
function c9300420.efilter(e,te)
return te:GetOwner():GetCounter(0x1f93)>0 and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c9300420.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(9300420)==0 end
e:GetHandler():RegisterFlagEffect(9300420,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c9300420.copyfilter(c)
return c:IsFaceup() and c:GetCounter(0x1f93)~=0 and c:IsType(TYPE_EFFECT)
end
function c9300420.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c9300420.copyfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9300420.copyfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9300420.copyfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c9300420.copyop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
local code=tc:GetOriginalCodeRule()
if not tc:IsType(TYPE_TRAPMONSTER) then
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300420,3))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetLabelObject(e1)
e2:SetLabel(cid)
e2:SetOperation(c9300420.rstop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function c9300420.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
if cid~=0 then
c:ResetEffect(cid,RESET_COPY)
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
end
local e1=e:GetLabelObject()
e1:Reset()
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9300420.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c9300420.filter4(c)
return c:GetCounter(0x1f93)>0
end
function c9300420.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c9300420.filter4,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c9300420.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9300420.filter4,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
--替身使者 猫草
function c9300425.initial_effect(c)
aux.EnableUnionAttribute(c,1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300425+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300425.sprcon)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_ONFIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c9300425.efilter)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9300425,0))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c9300425.eqtg)
e3:SetOperation(c9300425.eqop)
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9300425,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c9300425.sptg)
e4:SetOperation(c9300425.spop)
c:RegisterEffect(e4)
--Atk up
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(800)
c:RegisterEffect(e5)
--Def up
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_UPDATE_DEFENSE)
e6:SetValue(800)
c:RegisterEffect(e6)
--indes battle
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_EQUIP)
e7:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e7:SetValue(1)
c:RegisterEffect(e7)
--pierce
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_EQUIP)
e8:SetCode(EFFECT_PIERCE)
e8:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e8)
end
function c9300425.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300425
end
function c9300425.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300425.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300425.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER)
end
function c9300425.filter(c)
local ct1,ct2=c:GetUnionCount()
return c:IsFaceup() and ct2==0
end
function c9300425.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9300425.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(9300425)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c9300425.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c9300425.filter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
c:RegisterFlagEffect(9300425,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c9300425.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c9300425.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
aux.SetUnionState(c)
end
function c9300425.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(9300425)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(9300425,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c9300425.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
--曾被称为龟的替身使者
function c9300513.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2,c9300513.ovfilter,aux.Stringid(9300513,0),99,c9300513.xyzop)
c:EnableReviveLimit()
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9300513,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9300513)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c9300513.mttg)
e1:SetOperation(c9300513.mtop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300513,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9301513)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(c9300513.thtg)
e2:SetOperation(c9300513.thop)
c:RegisterEffect(e2)
end
function c9300513.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and not c:IsCode(9300513)
end
function c9300513.mtfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_ONFIELD)) and c:IsCanOverlay() and (c:IsType(TYPE_EQUIP) or c:IsType(TYPE_PENDULUM) or not c:IsType(TYPE_SPELL))
end
function c9300513.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c9300513.mtfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
end
function c9300513.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c9300513.mtfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c9300513.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup()
if chk==0 then return og:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_OVERLAY)
end
function c9300513.thop(e,tp,eg,ep,ev,re,r,rp)
local og=e:GetHandler():GetOverlayGroup()
if og:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local bg=og:Select(tp,1,1,nil)
Duel.SendtoHand(bg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,bg)
end
end
--替身使者-提查诺
function c9300520.initial_effect(c)
aux.AddCodeList(c,9300519)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300520+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300520.sprcon)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300520,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(c9300520.spcost)
e2:SetOperation(c9300520.indop)
c:RegisterEffect(e2)
--to hand/spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,9301520)
e3:SetCondition(c9300520.recon)
e3:SetTarget(c9300520.regtg)
e3:SetOperation(c9300520.regop)
c:RegisterEffect(e3)
--attack target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e4:SetCode(EFFECT_PATRICIAN_OF_DARKNESS)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
c:RegisterEffect(e4)
--Announce
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e5:SetCondition(c9300520.condition)
e5:SetOperation(c9300520.operation)
c:RegisterEffect(e5)
end
function c9300520.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300520
end
function c9300520.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300520.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300520.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 c9300520.indop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCountLimit(1)
e1:SetTarget(c9300520.immtg)
e1:SetValue(c9300520.valcon)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c9300520.immtg)
e2:SetValue(c9300520.tgoval)
e2:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
function c9300520.immtg(e,c)
return c:IsCode(9300519)
end
function c9300520.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c9300520.recon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9300520.thfilter(c)
return c:IsLevelBelow(6) and c:IsSetCard(0x1f99) and c:IsType(TYPE_MONSTER) and c:GetCode()~=9300520 and c:IsAttribute(ATTRIBUTE_DARK)
end
function c9300520.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9300520.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c9300520.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c9300520.thcon)
e1:SetOperation(c9300520.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9300520.thfilter2(c)
return c9300520.thfilter(c) and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c9300520.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9300520.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
function c9300520.thop(e,tp,eg,ep,ev,re,r,rp)
local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_CARD,0,9300520)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c9300520.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,res):GetFirst()
if tc then
if tc:GetLeftScale()==5 and res 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)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c9300520.condition(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimit(c9300520.chlimit)
local ex=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE)
return rp==1-tp and ex
end
function c9300520.chlimit(e,ep,tp)
return tp==ep
end
function c9300520.operation(e,tp,eg,ep,ev,re,r,rp)
local code=Duel.GetChainInfo(ev,CHAININFO_TARGET_PARAM)
local ac=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
if re:GetHandler().announce_filter==nil then
--not c:IsCode(code)
ac=Duel.AnnounceCard(tp,code,OPCODE_ISCODE,OPCODE_NOT)
else
local afilter={table.unpack(re:GetHandler().announce_filter)}
--and not c:IsCode(code)
table.insert(afilter,code)
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_NOT)
table.insert(afilter,OPCODE_AND)
ac=Duel.AnnounceCard(tp,table.unpack(afilter))
end
Duel.ChangeTargetParam(ev,ac)
end
\ No newline at end of file
--替身使者 卡尔涅
function c9300521.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9300521+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9300521.sprcon)
c:RegisterEffect(e1)
--special summon2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCode(EVENT_DESTROYED)
e2:SetTarget(c9300521.sptg2)
e2:SetOperation(c9300521.spop2)
c:RegisterEffect(e2)
end
function c9300521.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x1f99) and c:GetCode()~=9300521
end
function c9300521.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300521.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9300521.spfilter(c,e,tp)
return c:IsCode(9300522) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9300521.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9300521.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c9300521.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,c9300521.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 then
g:GetFirst():CompleteProcedure()
end
end
--替身魔怪 臭名昭著的B·I·G
function c9300522.initial_effect(c)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c9300522.splimit)
c:RegisterEffect(e1)
end
function c9300522.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
\ No newline at end of file
--特殊技能暂抽取
function c9300699.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c9300699.condition)
e1:SetCost(c9300699.cost)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c9300699.discon)
e2:SetOperation(c9300699.disop)
c:RegisterEffect(e2)
end
function c9300699.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=2
end
function c9300699.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c9300699.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
local loc,pos=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION)
return tc:IsStatus(STATUS_SPSUMMON_TURN)
and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and bit.band(pos,POS_FACEUP)~=0
end
function c9300699.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--归零界碑
function c9320003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c9320003.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--Atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetTarget(c9320003.atk)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
e4:SetValue(0)
c:RegisterEffect(e4)
end
function c9320003.disable(e,c)
return (c:IsType(TYPE_EFFECT+TYPE_SPELL+TYPE_TRAP) or c:GetOriginalType()&TYPE_EFFECT~=0)
and not c:IsOriginalCodeRule(9320003) and e:GetHandler():GetColumnGroup():IsContains(c)
end
function c9320003.atk(e,c)
return e:GetHandler():GetColumnGroup():IsContains(c)
end
......@@ -103,9 +103,6 @@
!setname 0x3f91 单调
!setname 0x9f93 早见虹羽
!setname 0xaf93 陷阵营
!setname 0xf99 替身
!setname 0x1f99 替身使者
!setname 0x2f99 替身箭
#setname="36Stratagems" 三十六计
!counter 0x1f93 猜拳指示物
......@@ -148,9 +145,7 @@
!counter 0x5aa 妖精指示物
#秦白颖 1435839960 104 0x680-0x68f
!setname 0x680 绝界剑
!setname 0x3680 绝界剑士
!counter 0x1942 时域指示物
!counter 0x680 时域指示物
#洛基卡奥斯 670489248 107 0x7c0-0x7cf
!setname 0x7c0 精生幻虫
......@@ -393,7 +388,7 @@
!setname 0x480b 星际战舰
!counter 0x48f 能量指示物
#廷达的信徒&林茂爽 401940250&2802160475 150 0xf30-0xf3f
#廷达的信徒 401940250&2802160475 150 0xf30-0xf3f
!setname 0xf33 色带
!setname 0x1f33 色带神
!setname 0x1f35 报丧泣语
......
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