Commit cf4a3b93 authored by Tachibana's avatar Tachibana

得得得得得

parent f4b4a427
No preview for this file type
...@@ -386,11 +386,6 @@ ...@@ -386,11 +386,6 @@
15002011 0 --郁屈的哀乐 15002011 0 --郁屈的哀乐
15002020 0 --墟伪的审判 15002020 0 --墟伪的审判
15003023 0 --虚空孔穴·格利扎 15003023 0 --虚空孔穴·格利扎
#160
16001007 0 --Ⅷ集团军 破阵之歌姬
16001011 0 --Ⅷ集团军 晓光之主教
16001014 0 --Ⅷ集团军 远知之贤者
16001509 0 --Ⅷ集团军 群龙女王
#161 #161
16101115 1 --现实歪曲 16101115 1 --现实歪曲
16101150 1 --超量进化单元 16101150 1 --超量进化单元
......
--Ⅷ集团军 赤之王
function c16001001.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,nil,nil,99)
c:EnableReviveLimit()
--Disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetTarget(c16001001.target)
c:RegisterEffect(e1)
--not remove Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_REMOVE)
c:RegisterEffect(e3)
--todeck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16001001,0))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c16001001.atcon)
e4:SetTarget(c16001001.attg)
e4:SetOperation(c16001001.atop)
c:RegisterEffect(e4)
--set atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_SET_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetValue(c16001001.atkval)
e5:SetCondition(c16001001.effcon)
e5:SetLabel(4)
c:RegisterEffect(e5)
--disable spsummon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(0,1)
e6:SetCondition(c16001001.effcon)
e2:SetTarget(c16001001.sumlimit)
e6:SetLabel(5)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e7)
end
function c16001001.target(e,c)
return c:GetPosition()~=e:GetHandler():GetPosition()
end
function c16001001.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c16001001.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local ct=Duel.GetOverlayCount(tp,1,1)
if ct>0 then
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,LOCATION_GRAVE)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c16001001.atop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>=1 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(16001001,1)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c16001001.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>=e:GetLabel()
end
function c16001001.atkval(e,c)
local rec=c:GetBaseAttack()
return rec
end
function c16001001.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_HAND)
end
\ No newline at end of file
--Ⅷ集团军 激进之猎手
function c16001002.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:SetValue(1)
e1:SetCountLimit(1,16001002)
e1:SetCondition(c16001002.spcon)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001002,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c16001002.dscon)
e2:SetTarget(c16001002.dstg)
e2:SetOperation(c16001002.dsop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001002,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16001002.spco)
e3:SetTarget(c16001002.sptg)
e3:SetOperation(c16001002.spop)
c:RegisterEffect(e3)
end
function c16001002.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c16001002.dscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c16001002.dstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16001002.dsop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
if Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)~=0 then
if tc:IsLocation(LOCATION_REMOVED) then
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(c16001002.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function c16001002.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function c16001002.spco(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsSetCard(0x5c1) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c16001002.filter(e,c)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16001002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16001002.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c16001002.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16001002.filter),tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--Ⅷ集团军 空中要塞
function c16001003.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:SetOperation(c16001003.activate)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001003,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,16001003)
e2:SetCondition(c16001003.descon)
e2:SetTarget(c16001003.destg)
e2:SetOperation(c16001003.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk & def
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,0x5c1))
e4:SetValue(500)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
--not Target
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetRange(LOCATION_FZONE)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5c1))
e6:SetValue(c16001003.evalue)
c:RegisterEffect(e6)
end
function c16001003.thfilter(c)
return c:IsSetCard(0x5c1) and c:IsAbleToHand() and not c:IsCode(16001003)
end
function c16001003.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c16001003.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16001003,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c16001003.desfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x5c1) and c:IsControler(tp)
end
function c16001003.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16001003.desfilter,1,nil,tp)
end
function c16001003.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16001003.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c16001003.evalue(e,re,rp)
return re:IsActiveType(TYPE_MONSTER) and re:IsLevelBelow(5) and rp==1-e:GetHandlerPlayer()
end
\ No newline at end of file
--Ⅷ集团军 烈焰之术士
function c16001004.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,16001004)
e1:SetCondition(c16001004.spcon)
e1:SetOperation(c16001004.spop)
c:RegisterEffect(e1)
--burn
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001004,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c16001004.dcon)
e2:SetTarget(c16001004.dtg)
e2:SetOperation(c16001004.dop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001004,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16001004.descon)
e3:SetTarget(c16001004.destg)
e3:SetOperation(c16001004.desop)
c:RegisterEffect(e3)
end
function c16001004.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c16001004.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1)
end
function c16001004.dcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetOverlayCount(tp,1,1)
return ct>=5
end
function c16001004.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetOverlayCount(tp,LOCATION_ONFIELD)+Duel.GetOverlayCount(1-tp,LOCATION_ONFIELD)
if chk==0 then return ct>=1 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct*300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300)
end
function c16001004.dop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetOverlayCount(tp,LOCATION_ONFIELD)+Duel.GetOverlayCount(1-tp,LOCATION_ONFIELD)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,ct*300,REASON_EFFECT)
end
function c16001004.descon(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c,rc=e:GetHandler(),re:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c16001004.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c16001004.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--Ⅷ集团军 龙女的急行军
function c16001005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,16001005+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16001005.target)
e1:SetOperation(c16001005.activate)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001005,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c16001005.atktg)
e2:SetOperation(c16001005.atkop)
c:RegisterEffect(e2)
end
function c16001005.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x5c1)
and Duel.IsExistingMatchingCard(c16001005.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c16001005.filter2(c,e,tp,mc)
return c:IsRank(5) and c:IsCode(16001009) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c16001005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c16001005.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c16001005.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16001005.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16001005.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16001005.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function c16001005.atkfilter(c)
return c:IsSetCard(0x5c1) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c16001005.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16001005.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c16001005.atkop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(c16001005.atkfilter,tp,LOCATION_MZONE,0,nil)
if tg:GetCount()>0 then
local sc=tg:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1000)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=tg:GetNext()
end
end
end
\ No newline at end of file
--Ⅷ集团军 秘渊守护者
function c16001006.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x5c1),2,2)
--todeck and draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001006,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,16001006)
e1:SetCondition(c16001006.tdcon)
e1:SetTarget(c16001006.tdtg)
e1:SetOperation(c16001006.tdop)
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_MZONE)
e2:SetCondition(c16001006.discon)
e2:SetOperation(c16001006.disop)
c:RegisterEffect(e2)
end
function c16001006.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c16001006.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),PLAYER_ALL,LOCATION_REMOVED)
end
function c16001006.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
local ct1=g:GetCount()
if ct1>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if not g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then return end
if g:IsExists(Card.IsControler,1,nil,tp) then Duel.ShuffleDeck(tp) end
if g:IsExists(Card.IsControler,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
local ct2=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct1==ct2 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(16001006,1)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c16001006.xyzfilter(c)
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c16001006.discon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return lg:IsExists(c16001006.xyzfilter,1,nil) and loc==LOCATION_GRAVE
end
function c16001006.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--Ⅷ集团军 破阵之歌姬
function c16001007.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001007,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16001007)
e1:SetCondition(c16001007.spcon)
e1:SetTarget(c16001007.sptg)
e1:SetOperation(c16001007.spop)
c:RegisterEffect(e1)
--cannot activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001007,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c16001007.con)
e2:SetOperation(c16001007.op)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001004,1))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16001007.lpcon)
e3:SetTarget(c16001007.lptg)
e3:SetOperation(c16001007.lpop)
c:RegisterEffect(e3)
end
function c16001007.spcon(e,tp,eg,ep,ev,re,r,rp)
local ex2,g2,gc2,dp2,dv2=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
return rp==1-tp and ex2 and bit.band(dv2,LOCATION_DECK)==LOCATION_DECK
end
function c16001007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16001007.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
end
function c16001007.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c16001007.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(c16001007.elimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16001007.elimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c16001007.lpcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c,rc=e:GetHandler(),re:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c16001007.lptg(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 c16001007.lpop(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
\ No newline at end of file
--Ⅷ集团军 群龙之女
function c16001009.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,5,2)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001009,1))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16001009)
e1:SetCondition(c16001009.drcon)
e1:SetTarget(c16001009.drtg)
e1:SetOperation(c16001009.drop)
c:RegisterEffect(e1)
--Overlay
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001009,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,16011009)
e2:SetCost(c16001009.cost)
e2:SetTarget(c16001009.tg)
e2:SetOperation(c16001009.op)
c:RegisterEffect(e2)
end
function c16001009.ovfilter(c,e)
return c:IsAbleToChangeControler() and not c:IsImmuneToEffect(e)
end
function c16001009.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c16001009.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 c16001009.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
local c=e:GetHandler()
local g=Duel.GetOperatedGroup()
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
if (tc:IsRace(RACE_DRAGON) and tc:IsType(TYPE_MONSTER)) or tc:IsSetCard(0x5c1) then
if c:IsRelateToEffect(e) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 and not c:IsImmuneToEffect(e)
and Duel.SelectYesNo(tp,aux.Stringid(16001009,2)) then
local g=Duel.GetDecktopGroup(1-tp,2)
local sg=g:Filter(c16001009.ovfilter,nil,e)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.Overlay(c,sg)
end
end
end
Duel.ShuffleHand(tp)
end
end
function c16001009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) and Duel.GetOverlayCount(tp,1,1)>1 end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c16001009.filter(c)
local og=Duel.GetOverlayGroup(tp,1,1)
og:Sub(c:GetOverlayGroup())
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and og:GetCount()>0
end
function c16001009.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c16001009.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16001009.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16001009.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c16001009.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
local og=Duel.GetOverlayGroup(tp,1,1)
og:Sub(tc:GetOverlayGroup())
if og:GetCount()==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local mg=og:Select(tp,1,2,nil)
local mat=mg:GetFirst()
local tg=Group.CreateGroup()
while mat do
local oc=mat:GetOverlayTarget()
tg:AddCard(oc)
mat=mg:GetNext()
end
Duel.Overlay(tc,mg)
Duel.RaiseSingleEvent(tg,EVENT_DETACH_MATERIAL,e,0,0,0,0)
end
\ No newline at end of file
--Ⅷ集团军 铁壁之战士
function c16001010.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,16001010)
e1:SetCondition(c16001010.sprcon)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetCountLimit(1)
e2:SetValue(c16001010.indct)
c:RegisterEffect(e2)
--buff
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001010,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16001010.con)
e3:SetOperation(c16001010.op)
c:RegisterEffect(e3)
end
function c16001010.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local t=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_ONFIELD)
local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and t>=s
end
function c16001010.indct(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c16001010.con(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c,rc=e:GetHandler(),re:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c16001010.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(aux.indoval)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--Ⅷ集团军 晓光之主教
function c16001011.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001011,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16001011)
e1:SetCondition(c16001011.spcon)
e1:SetTarget(c16001011.sptg)
e1:SetOperation(c16001011.spop)
c:RegisterEffect(e1)
--cannot SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001011,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c16001011.con)
e2:SetOperation(c16001011.op)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001011,0))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16001011.atkcon)
e3:SetTarget(c16001011.atktg)
e3:SetOperation(c16001011.atkop)
c:RegisterEffect(e3)
end
function c16001011.spcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return rp==1-tp and ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end
function c16001011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16001011.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
end
function c16001011.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c16001011.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16001011.atkcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c,rc=e:GetHandler(),re:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c16001011.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end
function c16001011.atkop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if tg:GetCount()>0 then
local sc=tg:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(500)
sc:RegisterEffect(e1)
sc=tg:GetNext()
end
end
end
\ No newline at end of file
--Ⅷ集团军 迅捷之蔷薇
function c16001012.initial_effect(c)
--SpecialSummon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16001012)
e1:SetCondition(c16001012.spcon)
e1:SetTarget(c16001012.sptg)
e1:SetOperation(c16001012.spop)
c:RegisterEffect(e1)
--SpecialSummon from GY
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001012,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16011012)
e2:SetTarget(c16001012.sptg1)
e2:SetOperation(c16001012.spop1)
c:RegisterEffect(e2)
--buff
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001012,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16001012.con)
e3:SetOperation(c16001012.op)
c:RegisterEffect(e3)
end
function c16001012.cfilter(c,tp)
return c:GetSummonPlayer()~=tp and c:IsPreviousLocation(LOCATION_EXTRA)
end
function c16001012.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16001012.cfilter,1,nil,tp) and Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c16001012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16001012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16001012.spfilter(c,e,tp)
return c:IsSetCard(0x5c1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16001012.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16001012.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c16001012.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16001012.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16001012.con(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c,rc=e:GetHandler(),re:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) and Duel.IsAbleToEnterBP()
end
function c16001012.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--Ⅷ集团军 游离之岗哨
function c16001013.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x5c1),2,2)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,16001013)
e1:SetCondition(c16001013.spcon)
e1:SetTarget(c16001013.sptg)
e1:SetOperation(c16001013.spop)
c:RegisterEffect(e1)
--cannot activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(c16001013.actcon)
e2:SetValue(c16001013.aclimit)
c:RegisterEffect(e2)
end
function c16001013.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c16001013.filter(c,e,tp)
return c:IsSetCard(0x5c1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16001013.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16001013.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c16001013.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16001013.filter),tp,LOCATION_GRAVE+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 e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c16001013.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16001013.splimit(e,c)
return not c:IsSetCard(0x5c1)
end
function c16001013.xyzfilter(c)
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c16001013.actcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg:IsExists(c16001013.xyzfilter,1,nil)
end
function c16001013.aclimit(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end
local c=re:GetHandler()
return c:IsLocation(LOCATION_SZONE) and c:IsFacedown()
end
\ No newline at end of file
--Ⅷ集团军 远知之贤者
function c16001014.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001014,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16001014)
e1:SetCondition(c16001014.spcon)
e1:SetTarget(c16001014.sptg)
e1:SetOperation(c16001014.spop)
c:RegisterEffect(e1)
--cannot SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001014,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c16001014.con)
e2:SetOperation(c16001014.op)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001014,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16001014.thcon)
e3:SetTarget(c16001014.thtg)
e3:SetOperation(c16001014.thop)
c:RegisterEffect(e3)
end
function c16001014.spcon(e,tp,eg,ep,ev,re,r,rp)
local ex1=re:IsHasCategory(CATEGORY_DRAW)
local ex2=re:IsHasCategory(CATEGORY_SEARCH)
return rp==1-tp and (ex1 or ex2)
end
function c16001014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16001014.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
end
function c16001014.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c16001014.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16001014.thfilter(c)
return c:IsSetCard(0x5c1) and c:IsFaceup() and c:IsAbleToHand()
end
function c16001014.thcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c,rc=e:GetHandler(),re:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c16001014.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16001014.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c16001014.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16001014.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,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 c16001015.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001015,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(c16001015.sptg)
e2:SetOperation(c16001015.spop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16001015,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetTarget(c16001015.thtg)
e3:SetOperation(c16001015.thop)
c:RegisterEffect(e3)
--overlay
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16001015,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetTarget(c16001015.ovtg)
e4:SetOperation(c16001015.ovop)
c:RegisterEffect(e4)
--SpecialSummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(16001015,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c16001015.spcon1)
e5:SetTarget(c16001015.sptg1)
e5:SetOperation(c16001015.spop1)
c:RegisterEffect(e5)
end
function c16001015.spfilter(c,e,tp)
return c:IsSetCard(0x5c1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16001015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c16001015.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c16001015.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16001015.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16001015.thfilter(c)
return c:IsSetCard(0x5c1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16001015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) and Duel.IsExistingMatchingCard(c16001015.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16001015.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local sg=Duel.SelectMatchingCard(tp,Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,1,REASON_EFFECT)
if sg:GetCount()==0 then return end
Duel.HintSelection(sg)
if sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16001015.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c16001015.xyzfilter(c)
return c:IsType(TYPE_XYZ) and c:IsFaceup()
end
function c16001015.ovfilter(c,tp)
return c:IsType(TYPE_TOKEN)
and (c:IsControler(tp) or c:IsAbleToChangeControler())
end
function c16001015.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16001015.xyzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c16001015.ovfilter,tp,LOCATION_HAND+LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) end
end
function c16001015.ovop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c16001015.ovfilter,tp,LOCATION_HAND+LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c16001015.xyzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc:IsFaceup() and not (tc:IsImmuneToEffect(e) or oc:IsImmuneToEffect(e)) then
Duel.Overlay(tc,Group.FromCards(oc))
end
end
function c16001015.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:GetPreviousControler()==tp
end
function c16001015.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c16001015.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16001015.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16001015.spfilter,tp,LOCATION_DECK+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
--再见了 吾之过往
function c16001016.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,16001016+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16001016.target)
e1:SetOperation(c16001016.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001016,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c16001016.thcost)
e2:SetTarget(c16001016.thtg)
e2:SetOperation(c16001016.thop)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c16001016.handcon)
c:RegisterEffect(e3)
end
function c16001016.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c16001016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) and Duel.GetLocationCountFromEx(tp,tp,c)>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c16001016.filter2(c,e,tp,mc,code)
return c:IsType(TYPE_XYZ) and c:IsCode(code) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c16001016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c16001016.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c16001016.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16001016.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16001016.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16001016.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,code)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function c16001016.rmfilter(c)
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c16001016.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16001016.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c16001016.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c16001016.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 c16001016.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,2,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(16001016,2)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c16001016.handfilter(c)
return not c:IsType(TYPE_XYZ+TYPE_LINK)
end
function c16001016.handcon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(c16001016.handfilter,tp,LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--Ⅷ集团军 群龙女王
function c16001509.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,6,3,nil,nil,99)
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetValue(16001009)
c:RegisterEffect(e0)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16001509,1))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16001009)
e1:SetCondition(c16001509.drcon)
e1:SetTarget(c16001509.drtg)
e1:SetOperation(c16001509.drop)
c:RegisterEffect(e1)
--Overlay
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16001509,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,16011009)
e2:SetCost(c16001509.cost)
e2:SetTarget(c16001509.tg)
e2:SetOperation(c16001509.op)
c:RegisterEffect(e2)
--limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTarget(c16001509.slimit)
e3:SetTargetRange(0,1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e4)
end
function c16001509.ovfilter(c,e)
return c:IsAbleToChangeControler() and not c:IsImmuneToEffect(e)
end
function c16001509.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c16001509.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 c16001509.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
local c=e:GetHandler()
local g=Duel.GetOperatedGroup()
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
if (tc:IsRace(RACE_DRAGON) and tc:IsType(TYPE_MONSTER)) or tc:IsSetCard(0x5c1) then
if c:IsRelateToEffect(e) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 and not c:IsImmuneToEffect(e)
and Duel.SelectYesNo(tp,aux.Stringid(16001509,2)) then
local g=Duel.GetDecktopGroup(1-tp,3)
local sg=g:Filter(c16001509.ovfilter,nil,e)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.Overlay(c,sg)
end
end
end
Duel.ShuffleHand(tp)
end
end
function c16001509.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) and Duel.GetOverlayCount(tp,1,1)>1 end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c16001509.filter(c)
local og=Duel.GetOverlayGroup(tp,1,1)
og:Sub(c:GetOverlayGroup())
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and og:GetCount()>0
end
function c16001509.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c16001509.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16001509.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16001509.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c16001509.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
local og=Duel.GetOverlayGroup(tp,1,1)
og:Sub(tc:GetOverlayGroup())
if og:GetCount()==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local mg=og:Select(tp,1,3,nil)
local mat=mg:GetFirst()
while mat do
local oc=mat:GetOverlayTarget()
Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
mat=mg:GetNext()
end
Duel.Overlay(tc,mg)
end
function c16001509.slimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLevelAbove(6)
end
\ No newline at end of file
--传颂之初章
function c16063001.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,16063001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16063001.target)
e1:SetOperation(c16063001.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063001,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063001.spcon)
e2:SetTarget(c16063001.sptg)
e2:SetOperation(c16063001.spop)
c:RegisterEffect(e2)
end
function c16063001.filter(c)
return c:IsSetCard(0x5c5) and c:IsAbleToHand()
end
function c16063001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16063001.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063001.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16063001.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c16063001.spfilter(c,e,tp)
return c:IsSetCard(0x5c5) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16063001.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063001.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
--传颂之中章
function c16063002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16063002+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16063002.target)
e1:SetOperation(c16063002.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063002,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063002.thcon)
e2:SetTarget(c16063002.thtg)
e2:SetOperation(c16063002.thop)
c:RegisterEffect(e2)
end
function c16063002.desfilter(c,e,tp)
local lv=c:GetLevel()
return c:IsDestructable()
and Duel.IsExistingMatchingCard(c16063002.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv)
end
function c16063002.spfilter(c,e,tp,lv)
return c:GetLevel()==lv and c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c16063002.desfilter(chkc,e,tp) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c16063002.desfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16063002.desfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063002.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063002.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c16063002.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c16063002.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16063002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063002.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c16063002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063002.thfilter,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
--传颂之物 久远
function c16063003.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063003,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16063003)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetCondition(c16063003.descon)
e1:SetTarget(c16063003.destg)
e1:SetOperation(c16063003.desop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63002,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,116063003)
e2:SetCondition(c16063003.thcon)
e2:SetTarget(c16063003.thtg)
e2:SetOperation(c16063003.thop)
c:RegisterEffect(e2)
end
function c16063003.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c16063003.desfilter(c)
return c:IsSetCard(0x5c5) and c:IsDestructable() and c:IsFaceup()
end
function c16063003.filter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand()
end
function c16063003.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c16063003.desfilter,tp,LOCATION_ONFIELD,0,2,nil)
and Duel.IsExistingMatchingCard(c16063003.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c16063003.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c16063003.desfilter,tp,LOCATION_ONFIELD,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c16063003.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.Destroy(tg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c16063003.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if tc:GetCount()>0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c16063003.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063003.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16063003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16063003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063003.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--传颂篇章 阿露露
function c16063004.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5c5),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063004,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c16063004.sptg)
e1:SetOperation(c16063004.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063004,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063004.discon)
e2:SetTarget(c16063004.distg)
e2:SetOperation(c16063004.disop)
c:RegisterEffect(e2)
end
function c16063004.desfilter(c)
return c:IsDestructable() and c:IsSetCard(0x5c5) and c:IsFaceup()
end
function c16063004.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c16063004.desfilter(chkc) and chkc:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c16063004.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c16063004.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16063004.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063004.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063004.spfilter,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
end
function c16063004.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063004.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c16063004.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c16063004.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.GetMatchingGroup(c16063004.disfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c16063004.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16063004.disfilter,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
--传颂之物 哈克
function c16063005.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,63101)
e1:SetCondition(c16063005.spcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063005,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,16063005)
e2:SetCondition(c16063005.descon)
e2:SetTarget(c16063005.destg)
e2:SetOperation(c16063005.desop)
c:RegisterEffect(e2)
end
function c16063005.filter(c)
return c:IsFaceup() and c:IsSetCard(0x5c5) and not c:IsCode(16063005)
end
function c16063005.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16063005.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c16063005.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063005.desfilter(c)
return c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsDestructable()
end
function c16063005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c16063005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16063005.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c16063005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--传颂之物 艾露露
function c16063006.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063006,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,16063006)
e1:SetCost(c16063006.spcost)
e1:SetTarget(c16063006.sptg)
e1:SetOperation(c16063006.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063006,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,116063006)
e2:SetCondition(c16063006.descon)
e2:SetTarget(c16063006.destg)
e2:SetOperation(c16063006.desop)
c:RegisterEffect(e2)
end
function c16063006.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 c16063006.filter(c,e,tp)
return c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c16063006.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16063006.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,c16063006.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16063006.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063006.desfilter(c)
return c:IsDestructable()
end
function c16063006.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c16063006.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16063006.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16063006.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16063006.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--传颂之物 阿露露
function c16063007.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063007,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16063007)
e1:SetTarget(c16063007.thtg)
e1:SetOperation(c16063007.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(16063007,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,116063007)
e3:SetCondition(c16063007.spcon)
e3:SetTarget(c16063007.sptg)
e3:SetOperation(c16063007.spop)
c:RegisterEffect(e3)
end
function c16063007.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16063007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063007.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c16063007.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063007.thfilter,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
function c16063007.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063007.spfilter(c,e,tp)
return c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16063007.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063007.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063007.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
--传颂之物 哈克奥罗
function c16063008.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063008,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16063008)
e1:SetTarget(c16063008.sptg)
e1:SetOperation(c16063008.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16063008,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,116063008)
e3:SetCondition(c16063008.tgcon)
e3:SetTarget(c16063008.tgtg)
e3:SetOperation(c16063008.tgop)
c:RegisterEffect(e3)
end
function c16063008.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16063008.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063008.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c16063008.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063008.tgfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c16063008.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063008.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c16063008.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16063008.tgfilter,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
--传颂篇章 白皇
function c16063009.initial_effect(c)
aux.AddSynchroMixProcedure(c,aux.Tuner(Card.IsSetCard,0x5c5),aux.Tuner(Card.IsSetCard,0x5c5),nil,aux.NonTuner(Card.IsSetCard,0x5c5),1,99)
c:EnableReviveLimit()
--
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_FIELD)
--e1:SetCode(EFFECT_SPSUMMON_PROC)
--e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
--e1:SetRange(LOCATION_EXTRA)
--e1:SetCondition(c16063009.syncon)
--e1:SetOperation(c16063009.synop)
--e1:SetValue(SUMMON_TYPE_SYNCHRO)
--c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(aux.FALSE)
c:RegisterEffect(e4)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063009,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c16063009.discon)
e2:SetCost(c16063009.cost)
e2:SetTarget(c16063009.distg)
e2:SetOperation(c16063009.disop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16063009,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16063009.spcon)
e3:SetTarget(c16063009.sptg)
e3:SetOperation(c16063009.spop)
c:RegisterEffect(e3)
--double tuner
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(21142671)
c:RegisterEffect(e9)
end
function c16063009.matfilter1(c,syncard)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_TUNER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
end
function c16063009.matfilter2(c,syncard)
return c:IsNotTuner() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x5c5) and c:IsCanBeSynchroMaterial(syncard)
end
function c16063009.synfilter1(c,syncard,lv,g1,g2,g3,g4)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f1=c.tuner_filter
if c:IsHasEffect(55863245) then
return g3:IsExists(c16063009.synfilter2,1,c,syncard,lv-tlv,g2,g4,f1,c)
else
return g1:IsExists(c16063009.synfilter2,1,c,syncard,lv-tlv,g2,g4,f1,c)
end
end
function c16063009.synfilter2(c,syncard,lv,g2,g4,f1,tuner1)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f2=c.tuner_filter
if f1 and not f1(c) then return false end
if f2 and not f2(tuner1) then return false end
if (tuner1:IsHasEffect(55863245) and not c:IsLocation(LOCATION_HAND)) or c:IsHasEffect(55863245) then
return g4:IsExists(c16063009.synfilter3,1,nil,syncard,lv-tlv,f1,f2)
else
return g2:IsExists(c16063009.synfilter3,1,nil,syncard,lv-tlv,f1,f2)
end
end
function c16063009.synfilter3(c,syncard,lv,f1,f2)
local mlv=c:GetSynchroLevel(syncard)
local lv1=bit.band(mlv,0xffff)
local lv2=bit.rshift(mlv,16)
return (lv1==lv or lv2==lv) and (not f1 or f1(c)) and (not f2 or f2(c))
end
function c16063009.syncon(e,c,tuner,mg)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<-2 then return false end
local g1=nil
local g2=nil
local g3=nil
local g4=nil
if mg then
g1=mg:Filter(c16063009.matfilter1,nil,c)
g2=mg:Filter(c16063009.matfilter2,nil,c)
g3=mg:Filter(c16063009.matfilter1,nil,c)
g4=mg:Filter(c16063009.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
g4=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
local tlv=tuner:GetSynchroLevel(c)
if lv-tlv<=0 then return false end
local f1=tuner.tuner_filter
if not pe then
return g1:IsExists(c16063009.synfilter2,1,tuner,c,lv-tlv,g2,g4,f1,tuner)
else
return c16063009.synfilter2(pe:GetOwner(),c,lv-tlv,g2,nil,f1,tuner)
end
end
if not pe then
return g1:IsExists(c16063009.synfilter1,1,nil,c,lv,g1,g2,g3,g4)
else
return c16063009.synfilter1(pe:GetOwner(),c,lv,g1,g2,g3,g4)
end
end
function c16063009.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=Group.CreateGroup()
local g1=nil
local g2=nil
local g3=nil
local g4=nil
if mg then
g1=mg:Filter(c16063009.matfilter1,nil,c)
g2=mg:Filter(c16063009.matfilter2,nil,c)
g3=mg:Filter(c16063009.matfilter1,nil,c)
g4=mg:Filter(c16063009.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
g4=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
g:AddCard(tuner)
local lv1=tuner:GetSynchroLevel(c)
local f1=tuner.tuner_filter
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner2=nil
if not pe then
local t2=g1:FilterSelect(tp,c16063009.synfilter2,1,1,tuner,c,lv-lv1,g2,g4,f1,tuner)
tuner2=t2:GetFirst()
else
tuner2=pe:GetOwner()
Group.FromCards(tuner2):Select(tp,1,1,nil)
end
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if tuner2:IsHasEffect(55863245) then
m3=g4:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
else
m3=g2:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
end
g:Merge(m3)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner1=nil
local hand=nil
if not pe then
local t1=g1:FilterSelect(tp,c16063009.synfilter1,1,1,nil,c,lv,g1,g2,g3,g4)
tuner1=t1:GetFirst()
else
tuner1=pe:GetOwner()
Group.FromCards(tuner1):Select(tp,1,1,nil)
end
g:AddCard(tuner1)
local lv1=tuner1:GetSynchroLevel(c)
local f1=tuner1.tuner_filter
local tuner2=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if tuner1:IsHasEffect(55863245) then
local t2=g3:FilterSelect(tp,c16063009.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1)
tuner2=t2:GetFirst()
else
local t2=g1:FilterSelect(tp,c16063009.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1)
tuner2=t2:GetFirst()
end
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if (tuner1:IsHasEffect(55863245) and not tuner2:IsLocation(LOCATION_HAND))
or tuner2:IsHasEffect(55863245) then
m3=g4:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
else
m3=g2:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
end
g:Merge(m3)
end
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
end
function c16063009.discon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return false end
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c16063009.tgfilter(c)
return c:IsSetCard(0x5c5) and c:IsAbleToGraveAsCost()
end
function c16063009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063009.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c16063009.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c16063009.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 c16063009.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c16063009.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063009.spfilter(c,e,tp)
return c:IsCode(16063005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16063009.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063009.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063009.spfilter,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
--传颂篇章 双皇激斗
function c16063010.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c16063010.tg)
e1:SetOperation(c16063010.op)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063010,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063010.thcon)
e2:SetTarget(c16063010.thtg)
e2:SetOperation(c16063010.thop)
c:RegisterEffect(e2)
end
function c16063010.sfilter(c)
return c:GetCode()==16063010 and c:IsSSetable()
end
function c16063010.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16063010.sfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
end
function c16063010.op(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local setg=Duel.SelectMatchingCard(tp,c16063010.sfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if setg:GetCount()>0 then
Duel.SSet(tp,setg)
Duel.ConfirmCards(1-tp,setg)
end
end
function c16063010.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c16063010.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand()
end
function c16063010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH+CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16063010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--传颂之物 藤香
function c16063012.initial_effect(c)
c:EnableReviveLimit()
--sp
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16063012)
e1:SetTarget(c16063012.target)
e1:SetOperation(c16063012.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063012,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,116063012)
e2:SetCondition(c16063012.thcon)
e2:SetTarget(c16063012.thtg)
e2:SetOperation(c16063012.thop)
c:RegisterEffect(e2)
end
function c16063012.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5c5) and c:IsAbleToGraveAsCost()
end
function c16063012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) and
Duel.IsExistingMatchingCard(c16063012.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c16063012.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g1,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16063012.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:CompleteProcedure()
end
end
function c16063012.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063012.desfilter(c)
return c:IsAbleToHand() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c16063012.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16063012.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16063012.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16063012.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c16063012.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--kalula
function c16063013.initial_effect(c)
--summon with no tribute
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:SetValue(1)
e1:SetCountLimit(1,16063013)
e1:SetCondition(c16063013.hspcon)
c:RegisterEffect(e1)
--cannot des
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16063013,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,16063013)
e4:SetCondition(c16063013.thcon)
e4:SetTarget(c16063013.thtg)
e4:SetOperation(c16063013.thop)
c:RegisterEffect(e4)
end
--function c16063013.filter(c)
--return c:IsFaceup() and c:IsSetCard(0x5c5)
--end
--function c16063013.ntcon(e,c,minc)
--if c==nil then return true end
--return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
--and Duel.IsExistingMatchingCard(c16063013.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
--end
function c16063013.hspcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c16063013.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063013.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16063013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063013.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c16063013.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063013.thfilter,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
function c16063014.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_GRAVE)
e1:SetCountLimit(1,16063014)
e1:SetCost(c16063014.cost)
e1:SetCondition(c16063014.spcon)
e1:SetOperation(c16063014.spop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16063014,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,116063014)
e3:SetTarget(c16063014.tg)
e3:SetOperation(c16063014.op)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(16063014,ACTIVITY_SPSUMMON,c16063014.counterfilter)
end
function c16063014.sfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c16063014.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16063014.sfilter,tp,LOCATION_HAND,0,1,c)
and Duel.GetFlagEffect(tp,16063014)==0
end
function c16063014.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c16063014.sfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
--Duel.RegisterFlagEffect(tp,16063014,RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c16063014.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16063014.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x5c5)
end
function c16063014.counterfilter(c)
return c:IsSetCard(0x5c5)
end
function c16063014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16063014,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c16063014.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16063014.filter(c,e,tp)
return c:IsType(TYPE_TUNER) and c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function c16063014.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,16063014)==0
and Duel.IsExistingMatchingCard(c16063014.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16063014.op(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,c16063014.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP)
Duel.RegisterFlagEffect(tp,16063014,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--pianzhang jiuyuan
function c16063023.initial_effect(c)
aux.AddMaterialCodeList(c,16063005)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,16063005),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atk def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c16063023.target)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--des
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1,16063023)
e3:SetCondition(c16063023.descon)
e3:SetTarget(c16063023.destg)
e3:SetOperation(c16063023.desop)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16063023,0))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c16063023.thcon)
e4:SetTarget(c16063023.thtg)
e4:SetOperation(c16063023.thop)
c:RegisterEffect(e4)
end
function c16063023.descon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c16063023.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16063023.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c16063023.target(e,c)
return c:IsSetCard(0x5c5) and c:IsFaceup()
end
function c16063023.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063023.thfilter(c)
return c:IsAbleToHand()
end
function c16063023.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c16063023.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,2,REASON_EFFECT)
end
end
--beinawei--
function c16063031.initial_effect(c)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,16063031)
e2:SetTarget(c16063031.tg)
e2:SetOperation(c16063031.op)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,116063031)
e1:SetCondition(c16063031.descon)
e1:SetTarget(c16063031.destg)
e1:SetOperation(c16063031.desop)
c:RegisterEffect(e1)
end
function c16063031.sfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c16063031.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063031.sfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16063031.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063031.sfilter,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 c16063031.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063031.dfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c16063031.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c16063031.dfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c16063031.dfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.SelectTarget(tp,c16063031.dfilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function c16063031.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--新津 新天地
function c16080001.initial_effect(c)
--activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e2)
--changge atkordef
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(c16080001.adtg)
e1:SetOperation(c16080001.adop)
c:RegisterEffect(e1)
--destroy T
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetValue(c16080001.repval)
e3:SetTarget(c16080001.reptg)
e3:SetOperation(c16080001.repop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16080001,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,16080001)
e4:SetCondition(c16080001.descon)
e4:SetTarget(c16080001.destg)
e4:SetOperation(c16080001.desop)
c:RegisterEffect(e4)
end
function c16080001.adfilter(c,tp)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080001.adtg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16080001.adfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16080001.adfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16080001.adop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
end
end
function c16080001.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x5ca) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function c16080001.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c16080001.repfilter,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(16080001,1))
end
function c16080001.repval(e,c)
return c16080001.repfilter(c,e:GetHandlerPlayer())
end
function c16080001.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
function c16080001.descon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and e:GetHandler():GetPreviousControler()==tp
end
function c16080001.spfilter(c,e,tp)
return c:IsSetCard(0x5ca) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16080001.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16080001.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16080001.desop(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,c16080001.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--新津 九羽
function c16080002.initial_effect(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5ca))
e1:SetCondition(c16080002.atcon)
e1:SetValue(300)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1,16080002)
e2:SetCondition(c16080002.thcon)
e2:SetTarget(c16080002.thtg)
e2:SetOperation(c16080002.thop)
c:RegisterEffect(e2)
--change pos
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c16080002.distg)
e3:SetOperation(c16080002.disop)
c:RegisterEffect(e3)
end
function c16080002.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK
end
--function c16080002.attg(c,e)
--return c:IsSetCard(0x5ca) and c~=e:GetHandler()
--end
--function c16080002.value(e,c)
--return e:GetHandler():GetDefense()
--end
function c16080002.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c16080002.thfilter(c)
return c:IsSetCard(0x5ca) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c16080002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true and Duel.IsExistingMatchingCard(c16080002.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16080002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16080002.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16080002.disfilter(c,e)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080002.distg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16080002.disfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16080002.disfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16080002.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--新津 小豆
function c16080003.initial_effect(c)
--atk cant
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c16080003.attg)
e1:SetCondition(c16080003.atcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c16080003.attg1)
e2:SetValue(aux.tgoval)
e2:SetCondition(c16080003.atcon)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetCountLimit(1,16080003)
e3:SetCondition(c16080003.spcon)
e3:SetTarget(c16080003.sptg)
e3:SetOperation(c16080003.spop)
c:RegisterEffect(e3)
--change
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1)
e4:SetTarget(c16080003.distg)
e4:SetOperation(c16080003.disop)
c:RegisterEffect(e4)
end
function c16080003.atcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefensePos()
end
function c16080003.attg(e,c)
return c~=e:GetHandler() and c:IsFaceup()
end
function c16080003.attg1(e,c)
return c~=e:GetHandler()
end
function c16080003.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE)
end
function c16080003.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x5ca) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16080003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16080003.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c16080003.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,c16080003.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16080003.disfilter(c,e)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080003.distg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16080003.disfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16080003.disfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16080003.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
end
end
\ No newline at end of file
--新津 恶役
function c16080004.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c16080004.spcon)
c:RegisterEffect(e1)
--Disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_SZONE)
e2:SetTarget(c16080004.attg)
e2:SetCondition(c16080004.atcon)
c:RegisterEffect(e2)
--disable effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(c16080004.disop)
c:RegisterEffect(e4)
--disable trap monster
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c16080004.attg)
c:RegisterEffect(e5)
--change
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c16080004.rmop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c16080004.filter(c)
return c:IsFaceup() and c:IsSetCard(0x5ca) and not c:IsCode(16080004)
end
function c16080004.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16080004.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c16080004.attg(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_CONTINUOUS)
end
function c16080004.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK
end
function c16080004.rmfilter(c)
return c:IsType(TYPE_MONSTER)
end
--function c16080004.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return true end
--local g=Duel.GetMatchingGroup(c16080004.rmfilter(),tp,LOCATION_MZONE,LOCATION_MZONE,nil)
--Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
--end
function c16080004.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16080004.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true)
end
function c16080004.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_CONTINUOUS) and rp~=tp then
Duel.NegateEffect(ev)
end
end
\ No newline at end of file
--新津 阿卡纳
function c16080005.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16080005)
e1:SetTarget(c16080005.target)
e1:SetOperation(c16080005.operation)
c:RegisterEffect(e1)
--lvchange
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c16080005.lvtg)
e2:SetOperation(c16080005.lvop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetCondition(c16080005.thcon)
e3:SetTarget(c16080005.thtg)
e3:SetOperation(c16080005.thop)
c:RegisterEffect(e3)
end
function c16080005.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5ca) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function c16080005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) and
Duel.IsExistingMatchingCard(c16080005.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c16080005.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ChangePosition(g1,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16080005.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
c:CompleteProcedure()
end
end
function c16080005.filter(c)
return c:IsFaceup() and c:IsSetCard(0x5ca) and c:GetLevel()~=2
end
function c16080005.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c16080005.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16080005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c16080005.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
function c16080005.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE)
end
function c16080005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c16080005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--新津 二莎
function c16080006.initial_effect(c)
--def po
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c16080006.atcon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5ca))
c:RegisterEffect(e1)
--syn
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetCondition(c16080006.spcon)
e3:SetTarget(c16080006.sptg)
e3:SetOperation(c16080006.spop)
c:RegisterEffect(e3)
end
function c16080006.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK
end
function c16080006.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE)
end
function c16080006.filter(c,e,tp,lv)
return c:IsFaceup() and c:GetLevel()>0
and Duel.IsExistingMatchingCard(c16080006.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetOriginalLevel())
end
function c16080006.scfilter(c,e,tp,lv)
return c:IsLevelBelow(lv) and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x5ca) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function c16080006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local lv=e:GetHandler():GetOriginalLevel()
if chk==0 then return Duel.IsExistingTarget(c16080006.filter,tp,0,LOCATION_MZONE,1,nil,e,tp,lv) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c16080006.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp,lv)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16080006.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local g=Group.FromCards(c,tc)
if Duel.SendtoGrave(g,REASON_EFFECT)==2 and c:GetLevel()>0 and c:IsLocation(LOCATION_GRAVE)
and tc:GetLevel()>0 and tc:IsLocation(LOCATION_GRAVE) then
local lv=c:GetLevel()+tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c16080006.scfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv)
local tc=sg:GetFirst()
if tc then
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
--新津 三狐道人
function c16080007.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16080007)
e1:SetTarget(c16080007.target)
e1:SetOperation(c16080007.operation)
c:RegisterEffect(e1)
--lvchange
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c16080007.lvcost)
e2:SetTarget(c16080007.lvtg)
e2:SetOperation(c16080007.lvop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetCondition(c16080007.thcon)
e3:SetTarget(c16080007.thtg)
e3:SetOperation(c16080007.thop)
c:RegisterEffect(e3)
end
function c16080007.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5ca) and c:IsPosition(POS_FACEUP_ATTACK) and not c:IsType(TYPE_LINK)
end
function c16080007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) and
Duel.IsExistingMatchingCard(c16080007.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c16080007.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ChangePosition(g1,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16080007.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
c:CompleteProcedure()
end
end
function c16080007.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c16080007.filter(c)
return c:IsFaceup() and c:IsSetCard(0x5ca)
end
function c16080007.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16080007.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c16080007.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16080007.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(6)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c16080007.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c16080007.thfilter(c,e)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_FIELD) or c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand()
end
function c16080007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16080007.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(c16080007.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c16080007.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16080007.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,2,REASON_EFFECT)
end
end
\ No newline at end of file
--新津 黑神铠·散樱
function c16080008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5ca),6,2)
c:EnableReviveLimit()
--updef
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetCondition(c16080008.thcon)
e1:SetOperation(c16080008.thop)
c:RegisterEffect(e1)
--upatk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCondition(c16080008.tgcon)
e2:SetOperation(c16080008.tgop)
c:RegisterEffect(e2)
--nodes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c16080008.reptg)
c:RegisterEffect(e3)
end
function c16080008.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c16080008.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+0x1ff0000)
if c:RegisterEffect(e1) and Duel.SelectYesNo(tp,aux.Stringid(16037007,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c16080008.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE)
end
function c16080008.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+0x1ff0000)
if c:RegisterEffect(e1) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
function c16080008.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(16080008,1)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end
\ No newline at end of file
--新津 钢蛾藤熙
function c16080009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--ChangeAtt
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DEFCHANGE+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCost(c16080009.cost)
e1:SetOperation(c16080009.operation)
c:RegisterEffect(e1)
end
function c16080009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c16080009.filter(c,e)
return c:IsFaceup() and not c:IsImmuneToEffect(e)
end
function c16080009.chfilter(c,e)
return c:IsType(TYPE_MONSTER)
end
function c16080009.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c16080009.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
local c=e:GetHandler()
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SWAP_AD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
local g=Duel.GetMatchingGroup(c16080009.chfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0,true)
end
\ No newline at end of file
--新津 涟库瓦
function c16080010.initial_effect(c)
aux.AddSynchroProcedure(c,c16080010.tfilter,aux.NonTuner(Card.IsType,TYPE_SYNCHRO),1,1)
c:EnableReviveLimit()
--change dis
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCondition(c16080010.thcon)
e2:SetOperation(c16080010.thop)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e3:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e3)
end
c16080010.material_type=TYPE_SYNCHRO
function c16080010.tfilter(c)
return c:IsSetCard(0x5ca)
end
function c16080010.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE))
end
function c16080010.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c16080010.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16080010.aclimit1(e,re,tp)
return re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_TRAP) and not re:GetHandler():IsImmuneToEffect(e)
end
\ No newline at end of file
--新津 月华宫
function c16080011.initial_effect(c)
c:SetUniqueOnField(1,0,16080011)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Change
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c16080011.target)
e2:SetOperation(c16080011.activate)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16080011,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetTarget(c16080011.dmtg)
e3:SetOperation(c16080011.dmop)
c:RegisterEffect(e3)
end
function c16080011.filter(c,tp)
local lv=c:GetLevel()
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_XYZ) and not c:IsType(TYPE_LINK)
and Duel.IsExistingMatchingCard(c16080011.pcfilter,tp,LOCATION_DECK,0,1,nil,lv)
end
function c16080011.pcfilter(c,lv)
return c:IsSetCard(0x5ca) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:GetLevel()==lv and c:IsAbleToHand()
end
function c16080011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c16080011.filter,tp,LOCATION_MZONE,0,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
Duel.SelectTarget(tp,c16080011.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c16080011.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16080011.pcfilter,tp,LOCATION_DECK,0,1,1,nil,lv)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c16080011.tdfilter(c)
return c:IsSetCard(0x5ca) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceup()
end
function c16080011.dmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16080011.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,2,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c16080011.dmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16080011.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
if g:GetCount()~=2 then return end
Duel.SendtoHand(g,nil,2,REASON_EFFECT)
end
\ No newline at end of file
--新津 暗龙墓场
function c16080012.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16080012+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c16080012.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5ca))
e2:SetValue(100)
c:RegisterEffect(e2)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetTarget(c16080012.destg1)
e4:SetOperation(c16080012.desop1)
c:RegisterEffect(e4)
end
function c16080012.filter(c)
return c:IsSetCard(0x5ca) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c16080012.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c16080012.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16080012,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c16080012.filter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsDestructable() and c:IsFaceup()
end
function c16080012.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c16080012.filter1(chkc) and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsDestructable()
and Duel.IsExistingTarget(c16080012.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16080012.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c16080012.desop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(Group.FromCards(tc,e:GetHandler()),REASON_EFFECT)>1
then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--意料之外的伏杀
function c16080013.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c16080013.discon)
e3:SetTarget(c16080013.distg)
e3:SetOperation(c16080013.disop)
c:RegisterEffect(e3)
end
function c16080013.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
and bit.band(re:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and Duel.IsChainNegatable(ev) and tp~=ep
end
function c16080013.filter(c,e)
return c:IsFaceup()
end
function c16080013.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16080013.filter,tp,LOCATION_MZONE,0,1,nil) 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 c16080013.rmfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c16080013.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16080013.rmfilter,tp,LOCATION_MZONE,0,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0,true)
Duel.NegateActivation(ev)
Duel.Destroy(eg,REASON_EFFECT)
end
\ No newline at end of file
--天地祈词
function c16080015.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c16080015.condition)
e1:SetTarget(c16080015.target)
e1:SetOperation(c16080015.activate)
c:RegisterEffect(e1)
end
function c16080015.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c16080015.filter(c)
return c:IsAttackPos() and c:IsFaceup() and c:IsSetCard(0x5ca) and not c:IsType(TYPE_LINK)
end
function c16080015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16080015.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080015.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16080015.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c16080015.dsfilter(c)
return c:IsDestructable() and c:IsFaceup()
end
function c16080015.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
if tc:IsOnField() and Duel.SelectYesNo(tp,aux.Stringid(16080015,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c16080015.dsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--新津 望月之城
function c16080016.initial_effect(c)
c:SetUniqueOnField(1,0,16080016)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot Remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c16080016.aclimit)
c:RegisterEffect(e2)
-- changge
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16080016,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCondition(c16080016.descon)
e4:SetTarget(c16080016.destg)
e4:SetOperation(c16080016.desop)
c:RegisterEffect(e4)
end
function c16080016.aclimit(e,re,tp)
return re:IsType(TYPE_MONSTER)
end
function c16080016.descon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and e:GetHandler():GetPreviousControler()==tp
end
function c16080016.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080016.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16080016.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080016.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16080016.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c16080016.thfilter(c)
return c:IsAbleToDeck() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c16080016.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
if tc:IsOnField() and Duel.SelectYesNo(tp,aux.Stringid(16080016,1)) then
local g=Duel.GetFieldGroup(c16080016.thfilter,LOCATION_REMOVED,LOCATION_REMOVED)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--联合作战
function c16080018.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--ChangePosition
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c16080018.target)
e2:SetOperation(c16080018.activate)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAIN_ACTIVATING)
e3:SetCondition(c16080018.discon)
e3:SetOperation(c16080018.disop)
c:RegisterEffect(e3)
end
function c16080018.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16080018.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080018.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16080018.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c16080018.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c16080018.disfilter(c)
return c:IsSetCard(0x5ca) and c:IsFaceup() and c:IsLevelAbove(6)
end
function c16080018.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingTarget(c16080018.disfilter,tp,LOCATION_MZONE,0,2,nil)
end
function c16080018.disop(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if rp==tp then return false
else if loc==LOCATION_GRAVE or loc==LOCATION_HAND or loc==LOCATION_DECK or loc==LOCATION_EXTRA or loc==LOCATION_REMOVED then
Duel.NegateEffect(ev)
end
end
end
\ No newline at end of file
--新津 青之王
function c16080019.initial_effect(c)
aux.AddSynchroProcedure(c,c16080019.tfilter,aux.NonTuner(Card.IsType,TYPE_SYNCHRO),1)
c:EnableReviveLimit()
--effect cant
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c16080019.atcon)
e1:SetTarget(c16080019.tglimit)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--cannot tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCondition(c16080019.thcon)
e2:SetOperation(c16080019.thop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,16080019)
e3:SetCondition(c16080019.discon)
e3:SetTarget(c16080019.distg)
e3:SetOperation(c16080019.disop)
c:RegisterEffect(e3)
end
c16080019.material_type=TYPE_SYNCHRO
function c16080019.tfilter(c)
return c:IsSetCard(0x5ca) and c:IsType(TYPE_SYNCHRO)
end
function c16080019.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK
end
function c16080019.tglimit(e,c)
return c~=e:GetHandler()
end
function c16080019.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE))
end
function c16080019.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetTargetRange(0,LOCATION_DECK)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c16080019.condition)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c16080019.condition)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
end
function c16080019.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW
end
function c16080019.discon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return false end
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c16080019.filter(c)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK)
end
function c16080019.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16080019.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080019.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16080019.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c16080019.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
if tc:IsOnField() then
Duel.NegateActivation(ev)
end
end
end
\ No newline at end of file
--新津 溯月
function c16080020.initial_effect(c)
--sps
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c16080020.spcon)
e1:SetTarget(c16080020.sptg)
e1:SetOperation(c16080020.spop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1,16080020)
e2:SetCondition(c16080020.thcon)
e2:SetTarget(c16080020.thtg)
e2:SetOperation(c16080020.thop)
c:RegisterEffect(e2)
--Change
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c16080020.distg)
e3:SetOperation(c16080020.disop)
c:RegisterEffect(e3)
end
function c16080020.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c16080020.spfilter(c,e,tp)
return not c:IsCode(16080020) and c:IsLevelBelow(6) and c:IsSetCard(0x5ca) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16080020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16080020.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16080020.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,c16080020.spfilter,tp,LOCATION_DECK+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
function c16080020.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE)
end
function c16080020.thfilter(c)
return c:IsSetCard(0x5ca) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c16080020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true and Duel.IsExistingMatchingCard(c16080020.thfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c16080020.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16080020.thfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT)
end
end
function c16080020.disfilter(c,e)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080020.distg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16080020.disfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16080020.disfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16080020.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--新津 岚舞
function c16080021.initial_effect(c)
aux.AddSynchroProcedure(c,c16080021.tfilter,aux.NonTuner(),1)
c:EnableReviveLimit()
--cannotsp
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(c16080021.condition)
e1:SetTargetRange(1,1)
e1:SetTarget(c16080021.value)
c:RegisterEffect(e1)
--pos change
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1)
e2:SetCondition(c16080021.thcon)
e2:SetOperation(c16080021.thop)
c:RegisterEffect(e2)
end
function c16080021.tfilter(c)
return c:IsSetCard(0x5aa)
end
function c16080021.thfilter(c)
return c:IsSetCard(0x5aa) and c:IsFaceup() and c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ) and not c:IsCode(16080021)
end
function c16080021.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c16080021.thfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c16080021.value(e,c)
return not c:IsType(TYPE_SYNCHRO) or not c:IsType(TYPE_FUSION) or not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c16080021.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE))
end
function c16080021.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEUP_ATTACK,0,POS_FACEUP_ATTACK,0,true)
end
\ No newline at end of file
--新津 雪舞
function c16080022.initial_effect(c)
aux.AddSynchroProcedure(c,c16080022.tfilter,aux.NonTuner(),1)
c:EnableReviveLimit()
--cannotsp
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(c16080022.condition)
e1:SetTargetRange(0,1)
e1:SetTarget(c16080022.value)
c:RegisterEffect(e1)
--poschange
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1)
e2:SetCondition(c16080022.thcon)
e2:SetOperation(c16080022.thop)
c:RegisterEffect(e2)
end
function c16080022.tfilter(c)
return c:IsSetCard(0x5aa)
end
function c16080022.thfilter(c)
return c:IsSetCard(0x5aa) and c:IsFaceup() and c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ) and not c:IsCode(16080022)
end
function c16080022.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c16080022.thfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c16080022.value(e,c)
return c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_FUSION) or c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_GRAVE)
end
function c16080022.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE))
end
function c16080022.lsfilter(c,tp)
return c:IsAttackPos() and not c:IsType(TYPE_LINK)
end
function c16080022.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c16080022.lsfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_DEFENSE,0)
end
\ No newline at end of file
--新津 八方
function c16080023.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
e4:SetCondition(c16080023.condition)
e4:SetValue(c16080023.damval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e5)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1,16080023)
e2:SetCondition(c16080023.thcon)
e2:SetTarget(c16080023.thtg)
e2:SetOperation(c16080023.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c16080023.distg)
e3:SetOperation(c16080023.disop)
c:RegisterEffect(e3)
end
function c16080023.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0 end
return val
end
function c16080023.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK
end
function c16080023.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c16080023.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true and Duel.IsExistingMatchingCard(nil,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_SZONE)
end
function c16080023.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c16080023.disfilter(c,e)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080023.distg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16080023.disfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16080023.disfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16080023.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--新津 诛砂
function c16080024.initial_effect(c)
c:EnableReviveLimit()
--spsumon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c16080024.spcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,16080024)
e2:SetCondition(c16080024.thcon)
e2:SetTarget(c16080024.thtg)
e2:SetOperation(c16080024.thop)
c:RegisterEffect(e2)
end
function c16080024.filter(c)
return c:IsSetCard(0x5ca) and c:IsLevelAbove(6) and c:IsFaceup()
end
function c16080024.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16080024.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c16080024.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c16080024.disfilter(c,e)
return c:IsFaceup()
end
function c16080024.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16080024.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080024.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c16080024.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c16080024.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--新津 团枭
function c16080025.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c16080025.datg)
c:RegisterEffect(e1)
--def down
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1,16080025)
e2:SetCondition(c16080025.spcon)
e2:SetOperation(c16080025.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c16080025.distg)
e3:SetOperation(c16080025.disop)
c:RegisterEffect(e3)
end
function c16080025.datg(e,c)
return c:IsSetCard(0x5ca) and c:IsAttackBelow(2000)
end
function c16080025.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE)
end
function c16080025.spop(e,tp,eg,ep,ev,re,r,rp)
local def=e:GetHandler():GetDefense()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(-def)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
end
end
--function c16080025.value(e,c)
--return e:GetHandler():GetDefense()-e:GetHandler():GetDefense()*2
--end
function c16080025.disfilter(c,e)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080025.distg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16080025.disfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16080025.disfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16080025.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--月华祭
function c16080026.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16080026+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c16080026.cost)
e1:SetTarget(c16080026.target)
e1:SetOperation(c16080026.activate)
c:RegisterEffect(e1)
end
function c16080026.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end
function c16080026.filter(c,e,tp)
return c:IsSetCard(0x5ca) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16080026.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16080026.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c16080026.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16080026.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
if Duel.SpecialSummon(tc,SUMMON_TYPE_SPECIAL,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(16080026,1)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--新津 艾琳娜
function c16080027.initial_effect(c)
aux.AddSynchroProcedure(c,c16080027.tfilter,aux.NonTuner(c16080027.sfilter),1)
c:EnableReviveLimit()
--cannot Destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5ca))
e1:SetValue(c16080027.indval)
c:RegisterEffect(e1)
--cannot attive
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCondition(c16080027.thcon)
e2:SetOperation(c16080027.thop)
c:RegisterEffect(e2)
--spsumon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c16080027.spcon)
e4:SetTarget(c16080027.sptg)
e4:SetOperation(c16080027.spop)
c:RegisterEffect(e4)
end
c16080027.material_type=TYPE_SYNCHRO
function c16080027.tfilter(c)
return c:IsSetCard(0x5ca)
end
function c16080027.sfilter(c)
return c:IsSetCard(0x5ca) and c:IsType(TYPE_SYNCHRO)
end
function c16080027.indval(e,re,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function c16080027.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE))
end
function c16080027.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c16080027.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16080027.aclimit1(e,re,tp)
return re:IsType(TYPE_EFFECT) and re:IsType(TYPE_MONSTER) and re:GetSummonLocation()==LOCATION_EXTRA and not re:GetHandler():IsImmuneToEffect(e) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c16080027.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK)
and c:IsPreviousPosition(POS_FACEUP)
end
function c16080027.spfilter(c,e,tp)
return c:IsSetCard(0x5ca) and c:IsLevelBelow(6) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16080027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16080027.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16080027.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,c16080027.spfilter,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
--终舞 黑莲吹雪
function c16080028.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(c16080028.target)
e1:SetOperation(c16080028.activate)
c:RegisterEffect(e1)
end
function c16080028.desfilter(c)
return not c:IsDisabled() and not c:IsType(TYPE_NORMAL) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c16080028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16080028.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080028.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingTarget(c16080028.tnfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c16080028.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c16080028.tnfilter(c)
return not c:IsType(TYPE_XYZ) and not c:IsType(TYPE_TUNER) and c:IsFaceup() and c:IsSetCard(0x5ca)
end
function c16080028.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(c16080028.tnfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
if tc:IsOnField() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c16080028.tnfilter,tp,LOCATION_MZONE,0,1,1,nil)
local sc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(TYPE_TUNER)
sc:RegisterEffect(e1)
end
end
\ No newline at end of file
--新津 风咲
function c16080029.initial_effect(c)
aux.AddSynchroProcedure(c,c16080029.tfilter,aux.NonTuner(),1)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_F)
e4:SetCode(EVENT_CHANGE_POS)
e4:SetCountLimit(1,16080029)
e4:SetCondition(c16080029.thcon)
e4:SetTarget(c16080029.thtg)
e4:SetOperation(c16080029.thop)
c:RegisterEffect(e4)
end
function c16080029.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE))
end
function c16080029.filter(c)
return c:IsAbleToDeck() and c:IsFaceup()
end
function c16080029.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16080029.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c16080029.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c16080029.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c16080029.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
\ No newline at end of file
--新津 御门正幸
function c16080030.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5ca),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--lvchange
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c16080030.target)
e1:SetOperation(c16080030.operation)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1,16080030)
e2:SetCondition(c16080030.thcon)
e2:SetTarget(c16080030.thtg)
e2:SetOperation(c16080030.thop)
c:RegisterEffect(e2)
end
function c16080030.filter(c)
return c:IsFaceup() and c:IsSetCard(0x5ca) and c:GetLevel()>0
end
function c16080030.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc~=c and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16080030.filter(chkc) end
if chk==0 then return c:GetLevel()>1
and Duel.IsExistingTarget(c16080030.filter,tp,LOCATION_MZONE,0,1,c) end
local t={}
local p=c:GetLevel()-1
p=math.min(p,6)
for i=1,p do
t[i]=i
end
Duel.Hint(HINT_SELECTMSG,tp,567)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16080030.filter,tp,LOCATION_MZONE,0,1,1,c)
end
function c16080030.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
function c16080030.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_DEFENSE))
end
function c16080030.filter1(c)
return not c:IsDisabled()
and not c:IsType(TYPE_TOKEN) and c:GetSummonLocation()==LOCATION_EXTRA
end
function c16080030.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c16080030.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080030.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16080030.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c16080030.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--新津 铃绪奈
local m=16080031
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5ca),aux.NonTuner(Card.IsSetCard,0x5ca),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--inactivatable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.effectfilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(cm.effectfilter)
c:RegisterEffect(e5)
end
function cm.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) and bit.band(loc,LOCATION_ONFIELD)~=0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x5ca) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.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
--黑莲与枭
function c16080032.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c16080032.target)
e1:SetOperation(c16080032.activate)
c:RegisterEffect(e1)
end
function c16080032.filter(c)
return c:IsControlerCanBeChanged() and c:IsLevelBelow(6) or c:IsRankBelow(6)
end
function c16080032.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:filter() end
if chk==0 then return Duel.IsExistingTarget(c16080032.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsPlayerCanDraw(1-tp,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c16080032.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c16080032.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,RESET_EVENT+0x1fc0000,1)
end
if tc:IsOnField() then
Duel.Draw(1-tp,2,REASON_EFFECT)
end
end
\ No newline at end of file
--新津 雪乃
function c16080033.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(aux.FALSE)
c:RegisterEffect(e4)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16080033)
e1:SetTarget(c16080033.target)
e1:SetOperation(c16080033.operation)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c16080033.target1)
e2:SetOperation(c16080033.operation1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c16080033.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5ca) and c:IsLevelAbove(6)
end
function c16080033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) and
Duel.IsExistingMatchingCard(c16080033.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c16080033.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ChangePosition(g1,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16080033.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:CompleteProcedure()
end
end
function c16080033.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c16080033.operation1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--新津 莲
function c16080034.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetCondition(c16080034.excon)
e1:SetTarget(c16080034.extg)
c:RegisterEffect(e1)
--SynchroSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16080034,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1,16080034)
e2:SetCondition(c16080034.con)
e2:SetTarget(c16080034.sctg)
e2:SetOperation(c16080034.scop)
c:RegisterEffect(e2)
end
function c16080034.excon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK
end
function c16080034.extg(e,c)
return c:IsSetCard(0x5ca)
end
function c16080034.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c16080034.mfilter(c)
return c:IsSetCard(0x5ca)
end
function c16080034.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c16080034.mfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16080034.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c16080034.mfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
\ No newline at end of file
--新津 胧
function c16080035.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(c16080035.con)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetCountLimit(1,16080035)
e2:SetCondition(c16080035.atcon)
e2:SetTarget(c16080035.attg)
e2:SetOperation(c16080035.atop)
c:RegisterEffect(e2)
--Change
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c16080035.distg)
e3:SetOperation(c16080035.disop)
c:RegisterEffect(e3)
end
function c16080035.con(e)
local tp=e:GetHandler():GetControler()
return not Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil)
end
function c16080035.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPosition()==POS_FACEUP_DEFENSE
end
function c16080035.filter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c16080035.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16080035.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16080035.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16080035.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16080035.atop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
Duel.Damage(tp,atk,REASON_EFFECT)
end
end
function c16080035.disfilter(c,e)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c16080035.distg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c16080035.disfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16080035.disfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16080035.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--狐仙 九重樁
function c16081016.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c16081016.filter,aux.NonTuner(c16081016.sfilter),1)
c:EnableReviveLimit()
--cannot sp
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--atdis
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c16081016.actlimit)
c:RegisterEffect(e2)
--eff dis
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c16081016.discon)
e3:SetCost(c16081016.discost)
e3:SetTarget(c16081016.distg)
e3:SetOperation(c16081016.disop)
c:RegisterEffect(e3)
--cannot bd
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
c16081016.material_type=TYPE_SYNCHRO
function c16081016.filter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_BEAST)
end
function c16081016.sfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_BEAST) and c:IsType(TYPE_SYNCHRO)
end
function c16081016.actlimit(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0
end
function c16081016.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c16081016.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c16081016.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():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c16081016.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--讨魔巫女 樁
function c16081017.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c16081017.filter,aux.NonTuner(Card.IsType,TYPE_SYNCHRO),1)
c:EnableReviveLimit()
--xiaomi
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SPSUMMON_COUNT_LIMIT)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetValue(1)
c:RegisterEffect(e4)
--cananot atk p
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e3)
--atk defdown
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetCountLimit(1)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c16081017.atkop)
c:RegisterEffect(e2)
end
c16081017.material_type=TYPE_SYNCHRO
function c16081017.filter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_BEAST)
end
function c16081017.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-500)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
end
\ No newline at end of file
--预谋者
function c22200001.initial_effect(c)
--Set & Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22200001,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22200001)
e1:SetCondition(c22200001.condition)
e1:SetCost(c22200001.cost)
e1:SetTarget(c22200001.target)
e1:SetOperation(c22200001.operation)
c:RegisterEffect(e1)
end
function c22200001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c22200001.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c22200001.filter(c,ignore)
return c:IsType(TYPE_TRAP) and c:IsSSetable(ignore)
end
function c22200001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22200001.filter,tp,LOCATION_HAND,0,1,1,nil,false) end
end
function c22200001.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c22200001.filter,tp,LOCATION_HAND,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
--act qp in hand
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
\ No newline at end of file
--探寻者
function c22200002.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22200002,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22200002)
e1:SetCost(c22200002.cost1)
e1:SetTarget(c22200002.target1)
e1:SetOperation(c22200002.operation1)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22200002,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22200002)
e2:SetCost(c22200002.cost2)
e2:SetTarget(c22200002.target2)
e2:SetOperation(c22200002.operation2)
c:RegisterEffect(e2)
end
function c22200002.codefilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c22200002.cost1filter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c22200002.codefilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode())
end
function c22200002.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22200002.cost1filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22200002.cost1filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c22200002.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFieldCard(tp,LOCATION_GRAVE,0)
if chk==0 then return tc and tc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function c22200002.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFieldCard(tp,LOCATION_GRAVE,0)
if tc and tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c22200002.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(e:GetHandler(),nseq)
end
function c22200002.target2filter(c)
return c:GetSequence()<5
end
function c22200002.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22200002.target2filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
end
function c22200002.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tc=Duel.SelectMatchingCard(tp,c22200002.target2filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()):GetFirst()
if not tc then return end
Duel.SwapSequence(c,tc)
end
\ No newline at end of file
--无法磨灭的阴影
function c22200003.initial_effect(c)
c:EnableReviveLimit()
--ritual summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22200003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22200003)
e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
e1:SetCondition(c22200003.condition)
e1:SetTarget(c22200003.target)
e1:SetOperation(c22200003.operation)
c:RegisterEffect(e1)
--SearchCard
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22200003,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SSET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c22200003.descon)
e2:SetTarget(c22200003.destg)
e2:SetOperation(c22200003.desop)
c:RegisterEffect(e2)
end
function c22200003.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c22200003.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end
function c22200003.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
local ft=Duel.GetMZoneCount(tp)
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(c22200003.mfilterf,1,nil,tp,mg,c)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c22200003.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetMZoneCount(tp)
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c22200003.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c22200003.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c22200003.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_DECK)
end
function c22200003.thfilter(c)
return c:IsCode(22202001) and c:IsAbleToHand()
end
function c22200003.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0) then return end
local cg=eg:Filter(Card.IsControler,nil,1-tp):Filter(Card.IsFacedown,nil):Filter(Card.IsLocation,nil,LOCATION_SZONE)
if cg:GetCount()<1 then return end
Duel.ConfirmCards(tp,cg)
if cg:FilterCount(Card.IsType,nil,TYPE_TRAP)>0 then
if Duel.IsExistingMatchingCard(c22200003.thfilter,tp,LOCATION_DECK,0,1,nil) then
local tc=Duel.GetMatchingGroup(c22200003.thfilter,tp,LOCATION_DECK,0,nil):Select(tp,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
\ No newline at end of file
--无颜者
function c22200161.initial_effect(c)
c:EnableReviveLimit()
c22200161.AddLinkProcedureUseFaceDownMonseters(c,nil,1,1)
--Guess
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22200161,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22200161)
e1:SetTarget(c22200161.target)
e1:SetOperation(c22200161.operation)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(22200161,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CUSTOM+22200161)
e2:SetCondition(c22200161.thcon)
e2:SetTarget(c22200161.thtg)
e2:SetOperation(c22200161.thop)
c:RegisterEffect(e2)
end
function c22200161.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
end
function c22200161.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) then return false end
local tc=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.SelectOption(1-tp,70,71,72)
Duel.ConfirmCards(1-tp,tc)
if (op~=0 and tc:IsType(TYPE_MONSTER)) or (op~=1 and tc:IsType(TYPE_SPELL)) or (op~=2 and tc:IsType(TYPE_TRAP)) then
if not c:IsRelateToEffect(e) then
Duel.ShuffleHand(tp)
return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetLabel(op)
e1:SetCondition(c22200161.discon)
e1:SetOperation(c22200161.disop)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
else
Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)
end
Duel.ShuffleHand(tp)
end
function c22200161.discon(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if rp==tp then return false end
if op==0 then
return re:IsActiveType(TYPE_TRAP) or re:IsActiveType(TYPE_SPELL)
elseif op==1 then
return re:IsActiveType(TYPE_TRAP) or re:IsActiveType(TYPE_MONSTER)
elseif op==2 then
return re:IsActiveType(TYPE_MONSTER) or re:IsActiveType(TYPE_SPELL)
end
end
function c22200161.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateEffect(ev) then
Duel.Hint(HINT_CARD,0,22200161)
Duel.RaiseEvent(c,EVENT_CUSTOM+22200161,e,0,tp,0,0)
end
e:Reset()
end
function c22200161.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==tp and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c22200161.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
end
function c22200161.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local tg=c:GetLinkedGroup()
if chk==0 then return tg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,tg:GetCount(),0,0)
end
function c22200161.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tg=c:GetLinkedGroup()
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--Link Summon
function c22200161.AddLinkProcedureUseFaceDownMonseters(c,f,min,max,gf)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c22200161.LinkCondition(f,min,max,gf))
e1:SetOperation(c22200161.LinkOperation(f,min,max,gf))
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
end
function c22200161.LConditionFilter(c,f,lc)
return c:IsFacedown() and c:IsCanBeLinkMaterial(lc) and (not f or f(c))
end
function c22200161.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else
return 1
end
end
function c22200161.LCheckRecursive(c,tp,sg,mg,lc,ct,minc,maxc,gf)
sg:AddCard(c)
ct=ct+1
local res=c22200161.LCheckGoal(tp,sg,lc,minc,ct,gf)
or (ct<maxc and mg:IsExists(c22200161.LCheckRecursive,1,sg,tp,sg,mg,lc,ct,minc,maxc,gf))
sg:RemoveCard(c)
ct=ct-1
return res
end
function c22200161.LCheckGoal(tp,sg,lc,minc,ct,gf)
return ct>=minc and sg:CheckWithSumEqual(c22200161.GetLinkCount,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
end
function c22200161.LinkCondition(f,minc,maxc,gf)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL) then return false end
return function(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFacedown() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c22200161.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,c)
local sg=Group.CreateGroup()
return mg:IsExists(c22200161.LCheckRecursive,1,nil,tp,sg,mg,c,0,minc,maxc,gf)
end
end
function c22200161.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c22200161.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,c)
local sg=Group.CreateGroup()
for i=0,maxc-1 do
local cg=mg:Filter(c22200161.LCheckRecursive,sg,tp,sg,mg,c,i,minc,maxc,gf)
if cg:GetCount()==0 then break end
local minct=1
if c22200161.LCheckGoal(tp,sg,c,minc,i,gf) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
end
function c22200161.IsMaterialListCode(c,code)
if not c.material then return false end
for i,mcode in ipairs(c.material) do
if code==mcode then return true end
end
return false
end
function c22200161.IsMaterialListSetCard(c,setcode)
return c.material_setcode and c.material_setcode==setcode
end
function c22200161.IsCodeListed(c,code)
if not c.card_code_list then return false end
for i,ccode in ipairs(c.card_code_list) do
if code==ccode then return true end
end
return false
end
\ No newline at end of file
--无尽连击
function c22201001.initial_effect(c)
--move
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c22201001.cost)
--e2:SetCondition(c22201001.con)
e2:SetTarget(c22201001.tg)
e2:SetOperation(c22201001.op)
c:RegisterEffect(e2)
end
--function c22201001.con(e,tp,eg,ep,ev,re,r,rp)
--local tp=e:GetHandler():GetControler()
--return Duel.GetLP(1-tp)-Duel.GetLP(tp)>=4000
--end
function c22201001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c22201001.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c22201001.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c22201001.filter(c)
return c:IsFaceup() and c:IsAttackBelow(1500) and c:IsType(TYPE_NORMAL)
end
function c22201001.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22201001.filter(chkc) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c22201001.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c22201001.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c22201001.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c22201001.op(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 tc:IsFacedown() then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
--eqlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c22201001.eqlimit)
e4:SetReset(RESET_EVENT+0x1fe0000)
e4:SetLabelObject(tc)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
tc:RegisterEffect(e2)
--reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c22201001.rdcon)
e3:SetOperation(c22201001.rdop)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22201001,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_EQUIP+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCondition(c22201001.eqcon)
e2:SetTarget(c22201001.eqtg)
e2:SetOperation(c22201001.eqop)
tc:RegisterEffect(e2)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22201001,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c22201001.thtg)
e2:SetOperation(c22201001.thop)
tc:RegisterEffect(e2)
end
function c22201001.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c
end
function c22201001.rdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==nil
end
function c22201001.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c22201001.eqfilter(c,ec)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec)
end
function c22201001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local eqg=e:GetHandler():GetEquipGroup()
if chk==0 then return eqg:FilterCount(Card.IsDestructable,nil)>0 and Duel.IsExistingMatchingCard(c22201001.eqfilter,tp,LOCATION_HAND,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eqg,eqg:GetCount(),0,0)
end
function c22201001.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Destroy(c:GetEquipGroup(),REASON_EFFECT)<1 then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c22201001.eqfilter,tp,LOCATION_HAND,0,1,1,nil,c)
local tc=g:GetFirst()
if tc then
if Duel.Equip(tp,tc,c) then
Duel.BreakEffect()
--Atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(1000)
c:RegisterEffect(e1)
if not c:IsRelateToBattle() then return end
Duel.ChainAttack()
end
end
end
function c22201001.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c22201001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22201001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c22201001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22201001.thfilter),tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--幽冥锻造术
function c22201002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22201002+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22201002.cost)
e1:SetTarget(c22201002.target)
e1:SetOperation(c22201002.activate)
c:RegisterEffect(e1)
if not c22201002.global_check then
c22201002.global_check=true
c22201002[0]=true
c22201002[1]=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c22201002.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c22201002.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c22201002.checkop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsType(TYPE_EQUIP) then
c22201002[rp]=false
end
end
function c22201002.clear(e,tp,eg,ep,ev,re,r,rp)
c22201002[0]=true
c22201002[1]=true
end
function c22201002.cfilter(c)
return bit.band(c:GetReason(),REASON_DESTROY)==REASON_DESTROY and c:IsAbleToRemoveAsCost()
end
function c22201002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c22201002.cfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return c22201002[tp] and g:GetCount()>0 end
Duel.Remove(g,POS_FACEUP,REASON_COST)
--oath effects
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e0:SetCode(EFFECT_CANNOT_ACTIVATE)
e0:SetTargetRange(1,0)
e0:SetValue(c22201002.aclimit)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
end
function c22201002.aclimit(e,re,tp)
return re:GetHandler():IsType(TYPE_EQUIP)
end
function c22201002.tgfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c22201002.eqfilter,tp,LOCATION_DECK,0,1,nil,tp,c)
end
function c22201002.eqfilter(c,tp,ec)
return c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec)
end
function c22201002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c22201002.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22201002.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,0,0,0)
end
function c22201002.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c22201002.eqfilter,tp,LOCATION_DECK,0,nil,tp,tc)
if not (ct>0 and g:GetCount()>0 and tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if ct>2 then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eg=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,eg:GetFirst():GetCode())
while g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22201002,0)) and ct==2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
egx=g:Select(tp,1,1,nil)
eg:Merge(egx)
break
end
local ec=eg:GetFirst()
while ec do
Duel.Equip(tp,ec,tc,true,true)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+0xfe0000)
e0:SetCondition(c22201002.con)
e0:SetValue(LOCATION_REMOVED)
ec:RegisterEffect(e0)
ec=eg:GetNext()
end
Duel.EquipComplete()
end
function c22201002.con(e)
return e:GetHandler():GetType()==TYPE_EQUIP+TYPE_SPELL
end
\ No newline at end of file
--终焉之噬
function c22201003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(c,22201003+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22201003.target)
e1:SetOperation(c22201003.activate)
c:RegisterEffect(e1)
--SSet
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_REMOVE)
e2:SetCondition(c22201003.con)
e2:SetOperation(c22201003.op)
c:RegisterEffect(e2)
end
function c22201003.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c22201003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22201003.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22201003.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22201003.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22201003.rmfilter(c,p)
return Duel.IsPlayerCanRemove(p,c) and not c:IsType(TYPE_TOKEN)
end
function c22201003.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)==0 then
if Duel.IsPlayerAffectedByEffect(1-tp,30459350) then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD):FilterSelect(1-tp,c22201003.rmfilter,1,1,nil,1-tp)
Duel.Remove(sg,POS_FACEDOWN,REASON_RULE)
end
else
if Duel.IsPlayerAffectedByEffect(1-tp,30459350) then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD):FilterSelect(1-tp,c22201003.rmfilter,1,1,nil,1-tp)
Duel.Remove(sg,POS_FACEDOWN,REASON_RULE)
end
end
function c22201003.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c22201003.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetRange(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCountLimit(1)
e1:SetOperation(c22201003.retop)
c:RegisterEffect(e1)
end
function c22201003.retop(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
local c=e:GetHandler()
if not c:IsLocation(LOCATION_REMOVED) then return end
if c:IsSSetable(false) and Duel.SelectYesNo(tp,aux.Stringid(22201003,0)) then
Duel.Hint(HINT_CARD,0,22201003)
Duel.SSet(tp,c,tp)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
--盗骸者
function c22201101.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22201101.cost)
e1:SetTarget(c22201101.target)
e1:SetOperation(c22201101.activate)
c:RegisterEffect(e1)
end
function c22201101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local rc=rg:GetFirst()
if rc:IsType(TYPE_MONSTER) then e:SetLabel(1)
elseif rc:IsType(TYPE_SPELL) then e:SetLabel(2)
elseif rc:IsType(TYPE_TRAP) then e:SetLabel(3)
else e:SetLabel(0)
end
end
function c22201101.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22201101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c22201101.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22201101.tgfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c22201101.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
if e:GetLabel()==1 then Duel.SetChainLimit(c22201101.chainlimit1)
elseif e:GetLabel()==2 then Duel.SetChainLimit(c22201101.chainlimit2)
elseif e:GetLabel()==3 then Duel.SetChainLimit(c22201101.chainlimit3)
end
end
end
function c22201101.chainlimit1(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER)
end
function c22201101.chainlimit2(e,rp,tp)
return not e:GetHandler():IsType(TYPE_SPELL)
end
function c22201101.chainlimit3(e,rp,tp)
return not e:GetHandler():IsType(TYPE_TRAP)
end
function c22201101.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
--if tc:IsLocation(LOCATION_HAND) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetLabelObject(tc)
e2:SetCountLimit(1)
e2:SetCondition(c22201101.drcon)
e2:SetTarget(c22201101.drtg)
e2:SetOperation(c22201101.drop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e3,tp)
--end
end
function c22201101.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetLabelObject()) and ep==tp
end
function c22201101.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 c22201101.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,22201101)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then e:Reset() end
end
\ No newline at end of file
--吟游终曲
function c22201102.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCountLimit(1,22201102+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c22201102.condition)
e1:SetCost(c22201102.cost)
e1:SetOperation(c22201102.activate)
c:RegisterEffect(e1)
end
function c22201102.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()~=nil
end
function c22201102.costfilter(c,bc)
return c:IsAbleToRemoveAsCost() and (bit.band(c:GetAttribute(),bc:GetAttribute())~=0 or bit.band(c:GetRace(),bc:GetRace())~=0)
end
function c22201102.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ac=Duel.GetAttacker()
local tc=Duel.GetAttackTarget()
if ac:GetControler()==tc:GetControler() then return false end
local bg=Group.FromCards(ac,tc)
local bc=bg:Filter(Card.IsControler,nil,tp):GetFirst()
if chk==0 then return bc and Duel.IsExistingMatchingCard(c22201102.costfilter,tp,LOCATION_GRAVE,0,1,nil,bc) end
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0):Filter(c22201102.costfilter,nil,bc)
local tg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
tg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
while g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22201102,0)) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
tg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
end
Duel.Remove(tg,POS_FACEUP,REASON_COST)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
if ct>0 then
e:SetLabel(ct)
else
e:SetLabel(0)
end
end
function c22201102.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
local tc=Duel.GetAttackTarget()
local bg=Group.FromCards(ac,tc)
local bc=bg:Filter(Card.IsControler,nil,1-tp):GetFirst()
local ct=e:GetLabel()
if bc and bc:IsRelateToBattle() and ct>0 then
local atk=bc:GetAttack()
local def=bc:GetDefense()
while ct>0 do
atk=atk/2
def=def/2
ct=ct-1
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000)
bc:RegisterEffect(e1)
Duel.BreakEffect()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c22201102.rdcon)
e2:SetOperation(c22201102.rdop)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e2,tp)
end
end
function c22201102.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function c22201102.rdfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c22201102.rdop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c22201102.rdfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(22201102,1)) then
Duel.Hint(HINT_CARD,0,22201102)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local rg=Duel.SelectMatchingCard(tp,c22201102.rdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if rg:GetCount()>0 then
Duel.SendtoHand(rg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,rg)
end
end
end
\ No newline at end of file
--不给糖就导弹
function c22201201.initial_effect(c)
--ACTIVATE
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Treat or Beat
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(c22201201.condition)
e1:SetTarget(c22201201.target)
e1:SetOperation(c22201201.operation)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c22201201.econ)
e2:SetValue(c22201201.efilter)
c:RegisterEffect(e2)
end
function c22201201.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c22201201.atkfilter1(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackable() and Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK)
end
function c22201201.atkfilter2(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackable() and Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK)
end
function c22201201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local a=Duel.IsExistingTarget(c22201201.atkfilter1,tp,LOCATION_MZONE,0,1,nil)
local b=Duel.IsExistingTarget(c22201201.atkfilter2,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return a or b end
if a then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c22201201.atkfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,Card.IsPosition,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK)
g1:Merge(g2)
Duel.SetOperationInfo(0,0,g1,g1:GetCount(),0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c22201201.atkfilter2,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK)
g1:Merge(g2)
Duel.SetOperationInfo(0,0,g1,g1:GetCount(),0,0)
end
end
function c22201201.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local a=g:FilterCount(Card.IsRelateToEffect,nil,e)==2
and g:FilterCount(Card.IsFaceup,nil)==2
and g:FilterCount(Card.IsAttackable,nil)>0
local tg=Duel.GetDecktopGroup(1-tp,1)
local b=(tg:GetCount()>0 and tg:GetFirst():IsAbleToHand())
local off=1
local ops={}
local opval={}
if a then
ops[off]=aux.Stringid(22201201,0)
opval[off-1]=1
off=off+1
end
if b then
ops[off]=aux.Stringid(22201201,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(1-tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
local ac=g:Filter(Card.IsAttackable,nil):GetFirst()
local bc=g:Filter(aux.TRUE,ac):GetFirst()
Duel.CalculateDamage(ac,bc)
elseif sel==2 then
tc=Duel.GetDecktopGroup(1-tp,1):GetFirst()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c22201201.econ(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_CHAINING)
end
function c22201201.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
\ No newline at end of file
--天下翻覆?
function c22202004.initial_effect(c)
--Act in Hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c22202004.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c22202004.target)
e1:SetOperation(c22202004.activate)
c:RegisterEffect(e1)
end
function c22202004.hdfilter(c)
return c:GetMutualLinkedGroupCount()>0
end
function c22202004.handcon(e)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(c22202004.hdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c22202004.filter(c)
return c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c22202004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if eg:GetCount()~=1 then return false end
local c=e:GetHandler()
local ec=eg:GetFirst()
if chkc then return chkc==ec end
if chk==0 then return ec:IsType(TYPE_LINK) and ec:IsSummonType(SUMMON_TYPE_LINK) and ec:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(eg)
end
function c22202004.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
local c=e:GetHandler()
if ec:IsRelateToEffect(e) and ec:IsType(TYPE_LINK) then
local lm=0
if ec:IsLinkMarker(LINK_MARKER_TOP_LEFT) then lm=lm+0x001 end
if ec:IsLinkMarker(LINK_MARKER_TOP) then lm=lm+0x002 end
if ec:IsLinkMarker(LINK_MARKER_TOP_RIGHT) then lm=lm+0x004 end
if ec:IsLinkMarker(LINK_MARKER_LEFT) then lm=lm+0x008 end
if ec:IsLinkMarker(LINK_MARKER_RIGHT) then lm=lm+0x020 end
if ec:IsLinkMarker(LINK_MARKER_BOTTOM_LEFT) then lm=lm+0x040 end
if ec:IsLinkMarker(LINK_MARKER_BOTTOM) then lm=lm+0x080 end
if ec:IsLinkMarker(LINK_MARKER_BOTTOM_RIGHT) then lm=lm+0x100 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_LINK_MARKER_KOISHI)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(lm)
ec:RegisterEffect(e1)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c22202004.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c22202004.splimit(e,c)
return c:IsType(TYPE_LINK) and (c:IsLinkMarker(LINK_MARKER_TOP) or c:IsLinkMarker(LINK_MARKER_BOTTOM))
end
\ No newline at end of file
--人体描边
function c22202005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22202005+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22202005.target)
e1:SetOperation(c22202005.activate)
c:RegisterEffect(e1)
end
function c22202005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e)
Duel.SetTargetCard(g)
local mg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local mc=g:GetFirst()
while mc do
if mg:IsContains(mc) then
mg:RemoveCard(mc)
end
mc=g:GetNext()
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c22202005.chainlm)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,mg,mg:GetCount(),0,0)
end
function c22202005.chainlm(e,rp,tp)
return tp~=rp
end
function c22202005.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local mg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local mc=g:GetFirst()
while mc do
if mg:IsContains(mc) then
mg:RemoveCard(mc)
end
mc=g:GetNext()
end
if mg:GetCount()>0 then Duel.Destroy(mg,REASON_EFFECT) end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
end
\ No newline at end of file
--消失的埋葬
function c22202102.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCost(c22202102.cost)
e1:SetCondition(c22202102.condition)
e1:SetTarget(c22202102.target)
e1:SetOperation(c22202102.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function c22202102.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local atk=re:GetHandler():GetAttack()
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0):Filter(Card.IsType,nil,TYPE_MONSTER)
if chk==0 then
if c:IsLocation(LOCATION_HAND) then
return g:GetCount()==g:GetClassCount(Card.GetAttack) and Duel.CheckLPCost(tp,atk)
else
return Duel.CheckLPCost(tp,atk)
end
end
Duel.PayLPCost(tp,atk)
end
function c22202102.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER)
end
function c22202102.target(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=re:GetHandler():GetAttack()
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_GRAVE):Filter(c22202102.filter,nil,atk)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE+LOCATION_MZONE)
end
function c22202102.filter(c,atk)
return c:IsAbleToDeck() and c:GetAttack()==atk and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c22202102.activate(e,tp,eg,ep,ev,re,r,rp)
local atk=re:GetHandler():GetAttack()
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_GRAVE):Filter(c22202102.filter,nil,atk)
local tg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:Select(tp,1,1,nil):GetFirst()
tg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
while g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22202102,0)) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:Select(tp,1,1,nil):GetFirst()
tg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
end
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--Used By Amana --Used By Amana
Amana=Amana or {} Amana=Amana or {}
--Mogami Shizuka, 81018xxx, 0x81b
function Amana.AttackBelow(c)
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_ATTACK)
ea:SetCondition(Amana.atcon)
c:RegisterEffect(ea)
end
function Amana.atcon(e)
return e:GetHandler():GetAttack()>=2000
end
--majsoul --majsoul
function Amana.Majsoul(c) function Amana.Majsoul(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE) Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
......
--子虚之罠 --子虚之罠
function c22202001.initial_effect(c) function c93622201.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22202001.target) e1:SetTarget(c93622201.target)
e1:SetOperation(c22202001.activate) e1:SetOperation(c93622201.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c22202001.handcon) e2:SetCondition(c93622201.handcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22202001.filter(c) function c93622201.filter(c)
return c:IsFacedown() and c:GetSequence()<5 return c:IsFacedown() and c:GetSequence()<5
end end
function c22202001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c93622201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local a=Duel.GetMatchingGroupCount(c22202001.filter,tp,0,LOCATION_SZONE,nil) local a=Duel.GetMatchingGroupCount(c93622201.filter,tp,0,LOCATION_SZONE,nil)
if chk==0 then return a>0 end if chk==0 then return a>0 end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c22202001.chainlimit) Duel.SetChainLimit(c93622201.chainlimit)
end end
end end
function c22202001.chainlimit(e,rp,tp) function c93622201.chainlimit(e,rp,tp)
return not (e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsType(TYPE_TRAP)) return not (e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsType(TYPE_TRAP))
end end
function c22202001.activate(e,tp,eg,ep,ev,re,r,rp) function c93622201.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil) local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil)
if g1:GetCount()<1 then return end if g1:GetCount()<1 then return end
...@@ -43,13 +43,13 @@ function c22202001.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,13 +43,13 @@ function c22202001.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c22202001.aclimit) e1:SetValue(c93622201.aclimit)
e1:SetLabel(code) e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
tc=g:GetNext() tc=g:GetNext()
end end
if Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(22202001,0)) then if Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(93622201,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local dg=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if dg:GetCount()>0 then Duel.Destroy(dg,REASON_EFFECT) end if dg:GetCount()>0 then Duel.Destroy(dg,REASON_EFFECT) end
...@@ -58,10 +58,10 @@ function c22202001.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,10 +58,10 @@ function c22202001.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(1-tp,2,REASON_EFFECT) Duel.Draw(1-tp,2,REASON_EFFECT)
end end
end end
function c22202001.aclimit(e,re,tp) function c93622201.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel()) and not re:GetHandler():IsImmuneToEffect(e) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel()) and not re:GetHandler():IsImmuneToEffect(e)
end end
function c22202001.handcon(e) function c93622201.handcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
for i=0,4 do for i=0,4 do
if Duel.GetFieldCard(tp,LOCATION_SZONE,i) then return false end if Duel.GetFieldCard(tp,LOCATION_SZONE,i) then return false end
......
--狂风骤雨 --狂风骤雨
function c22202003.initial_effect(c) function c93622202.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c22202003.target) e1:SetTarget(c93622202.target)
e1:SetCost(c22202003.cost) e1:SetCost(c93622202.cost)
e1:SetOperation(c22202003.activate) e1:SetOperation(c93622202.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -16,7 +16,7 @@ function c22202003.initial_effect(c) ...@@ -16,7 +16,7 @@ function c22202003.initial_effect(c)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22202003.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c93622202.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -31,20 +31,20 @@ function c22202003.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,20 +31,20 @@ function c22202003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
end end
function c22202003.filter1(c,ec) function c93622202.filter1(c,ec)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c~=ec and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c~=ec and c:IsAbleToDeck()
end end
function c22202003.filter2(c) function c93622202.filter2(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToDeck()
end end
function c22202003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c93622202.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22202003.filter1(chkc) and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and c93622202.filter1(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c22202003.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c93622202.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c22202003.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c93622202.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
local tc=g:GetFirst() local tc=g:GetFirst()
if bit.band(tc:GetOriginalType(),TYPE_MONSTER)~=0 then if bit.band(tc:GetOriginalType(),TYPE_MONSTER)~=0 then
local b1=Duel.IsExistingTarget(c22202003.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tc,e:GetHandler()) local b1=Duel.IsExistingTarget(c93622202.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tc,e:GetHandler())
local b2=e:IsHasType(EFFECT_TYPE_ACTIVATE) local b2=e:IsHasType(EFFECT_TYPE_ACTIVATE)
local b3=true local b3=true
if chk==0 then return b1 or b2 or b3 end if chk==0 then return b1 or b2 or b3 end
...@@ -52,17 +52,17 @@ function c22202003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -52,17 +52,17 @@ function c22202003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ops={} local ops={}
local opval={} local opval={}
if b1 then if b1 then
ops[off]=aux.Stringid(22202003,0) ops[off]=aux.Stringid(93622202,0)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if b2 then if b2 then
ops[off]=aux.Stringid(22202003,1) ops[off]=aux.Stringid(93622202,1)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
if b3 then if b3 then
ops[off]=aux.Stringid(22202003,2) ops[off]=aux.Stringid(93622202,2)
opval[off-1]=3 opval[off-1]=3
off=off+1 off=off+1
end end
...@@ -71,21 +71,21 @@ function c22202003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -71,21 +71,21 @@ function c22202003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabel(sel) e:SetLabel(sel)
if sel==1 then if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
g=Duel.SelectTarget(tp,c22202003.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,tc,e:GetHandler()) g=Duel.SelectTarget(tp,c93622202.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,tc,e:GetHandler())
g:AddCard(tc) g:AddCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
elseif sel==2 then elseif sel==2 then
Duel.SetChainLimit(c22202003.chlimit) Duel.SetChainLimit(c93622202.chlimit)
elseif sel==3 then elseif sel==3 then
end end
else else
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
end end
function c22202003.chlimit(e,ep,tp) function c93622202.chlimit(e,ep,tp)
return tp==ep return tp==ep
end end
function c22202003.activate(e,tp,eg,ep,ev,re,r,rp) function c93622202.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
\ No newline at end of file
--强制突破 --强制突破
function c22202101.initial_effect(c) function c93622203.initial_effect(c)
--negate --negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c22202101.con) e1:SetCondition(c93622203.con)
e1:SetCost(c22202101.cost) e1:SetCost(c93622203.cost)
e1:SetOperation(c22202101.op) e1:SetOperation(c93622203.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -15,10 +15,10 @@ function c22202101.initial_effect(c) ...@@ -15,10 +15,10 @@ function c22202101.initial_effect(c)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22202101.con(e,tp,eg,ep,ev,re,r,rp) function c93622203.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasCategory(CATEGORY_NEGATE) or re:IsHasCategory(CATEGORY_DISABLE) or re:IsHasCategory(CATEGORY_DISABLE_SUMMON) return re:IsHasCategory(CATEGORY_NEGATE) or re:IsHasCategory(CATEGORY_DISABLE) or re:IsHasCategory(CATEGORY_DISABLE_SUMMON)
end end
function c22202101.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c93622203.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -33,22 +33,22 @@ function c22202101.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,22 +33,22 @@ function c22202101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
end end
function c22202101.filter(c,rtype) function c93622203.filter(c,rtype)
return c:IsType(rtype) and c:IsAbleToGrave() return c:IsType(rtype) and c:IsAbleToGrave()
end end
function c22202101.op(e,tp,eg,ep,ev,re,r,rp) function c93622203.op(e,tp,eg,ep,ev,re,r,rp)
local rtype=bit.band(re:GetActiveType(),0x7) local rtype=bit.band(re:GetActiveType(),0x7)
local g=Group.CreateGroup() local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g) Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c22202101.repop) Duel.ChangeChainOperation(ev,c93622203.repop)
if Duel.IsExistingMatchingCard(c22202101.filter,tp,LOCATION_DECK,0,1,nil,rtype) and Duel.SelectYesNo(tp,aux.Stringid(22202101,0)) then if Duel.IsExistingMatchingCard(c93622203.filter,tp,LOCATION_DECK,0,1,nil,rtype) and Duel.SelectYesNo(tp,aux.Stringid(93622203,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,c22202101.filter,tp,LOCATION_DECK,0,1,1,nil,rtype) local sg=Duel.SelectMatchingCard(tp,c93622203.filter,tp,LOCATION_DECK,0,1,1,nil,rtype)
if sg:GetCount()>0 then Duel.SendtoGrave(sg,REASON_EFFECT) end if sg:GetCount()>0 then Duel.SendtoGrave(sg,REASON_EFFECT) end
end end
end end
function c22202101.repop(e,tp,eg,ep,ev,re,r,rp) function c93622203.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then if c:IsType(TYPE_SPELL+TYPE_TRAP) then
c:CancelToGrave(false) c:CancelToGrave(false)
......
...@@ -445,11 +445,6 @@ ...@@ -445,11 +445,6 @@
#setname="Persona" 人格面具 #setname="Persona" 人格面具
#setname="PhantomThievesOfHearts" 心之怪盗团 #setname="PhantomThievesOfHearts" 心之怪盗团
#▲咸鱼 - 160 0x5c0-0x5cf
!setname 0x5c1 Ⅷ集团军
!setname 0x5c5 传颂
!setname 0x5ca 新津
#REIKAI 2404873791 161 0xcc0-0xccf #REIKAI 2404873791 161 0xcc0-0xccf
!setname 0xcc2 狐宇 !setname 0xcc2 狐宇
!setname 0x3cc2 狐宇宙侠 !setname 0x3cc2 狐宇宙侠
...@@ -589,8 +584,6 @@ ...@@ -589,8 +584,6 @@
#持剑者 380518667 221 0x8f0-0x8ff #持剑者 380518667 221 0x8f0-0x8ff
#▲兔锅 1874883039 222
#雾霭朝西 2144320366 224 0x750-75f #雾霭朝西 2144320366 224 0x750-75f
!setname 0x750 Alchemy Stars !setname 0x750 Alchemy Stars
...@@ -1301,11 +1294,17 @@ ...@@ -1301,11 +1294,17 @@
!setname 0x9a0 Virtual UP !setname 0x9a0 Virtual UP
!counter 0x9a0 Virtual指示物 !counter 0x9a0 Virtual指示物
#虚子/极の一击 3403728546 936 0xfc0-0xfcf #公用区间1 936 0xfc0-0xfcf
#虚子 3403728546
#极の一击 -
!setname 0xfc1 人魂 !setname 0xfc1 人魂
#兔锅 1874883039
#柚木梨沙/Cherry/Nanami/Millux 1141457733/498433112 986 0x870-0x87f #公用区间2 986 0x870-0x87f
#柚木梨沙 1141457733
!setname 0x870 少女分形 !setname 0x870 少女分形
#Cherry/Nanami -
#Millux 498433112
#玉藻白 1994467959 998 0x580-0x58f #玉藻白 1994467959 998 0x580-0x58f
!setname 0x358a 水区 !setname 0x358a 水区
......
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