Commit 65237dfd authored by Nemo Ma's avatar Nemo Ma

list fix removal

parent c3f5514b
......@@ -255,6 +255,18 @@
83000078 0
83000079 0
83000084 0
130006013 0
130006014 0
130006015 0
130006016 0
130006017 0
130006018 0
130006019 0
130006020 0
130006021 0
130006022 0
130006023 0
130006024 0
#耻辱柱
#all 阳羽 cards
49920003 0
......@@ -355,6 +367,12 @@
30002065 0
30010000 0
30012000 0
#210620
14010150 0
64800043 0
9910051 2
9910710 2
25000157 2
#210613
33405100 0
9300315 0
......@@ -362,7 +380,6 @@
30003040 0
30003050 0
30005015 0
30005016 0
65020201 0
65010087 0
65010121 0
......@@ -389,7 +406,6 @@
60001007 0
60001008 0
88990171 0
25000157 1
33400552 1
79029466 1
#210523
......@@ -491,7 +507,6 @@
22070230 0
22544155 0
25000055 0
25000152 0
30000200 0
31470002 0
31470011 0
......@@ -918,7 +933,6 @@
25000061 0
25000049 0
25000024 0
25000088 0
30000300 0
30000305 0
30000310 0
......@@ -1588,14 +1602,11 @@
9951100 0
130001245 0
79029015 0
79029024 0
79029034 0
79029035 0
79029041 0
79029054 0
79029062 0
79029067 0
79029072 0
79029090 0
79029112 0
79029117 0
......@@ -1823,7 +1834,6 @@
25000017 1
79029038 1
79029050 1
79029239 1
9980400 1
9981158 1
9981159 1
......@@ -2034,10 +2044,8 @@
9951328 1
79029037 0
79029038 1
79029040 1
79029050 1
79029068 1
79029091 1
79029173 1
82208106 0
9950182 1
......@@ -2083,7 +2091,6 @@
9981465 0
871100006 1
#14010199 1
14010150 1
#semi limit
9950623 2
9950045 2
......
No preview for this file type
No preview for this file type
--方舟之骑士·德克萨斯
function c29000000.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29000000,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29000000)
e1:SetCondition(c29000000.spcon)
e1:SetTarget(c29000000.sptg)
e1:SetOperation(c29000000.spop)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000001)
e2:SetTarget(c29000000.cttg)
e2:SetOperation(c29000000.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29000000.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,29000002)
e4:SetCondition(c29000000.thcon)
e4:SetTarget(c29000000.thtg)
e4:SetOperation(c29000000.thop)
c:RegisterEffect(e4)
end
function c29000000.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x87af)
end
function c29000000.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c29000000.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c29000000.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 c29000000.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29000000.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x11ae,1) end
end
function c29000000.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
e:GetHandler():AddCounter(0x11ae,n)
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29000000,0)) then
Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
function c29000000.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29000000.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1) and c:IsType(TYPE_MONSTER)
end
function c29000000.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29000000.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29000000.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29000000.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
--其空葵的外包
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
\ No newline at end of file
--超量魔法-精英化
function c29010001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c29010001.target)
e1:SetOperation(c29010001.activate)
c:RegisterEffect(e1)
end
function c29010001.xyzfil(c,e,tp)
local att=c:GetAttribute()
local rc=c:GetRace()
return c:IsSetCard(0x87af) and Duel.IsExistingMatchingCard(c29010001.xzfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,att,rc) and c:IsLevelBelow(6) and (c:IsLocation(LOCATION_MZONE) or (c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
function c29010001.xzfil(c,e,tp,mc,att,rc)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsRace(rc) and c:IsAttribute(att) and c:IsRank(8) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c29010001.target(e,tp,eg,ep,ev,re,r,rp,chk)
local xg=Duel.GetMatchingGroup(c29010001.xyzfil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,e,tp)
if chk==0 then return xg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29010001.activate(e,tp,eg,ep,ev,re,r,rp)
local xg=Duel.GetMatchingGroup(c29010001.xyzfil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,e,tp)
if xg:GetCount()>0 then
local tc=xg:Select(tp,1,1,nil):GetFirst()
local rc=tc:GetRace()
local att=tc:GetAttribute()
if tc:IsLocation(LOCATION_HAND) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local xc=Duel.SelectMatchingCard(tp,c29010001.xzfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,att,rc):GetFirst()
Duel.Overlay(xc,tc)
Duel.SpecialSummonStep(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
xc:CompleteProcedure()
end
end
--小苍兰
function c29010002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010002.actg)
e1:SetOperation(c29010002.acop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c29010002.aktg)
e2:SetOperation(c29010002.akop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,29010002+EFFECT_COUNT_CODE_DUEL)
e3:SetTarget(c29010002.dstg)
e3:SetOperation(c29010002.dsop)
c:RegisterEffect(e3)
--
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_SSET)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e8:SetRange(LOCATION_FZONE)
e8:SetTargetRange(1,0)
e8:SetTarget(c29010002.setlimit)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_CANNOT_ACTIVATE)
e9:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetRange(LOCATION_FZONE)
e9:SetTargetRange(1,0)
e9:SetTarget(c29010002.actlimit)
c:RegisterEffect(e9)
end
function c29010002.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 end
local c=e:GetHandler()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetOperation(c29010002.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,4)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function c29010002.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==2 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c29010002.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(29010002,0))
end
function c29010002.aktg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc:IsControler(1-tp) and Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end
function c29010002.akop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,tc)
end
end
end
function c29010002.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Group.FromCards(Duel.GetAttacker(),Duel.GetAttackTarget())
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c29010002.dsop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if Duel.Destroy(g,REASON_EFFECT) then
Duel.BreakEffect()
local p=Duel.GetTurnPlayer()
Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
function c29010002.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function c29010002.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--银河访问姬•洛拉米亚•枪管
function c29010003.initial_effect(c)
--cannot special summon
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.FALSE)
c:RegisterEffect(e1)
--summon with 4 tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010003,2))
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e2:SetCondition(c29010003.ttcon)
e2:SetOperation(c29010003.ttop)
e2:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LIMIT_SET_PROC)
e3:SetCondition(c29010003.setcon)
c:RegisterEffect(e3)
end
function c29010003.ttcon(e,c,minc)
if c==nil then return true end
return minc<=4 and Duel.CheckTribute(c,4)
end
function c29010003.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,4,4)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c29010003.setcon(e,c,minc)
if not c then return true end
return false
end
--幻智的未烬·伊芙利特
function c29010007.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xf36),aux.FilterBoolFunction(Card.IsCode,15000630),1,1)
c:EnableReviveLimit()
--Immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(aux.indoval)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29010007,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetTarget(c29010007.thtg)
e4:SetOperation(c29010007.thop)
c:RegisterEffect(e4)
--copy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(29010007,1))
e5:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c29010007.copytg)
e5:SetOperation(c29010007.copyop)
c:RegisterEffect(e5)
end
function c29010007.filter(c)
return c:IsSetCard(0xf36) and c:IsType(TYPE_MONSTER)
and not c:IsForbidden() and c:IsAbleToGraveAsCost()
end
function c29010007.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010007.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c29010007.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil):GetFirst()
e:SetLabelObject(tc)
Duel.SendtoGrave(tc,REASON_COST)
end
function c29010007.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local code=tc:GetOriginalCode()
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetValue(tc:GetDefense())
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29010007,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetLabel(cid)
e3:SetOperation(c29010007.rstop)
c:RegisterEffect(e3)
end
function c29010007.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
c:ResetEffect(cid,RESET_COPY)
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c29010007.thfilter(c)
return c:IsSetCard(0xf36) and c:IsAbleToHand()
end
function c29010007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010007.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c29010007.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29010007.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 c29010008.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010008.target)
e1:SetOperation(c29010008.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c29010008.handcon)
c:RegisterEffect(e2)
end
function c29010008.handcon(e)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER)
end
function c29010008.filter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010008.ctfil(c)
return c:IsAbleToDeck() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010008.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)) or (Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_MZONE,0,nil,ATTRIBUTE_WATER):GetClassCount(Card.GetOriginalCode)>=3 and Duel.GetMatchingGroup(c29010008.ctfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil):GetClassCount(Card.GetCode)>=3 and Duel.IsPlayerCanDraw(tp,2)) end
if (Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_MZONE,0,nil,ATTRIBUTE_WATER):GetClassCount(Card.GetOriginalCode)>=3 and Duel.GetMatchingGroup(c29010008.ctfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil):GetClassCount(Card.GetCode)>=3 and Duel.IsPlayerCanDraw(tp,2)) and Duel.SelectYesNo(tp,aux.Stringid(29010008,0)) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
else
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
end
function c29010008.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
g=Duel.GetMatchingGroup(c29010008.ctfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetCode)<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
g1=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Draw(tp,2,REASON_EFFECT)
else
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29010008.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--深海的引导
function c29010009.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010009+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c29010009.cost)
e1:SetTarget(c29010009.target)
e1:SetOperation(c29010009.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c29010009.spcost)
e2:SetTarget(c29010009.sptg)
e2:SetOperation(c29010009.spop)
c:RegisterEffect(e2)
end
function c29010009.costfilter(c,e,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,c,e,tp)
end
function c29010009.filter(c,e,tp)
return c:IsSetCard(0x87af) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_COST) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil)
end
function c29010009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29010009.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,c29010009.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
e:GetHandler():CancelToGrave()
end
function c29010009.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c29010009.ckfil(c,e,tp)
return c:IsControler(1-tp) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,29010009,0,0x4011,0,0,8,RACE_AQUA,ATTRIBUTE_WATER) and eg:IsExists(c29010009.ckfil,1,nil,e,tp) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29010009.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,29010009,0,0x4011,0,0,8,RACE_AQUA,ATTRIBUTE_WATER) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
--方舟之骑士·斯卡蒂
function c29010010.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010010,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c29010010.sptg)
e1:SetOperation(c29010010.spop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c29010010.settg)
e2:SetOperation(c29010010.setop)
c:RegisterEffect(e2)
end
function c29010010.filter(c,e,tp)
return c:IsSetCard(0x87af) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010010.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010010.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c29010010.thfil(c)
return c:IsSetCard(0x87af) and not c:IsCode(29010010) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c29010010.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,c29010010.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,22702055) and Duel.IsExistingMatchingCard(c29010010.thfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29010010,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
sg=Duel.SelectMatchingCard(tp,c29010010.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c29010010.setfilter(c)
return c:IsSetCard(0x87af) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c29010010.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c29010010.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local tc=Duel.SelectTarget(tp,c29010010.setfilter,tp,LOCATION_DECK,0,1,1,nil)
end
function c29010010.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,g:GetFirst())
end
end
--绝海一战
function c29010012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010012.target)
e1:SetOperation(c29010012.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c29010012.handcon)
c:RegisterEffect(e2)
end
function c29010012.handcon(e)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER)
end
function c29010012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
if Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_MZONE,0,nil,ATTRIBUTE_WATER):GetClassCount(Card.GetOriginalCode)>=3 and Duel.SelectYesNo(tp,aux.Stringid(29010012,0)) then
e:SetLabel(1)
end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
end
function c29010012.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c29010012.distg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c29010012.discon)
e2:SetOperation(c29010012.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
tc=g:GetNext()
end
else
g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()<=0 then return end
local tc=g:Select(tp,1,1,nil):GetFirst()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c29010012.distg(e,c)
local tc=e:GetLabelObject()
return c:IsCode(tc:GetCode())
end
function c29010012.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode())
end
function c29010012.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--斯卡蒂·浊心
function c29010013.initial_effect(c)
--fusion material
c:EnableReviveLimit()
--fusion material
aux.AddFusionProcCodeFunRep(c,29010010,aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),1,99,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c29010013.splimit)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(29010010)
c:RegisterEffect(e2)
--change
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c29010013.cgcon)
e3:SetOperation(c29010013.cgop)
c:RegisterEffect(e3)
--Atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e4:SetValue(1000)
c:RegisterEffect(e4)
--Destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c29010013.desreptg)
e5:SetOperation(c29010013.desrepop)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(c29010013.eftg)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
end
function c29010013.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c29010013.ckfil(c)
return c:IsOnField() and c:IsType(TYPE_MONSTER)
end
function c29010013.cgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29010013.ckfil,1,nil)
end
function c29010013.cgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,29010013)
local g=eg:Filter(c29010013.ckfil,nil)
local tc=g:GetFirst()
while tc do
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
--add code
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010013,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_CODE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(29010023)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
tc=g:GetNext()
end
end
function c29010013.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsReason(REASON_RULE)
and Duel.CheckLPCost(e:GetHandlerPlayer(),1000) end
return true
end
function c29010013.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29010013)
Duel.PayLPCost(e:GetHandlerPlayer(),1000)
end
function c29010013.eftg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
--方舟之骑士·幽灵鲨
function c29010014.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010014,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c29010014.thtg)
e1:SetOperation(c29010014.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c29010014.spcost)
e2:SetTarget(c29010014.sptg)
e2:SetOperation(c29010014.spop)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c29010014.thfilter(c)
return c:IsSetCard(0x87af) and c:IsAbleToHand() and c:IsType(TYPE_TRAP)
end
function c29010014.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010014.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29010014.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29010014.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c29010014.ctfil(c)
return c:IsSetCard(0x87af) and c:IsAbleToDeckAsCost()
end
function c29010014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010014.ctfil,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c29010014.ctfil,tp,LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.SendtoDeck(g,tp,2,REASON_COST)
end
function c29010014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,22702055) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c29010014.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--宛如流星
if not pcall(function() require("expansions/script/c29010000") end) then require("script/c29010000") end
local m,cm = rscf.DefineCard(29010016)
function cm.initial_effect(c)
local e0 = rsef.SV_Card(c,"tah",1,"sr",LOCATION_HAND,cm.acon)
local e1 = rsef.A(c,nil,"des",nil,"des",nil,nil,nil,
rsop.target(aux.TRUE,"des",0,LOCATION_ONFIELD),cm.desop)
local e2 = rsef.A_NegateActivation(c,"des",nil,
aux.AND(rscon.neg("a,m",1),cm.excon))
local e3 = rsef.A(c,EVENT_SUMMON,{m,0},nil,"diss",nil,
cm.disscon,nil,cm.disstg,cm.dissop)
local e4 = rsef.A(c,EVENT_SPSUMMON,{m,0},nil,"diss",nil,
cm.disscon,nil,cm.disstg,cm.dissop)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.acon(e)
return Duel.IsExistingMatchingCard(cm.cfilter,0,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.cfilter,1,LOCATION_MZONE,0,1,nil)
end
function cm.desop(e,tp)
rsop.SelectOperate("des",tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
function cm.excon(e,tp)
local g = Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
return g:GetClassCount(Card.GetOriginalCodeRule) >= 3
end
function cm.disscon(e,tp,eg)
return cm.excon(e,tp) and Duel.GetCurrentChain() == 0 and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function cm.disstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
\ No newline at end of file
--方舟之骑士·歌蕾蒂娅
if not pcall(function() require("expansions/script/c29010000") end) then require("script/c29010000") end
local m,cm = rscf.DefineCard(29010017)
function cm.initial_effect(c)
local e1 = rsef.QO(c,nil,"sp",{1,m},"sp",nil,LOCATION_HAND,cm.spcon,
rscost.cost(cm.dfilter,"dhf",LOCATION_HAND),
rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e2 = rsef.FTO(c,EVENT_PHASE+PHASE_STANDBY,"sp",1,"sp",nil,
LOCATION_MZONE,nil,nil,
rsop.target(cm.spfilter,"sp",LOCATION_DECK),cm.spop2)
local e3 = rsef.FC(c,EVENT_CHAINING,nil,nil,nil,LOCATION_MZONE,
cm.limcon,cm.limop)
end
function cm.dfilter(c)
return c:IsType(TYPE_TRAP) and c:IsDiscardable()
end
function cm.spcon(e,tp)
return Duel.IsEnvironment(22702055)
end
function cm.spop(e,tp)
local c = rscf.GetSelf(e)
if c then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.spfilter(c,e,tp)
return not c:IsCode(m) and c:IsSetCard(0x87af) and rscf.spfilter2()(c,e,tp) and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.spop2(e,tp)
rsop.SelectOperate("sp",tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
function cm.limcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_TRAP) and ep==tp
end
function cm.limop(e,tp)
Duel.SetChainLimit(cm.chainlm)
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
--方舟之骑士·巫恋
function c29010019.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,29010019)
e1:SetTarget(c29010019.sptg)
e1:SetOperation(c29010019.spop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c29010019.adtg)
e2:SetValue(-1500)
c:RegisterEffect(e2)
--double
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c29010019.damcon)
e3:SetOperation(c29010019.damop)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(c29010019.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c29010019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,29010020,0,0x4011,0,0,5,RACE_SPELLCASTER,ATTRIBUTE_DARK) and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c29010019.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,29010020,0,0x4011,0,0,5,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,29010020)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
--cannot be battle target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetValue(aux.imval1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetLabelObject(c)
e3:SetCondition(c29010019.decon)
e3:SetOperation(c29010019.deop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
--
local e4=e3:Clone()
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCondition(c29010019.decon1)
token:RegisterEffect(e4)
Duel.SpecialSummonComplete()
end
function c29010019.decon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetLabelObject())
end
function c29010019.decon1(e,tp,eg,ep,ev,re,r,rp)
return true
end
function c29010019.deop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
function c29010019.ckfil(c,seq)
return math.abs(seq-c:GetSequence())==1 or ((c:GetSequence()==5 and seq==3) or (c:GetSequence()==6 and seq==1))
end
function c29010019.adtg(e,c)
local tp=e:GetHandlerPlayer()
local g1=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,nil,29010020)
local g2=Group.CreateGroup()
local tc=g1:GetFirst()
while tc do
local seq=tc:GetSequence()
local g3=Duel.GetMatchingGroup(c29010019.ckfil,tp,0,LOCATION_MZONE,nil,seq)
g2:Merge(g3)
tc=g1:GetNext()
end
return g2:IsContains(c)
end
function c29010019.eftg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c29010019.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==c:GetOwner() and c:IsRelateToBattle() and (c:IsAttackBelow(c:GetBaseAttack()) or c:IsDefenseBelow(c:GetBaseDefense()))
end
function c29010019.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
--诅咒娃娃衍生物
function c29010020.initial_effect(c)
end
--歌蕾蒂娅·碎漩狂舞
if not pcall(function() require("expansions/script/c29010000") end) then require("script/c29010000") end
local m,cm = rscf.DefineCard(29010021)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,8,2)
local e1 = rsef.SV_Card(c,"code",29010017,"sr",rsloc.mg)
local e2 = rsef.SC_Easy(c,EVENT_SPSUMMON_SUCCESS,"cd",
rscon.sumtyps("xyz"),cm.regop)
local e3 = rsef.QO(c,nil,{m,0},1,"tg",nil,LOCATION_MZONE,
cm.mvcon,nil,cm.mvtg,cm.mvop)
end
--fix ocg bug
function Auxiliary.SequenceToGlobal(p,loc,seq)
if p~=0 and p~=1 then
return 0
end
if loc==LOCATION_MZONE then
if seq<=6 then
return 0x1<<(16*p+seq)
else
return 0
end
elseif loc == LOCATION_SZONE then
if seq<=4 then
return 0x100<<(16*p+seq)
else
return 0
end
else
return 0
end
end
function cm.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_EFFECT)
end
function cm.regop(e,tp)
local c = e:GetHandler()
local og = c:GetMaterial():Filter(cm.cfilter,nil)
for tc in aux.Next(og) do
c:CopyEffect(tc:GetOriginalCodeRule(),rsrst.std)
end
end
function cm.mvcon(e,tp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29010017)
end
function cm.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
end
function cm.seqfilter(c,seq,loc)
local cseq=c:GetSequence()
local cloc=c:GetLocation()
if seq <= 4 and cloc == loc and math.abs(cseq-seq) <= 1 then return true end
if seq <= 4 and cloc ~= loc and cseq == seq then return true end
if seq <= 4 and cloc == loc and loc == LOCATION_MZONE and cseq >= 5 and aux.MZoneSequence(cseq) == aux.MZoneSequence(seq) then return true end
if seq >= 5 and cloc == loc and loc == LOCATION_MZONE and aux.MZoneSequence(cseq) == aux.MZoneSequence(seq) then return true end
return false
end
function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local filter=0
for i = 0, 6 do
if Duel.IsExistingMatchingCard(cm.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i,LOCATION_MZONE) then
filter = filter | ((2^i) * 0x10000)
end
end
for i = 0, 4 do
if Duel.IsExistingMatchingCard(cm.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i,LOCATION_SZONE) then
filter = filter | ((2^i) * 0x100 * 0x10000)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,0xff7fff7f - filter) / 0x10000
local sloc = flag >= 0x100 and LOCATION_SZONE or LOCATION_MZONE
local seq = math.log(flag >= 0x100 and flag/0x100 or flag,2)
e:SetLabel(seq,sloc)
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq,sloc=e:GetLabel()
local g=Duel.GetMatchingGroup(cm.seqfilter,tp,0,LOCATION_ONFIELD,nil,seq,sloc)
if #g <= 0 then return end
local loc = 0
local zone = {[ LOCATION_SZONE ] = 0, [ LOCATION_MZONE ] = 0}
for tc in aux.Next(g) do
loc = tc:GetLocation()
zone[loc] = zone[loc]| aux.SequenceToGlobal(tc:GetControler(),loc,tc:GetSequence())
end
local dzone = zone[ LOCATION_SZONE ] | zone[ LOCATION_MZONE ]
if dzone > 0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE_FIELD)
e2:SetReset(rsrst.ep)
e2:SetValue(dzone)
Duel.RegisterEffect(e2,tp)
end
local tg,tc
local ft,xzone,xzone2,uzone = 0,0,0,{[ LOCATION_SZONE ] = 0, [ LOCATION_MZONE ] = 0}
repeat
ft = 0
rshint.Select(tp,HINTMSG_OPERATECARD)
tg = g:Select(1-tp,1,1,nil)
Duel.HintSelection(tg)
tc = tg:GetFirst()
loc = tc:GetLocation()
p = tc:GetControler()
xzone = xzone | uzone[loc]
xzone = zone[loc] > 0x10000 and zone[loc]/0x10000 or zone[loc]
xzone2 = xzone
xzone = xzone > 0x100 and xzone/0x100 or xzone
ft = Duel.GetLocationCount(p,loc,PLAYER_NONE,LOCATION_REASON_TOFIELD,0x1f - xzone)
if ft <= 0 then
Duel.SendtoGrave(tc,REASON_RULE)
else
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOZONE)
ft=Duel.SelectDisableField(p,1,loc,0,xzone2)
Duel.Hint(HINT_ZONE,1-p,ft)
Duel.Hint(HINT_ZONE,p,ft)
Duel.MoveSequence(tc,math.log(ft/(loc == LOCATION_SZONE and 0x100 or 0x1),2))
uzone[loc] = uzone[loc] | (ft * (p == tp and 0x1 or 0x10000))
end
g:RemoveCard(tc)
until #g == 0
end
\ No newline at end of file
--荒败之城 盐风
if not pcall(function() require("expansions/script/c29010000") end) then require("script/c29010000") end
local m,cm = rscf.DefineCard(29010022)
function cm.initial_effect(c)
rscf.AddTokenList(c,29010023)
--local e1 = rsef.A(c,nil,nil,nil,nil,nil,nil,nil,
--rsop.target(cm.cfilter,"dum",LOCATION_MZONE),cm.act)
local e1 = rsef.A(c,nil,nil,nil,nil,nil,nil,nil,nil,cm.act2)
local e2 = aux.EnableChangeCode(c,22702055)
local e3 = rsef.I(c,"tk",{1,m},"sp,tg,tk,se,th",nil,LOCATION_SZONE,
nil,rscost.paylp(800),
aux.AND(rstg.token(29010023,1,POS_FACEUP,1),
rsop.target(cm.thfilter,"th,tg",LOCATION_DECK)),cm.tkop)
end
function cm.thfilter(c)
return c:IsSetCard(0x87af) and c:IsAttribute(ATTRIBUTE_WATER) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function cm.tkop(e,tp)
if rssf.SpecialSummonToken(e,tp,29010023,1,1,POS_FACEUP,1-tp) <= 0 then return end
local og,tc = rsop.SelectCards("dum",tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if not tc then return end
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.act(e,tp)
local g = Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(rsrst.std_ep,2)
e1:SetValue(cm.xyzlv)
tc:RegisterEffect(e1)
if not tc:IsType(TYPE_EFFECT) and not tc:IsImmuneToEffect(e) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(rsrst.std_ep,2)
tc:RegisterEffect(e2,true)
end
end
end
function cm.xyzlv(e,c,rc)
return 0x80000+e:GetHandler():GetLevel()
end
function cm.act2(e,tp)
local c = e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.xyzlv)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(cm.cfilter))
e2:SetLabelObject(e1)
e2:SetReset(rsrst.ep,2)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(cm.cfilter))
e4:SetLabelObject(e3)
e4:SetReset(rsrst.ep,2)
Duel.RegisterEffect(e4,tp)
end
\ No newline at end of file
--海嗣衍生物
function c29010023.initial_effect(c)
end
--急袭猛禽-雷云猎鹰
if not pcall(function() require("expansions/script/c29010000") end) then require("script/c29010000") end
local m,cm = rscf.DefineCard(29010024)
function cm.initial_effect(c)
local e1 = rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"dam",nil,"atk,def,dam",
"de",cm.damcon,nil,cm.damtg,cm.damop)
local e2 = rsef.SV_Card(c,"mat",cm.check,"cd")
e2:SetLabelObject(e1)
local e3 = rsef.QO_NegateActivation(c,"dum",nil,LOCATION_MZONE,
cm.negcon,rscost.rmxmat(2),nil,nil,cm.extg,cm.exop)
end
function cm.check(e,c)
local mat = c:GetMaterial()
if mat:IsExists(cm.cfilter,1,nil) then
e:GetLabelObject():SetLabel(100)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.damcon(e,tp)
return e:GetLabel() == 100 and e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.cfilter(c)
return c:FieldPosCheck() and c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g = Duel.GetMatchingGroup(cm.cfilter,tp,rsloc.mg,0,nil)
if chk == 0 then return #g > 0 end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*250)
end
function cm.damop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c then return end
local g = Duel.GetMatchingGroup(cm.cfilter,tp,rsloc.mg,0,nil)
if #g <= 0 then return end
local e1,e2 = rscf.QuickBuff(c,"atk+,def+",#g*500)
local atk = c:GetAttack() / 2
if atk > 0 then
Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler() ~= e:GetHandler() and Duel.IsChainNegatable(ev)
end
function cm.extg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return e:GetHandler():IsType(TYPE_XYZ) end
end
function cm.exop(e,tp,eg,ep,ev,re,r,rp,chk)
if chk ~= 1 then return end
local rc = re:GetHandler()
local c = rscf.GetFaceUpSelf(e)
if c and c:IsType(TYPE_XYZ) and rc:IsRelateToEffect(re) then
rsop.Overlay(e,c,rc)
end
end
\ No newline at end of file
--急袭猛禽-穹顶轰击
if not pcall(function() require("expansions/script/c29010000") end) then require("script/c29010000") end
local m,cm = rscf.DefineCard(29010025)
function cm.initial_effect(c)
local e1 = rsef.A(c,nil,nil,nil,"sp","tg",nil,nil,
rstg.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.act)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetCondition(cm.imcon)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xba) and c:IsRankAbove(6) and rscf.spfilter2()(c,e,tp) and e:GetHandler():IsCanOverlay()
end
function cm.spfilter2(c,e,tp,matc)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,matc,c) > 0 and matc:IsCanBeXyzMaterial(c)
and c:IsRank(matc:GetRank() + 1) and aux.MustMaterialCheck(matc,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsSetCard(0xba)
end
function cm.act(e,tp)
local c,tc = rscf.GetSelf(e), rscf.GetTargetCard()
if not tc or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) <= 0 or not tc:IsType(TYPE_XYZ) or not c or rsop.Overlay(e,tc,c) <= 0 then return end
rsop.SelectExPara("sp",true)
local og,sc = rsop.SelectCards("sp",tp,cm.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if not sc then return end
rsop.Overlay(nil,sc,tc,true,true)
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function cm.imcon(e)
return e:GetHandler():IsSetCard(0xba)
end
\ No newline at end of file
--急袭猛禽-侦察林鸮
if not pcall(function() require("expansions/script/c29010000") end) then require("script/c29010000") end
local m,cm = rscf.DefineCard(29010026)
function cm.initial_effect(c)
c:EnableReviveLimit()
c:SetSPSummonOnce(m)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_XYZ),1)
local e2 = rsef.I(c,"th",1,"se,th",nil,LOCATION_MZONE,cm.thcon,
nil,rsop.target(aux.TRUE,"dum",0,LOCATION_HAND),cm.thop)
end
function cm.thcon(e,tp)
local c = e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thop(e,tp)
local e1 = rsef.FV_Player({e:GetHandler(),tp},"act~",cm.imval,
nil,{1,0},nil,nil,nil,rsrst.ep)
local hg = Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if #hg <= 0 then return end
local cg = hg:RandomSelect(tp,1)
Duel.HintSelection(cg)
Duel.ConfirmCards(tp,cg)
local tc = cg:GetFirst()
rsop.SelectExPara("th",true)
rsop.SelectOperate("th",tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{},tc)
end
function cm.thfilter(c,tc)
local list = { TYPE_SPELL,TYPE_TRAP,TYPE_MONSTER }
for _,ctype in pairs(list) do
if c:IsType(ctype) and not tc:IsType(ctype) then return false end
end
return c:IsSetCard(0xba) and c:IsAbleToHand()
end
function cm.imval(e,re)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_DARK)
end
\ No newline at end of file
--驱动装·山吹
function c29010028.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCondition(c29010028.discon)
e1:SetOperation(c29010028.disop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetTarget(c29010028.desreptg)
e2:SetValue(c29010028.desrepval)
e2:SetOperation(c29010028.desrepop)
c:RegisterEffect(e2)
--damage reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetTargetRange(1,0)
e3:SetValue(c29010028.damval2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetCondition(c29010028.damcon)
c:RegisterEffect(e4)
end
function c29010028.damval2(e,re,val,r,rp,rc)
local c=e:GetHandler()
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.GetFlagEffect(tp,29010028)==0 then
Duel.Hint(HINT_CARD,0,29010028)
Duel.RegisterFlagEffect(tp,29010028,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(29010028,0))
return 0
end
return val
end
function c29010028.damcon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetFlagEffect(tp,29010028)==0 and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c29010028.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c29010028.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c29010028.repfilter,1,nil,tp)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.GetFlagEffect(tp,29010028)==0 end
return true
end
function c29010028.desrepval(e,c)
return c29010028.repfilter(c,e:GetHandlerPlayer())
end
function c29010028.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,29010028,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(29010028,0))
Duel.Hint(HINT_CARD,0,29010028)
end
function c29010028.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fe=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
return rp==1-tp and fe:GetHandlerPlayer()==tp and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.GetFlagEffect(tp,29010028)==0
end
function c29010028.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29010028)
Duel.NegateActivation(ev)
Duel.RegisterFlagEffect(tp,29010028,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(29010028,0))
end
--无限零·始之冠
function c29060000.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),9,9)
c:EnableReviveLimit()
--win
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c29060000.wincon)
e1:SetOperation(c29060000.winop)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c29060000.sumsuc)
c:RegisterEffect(e2)
end
function c29060000.wincon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetHandler():GetMaterialCount()>0 and e:GetHandler():GetMaterial():GetClassCount(Card.GetCode)==e:GetHandler():GetMaterialCount()
end
function c29060000.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_CREATORGOD=0x1
local p=e:GetHandler():GetSummonPlayer()
Duel.Win(p,WIN_REASON_ZERO)
end
function c29060000.sumsuc(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) then return end
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
--勿忘我
function c29065501.initial_effect(c)
aux.AddCodeList(c,29065577)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065577,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCountLimit(1,29065501)
e1:SetCondition(c29065501.spcon)
e1:SetTarget(c29065501.sptg1)
e1:SetOperation(c29065501.spop1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065577,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,29065501)
e2:SetCondition(c29065501.spcon)
e2:SetTarget(c29065501.sptg2)
e2:SetOperation(c29065501.spop2)
c:RegisterEffect(e2)
end
function c29065501.cfilter1(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSetCard(0x87af)
and c:IsPreviousPosition(POS_FACEUP) and c:IsLocation(LOCATION_HAND+LOCATION_DECK)
end
function c29065501.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29065501.cfilter1,1,nil,tp)
end
function c29065501.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x87af) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c29065501.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c29065501.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x87af) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c29065501.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c29065501.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if Duel.IsExistingMatchingCard(c29065501.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c29065501.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
end
local res=Duel.IsExistingMatchingCard(c29065501.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c29065501.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29065501.spop1(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c29065501.filter1,nil,e)
if Duel.IsExistingMatchingCard(c29065501.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c29065501.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
end
local sg1=Duel.GetMatchingGroup(c29065501.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c29065501.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c29065501.actlimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c29065501.spfilter1(c,e,tp)
return c:IsCode(29065502) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065501.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065501.spfilter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and (Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) or Duel.IsCanRemoveCounter(tp,1,0,0x87ae,2,REASON_EFFECT)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c29065501.spop2(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065501.spfilter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and (Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) or Duel.IsCanRemoveCounter(tp,1,0,0x87ae,2,REASON_EFFECT))) then return end
local pd1=0
local pd2=0
local op
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) then pd1=1 end
if Duel.IsCanRemoveCounter(tp,1,0,0x87ae,2,REASON_EFFECT) then pd2=1 end
if pd1>0 and pd2>0 then
op=Duel.SelectOption(tp,aux.Stringid(29065501,3),aux.Stringid(29065501,4))
elseif pd1>0 then op=0
else op=1
end
local pd3=0
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil)
Duel.Release(g,REASON_EFFECT)
pd3=1
else
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x87ae,2,REASON_EFFECT)
pd3=1
end
if pd3==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c29065501.spfilter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c29065501.actlimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c29065501.actlimit(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0x87af)
end
--方舟之骑士·迷迭香
function c29065502.initial_effect(c)
c:SetSPSummonOnce(29065502)
c:EnableCounterPermit(0x87ae)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c29065502.splimit)
c:RegisterEffect(e0)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065502,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065501)
e1:SetCost(c29065502.spcost)
e1:SetTarget(c29065502.sptg)
e1:SetOperation(c29065502.spop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065502,2))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,29065501)
e2:SetCost(c29065502.setcost)
e2:SetTarget(c29065502.settg)
e2:SetOperation(c29065502.setop)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065502,3))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(c29065502.descost)
e3:SetTarget(c29065502.destg)
e3:SetOperation(c29065502.desop)
c:RegisterEffect(e3)
end
function c29065502.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsCode(29065502,29065501)
end
function c29065502.cfilter(c)
return c:IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_ONFIELD,0,1,c)
end
function c29065502.check(g)
return g:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
end
function c29065502.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c29065502.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and (Duel.IsExistingMatchingCard(c29065502.cfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.IsCanRemoveCounter(tp,1,0,0x87ae,6,REASON_EFFECT)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29065502.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not Duel.IsExistingMatchingCard(c29065502.cfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.IsCanRemoveCounter(tp,1,0,0x87ae,6,REASON_EFFECT) then return end
local pd1=Duel.IsExistingMatchingCard(c29065502.cfilter,tp,LOCATION_MZONE,0,1,nil)
local pd2=Duel.IsCanRemoveCounter(tp,1,0,0x87ae,6,REASON_EFFECT)
if pd1 and pd2 then
op=Duel.SelectOption(tp,aux.Stringid(29065501,3),aux.Stringid(29065501,4))
else if pd1 then op=0
else op=1
end
if op==0 then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeckAsCost,tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:SelectSubGroup(tp,c29065502.check,false,2,2)
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x87ae,6,REASON_EFFECT)
end
end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c29065502.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c29065502.tffilter(c,tp)
return c:IsCode(29065501) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c29065502.tdfilter(c)
return c:IsAbleToDeck() and c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)
end
function c29065502.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c29065502.tffilter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c29065502.tdfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
end
function c29065502.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not Duel.IsExistingMatchingCard(c29065502.tdfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c29065502.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,c29065502.tdfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoDeck(g2,nil,2,REASON_EFFECT)
end
function c29065502.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x87ae,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x87ae,1,REASON_COST)
end
function c29065502.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function c29065502.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
--
function c29065571.initial_effect(c)
aux.AddCodeList(c,29065577)
c:EnableCounterPermit(0x11ae)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,29065577,c29065571.fusfilter,1,false,false)
--atk def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87af))
e1:SetValue(800)
e1:SetCondition(c29065571.adcon1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87af))
e1:SetValue(1600)
e1:SetCondition(c29065571.adcon2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--disable
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetTarget(c29065571.target)
e6:SetCondition(c29065571.condition)
e6:SetOperation(c29065571.activate)
e6:SetCountLimit(1)
c:RegisterEffect(e6)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(c29065571.lrop)
c:RegisterEffect(e4)
end
function c29065571.fusfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsRace(RACE_DRAGON)
end
function c29065571.adcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(29065571)<=0
end
function c29065571.adcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(29065571)>0
end
function c29065571.ckfil(c)
return c:IsSetCard(0x87af) and not c:IsCode(29065571)
end
function c29065571.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.IsChainNegatable(ev) and rc:GetControler()~=tp and Duel.IsExistingMatchingCard(c29065571.ckfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c29065571.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
Duel.SetChainLimit(c29065571.chlimit)
end
end
function c29065571.chlimit(e,ep,tp)
return tp==ep
end
function c29065571.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(29065571,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(29065571,0))
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c29065571.lrop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) then return false end
end
\ No newline at end of file
--方舟之骑士·凯尔希
function c29065572.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065572,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065572)
e1:SetCost(c29065572.spcost)
e1:SetTarget(c29065572.sptg)
e1:SetOperation(c29065572.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065572,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000003)
e2:SetTarget(c29065572.thtg1)
e2:SetOperation(c29065572.thop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065572.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065572,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000004)
e4:SetCondition(c29065572.thcon)
e4:SetTarget(c29065572.thtg)
e4:SetOperation(c29065572.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065572.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x11ae,2,REASON_COST) or Duel.IsPlayerAffectedByEffect(tp,29065592) end
if Duel.IsPlayerAffectedByEffect(tp,29065592) and (not Duel.IsCanRemoveCounter(tp,1,0,0x11ae,2,REASON_COST) or Duel.SelectYesNo(tp,aux.Stringid(29065592,0))) then
Duel.RegisterFlagEffect(tp,29065592,RESET_PHASE+PHASE_END,0,1)
else
Duel.RemoveCounter(tp,1,0,0x11ae,2,REASON_COST)
end
end
function c29065572.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c29065572.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
e:GetHandler():AddCounter(0x11ae,n)
end
end
function c29065572.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065572.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065572.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065572.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065572.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065572.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
function c29065572.xthfilter(c)
return c:IsSetCard(0x87af) and not c:IsCode(29065572) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c29065572.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065572.xthfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065572.athfilter(c,tp)
return c:IsSetCard(0x87af) and c:GetType()==0x20002
and c:GetActivateEffect():IsActivatable(tp)
end
function c29065572.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29065572.xthfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,29065577) and Duel.IsExistingMatchingCard(c29065572.athfilter,tp,LOCATION_DECK,0,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(29065572,0)) then
local tc=Duel.SelectMatchingCard(tp,c29065572.athfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
local tg=te:GetTarget()
local op=te:GetOperation()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
if tg then tg(te,tep,eg,ep,ev,re,r,rp,1) end
if op then op(te,tep,eg,ep,ev,re,r,rp) end
end
end
end
\ No newline at end of file
--塔露拉·不死的黑蛇
function c29065573.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,c29065573.fusfilter1,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),2,99,true)
--Damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,29065573)
e1:SetCondition(c29065573.discon)
e1:SetTarget(c29065573.distg)
e1:SetOperation(c29065573.disop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CUSTOM+29065573)
e2:SetCountLimit(1,29000005)
e2:SetTarget(c29065573.detg)
e2:SetOperation(c29065573.deop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c29065573.reptg)
e3:SetOperation(c29065573.repop)
c:RegisterEffect(e3)
end
function c29065573.fusfilter1(c)
return c:IsSetCard(0x87af) and c:IsRace(RACE_DRAGON)
end
function c29065573.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c29065573.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local atk=eg:GetSum(Card.GetBaseAttack)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c29065573.disop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c29065573.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
return true
end
function c29065573.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29065573)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+29065573,e,0,0,tp,0)
end
function c29065573.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c29065573.deop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
--怒号光明
function c29065574.initial_effect(c)
aux.AddCodeList(c,29065577)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065574,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,29065574+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c29065574.cost)
e1:SetTarget(c29065574.target)
e1:SetOperation(c29065574.activate)
c:RegisterEffect(e1)
end
function c29065574.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 c29065574.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c29065574.mxfil(c)
return (c:IsCode(29065577) or (c:IsSetCard(0x87af) and c:IsRace(RACE_DRAGON))) and c:IsAbleToRemove()
end
function c29065574.nxfil(c)
return c:IsLocation(LOCATION_ONFIELD) or c:IsLocation(LOCATION_GRAVE)
end
function c29065574.filter(c,e,tp,m,f,chkf)
if c:IsSetCard(0x87af) then
m4=Duel.GetMatchingGroup(c29065574.mxfil,tp,LOCATION_DECK,0,nil)
m:Merge(m4)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsSetCard(0x87af)
else
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m:Filter(c29065574.nxfil,nil),nil,chkf)
end
end
function c29065574.filter2(c,e)
return not c:IsImmuneToEffect(e)
end
function c29065574.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function c29065574.xyzfil(c,e,tp)
local att=c:GetAttribute()
local rc=c:GetRace()
return c:IsSetCard(0x87af) and Duel.IsExistingMatchingCard(c29065574.xzfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,att,rc) and c:IsLevelBelow(6)
end
function c29065574.xzfil(c,e,tp,mc,att,rc)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsRace(rc) and c:IsAttribute(att) and c:IsRank(8) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c29065574.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c29065574.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c29065574.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c29065574.target(e,tp,eg,ep,ev,re,r,rp,chk)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c29065574.filter0,nil)
local mg2=Duel.GetMatchingGroup(c29065574.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
Auxiliary.FCheckAdditional=c29065574.fcheck
local res=Duel.IsExistingMatchingCard(c29065574.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c29065574.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
Auxiliary.FCheckAdditional=nil
local xg=Duel.GetMatchingGroup(c29065574.xyzfil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,e,tp)
if Duel.IsExistingMatchingCard(c29065574.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local xxg=Duel.GetMatchingGroup(c29065574.xyzfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
xg:Merge(xxg)
end
local xyz=xg:GetCount()>0
if chk==0 then return res or xyz end
local op=0
if res and xyz then
op=Duel.SelectOption(tp,aux.Stringid(29065574,0),aux.Stringid(29065574,1))
elseif res then
op=Duel.SelectOption(tp,aux.Stringid(29065574,0))
elseif xyz then
op=Duel.SelectOption(tp,aux.Stringid(29065574,1))+1
end
e:SetLabel(op)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29065574.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c29065574.filter0,nil)
local mg2=Duel.GetMatchingGroup(c29065574.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
Auxiliary.FCheckAdditional=c29065574.fcheck
local sg1=Duel.GetMatchingGroup(c29065574.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c29065574.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if tc:IsSetCard(0x87af) then
mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
else
mat1=Duel.SelectFusionMaterial(tp,tc,mg1:Filter(c29065574.nxfil,nil),nil,chkf)
end
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
tc:RegisterFlagEffect(29065574,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabel(Duel.GetTurnCount()+1)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetCondition(c29065574.rmcon)
e2:SetOperation(c29065574.rmop)
Duel.RegisterEffect(e2,tp)
end
Auxiliary.FCheckAdditional=nil
else
local xg=Duel.GetMatchingGroup(c29065574.xyzfil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,e,tp)
if Duel.IsExistingMatchingCard(c29065574.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local xxg=Duel.GetMatchingGroup(c29065574.xyzfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
xg:Merge(xxg)
end
if xg:GetCount()>0 then
local tc=xg:Select(tp,1,1,nil):GetFirst()
local rc=tc:GetRace()
local att=tc:GetAttribute()
local xc=Duel.SelectMatchingCard(tp,c29065574.xzfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,att,rc):GetFirst()
Duel.SpecialSummonStep(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(xc,tc)
e:GetHandler():CancelToGrave()
Duel.Overlay(xc,e:GetHandler())
Duel.SpecialSummonComplete()
xc:CompleteProcedure()
xc:RegisterFlagEffect(29065574,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabel(Duel.GetTurnCount()+1)
e2:SetLabelObject(xc)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetCondition(c29065574.rmcon)
e2:SetOperation(c29065574.rmop)
Duel.RegisterEffect(e2,tp)
end
end
end
function c29065574.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(29065574)~=0 then
return Duel.GetTurnCount()==e:GetLabel()
else
e:Reset()
return false
end
end
function c29065574.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
\ No newline at end of file
--驶向明日的方舟
function c29065576.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:SetTarget(c29065576.target)
e1:SetOperation(c29065576.activate)
c:RegisterEffect(e1)
end
function c29065576.filter(c)
return c:IsSetCard(0x87af) and c:IsAbleToHand()
end
function c29065576.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065576.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065576.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29065576.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 c29065577.initial_effect(c)
aux.AddCodeList(c,29065577)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065577,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065577)
e1:SetCost(c29065577.spcost)
e1:SetTarget(c29065577.sptg)
e1:SetOperation(c29065577.spop)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065577,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000006)
e2:SetCost(c29065577.cocost)
e2:SetTarget(c29065577.cotg)
e2:SetOperation(c29065577.coop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065577,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000007)
e4:SetCondition(c29065577.thcon)
e4:SetTarget(c29065577.thtg)
e4:SetOperation(c29065577.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065577.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.IsPlayerAffectedByEffect(tp,29065592) end
if Duel.IsPlayerAffectedByEffect(tp,29065592) and (not Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.SelectYesNo(tp,aux.Stringid(29065592,0))) then
Duel.RegisterFlagEffect(tp,29065592,RESET_PHASE+PHASE_END,0,1)
else
Duel.RemoveCounter(tp,1,0,0x11ae,1,REASON_COST)
end
end
function c29065577.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c29065577.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29065577.efil(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and not c:IsCode(29065577)) then return false end
local m=_G["c"..c:GetCode()]
if not m then return false end
local te=m.summon_effect if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c29065577.cocost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065577.efil,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.SelectMatchingCard(tp,c29065577.efil,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,re,r,rp):GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
e:SetLabelObject(tc)
end
function c29065577.cotg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
local tc=e:GetLabelObject()
tc:CreateEffectRelation(e)
local m=_G["c"..tc:GetCode()]
local te=m.summon_effect
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
function c29065577.coop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
local m=_G["c"..tc:GetCode()]
local te=m.summon_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp)
end
end
function c29065577.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065577.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065577.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065577.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065577.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065577.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
\ No newline at end of file
--方舟骑士·梓兰
function c29065578.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--to deck to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065578,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,19065578)
e2:SetTarget(c29065578.tttg)
e2:SetOperation(c29065578.ttop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065578.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9065578,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000008)
e4:SetCondition(c29065578.thcon)
e4:SetTarget(c29065578.thtg)
e4:SetOperation(c29065578.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065578.tdfil(c)
return c:IsSetCard(0x87af) and c:IsAbleToDeck()
end
function c29065578.thfil(c)
return c:IsSetCard(0x87af) and c:IsAbleToHand()
end
function c29065578.tttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065578.tdfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c29065578.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065578.ttop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c29065578.tdfil,tp,LOCATION_GRAVE,0,1,99,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
local hg=Duel.GetMatchingGroup(c29065578.thfil,tp,LOCATION_DECK,0,nil)
if hg:GetCount()>0 then
tc=hg:RandomSelect(tp,1):GetFirst()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c29065578.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065578.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065578.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065578.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065578.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065578.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
--方舟骑士·桃金娘
function c29065579.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065579,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065579)
e1:SetCost(c29065579.spcost)
e1:SetTarget(c29065579.sptg)
e1:SetOperation(c29065579.spop)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065579,2))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000009)
e2:SetTarget(c29065579.cttg)
e2:SetOperation(c29065579.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065579.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065579,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000010)
e4:SetCondition(c29065579.thcon)
e4:SetTarget(c29065579.thtg)
e4:SetOperation(c29065579.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065579.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.IsPlayerAffectedByEffect(tp,29065592) end
if Duel.IsPlayerAffectedByEffect(tp,29065592) and (not Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.SelectYesNo(tp,aux.Stringid(29065592,0))) then
Duel.RegisterFlagEffect(tp,29065592,RESET_PHASE+PHASE_END,0,1)
else
Duel.RemoveCounter(tp,1,0,0x11ae,1,REASON_COST)
end
end
function c29065579.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c29065579.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29065579.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local n=2
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,n,0,0x11ae)
end
function c29065579.refilter(c)
return c:IsSetCard(0x87af) and c:GetBaseAttack()>0
end
function c29065579.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local n=2
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
e:GetHandler():AddCounter(0x11ae,n)
end
if Duel.IsExistingMatchingCard(c29065579.refilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29065579,1)) then
local tc=Duel.SelectMatchingCard(tp,c29065579.refilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
local atk=tc:GetBaseAttack()
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
function c29065579.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065579.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065579.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065579.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065579.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065579.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
\ No newline at end of file
--方舟骑士·风笛
function c29065580.initial_effect(c)
c:EnableCounterPermit(0x11ae)
c:SetSPSummonOnce(29065580)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x87af),2,2)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065580,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c29065580.cocon)
e1:SetOperation(c29065580.coop)
c:RegisterEffect(e1)
--counter
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e5:SetCost(c29065580.thcost)
e5:SetTarget(c29065580.thtg)
e5:SetOperation(c29065580.thop)
c:RegisterEffect(e5)
--COUNTER
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(29065580)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
end
function c29065580.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,2)
end
function c29065580.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c29065580.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065580.thfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
end
function c29065580.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065580.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=2
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
function c29065580.cocon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsCanAddCounter(0x11ae,1) and e:GetHandler():IsRelateToBattle()
end
function c29065580.coop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
c:AddCounter(0x11ae,n)
end
--阿米娅·奇美拉
function c29065581.initial_effect(c)
aux.AddCodeList(c,29065577)
c:EnableCounterPermit(0x11ae)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c29065581.lvtg)
e1:SetValue(c29065581.lvval)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(29065577)
c:RegisterEffect(e2)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
e3:SetCondition(c29065581.con)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c29065581.stcon)
e4:SetTarget(c29065581.sttg)
e4:SetOperation(c29065581.stop)
c:RegisterEffect(e4)
--to grave
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e5:SetCondition(c29065581.stcon)
e5:SetCost(c29065581.tgcost)
e5:SetTarget(c29065581.tgtg)
e5:SetOperation(c29065581.tgop)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetOperation(c29065581.lrop)
c:RegisterEffect(e6)
end
function c29065581.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x11ae)>0 and c:IsSetCard(0x87af)
end
function c29065581.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 8
else return lv end
end
function c29065581.con(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c29065581.stcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065577)
end
function c29065581.stfil(c,e)
return c:IsSSetable(false) and (c:IsSetCard(0x87af) or aux.IsCodeListed(c,29065577)) and c:IsType(TYPE_SPELL)
end
function c29065581.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065581.stfil,tp,LOCATION_DECK,0,1,nil) end
end
function c29065581.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,c29065581.stfil,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c29065581.tgcost(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 c29065581.tgfil(c)
return c:IsAbleToGrave()
end
function c29065581.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065581.tgfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD)
end
function c29065581.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c29065581.tgfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c29065581.lrop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) then return false end
end
--方舟骑士·陈
function c29065582.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065582,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065582)
e1:SetCost(c29065582.spcost)
e1:SetTarget(c29065582.sptg)
e1:SetOperation(c29065582.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065582,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000011)
e2:SetTarget(c29065582.sptg1)
e2:SetOperation(c29065582.spop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065582.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065582,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000012)
e4:SetCondition(c29065582.thcon)
e4:SetTarget(c29065582.thtg)
e4:SetOperation(c29065582.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065582.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x11ae,2,REASON_COST) or Duel.IsPlayerAffectedByEffect(tp,29065592) end
if Duel.IsPlayerAffectedByEffect(tp,29065592) and (not Duel.IsCanRemoveCounter(tp,1,0,0x11ae,2,REASON_COST) or Duel.SelectYesNo(tp,aux.Stringid(29065592,0))) then
Duel.RegisterFlagEffect(tp,29065592,RESET_PHASE+PHASE_END,0,1)
else
Duel.RemoveCounter(tp,1,0,0x11ae,2,REASON_COST)
end
end
function c29065582.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c29065582.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
e:GetHandler():AddCounter(0x11ae,n)
end
end
function c29065582.spfilter(c,e,tp)
return c:IsSetCard(0x87af) and not c:IsCode(29065582) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_DECK) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,29065577)))
end
function c29065582.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065582.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29065582.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,c29065582.spfilter,tp,LOCATION_DECK+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 c29065582.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065582.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065582.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065582.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065582.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065582.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
\ No newline at end of file
--陈·赤龙绝影
function c29065583.initial_effect(c)
aux.AddCodeList(c,29065582)
c:EnableCounterPermit(0x11ae)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c29065583.lvtg)
e1:SetValue(c29065583.lvval)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(29065582)
c:RegisterEffect(e2)
--extra attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetCondition(c29065583.eatcon)
e3:SetValue(1)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c29065583.discon)
e4:SetOperation(c29065583.disop)
c:RegisterEffect(e4)
--disable
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetTarget(c29065583.target)
e6:SetCondition(c29065583.condition)
e6:SetOperation(c29065583.activate)
e6:SetCountLimit(1)
c:RegisterEffect(e6)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetOperation(c29065583.lrop)
c:RegisterEffect(e6)
end
function c29065583.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x11ae)>0 and c:IsSetCard(0x87af)
end
function c29065583.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 8
else return lv end
end
function c29065583.eatcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c29065583.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsExists(Card.IsSetCard,1,nil,0x87af) then return false end
return re:GetHandler():GetControler()~=tp and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065582)
end
function c29065583.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c29065583.ckfil(c)
return c:IsSetCard(0x87af) and not c:IsCode(29065583)
end
function c29065583.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.IsChainNegatable(ev) and rc:GetControler()~=tp and Duel.IsExistingMatchingCard(c29065583.ckfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065582)
end
function c29065583.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
e:GetHandler():RegisterFlagEffect(29065583,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(29065583,0))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c29065583.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c29065583.lrop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) then return false end
end
\ No newline at end of file
--方舟骑士·煌
function c29065584.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065584,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,29065584)
e1:SetCondition(c29065584.con)
e1:SetTarget(c29065584.sptg1)
e1:SetOperation(c29065584.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065584,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c29065584.spcost)
e2:SetTarget(c29065584.sptg)
e2:SetOperation(c29065584.spop)
c:RegisterEffect(e2)
end
function c29065584.con(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c29065584.spfilter(c,e,tp)
return c:IsSetCard(0x87af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065584.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065584.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
local op=0
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,29065577) then
op=1
else
op=0
end
e:SetLabel(op)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,n,0,0x11ae)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29065584.spop1(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29065584.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)
if op==1 and Duel.IsExistingMatchingCard(c29065584.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(29065584,0)) then
local xc=Duel.SelectMatchingCard(tp,c29065584.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(xc,0,tp,tp,false,false,POS_FACEUP)
g:AddCard(xc)
end
Duel.BreakEffect()
local tc=g:GetFirst()
while tc do
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
tc=g:GetNext()
end
end
end
function c29065584.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x11ae,2,REASON_COST) or Duel.IsPlayerAffectedByEffect(tp,29065592) end
if Duel.IsPlayerAffectedByEffect(tp,29065592) and (not Duel.IsCanRemoveCounter(tp,1,0,0x11ae,2,REASON_COST) or Duel.SelectYesNo(tp,aux.Stringid(29065592,0))) then
Duel.RegisterFlagEffect(tp,29065592,RESET_PHASE+PHASE_END,0,1)
else
Duel.RemoveCounter(tp,1,0,0x11ae,2,REASON_COST)
end
end
function c29065584.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c29065584.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--煌·沸腾爆裂
function c29065585.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c29065585.lvtg)
e1:SetValue(c29065585.lvval)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(29065584)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065585,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c29065585.stgtarget)
e3:SetOperation(c29065585.stgoperation)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c29065585.indct)
c:RegisterEffect(e4)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c29065585.discon)
e4:SetOperation(c29065585.disop)
c:RegisterEffect(e4)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetOperation(c29065585.lrop)
c:RegisterEffect(e6)
end
function c29065585.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x11ae)>0 and c:IsSetCard(0x87af)
end
function c29065585.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 8
else return lv end
end
function c29065585.dfil(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
end
function c29065585.stgtarget(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=e:GetHandler():GetAttack()
if chk==0 then return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065584) and Duel.GetMatchingGroupCount(c29065585.dfil,tp,0,LOCATION_MZONE,nil,atk)>=1 end
local g=Duel.GetMatchingGroup(c29065585.dfil,tp,0,LOCATION_MZONE,nil,atk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c29065585.stgoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetHandler():GetAttack()
local g=Duel.GetMatchingGroup(c29065585.dfil,tp,0,LOCATION_MZONE,nil,atk)
local x=Duel.Destroy(g,REASON_EFFECT)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(x*500)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
Duel.Damage(tp,x*500,REASON_EFFECT)
end
function c29065585.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c29065585.discon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return re:GetHandler():GetControler()~=tp and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065584) and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function c29065585.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c29065585.lrop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) then return false end
end
--方舟骑士·灰喉
function c29065586.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065586,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065586)
e1:SetCost(c29065586.spcost)
e1:SetTarget(c29065586.sptg)
e1:SetOperation(c29065586.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065586,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000013)
e2:SetTarget(c29065586.thtg1)
e2:SetOperation(c29065586.thop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065586.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065586,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000014)
e4:SetCondition(c29065586.thcon)
e4:SetTarget(c29065586.thtg)
e4:SetOperation(c29065586.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065586.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.IsPlayerAffectedByEffect(tp,29065592) end
if Duel.IsPlayerAffectedByEffect(tp,29065592) and (not Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.SelectYesNo(tp,aux.Stringid(29065592,0))) then
Duel.RegisterFlagEffect(tp,29065592,RESET_PHASE+PHASE_END,0,1)
else
Duel.RemoveCounter(tp,1,0,0x11ae,1,REASON_COST)
end
end
function c29065586.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c29065586.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29065586.xthfilter(c)
return c:IsSetCard(0x87af) and not c:IsCode(29065586) and c:IsAbleToHand()
end
function c29065586.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065586.xthfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c29065586.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c29065586.xthfilter,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 c29065586.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065586.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065586.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065586.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065586.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065586.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
--灰喉·回流
function c29065587.initial_effect(c)
aux.AddCodeList(c,29065586)
c:EnableCounterPermit(0x11ae)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c29065587.lvtg)
e1:SetValue(c29065587.lvval)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(29065586)
c:RegisterEffect(e2)
--extra attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e3:SetCondition(c29065587.eatcon)
e3:SetValue(2)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c29065587.akcon)
e4:SetValue(c29065587.akval)
c:RegisterEffect(e4)
--activate limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1)
e5:SetCondition(c29065587.actcon)
e5:SetValue(c29065587.actlimit)
c:RegisterEffect(e5)
end
function c29065587.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x11ae)>0 and c:IsSetCard(0x87af)
end
function c29065587.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 8
else return lv end
end
function c29065587.eatcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c29065587.akfil(c)
return c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)
end
function c29065587.akcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065586)
end
function c29065587.akval(e,c,rc)
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c29065587.akfil,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetCode)*400
end
function c29065587.actcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065586)
end
function c29065587.actlimit(e,re,tp)
return (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) or (re:GetHandler():IsType(TYPE_SPELL) or re:GetHandler():IsType(TYPE_TRAP))) and re:GetHandler():IsLocation(LOCATION_SZONE)
end
--方舟骑士·克洛丝
function c29065588.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065588,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065588)
e1:SetCondition(c29065588.spcon)
e1:SetCost(c29065588.spcost)
e1:SetTarget(c29065588.sptg)
e1:SetOperation(c29065588.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065588,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000015)
e2:SetTarget(c29065588.sptg1)
e2:SetOperation(c29065588.spop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065588.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065588,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000016)
e4:SetCondition(c29065588.thcon)
e4:SetTarget(c29065588.thtg)
e4:SetOperation(c29065588.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065588.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsContains(c)
end
function c29065588.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c29065588.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c29065588.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c29065588.spfilter(c,e,tp)
return c:IsSetCard(0x87af) and c:IsCode(29065588) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065588.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065588.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29065588.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,c29065588.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
function c29065588.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065588.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065588.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065588.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065588.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065588.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
--方舟骑士·芬
function c29065589.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--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,29065589)
e1:SetCondition(c29065589.spcon)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065589,2))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000017)
e2:SetTarget(c29065589.cttg)
e2:SetOperation(c29065589.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065589.summon_effect=e2
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065589,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,29000018)
e4:SetCondition(c29065589.thcon)
e4:SetTarget(c29065589.thtg)
e4:SetOperation(c29065589.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065589.filter(c)
return c:IsFaceup() and c:IsSetCard(0x87af) and c:GetCode()~=29065589
end
function c29065589.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c29065589.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c29065589.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x11ae,1) end
end
function c29065589.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
e:GetHandler():AddCounter(0x11ae,n)
end
end
function c29065589.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065589.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065589.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065589.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065589.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065589.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
--长眠尽头的醒唤
function c29065590.initial_effect(c)
aux.AddCodeList(c,29065577)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCountLimit(1,29065590+EFFECT_COUNT_CODE_OATH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065590,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c29065590.thtg)
e2:SetOperation(c29065590.thop)
c:RegisterEffect(e2)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c29065590.desreptg)
e2:SetValue(c29065590.desrepval)
e2:SetOperation(c29065590.desrepop)
c:RegisterEffect(e2)
end
function c29065590.tdfil(c)
return c:IsAbleToHand() and c:IsSetCard(0x87af)
end
function c29065590.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(29065591) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c29065590.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetMatchingGroupCount(c29065590.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)>=1) or (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,29065577) and Duel.IsExistingMatchingCard(c29065590.spfil,tp,LOCATION_MZONE,0,1,nil,e,tp)) end
if (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,29065577) and Duel.IsExistingMatchingCard(c29065590.spfil,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)) and Duel.SelectYesNo(tp,aux.Stringid(29065590,0)) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,tp,0)
e:SetLabel(0)
else
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,0)
e:SetLabel(1)
end
end
function c29065590.thop(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==1 then
if Duel.GetMatchingGroupCount(c29065590.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)>0 then
local tc=Duel.SelectMatchingCard(tp,c29065590.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
else
local g=Duel.GetMatchingGroup(c29065590.spfil,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>=1 then
local xg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(xg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c29065590.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)
end
function c29065590.rmfil(c)
return c:IsAbleToRemove() and c:IsSetCard(0x87af) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL)
end
function c29065590.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c29065590.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c29065590.rmfil,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c29065590.desrepval(e,c)
return c29065590.repfilter(c,e:GetHandlerPlayer())
end
function c29065590.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c29065590.rmfil,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,29065590)
end
--方舟骑士·暴行
function c29065592.initial_effect(c)
c:SetSPSummonOnce(29065592)
c:EnableCounterPermit(0x11ae)
--link summon
aux.AddLinkProcedure(c,c29065592.mfilter,1,1)
c:EnableReviveLimit()
--COUNTER
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(29065592)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(c29065592.con)
c:RegisterEffect(e2)
end
function c29065592.mfilter(c)
return c:IsLevelAbove(5) and c:IsSetCard(0x87af)
end
function c29065592.con(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return Duel.GetFlagEffect(tp,29065592)<=0
end
--双龙呼争
function c29065595.initial_effect(c)
aux.AddCodeList(c,29065577)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29065595+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c29065595.cost)
e1:SetTarget(c29065595.target)
e1:SetOperation(c29065595.activate)
c:RegisterEffect(e1)
end
function c29065595.cofil(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x87af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
end
function c29065595.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065595.cofil,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
local g=Duel.SelectMatchingCard(tp,c29065595.cofil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)
end
function c29065595.thfil1(c)
local tp=c:GetControler()
return c:IsAbleToHand() and c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c29065595.thfil2,tp,LOCATION_DECK,0,1,c)
end
function c29065595.thfil2(c)
return c:IsAbleToHand() and c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DRAGON)
end
function c29065595.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)
end
function c29065595.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065595.thfil1,tp,LOCATION_DECK,0,1,nil) end
end
function c29065595.spfil(c,e,tp)
return (c:IsRace(RACE_DRAGON) or c:IsCode(29065577)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065595.fcheck(c,g)
return g:IsExists(Card.IsOriginalCodeRule,1,c,c:GetOriginalCodeRule())
end
function c29065595.fselect(g)
return not g:IsExists(c29065595.fcheck,1,nil,g) and g:IsExists(c29065595.thfil2,1,nil)
end
function c29065595.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29065595.thfil1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=1 then
local hg=Duel.GetMatchingGroup(c29065595.thfil,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=hg:SelectSubGroup(tp,c29065595.fselect,false,2,2,e,tp)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.IsExistingMatchingCard(c29065595.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(29065595,0)) then
tc=Duel.SelectMatchingCard(tp,c29065595.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c29065595.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c29065595.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x87af) and (re:GetHandler():IsType(TYPE_MONSTER))
end
\ No newline at end of file
--方舟之骑士·衾翼
function c29065596.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--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,29065596)
e1:SetCondition(c29065596.spcon)
e1:SetOperation(c29065596.spop)
c:RegisterEffect(e1)
--ANNOUNCE_CARD
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ANNOUNCE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000019)
e2:SetTarget(c29065596.cttg)
e2:SetOperation(c29065596.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065596.summon_effect=e2
end
function c29065596.rlfil(c)
return c:IsReleasable() and (c:IsSetCard(0xa900) or c:IsSetCard(0x87af)) and Duel.GetMZoneCount(tp,c)>0
end
function c29065596.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.IsExistingMatchingCard(c29065596.rlfil,tp,LOCATION_MZONE,0,1,nil)
end
function c29065596.spop(e,tp,eg,ep,ev,re,r,rp,c)
if Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(29065596,0)) then
Duel.RemoveCounter(tp,1,0,0x11ae,1,REASON_COST)
else
rg=Duel.SelectMatchingCard(tp,c29065596.rlfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(rg,REASON_COST)
end
end
function c29065596.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if chk==0 then return dcount~=0 and Duel.IsPlayerCanDraw(tp,1) end
end
function c29065596.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local ag=Group.CreateGroup()
local codes={}
for c in aux.Next(g) do
local code=c:GetCode()
if not ag:IsExists(Card.IsCode,1,nil,code) then
ag:AddCard(c)
table.insert(codes,code)
end
end
table.sort(codes)
--c:IsCode(codes[1])
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
--or ... or c:IsCode(codes[i])
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local xc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.ConfirmCards(0,xc)
if xc:IsCode(ac) and Duel.SelectYesNo(tp,aux.Stringid(29065596,3)) then
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87af))
e1:SetValue(0xa900)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
--年·众相之柱
function c29065597.initial_effect(c)
c:SetUniqueOnField(1,0,29065597)
c:EnableCounterPermit(0x11ae)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),12,12,c29065597.ovfilter,aux.Stringid(29065597,0))
c:EnableReviveLimit()
--cannot disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(c29065597.effcon)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065597,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,29000021)
e2:SetCost(c29065597.icost)
e2:SetTarget(c29065597.itarget)
e2:SetOperation(c29065597.ioperation)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(c29065597.lrop)
c:RegisterEffect(e4)
end
function c29065597.ovfilter(c)
local tp=c:GetControler()
local x=Duel.GetActivityCount(tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)+Duel.GetActivityCount(1-tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(1-tp,ACTIVITY_SPSUMMON)
return c:IsFaceup() and not c:IsCode(29065597) and x>=12 and c:IsType(TYPE_XYZ)
end
function c29065597.effcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c29065597.icost(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 c29065597.itarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
end
function c29065597.ioperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c:GetBaseAttack()*2)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_BASE_DEFENSE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c29065597.xxtg)
e1:SetValue(c29065597.val)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c29065597.efilter)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87af))
e1:SetReset(RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c29065597.xxtg(e,c)
return c~=e:GetHandler() and c:IsSetCard(0x87af)
end
function c29065597.val(e,c)
return c:GetBaseDefense()*2
end
function c29065597.efilter(e,te)
return te:GetOwner():GetControler()~=e:GetOwner():GetControler() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
function c29065597.lrop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) then return false end
end
--方舟的骑士·廷达
function c29065598.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--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,29065598)
e1:SetCondition(c29065598.spcon)
c:RegisterEffect(e1)
--ANNOUNCE_CARD
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ANNOUNCE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29000020)
e2:SetTarget(c29065598.cttg)
e2:SetOperation(c29065598.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065598.summon_effect=e2
end
function c29065598.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLP(tp)<=2000
end
function c29065598.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if chk==0 then return dcount~=0 and Duel.IsPlayerCanDraw(tp,1) end
end
function c29065598.refilter(c)
return c:IsSetCard(0x87af) and c:GetBaseAttack()>0
end
function c29065598.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local ag=Group.CreateGroup()
local codes={}
for c in aux.Next(g) do
local code=c:GetCode()
if not ag:IsExists(Card.IsCode,1,nil,code) then
ag:AddCard(c)
table.insert(codes,code)
end
end
table.sort(codes)
--c:IsCode(codes[1])
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
--or ... or c:IsCode(codes[i])
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local xc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.ConfirmCards(0,xc)
if xc:IsCode(ac) and Duel.SelectYesNo(tp,aux.Stringid(29065598,3)) then
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87af))
e1:SetValue(0xf36)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
---夕·虚实之笔
function c29065599.initial_effect(c)
c:SetUniqueOnField(1,0,29065599)
c:EnableCounterPermit(0x11ae)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),12,12,c29065599.ovfilter,aux.Stringid(29065599,0))
c:EnableReviveLimit()
--cannot disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(c29065599.effcon)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065599,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,29000022)
e2:SetCost(c29065599.icost)
e2:SetTarget(c29065599.itarget)
e2:SetOperation(c29065599.ioperation)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(c29065599.lrop)
c:RegisterEffect(e4)
end
function c29065599.ovfilter(c)
local tp=c:GetControler()
local x=Duel.GetActivityCount(tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)+Duel.GetActivityCount(1-tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(1-tp,ACTIVITY_SPSUMMON)
return c:IsFaceup() and not c:IsCode(29065597) and x>=12 and c:IsType(TYPE_XYZ)
end
function c29065599.effcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c29065599.icost(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 c29065599.itarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
end
function c29065599.ioperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c29065599.efilter)
e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetTargetRange(0,1)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--cannot mset
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_MSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
--poschange
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true)
end
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_SET_POSITION)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetValue(POS_FACEUP_ATTACK)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
end
function c29065599.efilter(e,te,c)
return te:GetOwner()~=c and te:GetOwnerPlayer()~=e:GetOwnerPlayer()
end
function c29065599.lrop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) then return false end
end
--战械人形 M4A1
function c29065600.initial_effect(c)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_SEARCH)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,29065600)
e1:SetTarget(c29065600.eqtg)
e1:SetOperation(c29065600.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065600,1))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c29065600.rettg)
e3:SetOperation(c29065600.retop)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c29065600.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c29065600.eqfil(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function c29065600.thfil(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x87ad) and not c:IsCode(29065600)
end
function c29065600.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065600.eqfil,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function c29065600.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29065600.eqfil,tp,LOCATION_HAND,0,nil)
if g:GetCount()<=0 then return end
local tc=g:Select(tp,1,1,nil):GetFirst()
if Duel.Equip(tp,tc,c) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29065600.eqlimit)
tc:RegisterEffect(e1)
local g1=Duel.GetMatchingGroup(c29065600.thfil,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(29065600,0)) then
local hg=g1:Select(tp,1,1,nil)
Duel.SendtoHand(hg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end
end
function c29065600.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(0x87ad)
end
function c29065600.exqfil(c)
return c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function c29065600.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c29065600.exqfil,tp,0,LOCATION_MZONE,1,nil) end
local g=nil
if c:IsType(TYPE_XYZ) then
g=Duel.SelectTarget(tp,c29065600.exqfil,tp,0,LOCATION_MZONE,1,2,nil)
else
g=Duel.SelectTarget(tp,c29065600.exqfil,tp,0,LOCATION_MZONE,1,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,g:GetCount(),0,0)
end
function c29065600.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
while tc do
Duel.Equip(tp,tc,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29065600.eqlimit)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
end
end
function c29065600.eqlimit(e,c)
return e:GetOwner()==c
end
--战械人形 M4
function c29065601.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,29065601)
e1:SetTarget(c29065601.sptg)
e1:SetOperation(c29065601.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE)
e2:SetTarget(c29065601.desreptg)
e2:SetValue(c29065601.desrepval)
e2:SetOperation(c29065601.desrepop)
c:RegisterEffect(e2)
end
function c29065601.spfil(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x87ad) and not c:IsCode(29065601)
end
function c29065601.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetEquipTarget()~=nil and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_SZONE)
end
function c29065601.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(c29065601.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(29065601,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29065601.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsSetCard(0x87ad)
end
function c29065601.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c29065601.repfilter,1,nil,tp)
and e:GetHandler():IsAbleToRemove() end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c29065601.desrepval(e,c)
return c29065601.repfilter(c,e:GetHandlerPlayer())
end
function c29065601.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,29065601)
end
--战械人形 SOPMODII
function c29065602.initial_effect(c)
--special summon while equipped
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065602,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,29065602)
e2:SetTarget(c29065602.sptg)
e2:SetOperation(c29065602.spop)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065602,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c29065602.rettg)
e3:SetOperation(c29065602.retop)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c29065602.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c29065602.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 c29065602.thfil(c)
return c:IsSetCard(0x7ad) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c29065602.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(c29065602.thfil,tp,LOCATION_DECK,0,1,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(29065602,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c29065602.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(0x87ad)
end
function c29065602.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
if c:IsType(TYPE_FUSION) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
end
function c29065602.tgfil1(c,seq,tc)
local loc=tc:GetPreviousLocation()
if seq>=5 and seq<=7 then return false end
local cseq=c:GetSequence()
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE
and (seq==1 and cseq==5 or seq==3 and cseq==6) then return true end
return cseq==seq or (cloc==loc and math.abs(cseq-seq)==1)
end
function c29065602.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()<=0 then return end
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
local seq=tc:GetPreviousSequence()
local g1=Duel.GetMatchingGroup(c29065602.tgfil1,tp,0,LOCATION_ONFIELD,nil,seq,tc)
if c:IsType(TYPE_FUSION) and g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(29065602,1)) then
Duel.SendtoGrave(g1,REASON_EFFECT)
end
end
--战械人形 RO635
function c29065603.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,29065603)
e1:SetTarget(c29065603.sptg)
e1:SetOperation(c29065603.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065603,1))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c29065603.discon)
e3:SetTarget(c29065603.distg)
e3:SetOperation(c29065603.disop)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c29065603.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c29065603.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetEquipTarget():IsSetCard(0x87ad)
end
function c29065603.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c29065603.spfil,tp,LOCATION_SZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c29065603.spfil,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_SZONE)
end
function c29065603.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g:GetCount()<=0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function c29065603.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c29065603.negfilter(c)
return aux.disfilter1(c)
end
function c29065603.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and c29065603.negfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29065603.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c29065603.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c29065603.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(0x87ad)
end
function c29065603.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e3)
end
if e:GetHandler():IsType(TYPE_LINK) and Duel.SelectYesNo(tp,aux.Stringid(29065603,0)) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c29065603.xdistg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c29065603.xdiscon)
e2:SetOperation(c29065603.xdisop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function c29065603.xdistg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c29065603.xdiscon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c29065603.xdisop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--战械人形 AR15
function c29065604.initial_effect(c)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,29065604)
e1:SetTarget(c29065604.eqtg)
e1:SetOperation(c29065604.eqop)
c:RegisterEffect(e1)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065604,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c29065604.rettg)
e3:SetOperation(c29065604.retop)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c29065604.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c29065604.eqfil(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x87ad) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsCode(29065604)
end
function c29065604.eqtfil(c)
return c:IsSetCard(0x87ad)
end
function c29065604.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065604.eqfil,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c29065604.eqtfil,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function c29065604.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29065604.eqfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,c29065604.eqtfil,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
local ec=g:Select(tp,1,1,nil):GetFirst()
if Duel.Equip(tp,ec,tc) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c29065604.eqlimit)
ec:RegisterEffect(e1)
end
end
function c29065604.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c29065604.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(0x87ad)
end
function c29065604.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c29065604.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
if e:GetHandler():IsType(TYPE_SYNCHRO) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
--AR15·罪罚者
function c29065605.initial_effect(c)
c:SetSPSummonOnce(29065605)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x87ad),1,99)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c29065605.eqcon)
e1:SetOperation(c29065605.eqop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c29065605.idtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--cannot be target
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
if not c29065605.global_check then
c29065605.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(c29065605.checkcon)
ge1:SetOperation(c29065605.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c29065605.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():GetOriginalCode()==29065606
end
function c29065605.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,29065605,RESET_PHASE+PHASE_END,0,1,1)
end
function c29065605.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or (c:IsSetCard(0x87ad) and c:IsLevel(4))
end
function c29065605.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetHandler():GetMaterial():Filter(Card.IsSetCard,nil,0x87ad):GetCount()>0
end
function c29065605.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial():Filter(Card.IsSetCard,nil,0x87ad)
if g:GetCount()>Duel.GetLocationCount(tp,LOCATION_SZONE) then
g=g:Select(tp,Duel.GetLocationCount(tp,LOCATION_SZONE),Duel.GetLocationCount(tp,LOCATION_SZONE),nil)
end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c29065605.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c29065605.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c29065605.idtg(e,c)
return c:GetEquipGroup():IsExists(Card.IsSetCard,nil,1,0x87ad)
end
--M4A1·伸冤者
function c29065606.initial_effect(c)
c:SetSPSummonOnce(29065606)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),5,2)
c:EnableReviveLimit()
--xyz summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(SUMMON_TYPE_XYZ)
e1:SetCondition(c29065606.sprcon)
e1:SetOperation(c29065606.sprop)
c:RegisterEffect(e1)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c29065606.eqcon)
e1:SetOperation(c29065606.eqop)
c:RegisterEffect(e1)
--Disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065606,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c29065606.descon)
e3:SetTarget(c29065606.destg)
e3:SetOperation(c29065606.desop)
c:RegisterEffect(e3)
end
function c29065606.xyzfil(c)
return c:IsCanOverlay() and c:IsSetCard(0x87ad) and c:IsLevel(4)
end
function c29065606.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c29065606.xyzfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c29065606.eqfil(c,tc)
return c:GetPreviousEquipTarget()==tc
end
function c29065606.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c29065606.xyzfil,tp,LOCATION_MZONE,0,1,1,nil)
c:SetMaterial(g)
Duel.Overlay(c,g)
end
function c29065606.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetHandler():GetMaterial():Filter(Card.IsSetCard,nil,0x87ad):GetCount()>0
end
function c29065606.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial():Filter(Card.IsSetCard,nil,0x87ad)
if g:GetCount()>Duel.GetLocationCount(tp,LOCATION_SZONE) then
g=g:Select(tp,Duel.GetLocationCount(tp,LOCATION_SZONE),Duel.GetLocationCount(tp,LOCATION_SZONE),nil)
end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c29065605.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c29065606.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c29065606.descon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c29065606.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c29065606.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(-1000)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
end
--SOPMODII·弄臣
function c29065607.initial_effect(c)
c:SetSPSummonOnce(29065607)
--fusion
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x87ad),aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),true)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c29065607.eqcon)
e1:SetOperation(c29065607.eqop)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065607,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c29065607.destg)
e3:SetOperation(c29065607.desop)
c:RegisterEffect(e3)
end
function c29065607.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetHandler():GetMaterial():Filter(Card.IsSetCard,nil,0x87ad):GetCount()>0
end
function c29065607.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial():Filter(Card.IsSetCard,nil,0x87ad)
if g:GetCount()>Duel.GetLocationCount(tp,LOCATION_SZONE) then
g=g:Select(tp,Duel.GetLocationCount(tp,LOCATION_SZONE),Duel.GetLocationCount(tp,LOCATION_SZONE),nil)
end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c29065605.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c29065607.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c29065607.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetBaseAttack())
end
function c29065607.desop(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.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT)
end
end
--战械死烬
function c29065608.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29065608+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c29065608.target)
e1:SetOperation(c29065608.activate)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065608,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c29065608.sptg)
e3:SetOperation(c29065608.spop)
c:RegisterEffect(e3)
end
function c29065608.mttg(e,c)
local tc=c:GetEquipTarget()
return tc and tc:IsSetCard(0x87ad)
end
function c29065608.mtval(e,c)
if not c then return false end
return c:IsCode(29065607)
end
function c29065608.filter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c29065608.filter2(c,e)
return not c:IsImmuneToEffect(e)
end
function c29065608.fcheck(tp,sg,fc)
return true
end
function c29065608.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local me=Effect.CreateEffect(e:GetHandler())
me:SetType(EFFECT_TYPE_FIELD)
me:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
me:SetTargetRange(LOCATION_SZONE,0)
me:SetTarget(c29065608.mttg)
me:SetValue(c29065608.mtval)
Duel.RegisterEffect(me,tp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
Auxiliary.FCheckAdditional=c29065608.fcheck
local res=Duel.IsExistingMatchingCard(c29065608.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c29065608.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
Auxiliary.FCheckAdditional=nil
me:Reset()
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29065608.activate(e,tp,eg,ep,ev,re,r,rp)
local me=Effect.CreateEffect(e:GetHandler())
me:SetType(EFFECT_TYPE_FIELD)
me:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
me:SetTargetRange(LOCATION_SZONE,0)
me:SetTarget(c29065608.mttg)
me:SetValue(c29065608.mtval)
Duel.RegisterEffect(me,tp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c29065608.filter2,nil,e)
Auxiliary.FCheckAdditional=c29065608.fcheck
local sg1=Duel.GetMatchingGroup(c29065608.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c29065608.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
Auxiliary.FCheckAdditional=nil
me:Reset()
end
function c29065608.spfilter(c,e,tp)
return c:IsSetCard(0x87ad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065608.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065608.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c29065608.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,c29065608.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
--记忆之梦
function c29065609.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:SetTarget(c29065609.target)
e1:SetOperation(c29065609.activate)
c:RegisterEffect(e1)
end
function c29065609.filter(c)
return c:IsSetCard(0x87ad) and c:IsAbleToHand()
end
function c29065609.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065609.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065609.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29065609.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
--RO635·审判者
function c29065610.initial_effect(c)
c:SetSPSummonOnce(29065610)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c29065610.lcheck)
--Equip
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c29065610.eqcon)
e2:SetOperation(c29065610.eqop)
c:RegisterEffect(e2)
--Equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065610,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c29065610.eqtg1)
e4:SetOperation(c29065610.eqop1)
c:RegisterEffect(e4)
end
function c29065610.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x87ad)
end
function c29065610.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetHandler():GetMaterial():Filter(Card.IsSetCard,nil,0x87ad):GetCount()>0
end
function c29065610.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial():Filter(Card.IsSetCard,nil,0x87ad)
if g:GetCount()>Duel.GetLocationCount(tp,LOCATION_SZONE) then
g=g:Select(tp,Duel.GetLocationCount(tp,LOCATION_SZONE),Duel.GetLocationCount(tp,LOCATION_SZONE),nil)
end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c29065610.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c29065610.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c29065610.eqfil(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x87ad)
end
function c29065610.eqtfil(c)
return c:IsSetCard(0x87ad)
end
function c29065610.cthfil(c)
return c:GetEquipTarget()~=nil and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToHand()
end
function c29065610.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) and Duel.IsExistingMatchingCard(c29065610.eqtfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c29065610.cthfil,tp,LOCATION_SZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function c29065610.eqop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c29065610.cthfil,tp,LOCATION_SZONE,0,nil)
if g1:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g1:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,TYPE_MONSTER,RACE_MACHINE)
if g2:GetCount()<=0 then return end
local tc=Duel.SelectMatchingCard(tp,c29065610.eqtfil,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local ec=g2:Select(tp,1,1,nil):GetFirst()
if Duel.Equip(tp,ec,tc) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c29065610.eqlimit1)
ec:RegisterEffect(e1)
end
end
function c29065610.eqlimit1(e,c)
return c==e:GetLabelObject()
end
--钢铁方舟·骑士杀手号
function c29065611.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,29000028)
e1:SetTarget(c29065611.sptg2)
e1:SetOperation(c29065611.spop2)
c:RegisterEffect(e1)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(c29065611.dacon)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,29065611)
e3:SetCondition(c29065611.efcon)
e3:SetTarget(c29065611.eftg)
e3:SetOperation(c29065611.efop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c29065611.xefcon)
c:RegisterEffect(e4)
end
function c29065611.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29065611.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c29065611.dacon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE,nil)
end
function c29065611.efcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_MATERIAL)~=0 and bit.band(r,REASON_SUMMON)==0
end
function c29065611.xefcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_OVERLAY) and (c:IsReason(REASON_COST) or c:IsReason(REASON_EFFECT))
end
function c29065611.tgfil(c)
return c:IsLevel(12) and not c:IsCode(29065611)
end
function c29065611.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065611.tgfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c29065611.efop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065611.tgfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
\ No newline at end of file
--钢铁方舟·深洋巨神号
function c29065612.initial_effect(c)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065612,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,29065612)
e3:SetCondition(c29065612.efcon)
e3:SetTarget(c29065612.eftg)
e3:SetOperation(c29065612.efop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c29065612.xefcon)
c:RegisterEffect(e4)
end
function c29065612.efcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_MATERIAL)~=0 and bit.band(r,REASON_SUMMON)==0
end
function c29065612.xefcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_OVERLAY) and (c:IsReason(REASON_COST) or c:IsReason(REASON_EFFECT))
end
function c29065612.tgfil(c)
return c:IsAbleToRemove()
end
function c29065612.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065612.tgfil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c29065612.efop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065612.tgfil,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
\ No newline at end of file
--钢铁方舟·救赎使徒号
function c29065613.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,29000029)
e1:SetTarget(c29065613.sptg)
e1:SetOperation(c29065613.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,29065613)
e3:SetCondition(c29065613.efcon)
e3:SetTarget(c29065613.eftg)
e3:SetOperation(c29065613.efop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c29065613.xefcon)
c:RegisterEffect(e4)
end
function c29065613.ckfil(c)
return c:IsLevel(12)
end
function c29065613.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(c29065613.ckfil,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29065613.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c29065613.efcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_MATERIAL)~=0 and bit.band(r,REASON_SUMMON)==0
end
function c29065613.xefcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_OVERLAY) and (c:IsReason(REASON_COST) or c:IsReason(REASON_EFFECT))
end
function c29065613.tgfil(c,e,tp)
return c:IsLevel(12) and not c:IsCode(29065613) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065613.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065613.tgfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c29065613.efop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065613.tgfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--钢铁方舟·暗渊幽灵号
function c29065614.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,29000030)
e1:SetTarget(c29065614.sptg2)
e1:SetOperation(c29065614.spop2)
c:RegisterEffect(e1)
--atk twice
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,29065614)
e3:SetCondition(c29065614.efcon)
e3:SetTarget(c29065614.eftg)
e3:SetOperation(c29065614.efop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c29065614.xefcon)
c:RegisterEffect(e4)
end
function c29065614.cfilter(c)
return not c:IsSetCard(0x87ac)
end
function c29065614.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and not Duel.IsExistingMatchingCard(c29065614.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29065614.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c29065614.efcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_MATERIAL)~=0 and bit.band(r,REASON_SUMMON)==0
end
function c29065614.xefcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_OVERLAY) and (c:IsReason(REASON_COST) or c:IsReason(REASON_EFFECT))
end
function c29065614.tgfil(c)
return c:IsAbleToDeck()
end
function c29065614.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065614.tgfil,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c29065614.efop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065614.tgfil,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil)
if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
\ No newline at end of file
--钢铁方舟·崩岩重锤号
function c29065615.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,12,2)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,29065615)
e1:SetCost(c29065615.thcost)
e1:SetTarget(c29065615.thtg)
e1:SetOperation(c29065615.thop)
c:RegisterEffect(e1)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c29065615.imcon)
e1:SetValue(c29065615.efilter)
c:RegisterEffect(e1)
--cannot remove
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD+LOCATION_OVERLAY+LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0)
c:RegisterEffect(e1)
end
function c29065615.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0x87ac)
end
function c29065615.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c29065615.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065615.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065615.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29065615.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
function c29065615.imfilter(c)
return c:IsSetCard(0x87ac)
end
function c29065615.imcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(c29065615.imfilter,1,nil)
and e:GetHandler():GetOverlayGroup():FilterCount(c29065615.imfilter,nil)==e:GetHandler():GetOverlayCount()
end
function c29065615.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
--因帕克危机
function c29065617.initial_effect(c)
aux.AddCodeList(c,29065619)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c29065617.condition)
e1:SetTarget(c29065617.target)
e1:SetOperation(c29065617.activate)
c:RegisterEffect(e1)
--Draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetCost(c29065617.drcost)
e2:SetTarget(c29065617.drtg)
e2:SetOperation(c29065617.drop)
c:RegisterEffect(e2)
--inactivatable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetRange(LOCATION_FZONE)
e3:SetValue(c29065617.effectfilter)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_DISEFFECT)
e4:SetRange(LOCATION_FZONE)
e4:SetValue(c29065617.effectfilter)
c:RegisterEffect(e4)
end
function c29065617.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_MAIN1
and (not Duel.CheckPhaseActivity() or Duel.GetFlagEffect(tp,15248873)>0)
end
function c29065617.rmfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToRemove()
end
function c29065617.tdfilter(c)
return c:IsCode(29065619) and (c:IsAbleToDeck() or c:IsLocation(LOCATION_DECK))
end
function c29065617.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065617.rmfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c29065617.tdfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function c29065617.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c29065617.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()==0 or Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)==0 then return end
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29065617.tdfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g2:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.HintSelection(g2)
if tc:IsLocation(LOCATION_DECK) then
Duel.MoveSequence(tc,0)
else
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
if tc:IsLocation(LOCATION_DECK) then
Duel.ConfirmDecktop(tp,1)
end
end
end
function c29065617.cfilter(c)
return (c:IsRace(RACE_FIEND) or aux.IsCodeListed(c,29065619)) and c:IsAbleToDeckAsCost()
and c:IsFaceup()
end
function c29065617.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065617.cfilter,tp,LOCATION_REMOVED,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c29065617.cfilter,tp,LOCATION_REMOVED,0,3,3,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,0,REASON_COST)
Duel.SortDecktop(tp,tp,3)
for i=1,3 do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
function c29065617.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 c29065617.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c29065617.effectfilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
local tc=te:GetHandler()
return p==tp and tc:IsRace(RACE_FIEND) and bit.band(loc,LOCATION_REMOVED)~=0
end
--花火昙
function c29065618.initial_effect(c)
--return
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065618,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,29065618)
e1:SetCost(c29065618.cost)
e1:SetTarget(c29065618.target)
e1:SetOperation(c29065618.operation)
c:RegisterEffect(e1)
end
function c29065618.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c29065618.filter(c,id)
return c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsAbleToHand()
end
function c29065618.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local id=Duel.GetTurnCount()
local loc=LOCATION_GRAVE+LOCATION_REMOVED
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(loc) and c29065618.filter(chkc,id) end
if chk==0 then return Duel.IsExistingTarget(c29065618.filter,tp,loc,loc,1,nil,id) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c29065618.filter,tp,loc,loc,1,1,nil,id)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,0,0,0)
end
function c29065618.locfilter(c,sp)
return c:IsLocation(LOCATION_HAND) and c:IsControler(sp)
end
function c29065618.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.SendtoHand(tc,tp,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():FilterCount(c29065618.locfilter,nil,tp)
if ct>0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoHand(c,1-tp,REASON_EFFECT)
end
end
--恶役的巨人 贝利亚
function c29065619.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,29065619+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c29065619.spcon)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c29065619.thtg)
e2:SetOperation(c29065619.thop)
c:RegisterEffect(e2)
end
function c29065619.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (ct1==0 or ct1<ct2)
end
function c29065619.thfilter(c)
return ((c:IsLevelBelow(9) and c:IsRace(RACE_FIEND))
or (c:IsSetCard(0x46) and c:IsType(TYPE_SPELL))
or aux.IsCodeListed(c,29065619)) and c:IsAbleToHand()
end
function c29065619.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) and Duel.IsExistingMatchingCard(c29065619.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065619.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29065619.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 c29065623.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon rule
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,29065623)
e1:SetCondition(c29065623.sprcon)
c:RegisterEffect(e1)
--ANNOUNCE_CARD
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ANNOUNCE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29065624)
e2:SetTarget(c29065623.cttg)
e2:SetOperation(c29065623.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065623.summon_effect=e2
end
function c29065623.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local lv=c:GetLevel()
if Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)~=2 then return false end
local lsc=Duel.GetFieldCard(tp,LOCATION_PZONE,0):GetLeftScale()
local rsc=Duel.GetFieldCard(tp,LOCATION_PZONE,1):GetRightScale()
if lsc>rsc then lsc,rsc=rsc,lsc end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and lv>lsc and lv<rsc
end
function c29065623.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if chk==0 then return dcount~=0 and Duel.IsPlayerCanDraw(tp,1) end
end
function c29065623.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local ag=Group.CreateGroup()
local codes={}
for c in aux.Next(g) do
local code=c:GetCode()
if not ag:IsExists(Card.IsCode,1,nil,code) then
ag:AddCard(c)
table.insert(codes,code)
end
end
table.sort(codes)
--c:IsCode(codes[1])
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
--or ... or c:IsCode(codes[i])
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local xc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.ConfirmCards(0,xc)
if xc:IsCode(ac) and Duel.SelectYesNo(tp,aux.Stringid(29065623,1)) then
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87af))
e1:SetValue(0xca3)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
--凯尔希·指令 -熔毁-
function c29065626.initial_effect(c)
aux.AddCodeList(c,29065572)
c:EnableCounterPermit(0x11ae)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c29065626.lvtg)
e1:SetValue(c29065626.lvval)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(29065572)
c:RegisterEffect(e2)
--atklimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetCondition(c29065626.atcon)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c29065626.efilter)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(29065626,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c29065626.spcon)
e5:SetTarget(c29065626.sptg)
e5:SetOperation(c29065626.spop)
c:RegisterEffect(e5)
--act limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_RELEASE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,1)
e6:SetCondition(c29065626.relcon)
e6:SetTarget(c29065626.rellimit)
c:RegisterEffect(e6)
--atk limit
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(0,LOCATION_MZONE)
e7:SetCondition(c29065626.relcon)
e7:SetValue(c29065626.tgtg)
c:RegisterEffect(e7)
end
function c29065626.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x11ae)>0 and c:IsSetCard(0x87af)
end
function c29065626.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 8
else return lv end
end
function c29065626.filter(c)
return c:IsFaceup() and c:IsCode(29065628)
end
function c29065626.atcon(e)
return Duel.IsExistingMatchingCard(c29065626.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c29065626.efilter(e,te)
return te:GetOwner():GetControler()~=e:GetOwner():GetControler() and Duel.IsExistingMatchingCard(c29065626.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c29065626.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065572)
end
function c29065626.spfilter(c,e,tp)
return c:IsCode(29065628) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c29065626.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065626.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29065626.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,c29065626.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c29065626.relcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065572)
end
function c29065626.rellimit(e,c,tp,sumtp)
return not c:IsCode(29065628)
end
function c29065626.tgtg(e,c)
return not (c:IsCode(29065628) and c:IsFaceup())
end
\ No newline at end of file
--源石生命·Mon3tr
function c29065628.initial_effect(c)
c:EnableReviveLimit()
aux.AddCodeList(c,29065572)
c:EnableCounterPermit(0x11ae)
c:SetUniqueOnField(1,0,29065628)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c29065628.splimit)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c29065628.spcon)
e1:SetOperation(c29065628.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065628,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c29065628.destg)
e2:SetOperation(c29065628.desop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065628,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c29065628.discon)
e3:SetTarget(c29065628.distg)
e3:SetOperation(c29065628.disop)
c:RegisterEffect(e3)
end
function c29065628.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,29065572) and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0x11ae,1,REASON_COST)
end
function c29065628.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,1,0x11ae,1,REASON_RULE)
end
function c29065628.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp)end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c29065628.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
function c29065628.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or 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 ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end
function c29065628.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 c29065628.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--心之祅饰壤
function c29065666.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--defup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87aa))
e2:SetValue(300)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--to ex and p set
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOEXTRA)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_FZONE)
e4:SetTarget(c29065666.estg)
e4:SetOperation(c29065666.esop)
c:RegisterEffect(e4)
--Remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_HAND)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1,29065666)
e5:SetCondition(c29065666.rmcon)
e5:SetTarget(c29065666.rmtg)
e5:SetOperation(c29065666.rmop)
c:RegisterEffect(e5)
end
function c29065666.toexfil(c)
return c:IsAbleToExtra() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x87aa) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function c29065666.psetfil(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x87aa) and not c:IsForbidden()
end
function c29065666.estg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065666.toexfil,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c29065666.psetfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_HAND)
end
function c29065666.esop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c29065666.toexfil,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c29065666.psetfil,tp,LOCATION_DECK,0,nil)
if g1:GetCount()<=0 or g2:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(29065666,0))
local sg1=g1:Select(tp,1,1,nil)
Duel.SendtoExtraP(sg1,tp,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(29065666,1))
local tc=g2:Select(tp,1,1,nil):GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
function c29065666.ckfil(c)
return not c:IsReason(REASON_DRAW) and c:IsAbleToRemove()
end
function c29065666.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c29065666.ckfil,1,nil) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x87aa)
end
function c29065666.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local xg=eg:Filter(c29065666.ckfil,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,xg,xg:GetCount(),tp,LOCATION_HAND)
end
function c29065666.rmop(e,tp,eg,ep,ev,re,r,rp)
local xg=eg:Filter(c29065666.ckfil,nil)
xg:KeepAlive()
if Duel.Remove(xg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(xg)
e1:SetCountLimit(1)
e1:SetOperation(c29065666.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c29065666.retop(e,tp,eg,ep,ev,re,r,rp)
local xg=e:GetLabelObject()
Duel.SendtoHand(xg,1-tp,REASON_EFFECT)
end
--星光的赞歌
function c29065667.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29065667+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c29065667.target)
e1:SetOperation(c29065667.operation)
c:RegisterEffect(e1)
end
function c29065667.spfil(c,e,tp)
return c:IsSetCard(0x87aa) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c29065667.rmfil(c)
return c:IsSetCard(0x87aa) and c:IsAbleToRemove()
end
function c29065667.thfil(c)
return c:IsSetCard(0x87aa) and c:IsAbleToHand()
end
function c29065667.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c29065667.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp)
local b2=Duel.IsExistingTarget(c29065667.rmfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c29065667.thfil,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(29065667,0),aux.Stringid(29065667,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(29065667,0))
else
op=Duel.SelectOption(tp,aux.Stringid(29065667,1))+1
end
e:SetLabel(op)
if op==0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
else
tc=Duel.SelectTarget(tp,c29065667.rmfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c29065667.operation(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local g1=Duel.GetMatchingGroup(c29065667.spfil,tp,LOCATION_EXTRA,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(c29065667.thfil,tp,LOCATION_DECK,0,nil)
if op==0 then
if g1:GetCount()<=0 then return end
sg=g1:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(c29065667.retop)
Duel.RegisterEffect(e1,tp)
end
if g2:GetCount()<=0 then return end
dg=g2:Select(tp,1,1,nil)
Duel.SendtoHand(dg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
end
end
function c29065667.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--灵知隐者 狱魔师厄手
function c29065668.initial_effect(c)
aux.EnablePendulumAttribute(c)
--selfdes
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EFFECT_SELF_DESTROY)
e0:SetCondition(c29065668.descon)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,29065668)
e1:SetTarget(c29065668.sptg)
e1:SetOperation(c29065668.spop)
c:RegisterEffect(e1)
--spell
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCost(c29065668.cpcost)
e2:SetTarget(c29065668.cptg)
e2:SetOperation(c29065668.cpop)
c:RegisterEffect(e2)
--pendulum
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_DESTROYED)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCountLimit(1,29000031)
e8:SetCondition(c29065668.pencon)
e8:SetTarget(c29065668.pentg)
e8:SetOperation(c29065668.penop)
c:RegisterEffect(e8)
end
function c29065668.descon(e)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,c,0x87aa)
end
function c29065668.spfil(c,e,tp)
return c:IsSetCard(0x87aa) and Duel.IsExistingMatchingCard(c29065668.syfil,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),c)
end
function c29065668.syfil(c,xc,tc)
local mg=Group.FromCards(xc,tc)
return c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function c29065668.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c29065668.spfil,tp,LOCATION_ONFIELD,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SelectTarget(tp,c29065668.spfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29065668.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(c29065668.syfil,tp,LOCATION_EXTRA,0,nil,c,tc)
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xc=g:Select(tp,1,1,nil):GetFirst()
local mg=Group.FromCards(e:GetHandler(),tc)
Duel.SynchroSummon(tp,xc,nil,mg)
end
end
function c29065668.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c29065668.cpfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x87aa) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function c29065668.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c29065668.cpfilter,tp,LOCATION_DECK,0,1,nil) end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c29065668.cpfilter,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c29065668.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
function c29065668.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c29065668.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c29065668.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--灵知隐者 青山的真穗刃
function c29065669.initial_effect(c)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_DESTROY)
e1:SetCountLimit(1,29065669)
e1:SetCondition(c29065669.spcon)
e1:SetTarget(c29065669.sptg)
e1:SetOperation(c29065669.spop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,29000032)
e2:SetTarget(c29065669.retg)
e2:SetOperation(c29065669.reop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,29000033)
e3:SetTarget(c29065669.rvtg)
e3:SetOperation(c29065669.rvop)
c:RegisterEffect(e3)
end
function c29065669.ctfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x87aa) and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_EFFECT)
end
function c29065669.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c29065669.ctfilter,nil,tp)
return ct>0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,2,2,nil)
end
function c29065669.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c29065669.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
c:CompleteProcedure()
end
function c29065669.ckfil(c,e,tp)
return c:IsAbleToRemove() and c:GetSummonPlayer()~=tp
end
function c29065669.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c29065669.ckfil,nil,e,tp)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),1-tp,0)
end
function c29065669.reop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c29065669.ckfil,nil,e,tp)
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY) then
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(g)
e1:SetCountLimit(1)
e1:SetOperation(c29065669.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c29065669.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tc=g:GetFirst()
while tc do
Duel.ReturnToField(tc)
tc=g:GetNext()
end
end
function c29065669.cnfil(c,e,tp)
return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsControler(tp)
end
function c29065669.rvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c29065669.cnfil,nil,e,tp)
if chk==0 then return g:GetCount()>0 and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c29065669.rvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--灵知隐者 其空葵
function c29065670.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,29065669)
e1:SetTarget(c29065670.rvtg)
e1:SetOperation(c29065670.rvop)
c:RegisterEffect(e1)
--atk def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c29065670.adval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--Remove
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c29065670.recon)
e4:SetTarget(c29065670.retg)
e4:SetOperation(c29065670.reop)
c:RegisterEffect(e4)
--pendulum
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c29065670.pencon)
e5:SetTarget(c29065670.pentg)
e5:SetOperation(c29065670.penop)
c:RegisterEffect(e5)
end
function c29065670.cnfil(c,e,tp)
return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsControler(tp)
end
function c29065670.rvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c29065670.cnfil,nil,e,tp)
if chk==0 then return g:GetCount()>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c29065670.rvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c29065670.cxfil(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c29065670.adval(e)
local tp=e:GetHandler():GetControler()
local g=Duel.GetMatchingGroup(c29065670.cxfil,tp,LOCATION_EXTRA,0,nil)
local x=g:GetClassCount(Card.GetCode)
return -x*100
end
function c29065670.recon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()==tp
end
function c29065670.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,1-tp,0)
end
function c29065670.reop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c29065670.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c29065670.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c29065670.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--灵知隐者 不可思议的魔法面包
function c29065671.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
c:SetSPSummonOnce(29065671)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2,c29065671.ovfilter,aux.Stringid(29065671,0))
c:EnableReviveLimit()
--p
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c29065671.pcost)
e1:SetTarget(c29065671.ptg)
e1:SetOperation(c29065671.pop)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c29065671.rvtg)
e1:SetOperation(c29065671.rvop)
c:RegisterEffect(e1)
end
c29065671.pendulum_level=6
function c29065671.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x87aa) and c:IsType(TYPE_LINK)
end
function c29065671.pcost(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 c29065671.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c29065671.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_RELEASE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.SelectYesNo(tp,aux.Stringid(29065671,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c29065671.cnfil(c,e,tp)
return (c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ)) and c:IsControler(tp)
end
function c29065671.spfil(c,e,tp)
return c:IsSetCard(0x87aa) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c29065671.rvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c29065671.cnfil,nil,e,tp)
if chk==0 then return g:GetCount()>0 and Duel.IsExistingMatchingCard(c29065667.spfil,tp,LOCATION_EXTRA,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29065671.rvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c29065671.spfil,tp,LOCATION_EXTRA,e:GetHandler(),nil,e,tp)
if g1:GetCount()<=0 then return end
tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
--灵知隐者 PH-菲尼亚斯
function c29065672.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,c29065672.mfilter1,c29065672.mfilter2,2,2,true)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c29065672.detg)
e1:SetOperation(c29065672.deop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
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(c29065672.discon)
e2:SetTarget(c29065672.distg)
e2:SetOperation(c29065672.disop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(c29065672.drtg)
e3:SetOperation(c29065672.drop)
c:RegisterEffect(e3)
end
function c29065672.mfilter1(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c29065672.mfilter2(c)
return c:IsFusionSetCard(0x87aa)
end
function c29065672.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,LOCATION_ONFIELD)
end
function c29065672.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0x87aa)
end
function c29065672.deop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c29065672.thfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29065672,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
sg=Duel.SelectMatchingCard(tp,c29065672.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c29065672.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c29065672.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c29065672.disop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c29065672.spfil(c,e,tp)
return c:IsSetCard(0x87aa) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c29065672.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065667.spfil,tp,LOCATION_EXTRA,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29065672.drop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c29065667.spfil,tp,LOCATION_EXTRA,0,e:GetHandler(),e,tp)
if g1:GetCount()<=0 then return end
tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
\ No newline at end of file
--灵知隐者 暗耀之翼
function c29065673.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x87aa),2,2)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,29065673)
e1:SetTarget(c29065673.fatg)
e1:SetOperation(c29065673.faop)
c:RegisterEffect(e1)
--Destroy Remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,29000034)
e2:SetTarget(c29065673.drtg)
e2:SetOperation(c29065673.drop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29000035)
e3:SetCondition(c29065673.thcon)
e3:SetTarget(c29065673.thtg)
e3:SetOperation(c29065673.thop)
c:RegisterEffect(e3)
end
function c29065673.filter(c,tp)
return c:IsCode(29065666) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c29065673.fatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065673.filter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c29065673.faop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c29065673.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
end
Duel.BreakEffect()
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function c29065673.desfil(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x87aa)
end
function c29065673.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c29065673.desfil,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.SelectTarget(tp,c29065673.desfil,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,1-tp,0)
end
function c29065673.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Destroy(tc,REASON_EFFECT)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
function c29065673.tkfil(c,e,tp)
return c:GetOwner()==1-tp
end
function c29065673.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29065673.tkfil,1,nil,e,tp)
end
function c29065673.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0x87aa) and c:IsType(TYPE_MONSTER)
end
function c29065673.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065673.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065673.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065673.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
dg=g:Select(tp,1,1,nil)
Duel.SendtoHand(dg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
end
--灵知隐者 辉光之翼
function c29065674.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x87aa),1,1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,29065674)
e1:SetTarget(c29065674.sptg)
e1:SetOperation(c29065674.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,29000036)
e2:SetTarget(c29065674.reptg)
e2:SetValue(c29065674.repval)
e2:SetOperation(c29065674.repop)
c:RegisterEffect(e2)
end
function c29065674.spfil(c,e,tp)
return c:IsLinkBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsSetCard(0x87aa)
end
function c29065674.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065674.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29065674.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065674.spfil,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
function c29065674.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x87aa)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c29065674.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c29065674.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c29065674.repval(e,c)
return c29065674.repfilter(c,e:GetHandlerPlayer())
end
function c29065674.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--灵知隐者 关士统领王牌
function c29065675.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x87aa),2,3)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,29065675)
e2:SetCondition(c29065675.spcon)
e2:SetTarget(c29065675.sptg)
e2:SetOperation(c29065675.spop)
c:RegisterEffect(e2)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_START)
e4:SetCountLimit(1,29000037)
e4:SetCondition(c29065675.descon)
e4:SetTarget(c29065675.destg)
e4:SetOperation(c29065675.desop)
c:RegisterEffect(e4)
end
function c29065675.cfilter(c,lg)
return c:IsSetCard(0x87aa) and lg:IsContains(c)
end
function c29065675.spcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c29065675.cfilter,1,nil,lg)
end
function c29065675.desfil(c,e,tp,lg)
return lg:IsContains(c) and Duel.IsExistingMatchingCard(c29065675.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
function c29065675.spfilter(c,e,tp)
return c:IsSetCard(0x87aa) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c29065675.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c29065675.desfil,tp,LOCATION_MZONE,0,1,nil,e,tp,lg) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29065675.spop(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(c29065675.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local dg=Duel.SelectMatchingCard(tp,c29065675.desfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp,lg)
if Duel.Destroy(dg,REASON_EFFECT) and g:GetCount()>0 then
sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29065675.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c29065675.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0)
end
function c29065675.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
local atk=bc:GetTextAttack()
if atk<0 then atk=0 end
if Duel.Destroy(bc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
\ No newline at end of file
--灵知隐者 猫眼的两仪织
function c29065676.initial_effect(c)
aux.EnablePendulumAttribute(c)
--Destroy SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,29000038)
e1:SetTarget(c29065676.desptg)
e1:SetOperation(c29065676.despop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87aa))
e2:SetRange(LOCATION_MZONE)
e2:SetValue(300)
c:RegisterEffect(e2)
--search
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_DESTROYED)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCountLimit(1,29065676)
e8:SetCondition(c29065676.thcon)
e8:SetCost(c29065676.thcost)
e8:SetTarget(c29065676.thtg)
e8:SetOperation(c29065676.thop)
c:RegisterEffect(e8)
end
function c29065676.spfil(c,e,tp)
return c:IsSetCard(0x87aa) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065676.desptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065676.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_PZONE)
end
function c29065676.despop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065676.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
function c29065676.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c29065676.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c29065676.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0x87aa) and c:IsType(TYPE_MONSTER) and not c:IsCode(29065676)
end
function c29065676.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065676.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065676.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065676.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
dg=g:Select(tp,1,1,nil)
Duel.SendtoHand(dg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
end
\ No newline at end of file
--灵知隐者 元素眼的善士
function c29065677.initial_effect(c)
aux.EnablePendulumAttribute(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c29065677.atktg)
e1:SetOperation(c29065677.atkop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29065677)
e2:SetTarget(c29065677.thtg)
e2:SetOperation(c29065677.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c29065677.thcon)
c:RegisterEffect(e3)
end
function c29065677.atkfil(c)
return c:IsType(TYPE_PENDULUM)
end
function c29065677.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c29065677.atkfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_REMOVED,nil)>0 end
Duel.SelectTarget(tp,c29065677.atkfil,tp,LOCATION_MZONE,0,1,1,nil)
end
function c29065677.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c29065677.atkval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c29065677.atkval(e)
local tp=e:GetHandler():GetControler()
return Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_REMOVED,nil)*200
end
function c29065677.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c29065677.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0x87aa) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c29065677.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065677.thfil,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c29065677.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065677.thfil,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
\ No newline at end of file
--灵知隐者 凉合利贝罗勒
function c29065678.initial_effect(c)
c:EnableCounterPermit(0x11af)
c:SetCounterLimit(0x11af,2)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c29065678.sprcon)
e2:SetTarget(c29065678.sprtg)
e2:SetOperation(c29065678.sprop)
c:RegisterEffect(e2)
--add counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_DESTROY)
e3:SetCondition(c29065678.ctcon)
e3:SetOperation(c29065678.ctop)
c:RegisterEffect(e3)
--Destroy Draw
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetDescription(aux.Stringid(29065678,0))
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,29065678)
e4:SetTarget(c29065678.ddtg)
e4:SetOperation(c29065678.ddop)
c:RegisterEffect(e4)
--SpecialSummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetDescription(aux.Stringid(29065678,1))
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMING_END_PHASE)
e5:SetCountLimit(1,29000039)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c29065678.spcost)
e5:SetTarget(c29065678.sptg)
e5:SetOperation(c29065678.spop)
c:RegisterEffect(e5)
--2
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetTarget(c29065678.extg)
e6:SetOperation(c29065678.exop)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(29065678,ACTIVITY_CHAIN,c29065678.chainfilter)
end
function c29065678.chainfilter(re,tp,cid)
local p=Duel.GetTurnPlayer()
return p~=tp
end
function c29065678.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_ONFIELD,0,nil)
return rg:GetCount()>=2
end
function c29065678.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:Select(tp,2,2,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c29065678.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
g:DeleteGroup()
end
function c29065678.ctfilter(c,tp)
return c:IsSetCard(0x87aa)
end
function c29065678.ctcon(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c29065678.ctfilter,nil,tp)
if ct>0 and e:GetHandler():IsCanAddCounter(0x11af,1) then
return true
else
return false
end
end
function c29065678.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x11af,1)
end
function c29065678.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,nil,0x87aa) and Duel.IsPlayerCanDraw(tp,1) end
local tc=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,1,nil,0x87aa)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,LOCATION_ONFIELD)
end
function c29065678.ddop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
end
function c29065678.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x11af,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x11af,1,REASON_COST)
end
function c29065678.sfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065678.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c29065678.sfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c29065678.sfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c29065678.sfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c29065678.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29065678.exfil(c)
return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) and c:IsSetCard(0x87aa)
end
function c29065678.extg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c29065678.exfil(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29065678.exfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetCustomActivityCount(29065678,1-tp,ACTIVITY_CHAIN)~=0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c29065678.exfil,tp,LOCATION_MZONE,0,1,1,nil)
end
function c29065678.exop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--灵知隐者 白瞳之剑痕
function c29065679.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(c29065679.splimcon)
e2:SetTarget(c29065679.splimit)
c:RegisterEffect(e2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_FZONE)
e1:SetCode(EFFECT_SEND_REPLACE)
e1:SetTarget(c29065679.reptg)
e1:SetValue(c29065679.repval)
c:RegisterEffect(e1)
--nontuner
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetValue(c29065679.tnval)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_PZONE,0)
e2:SetTarget(c29065679.indtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c29065679.effcon)
e3:SetOperation(c29065679.effop)
c:RegisterEffect(e3)
end
function c29065679.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function c29065679.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsSetCard(0x87aa) and bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c29065679.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_SYNCHRO) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_DECKBOT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c29065679.repval(e,c)
return false
end
function c29065679.tnval(e,c)
return true
end
function c29065679.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function c29065679.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetDescription(aux.Stringid(29065679,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function c29065679.indtg(e,c)
return c:IsSetCard(0x87aa)
end
\ No newline at end of file
--灵知隐者 凉宫凡凡
function c29065680.initial_effect(c)
--search
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:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c29065680.thtg)
e2:SetOperation(c29065680.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c29065680.spcon)
e4:SetTarget(c29065680.sptg)
e4:SetOperation(c29065680.spop)
c:RegisterEffect(e4)
end
function c29065680.thfilter(c)
return c:IsSetCard(0x87aa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c29065680.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065680.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_PZONE,0,nil)==2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065680.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29065680.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 c29065680.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c29065680.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 c29065680.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end
--灵知隐者灵光 友尽终难
function c29065681.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,29065681)
e1:SetCondition(c29065681.condition)
e1:SetTarget(c29065681.target)
e1:SetOperation(c29065681.activate)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,29065681)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c29065681.detg)
e2:SetOperation(c29065681.deop)
c:RegisterEffect(e2)
end
function c29065681.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x87aa) and c:IsType(TYPE_PENDULUM)
end
function c29065681.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c29065681.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c29065681.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetFirst():IsFaceup() and not eg:GetFirst():IsDisabled() end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c29065681.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=re:GetHandler()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
function c29065681.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c29065681.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c29065681.dfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c29065681.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c29065681.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c29065681.deop(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
......@@ -66,7 +66,7 @@ function c65010026.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c65010026.ffilter(c,fc,sub,mg,sg)
......
......@@ -57,7 +57,7 @@ function c65010028.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c65010028.ffilterfil(c,att,rac)
......
......@@ -119,7 +119,7 @@ function c65010030.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c65010030.ffilter(c)
......
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