Commit 973ddb86 authored by Tachibana's avatar Tachibana

eme

parent 2891f9eb
Pipeline #7195 passed with stage
in 11 minutes and 37 seconds
No preview for this file type
...@@ -1571,10 +1571,7 @@ ...@@ -1571,10 +1571,7 @@
81007007 1 --白雪安娜·塔牌 81007007 1 --白雪安娜·塔牌
81008001 1 --花烂漫·露卡希娅 81008001 1 --花烂漫·露卡希娅
81008002 1 --暑假·露卡希娅 81008002 1 --暑假·露卡希娅
81009025 0 --Needle Light
81011003 1 --大轮之华·桑山千雪 81011003 1 --大轮之华·桑山千雪
81011004 0 --花色幸福论·大崎甘奈
81011010 0 --甜美之花·大崎甘奈
81011102 1 --橘花音·午后之音 81011102 1 --橘花音·午后之音
81011104 2 --橘花音·约会之音 81011104 2 --橘花音·约会之音
81011116 1 --双色之音 81011116 1 --双色之音
......
--强化妹妹 艾薇儿
function c10700003.initial_effect(c)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700003,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c10700003.atkcon)
e1:SetCost(c10700003.atkcost)
e1:SetOperation(c10700003.atkop)
c:RegisterEffect(e1)
--special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,10700003)
e1:SetCost(c10700003.spcost)
e1:SetTarget(c10700003.sptg)
e1:SetOperation(c10700003.spop)
e1:SetCondition(c10700003.spcon)
c:RegisterEffect(e1)
end
function c10700003.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if a:IsControler(1-tp) then a=Duel.GetAttackTarget() end
return a
end
function c10700003.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and Duel.CheckLPCost(tp,2000) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
Duel.PayLPCost(tp,2000)
e:GetHandler():RegisterFlagEffect(10700003,RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c10700003.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttacker()
if c:IsControler(1-tp) then c=Duel.GetAttackTarget() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(3000)
c:RegisterEffect(e1)
end
function c10700003.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<4000
end
function c10700003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Debug.Message("这是我和主人的力量")
Debug.Message("给我切实的接下吧kira")
Duel.PayLPCost(tp,500)
end
function c10700003.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 c10700003.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 e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
end
end
\ No newline at end of file
--惊惧苏生
function c10700030.initial_effect(c)
--Activate(aite)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10700030+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c10700030.spatg)
e1:SetOperation(c10700030.spaact)
c:RegisterEffect(e1)
--Activate(jibun)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,10700030)
e2:SetCondition(c10700030.spjcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c10700030.spjtg)
e2:SetOperation(c10700030.spjact)
c:RegisterEffect(e2)
end
function c10700030.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700030.spatg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c10700030.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c10700030.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10700030.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10700030.spaact(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c10700030.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(c10700030.discon)
e2:SetOperation(c10700030.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c10700030.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c10700030.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c10700030.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c10700030.spfilter(c,tp)
return c:GetSummonPlayer()~=1-tp and bit.band(c:GetSummonLocation(),LOCATION_GRAVE)~=0 and c:IsLocation(LOCATION_MZONE)
end
function c10700030.spjcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10700030.spfilter,1,nil,1-tp)
end
function c10700030.spjtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c10700030.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c10700030.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10700030.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10700030.spjact(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
\ No newline at end of file
--精生幻虫 平花萤火
function c10700201.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,10700201+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c10700201.spcon1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCountLimit(1,10700201+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c10700201.spcon2)
c:RegisterEffect(e2)
--SearchCard
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700202,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,10700202)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c10700201.thcost)
e3:SetTarget(c10700201.thtg)
e3:SetOperation(c10700201.thop)
c:RegisterEffect(e3)
--token
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700201,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(c10700201.sptg)
e4:SetOperation(c10700201.spop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c10700201.spcon1(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c10700201.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c10700201.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN)
Duel.Release(g,REASON_COST)
end
function c10700201.thfilter(c)
return c:IsSetCard(0x7c0) and c:IsAbleToHand()
end
function c10700201.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700201.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700201.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700201.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 c10700201.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c10700201.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,10700200,0x101e,0x4011,0,0,2,RACE_INSECT,ATTRIBUTE_WIND) then
local token=Duel.CreateToken(tp,10700200)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--精生幻虫 怪力赫拉
function c10700209.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,10700209+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c10700209.spcon1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCountLimit(1,10700209+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c10700209.spcon2)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(47106439,0))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCountLimit(1,10700210)
e3:SetCost(c10700209.cost)
e3:SetTarget(c10700209.target)
e3:SetOperation(c10700209.operation)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700209,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,10700211)
e4:SetTarget(c10700209.sptg)
e4:SetOperation(c10700209.spop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c10700209.spcon1(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c10700209.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c10700209.cfilter2(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function c10700209.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(c10700209.cfilter2,tp,LOCATION_MZONE,0,1,nil))
end
function c10700209.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c10700209.atkcfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c10700209.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700209.atkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c10700209.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c10700209.atkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetDefense())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c10700209.filter(c,e,tp)
return c:IsSetCard(0x7c0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c10700209.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10700209.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c10700209.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10700209.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10700209.spop(e,tp,eg,ep,ev,re,r,rp)
local ts=Duel.GetFirstTarget()
if ts:IsRelateToEffect(e) then
Duel.SpecialSummon(ts,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--精生幻虫 倾国蜂后
function c10700212.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_INSECT),2,2)
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700212,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10700212)
e1:SetCost(c10700212.drcost)
e1:SetTarget(c10700212.drtg)
e1:SetOperation(c10700212.drop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700212,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,10700213)
e2:SetTarget(c10700212.sptg)
e2:SetOperation(c10700212.spop)
c:RegisterEffect(e2)
--nontuner
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SYNCHRO_LEVEL)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c10700212.drcfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c10700212.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700212.drcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c10700212.drcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c10700212.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c10700212.drop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.Draw(tp,1,REASON_EFFECT)
if ct==0 then return end
local dc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,dc)
if dc:IsType(TYPE_TUNER) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
function c10700212.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,c:GetCode())>0 and c:IsRace(RACE_INSECT)
end
function c10700212.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700212.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c10700212.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c10700212.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--美食连结 佩可莉姆
function c10700220.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c10700220.lcheck)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700220.lkcon)
e0:SetOperation(c10700220.lkop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700220,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,10700220)
e1:SetCondition(c10700220.spcon)
e1:SetTarget(c10700220.sptg)
e1:SetOperation(c10700220.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--indes2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetCondition(c10700220.dircon)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
function c10700220.lcheck(g,lc)
return g:IsExists(c10700220.mzfilter,1,nil)
end
function c10700220.mzfilter(c)
return c:IsLinkSetCard(0x7c1) and not c:IsLinkType(TYPE_LINK)
end
function c10700220.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700220.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("哈唔~肚子饿得咕咕叫了")
Debug.Message("我的名字是……肚子饿得咕咕叫的佩可莉姆!")
end
function c10700220.dircon(e)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c10700220.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700220.thfilter(c,e,tp,ft)
return c:IsSetCard(0x7c1) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c10700220.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c10700220.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function c10700220.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c10700220.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c10700220.splimit)
Duel.RegisterEffect(e1,tp)
end
function c10700220.splimit(e,c)
return not (c:IsType(TYPE_DUAL) or c:IsSetCard(0x7c1))
end
\ No newline at end of file
--美食连结 凯露
function c10700221.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c10700221.lcheck)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700221.lkcon)
e0:SetOperation(c10700221.lkop)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700221,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10700221)
e1:SetCondition(c10700221.descon)
e1:SetTarget(c10700221.destg)
e1:SetOperation(c10700221.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c10700221.descon2)
c:RegisterEffect(e2)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700221,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,10700222)
e4:SetTarget(c10700221.drtg)
e4:SetOperation(c10700221.drop)
c:RegisterEffect(e4)
end
function c10700221.lcheck(g,lc)
return g:IsExists(c10700221.mzfilter,1,nil)
end
function c10700221.mzfilter(c)
return c:IsLinkSetCard(0x7c1) and not c:IsLinkType(TYPE_LINK)
end
function c10700221.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700221.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("成为我的仆人吧~")
Debug.Message("我会和你一起战斗的 所以拙劣的战斗是绝不允许的哦!")
end
function c10700221.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLinkState() and e:GetHandler():GetMutualLinkedGroupCount()==0
end
function c10700221.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Debug.Message("做好觉悟了吗?")
Debug.Message("格林炸裂!(Grim-burst)")
end
function c10700221.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 c10700221.descon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c10700221.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 c10700221.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--美食连结 可可萝
function c10700223.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c10700223.lcheck)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700223.lkcon)
e0:SetOperation(c10700223.lkop)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(10700223,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10700223)
e1:SetCondition(c10700223.condition)
e1:SetTarget(c10700223.target)
e1:SetOperation(c10700223.operation)
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)
e2:SetTarget(c10700223.reptg)
e2:SetValue(c10700223.repval)
e2:SetOperation(c10700223.repop)
c:RegisterEffect(e2)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700223,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700234)
e5:SetTarget(c10700223.thtg)
e5:SetOperation(c10700223.thop)
c:RegisterEffect(e5)
end
function c10700223.lcheck(g,lc)
return g:IsExists(c10700223.mzfilter,1,nil)
end
function c10700223.mzfilter(c)
return c:IsLinkSetCard(0x7c1) and not c:IsLinkType(TYPE_LINK)
end
function c10700223.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700223.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("终于能够与您相见了,主人……")
Debug.Message("今后,就由我来引导您 请多关照")
end
function c10700223.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c10700223.filter(c,e,sp)
return (c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL)) and c:GetCode()~=10700223 and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c10700223.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10700223.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c10700223.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10700223.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Debug.Message("请交给在下吧")
Debug.Message("光的加护!!!!")
end
function c10700223.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
and tc:IsType(TYPE_DUAL) then
tc:EnableDualState()
end
Duel.SpecialSummonComplete()
end
function c10700223.refilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and not c:IsReason(REASON_REPLACE)
end
function c10700223.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c10700223.refilter,1,c,tp)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c10700223.repval(e,c)
return c10700223.refilter(c,e:GetHandlerPlayer())
end
function c10700223.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c10700223.thfilter(c)
return c:IsSetCard(0x7c1) and c:IsAbleToHand()
end
function c10700223.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10700223.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700223.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10700223.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c10700223.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--姬绊连结 枣可萝
function c10700224.initial_effect(c)
aux.EnableDualAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700224,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10700224)
e1:SetCost(c10700224.thcost)
e1:SetTarget(c10700224.thtg)
e1:SetOperation(c10700224.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(10700224,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(aux.IsDualState)
e2:SetTarget(c10700224.target)
e2:SetOperation(c10700224.operation)
c:RegisterEffect(e2)
end
function c10700224.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c10700224.thfilter(c)
return c:IsSetCard(0x7c1) and not c:IsCode(10700224) and c:IsAbleToHand()
end
function c10700224.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c10700224.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700224.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700224.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 c10700224.filter(c,e,sp)
return c:IsSetCard(0x7c1) and not c:IsCode(10700224) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c10700224.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10700224.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c10700224.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10700224.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10700224.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
and tc:IsType(TYPE_DUAL) then
tc:EnableDualState()
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--姬绊连结 尤丝蒂亚娜
function c10700225.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700225,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,10700225)
e1:SetCondition(c10700225.spcon)
e1:SetTarget(c10700225.sptg)
e1:SetOperation(c10700225.spop)
c:RegisterEffect(e1)
--summon two
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700225,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c10700225.target)
e2:SetOperation(c10700225.operation)
c:RegisterEffect(e2)
--extra summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700225,2))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e3:SetTarget(c10700225.extg)
c:RegisterEffect(e3)
end
function c10700225.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c1) and c:IsType(TYPE_LINK)
end
function c10700225.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10700225.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c10700225.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 c10700225.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 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_DECKBOT)
c:RegisterEffect(e1)
end
end
function c10700225.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end
function c10700225.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10700225.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700225.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c10700225.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c10700225.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c10700225.filter(tc) then
tc:EnableDualState()
end
end
function c10700225.extg(e,c)
return c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL)
end
\ No newline at end of file
--姬绊连结 百地希留那
function c10700226.initial_effect(c)
aux.EnableDualAttribute(c)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700226,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10700226)
e1:SetCost(c10700226.spcost)
e1:SetTarget(c10700226.mvtg)
e1:SetOperation(c10700226.mvop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700226,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(aux.IsDualState)
e2:SetCost(c10700226.thcost)
e2:SetTarget(c10700226.thtg)
e2:SetOperation(c10700226.thop)
c:RegisterEffect(e2)
end
function c10700226.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c10700226.mvfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c1)
end
function c10700226.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700226.mvfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c10700226.mvop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(10700226,3))
local g=Duel.SelectMatchingCard(tp,c10700226.mvfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(g:GetFirst(),nseq)
end
end
function c10700226.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c10700226.thfilter2(c,e,tp)
return (c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL))
and c:IsCanBeEffectTarget(e) and c:IsAbleToHand()
end
function c10700226.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c10700226.thfilter2,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end
function c10700226.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--美食殿的日常
function c10700227.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--summon two
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700227,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c10700227.target)
e2:SetOperation(c10700227.operation)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700227,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,10700228)
e3:SetTarget(c10700227.drtg)
e3:SetOperation(c10700227.drop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700227,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,10700228)
e4:SetTarget(c10700227.sptg)
e4:SetOperation(c10700227.spop)
c:RegisterEffect(e4)
end
c10700227.has_text_type=TYPE_DUAL
function c10700227.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end
function c10700227.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10700227.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700227.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c10700227.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c10700227.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c10700227.filter(tc) then
tc:EnableDualState()
end
end
function c10700227.drfilter(c)
return ((c:IsType(TYPE_MONSTER) and c:IsSetCard(0x7c1)) or c:IsType(TYPE_DUAL)) and c:IsReleasableByEffect()
end
function c10700227.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.CheckReleaseGroupEx(tp,c10700227.drfilter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c10700227.drop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDraw(tp) then return end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then ct=1 end
if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(tp,c10700227.drfilter,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local rct=Duel.Release(g,REASON_EFFECT)
Duel.Draw(tp,rct,REASON_EFFECT)
end
end
function c10700227.spfilter(c,e,tp)
return (c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700227.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10700227.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c10700227.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10700227.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10700227.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--破晓连结 怜
function c10700230.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c10700230.lcheck)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700230.lkcon)
e0:SetOperation(c10700230.lkop)
c:RegisterEffect(e0)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(c10700230.atkval)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(c10700230.thcon)
e2:SetCondition(c10700230.actcon)
c:RegisterEffect(e2)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700221,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,10700230)
e4:SetTarget(c10700230.tgtg)
e4:SetOperation(c10700230.tgop)
c:RegisterEffect(e4)
end
function c10700230.lcheck(g,lc)
return g:IsExists(c10700230.mzfilter,1,nil)
end
function c10700230.mzfilter(c)
return c:IsLinkSetCard(0x7c1) and not c:IsLinkType(TYPE_LINK)
end
function c10700230.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700230.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("今天是适合修行的好日子")
Debug.Message("有你在身边的话,似乎就能一起变强。今后请多指教")
end
function c10700230.atkval(e,c)
return c:GetLinkedGroupCount()*200
end
function c10700230.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x7c1) and c:IsType(TYPE_LINK) and c:IsControler(tp)
end
function c10700230.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c10700230.actcon(e)
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and c10700230.cfilter(a,tp)) or (d and c10700230.cfilter(d,tp))
end
function c10700230.tgfilter(c)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL)) and c:IsAbleToGrave()
end
function c10700230.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700230.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c10700230.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700230.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--破晓连结 优衣
function c10700231.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c10700231.lcheck)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700231.lkcon)
e0:SetOperation(c10700231.lkop)
c:RegisterEffect(e0)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700231,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10700231+EFFECT_COUNT_CODE_SINGLE)
e1:SetCondition(c10700231.negcon)
e1:SetTarget(c10700231.negtg)
e1:SetOperation(c10700231.negop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e2:SetCondition(c10700231.negcon2)
c:RegisterEffect(e2)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700221,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,10700232)
e4:SetTarget(c10700231.thtg)
e4:SetOperation(c10700231.thop)
c:RegisterEffect(e4)
end
function c10700231.lcheck(g,lc)
return g:IsExists(c10700231.mzfilter,1,nil)
end
function c10700231.mzfilter(c)
return c:IsLinkSetCard(0x7c1) and not c:IsLinkType(TYPE_LINK)
end
function c10700231.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700231.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("骑士君,终于见到你了!")
Debug.Message("可以的话,我想为你提供帮助……")
Debug.Message("今后也请多关照哦。")
end
function c10700231.negcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLinkState() and e:GetHandler():GetMutualLinkedGroupCount()==0
end
function c10700231.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c10700231.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c10700231.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700231.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c10700231.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Debug.Message("交给我吧!")
Debug.Message("我来治愈大家")
end
function c10700231.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
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)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT)
end
end
function c10700231.negcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c10700231.thfilter(c)
return c:IsSetCard(0x7c1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10700231.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700231.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700231.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700231.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--破晓连结 日和莉
function c10700233.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c10700233.lcheck)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700233.lkcon)
e0:SetOperation(c10700233.lkop)
c:RegisterEffect(e0)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c10700233.atkval)
c:RegisterEffect(e1)
--poschange
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCondition(c10700233.defcon)
e3:SetCondition(c10700233.poscon)
e3:SetTarget(c10700233.postg)
e3:SetOperation(c10700233.posop)
c:RegisterEffect(e3)
--pierce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
e4:SetCondition(c10700233.defcon2)
c:RegisterEffect(e4)
end
function c10700233.lcheck(g,lc)
return g:IsExists(c10700233.mzfilter,1,nil)
end
function c10700233.mzfilter(c)
return c:IsLinkSetCard(0x7c1) and not c:IsLinkType(TYPE_LINK)
end
function c10700233.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700233.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("好了!该我登场了")
Debug.Message("要让大家笑口常开!日和莉会努力的!耶!")
end
function c10700233.atkval(e,c)
return c:GetLinkedGroupCount()*500
end
function c10700233.defcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLinkState() and e:GetHandler():GetMutualLinkedGroupCount()==0
end
function c10700233.poscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsPosition(POS_FACEUP_ATTACK) and not bc:IsType(TYPE_LINK)
end
function c10700233.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler():GetBattleTarget(),1,0,0)
end
function c10700233.posop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.ChangePosition(bc,POS_FACEUP_DEFENSE)
end
end
function c10700233.defcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
\ No newline at end of file
--姬绊连结 草野优衣
function c10700234.initial_effect(c)
aux.EnableDualAttribute(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700234,0))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c10700234.negcon)
e1:SetCost(c10700234.negcost)
e1:SetTarget(c10700234.negtg)
e1:SetOperation(c10700234.negop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700234,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(aux.IsDualState)
e2:SetTarget(c10700234.distg)
e2:SetOperation(c10700234.disop)
c:RegisterEffect(e2)
end
function c10700234.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x7c1) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function c10700234.negcon(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)
return g and g:IsExists(c10700234.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function c10700234.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c10700234.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c10700234.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
function c10700234.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c10700234.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c10700234.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700234.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c10700234.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c10700234.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
--姬绊连结 春咲日和莉
function c10700235.initial_effect(c)
aux.EnableDualAttribute(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700235,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,10700235)
e1:SetCondition(aux.dscon)
e1:SetCost(c10700235.atkcost1)
e1:SetTarget(c10700235.atktg)
e1:SetOperation(c10700235.atkop1)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700235,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(aux.IsDualState)
e2:SetCost(c10700235.thcost)
e2:SetOperation(c10700235.operation)
c:RegisterEffect(e2)
end
function c10700235.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c10700235.atkfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL))
end
function c10700235.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10700235.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700235.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c10700235.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c10700235.atkop1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1900)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c10700235.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 c10700235.atkfilter2(c)
return c:IsFaceup()
end
function c10700235.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(c10700235.atkfilter2,tp,LOCATION_MZONE,0,nil)
if tg:GetCount()<=0 then return end
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
end
\ No newline at end of file
--姬绊连结 士条怜
function c10700236.initial_effect(c)
aux.EnableDualAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700236,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10700236)
e1:SetCost(c10700236.spcost)
e1:SetTarget(c10700236.sptg)
e1:SetOperation(c10700236.spop)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(aux.IsDualState)
e2:SetCondition(c10700236.actcon)
c:RegisterEffect(e2)
end
function c10700236.cffilter(c)
return (c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL)) and not c:IsPublic()
end
function c10700236.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700236.cffilter,tp,LOCATION_HAND,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c10700236.cffilter,tp,LOCATION_HAND,0,3,3,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c10700236.spfilter(c,e,tp)
return c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700236.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c10700236.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end
function c10700236.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10700236.spfilter),tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
local c=e:GetHandler()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
g:AddCard(c)
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c10700236.splimit)
Duel.RegisterEffect(e1,tp)
end
function c10700236.splimit(e,c)
return not (c:IsType(TYPE_DUAL) or c:IsSetCard(0x7c1))
end
function c10700236.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
\ No newline at end of file
--南方夏日庆典——心跳假日
function c10700237.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c10700237.activate)
c:RegisterEffect(e1)
--atk & def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c10700237.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--change ATTRIBUTE
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700237,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,10700237)
e4:SetTarget(c10700237.target)
e4:SetOperation(c10700237.operation)
c:RegisterEffect(e4)
end
c10700237.has_text_type=TYPE_DUAL
function c10700237.thfilter(c)
return c:IsSetCard(0x17c1) and c:IsAbleToHand() and not c:IsCode(10700237)
end
function c10700237.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c10700237.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10700237,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c10700237.atktg(e,c)
return c:IsSetCard(0x7c1) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c10700237.tgfilter(c,att)
return c:IsSetCard(0x7c1) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function c10700237.target(e,tp,eg,ep,ev,re,r,rp,chk,g)
if chk==0 then return Duel.IsExistingMatchingCard(c10700237.tgfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function c10700237.operation(e,tp,eg,ep,ev,re,r,rp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700237.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,g:GetFirst():GetAttribute()))
e1:SetValue(ATTRIBUTE_WATER)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c10700237.splimit)
Duel.RegisterEffect(e2,tp)
end
end
function c10700237.splimit(e,c)
return not (c:IsType(TYPE_DUAL) or c:IsSetCard(0x7c1))
end
\ No newline at end of file
--夏日连结 佩可莉姆
function c10700238.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,3,c10700238.lcheck)
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700238.lkcon)
e0:SetOperation(c10700238.lkop)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700238,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,10700238)
e3:SetCondition(c10700238.rmcon)
e3:SetTarget(c10700238.rmtg)
e3:SetOperation(c10700238.rmop)
c:RegisterEffect(e3)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700238,2))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c10700238.atktg)
e4:SetOperation(c10700238.atkop)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c10700238.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function c10700238.lcheck(g,lc)
return g:IsExists(c10700238.mzfilter,1,nil)
end
function c10700238.mzfilter(c)
return c:IsLinkSetCard(0x7c1) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c10700238.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700238.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("吃光这些海鲜吧~")
Debug.Message("能来到海边,真的很开心!一同享受夏日吧!")
end
function c10700238.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c1) and c:IsType(TYPE_NORMAL)
end
function c10700238.rmcon(e)
local ac=Duel.GetAttacker()
return ac and c10700238.cfilter(ac) and e:GetHandler():GetLinkedGroup():IsContains(ac)
end
function c10700238.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
Debug.Message("变得湿漉漉吧~")
Debug.Message("公主浪花飞溅!(Princess-splash)")
end
function c10700238.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local opt=0
if g1:GetCount()>0 and g2:GetCount()>0 then
opt=Duel.SelectOption(tp,aux.Stringid(10700238,3),aux.Stringid(10700238,4))
elseif g1:GetCount()>0 then
opt=0
elseif g2:GetCount()>0 then
opt=1
else
return
end
local sg=nil
if opt==0 then
sg=g1:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
sg=g2:Select(tp,1,1,nil)
end
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
function c10700238.eftg(e,c)
local lg=e:GetHandler():GetLinkedGroup()
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x7c1) and lg:IsContains(c)
end
function c10700238.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c1)
end
function c10700238.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700238.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c10700238.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c10700238.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(300)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
\ No newline at end of file
--夏日连结武装 浪花飞溅阳伞
function c10700239.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10700239.target)
e1:SetOperation(c10700239.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c10700239.eqlimit)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7c1))
e3:SetValue(aux.tgoval)
e3:SetCondition(c10700239.dircon)
c:RegisterEffect(e3)
--ATTRIBUTE
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_ADD_ATTRIBUTE)
e4:SetValue(ATTRIBUTE_WATER)
e4:SetCondition(c10700239.dircon2)
c:RegisterEffect(e4)
e1:SetLabelObject(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700239,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700239)
e5:SetCondition(c10700239.rhcon)
e5:SetTarget(c10700239.thtg)
e5:SetOperation(c10700239.thop)
c:RegisterEffect(e5)
--change effect type
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(10700239)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(1,0)
c:RegisterEffect(e6)
end
function c10700239.eqlimit(e,c)
return c:IsSetCard(0x7c1)
end
function c10700239.filter(c)
return c:IsFaceup() and c:IsSetCard(0x7c1)
end
function c10700239.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10700239.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700239.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c10700239.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c10700239.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c10700239.dircon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget():IsCode(10700238)
end
function c10700239.dircon2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetEquipTarget():IsAttribute(ATTRIBUTE_WATER)
end
function c10700239.rhcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c10700239.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() and not c:IsCode(10700239)
end
function c10700239.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10700239.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700239.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10700239.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c10700239.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--姬绊连结 藤堂秋乃
function c10700240.initial_effect(c)
aux.EnableDualAttribute(c)
--link
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10700240)
e1:SetCost(c10700240.cost)
e1:SetTarget(c10700240.lktg)
e1:SetOperation(c10700240.lkop)
c:RegisterEffect(e1)
c10700240.discard_effect=e1
--atk
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(65305468,0))
e6:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DAMAGE_STEP_END)
e6:SetCondition(aux.IsDualState)
e6:SetOperation(c10700240.atkop)
c:RegisterEffect(e6)
end
function c10700240.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c10700240.matfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x7c1) or c:IsType(TYPE_DUAL))
end
function c10700240.lkfilter(c,mg)
return c:IsLinkSummonable(mg)
end
function c10700240.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c10700240.matfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c10700240.lkfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c10700240.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c10700240.matfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c10700240.lkfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg)
local tc=tg:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,mg)
end
end
function c10700240.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=c:GetBattleTarget()
if at then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
at:RegisterEffect(e1)
end
Duel.Recover(tp,at:GetBaseAttack(),REASON_EFFECT)
end
\ No newline at end of file
--墨丘利连结 秋乃
function c10700241.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,c10700241.lcheck)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c10700241.lkcon)
e0:SetOperation(c10700241.lkop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700241,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,10700241)
e1:SetCondition(c10700241.spcon)
e1:SetTarget(c10700241.sptg)
e1:SetOperation(c10700241.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700241,2))
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,10700242)
e2:SetCondition(c10700241.condition)
e2:SetCost(c10700241.cost)
e2:SetTarget(c10700241.target)
e2:SetOperation(c10700241.operation)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700241,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c10700241.thcon)
e3:SetTarget(c10700241.thtg)
e3:SetOperation(c10700241.thop)
c:RegisterEffect(e3)
end
function c10700241.lcheck(g,lc)
return g:IsExists(c10700241.mzfilter,1,nil)
end
function c10700241.mzfilter(c)
return c:IsType(TYPE_DUAL) or c:GetEquipCount()>0
end
function c10700241.lkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700241.lkop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("秋乃大小姐,华丽登场")
Debug.Message("这种程度的敌人,根本不是我的对手")
Debug.Message("赶快解决,去办庆功宴吧!")
end
function c10700241.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c10700241.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c10700241.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c10700241.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700241.spop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700241.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 c10700241.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c10700241.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x7c1) end
local sg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x3a01)
local atk=sg:GetFirst():GetTextAttack()
if atk<0 then atk=0 end
e:SetLabel(atk)
Duel.Release(sg,REASON_COST)
end
function c10700241.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel())
Debug.Message("交给我吧")
Debug.Message("失败也是你的礼物")
Debug.Message("高贵斩击!(Noble-assault)")
end
function c10700241.operation(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 c10700241.thcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetMutualLinkedGroup()
local tc=eg:GetFirst()
return ep~=tp and lg:IsContains(tc) and tc:GetBattleTarget()~=nil
end
function c10700241.filter(c)
return c:IsSetCard(0x7c1) and c:IsAbleToHand()
end
function c10700241.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10700241.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10700241.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10700241.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c10700241.thop(e,tp,eg,ep,ev,re,r,rp)
local tv=Duel.GetFirstTarget()
if tv:IsRelateToEffect(e) then
Duel.SendtoHand(tv,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tv)
end
end
\ No newline at end of file
--奇术师 狂欢节K
function c10700270.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c10700270.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_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,10700270)
e1:SetCondition(c10700270.spcon)
e1:SetOperation(c10700270.spop)
c:RegisterEffect(e1)
--coin
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c10700270.regcon)
e3:SetOperation(c10700270.regop)
c:RegisterEffect(e3)
--SearchCard
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700270,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c10700270.thcon)
e4:SetTarget(c10700270.thtg)
e4:SetOperation(c10700270.thop)
c:RegisterEffect(e4)
end
function c10700270.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c10700270.rfilter(c,ft,tp)
return c:IsRace(RACE_SPELLCASTER)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c10700270.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c10700270.rfilter,1,nil,ft,tp)
end
function c10700270.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c10700270.rfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c10700270.regcon(e,tp,eg,ep,ev,re,r,rp)
local ex=Duel.GetOperationInfo(ev,CATEGORY_COIN)
return ex
end
function c10700270.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TOSS_COIN)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,10700271)
e1:SetCondition(c10700270.effcon)
e1:SetOperation(c10700270.effop)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN)
c:RegisterEffect(e1)
end
function c10700270.effcon(e,tp,eg,ep,ev,re,r,rp)
local ct=0
local res={Duel.GetCoinResult()}
for i=1,ev do
if res[i]==1 then
ct=ct+1
end
end
return re==e:GetLabelObject() and ct>0
end
function c10700270.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,10700270)
local ct=0
local res={Duel.GetCoinResult()}
for i=1,ev do
if res[i]==1 then
ct=ct+1
end
end
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Release(g,REASON_COST)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
if ct>2 then
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(1-tp,1)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT+REASON_DISCARD)
end
end
function c10700270.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(10700270)
end
function c10700270.filter1(c)
return (c.toss_coin or aux.IsCodeListed(c,10700270)) and c:IsAbleToHand() and not c:IsAttackAbove(3000)
end
function c10700270.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700270.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c10700270.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700270.filter1,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 c10700272.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700272,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,10700272)
e1:SetTarget(c10700272.sptg)
e1:SetOperation(c10700272.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700272,0))
e3:SetCategory(CATEGORY_COIN+CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c10700272.spcon)
e3:SetTarget(c10700272.sptg2)
e3:SetOperation(c10700272.spop2)
c:RegisterEffect(e3)
end
c10700272.toss_coin=true
function c10700272.filter(c,e,tp)
return (c:IsSetCard(0x7c2) or c.toss_coin) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700272.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10700272.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c10700272.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10700272.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c10700272.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and not c:IsStatus(STATUS_CHAINING) and Duel.IsChainNegatable(ev)
end
function c10700272.spfilter(c,e,tp)
return (c:IsSetCard(0x7c2) or c.toss_coin) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700272.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10700272.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c10700272.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local res=Duel.TossCoin(tp,1)
if res==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10700272.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if g:GetCount()>0 then
if sc and Duel.SpecialSummon(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(sc:GetBaseAttack()/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
end
else
Duel.NegateRelatedChain(e:GetOwner(),RESET_TURN_SET)
local e2=Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetOwner():RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetOwner())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetOwner():RegisterEffect(e3)
end
end
\ No newline at end of file
--奇术师 万圣节女巫
function c10700273.initial_effect(c)
c:SetUniqueOnField(1,0,10700273)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c10700273.lcheck)
c:EnableReviveLimit()
--coin result
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700273,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10700273)
e1:SetCondition(c10700273.coincon1)
e1:SetOperation(c10700273.coinop1)
c:RegisterEffect(e1)
--reset
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700273,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c10700273.postg)
e2:SetOperation(c10700273.posop)
c:RegisterEffect(e2)
end
function c10700273.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x7c2)
end
function c10700273.coincon1(e,tp,eg,ep,ev,re,r,rp)
local ex,eg,et,cp,ct=Duel.GetOperationInfo(ev,CATEGORY_COIN)
if ex and ct>0 then
e:SetLabelObject(re)
return true
else return false end
end
function c10700273.coinop1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TOSS_COIN_NEGATE)
e1:SetCountLimit(1)
e1:SetCondition(c10700273.coincon2)
e1:SetOperation(c10700273.coinop2)
e1:SetLabelObject(e:GetLabelObject())
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
function c10700273.coincon2(e,tp,eg,ep,ev,re,r,rp)
return re==e:GetLabelObject()
end
function c10700273.coinop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,10700273)
local res={Duel.GetCoinResult()}
local ct=ev
for i=1,ct do
res[i]=1
end
Duel.SetCoinResult(table.unpack(res))
end
function c10700273.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c10700273.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--狂欢的回旋余地
function c10700274.initial_effect(c)
aux.AddCodeList(c,10700270)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c10700274.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700274,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--instant(chain)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700274,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,10700274)
e2:SetTarget(c10700274.settg)
e2:SetOperation(c10700274.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700274,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1,10700274)
e4:SetCost(c10700274.spcost)
e4:SetTarget(c10700274.sptg)
e4:SetOperation(c10700274.spop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e5)
end
function c10700274.hfilter(c)
return c:IsFaceup() and (c:IsCode(10700270) or c.toss_coin)
end
function c10700274.handcon(e)
return Duel.IsExistingMatchingCard(c10700274.hfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c10700274.setfilter(c)
return c:IsFaceup() and c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsSSetable()
end
function c10700274.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(c10700274.setfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c10700274.setfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c10700274.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function c10700274.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c10700274.cfilter(c,e,tp)
return c:IsFaceup() and (c:IsSetCard(0x7c2) or c.toss_coin) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c10700274.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
end
function c10700274.spfilter(c,e,tp,code)
return (c:IsCode(code) or c:IsSetCard(0x17c2)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700274.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c10700274.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c10700274.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c10700274.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,c10700274.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel())
local sc=g:GetFirst()
if g:GetCount()>0 then
if sc and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(sc:GetBaseAttack()/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--奇术师 愚人节荷官
function c10700276.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10700276)
e1:SetCondition(c10700276.spcon)
e1:SetTarget(c10700276.sptg)
e1:SetOperation(c10700276.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700276,1))
e2:SetCategory(CATEGORY_COIN+CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_NEGATE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c10700276.drcon)
e2:SetTarget(c10700276.drtg)
e2:SetOperation(c10700276.drop)
c:RegisterEffect(e2)
end
c10700276.toss_coin=true
function c10700276.spfilter(c)
return c:IsFaceup() and c:IsDisabled()
end
function c10700276.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10700276.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c10700276.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)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c10700276.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc.toss_coin then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
end
end
Duel.ShuffleHand(tp)
end
function c10700276.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and not c:IsStatus(STATUS_CHAINING) and Duel.IsChainNegatable(ev)
end
function c10700276.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if chk==0 then return (Duel.IsPlayerCanDraw(tp) or h1==0)
and (Duel.IsPlayerCanDraw(1-tp) or h2==0)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c10700276.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND)
local res=Duel.TossCoin(tp,1)
if res==1 then
if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=0 then
local og=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
if og:IsExists(Card.IsControler,1,nil,tp) then Duel.ShuffleDeck(tp) end
if og:IsExists(Card.IsControler,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
Duel.BreakEffect()
local ct1=og:FilterCount(aux.FilterEqualFunction(Card.GetPreviousControler,tp),nil)
local ct2=og:FilterCount(aux.FilterEqualFunction(Card.GetPreviousControler,1-tp),nil)
Duel.Draw(tp,ct1,REASON_EFFECT)
Duel.Draw(1-tp,ct2,REASON_EFFECT)
end
else
Duel.Damage(tp,500,REASON_EFFECT)
Duel.NegateRelatedChain(e:GetOwner(),RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetOwner():RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetOwner())
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)
e:GetOwner():RegisterEffect(e2)
end
end
\ No newline at end of file
--触碰禁忌的术士 埃尔莉
function c10700277.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2)
c:EnableReviveLimit()
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700277,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c10700277.descost)
e1:SetTarget(c10700277.destg)
e1:SetOperation(c10700277.desop)
c:RegisterEffect(e1)
--Disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c10700277.dcscon)
e3:SetOperation(c10700277.dcsop)
c:RegisterEffect(e3)
end
function c10700277.descost(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 c10700277.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function c10700277.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)>0 and tc:IsType(TYPE_MONSTER) and tc:GetTextAttack()>0 then
Duel.Damage(1-tp,math.floor(tc:GetBaseAttack()/2),REASON_EFFECT)
end
end
end
function c10700277.desfilter(c,tp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==1-tp
end
function c10700277.dcscon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return eg:IsExists(c10700277.desfilter,1,nil,tp)
end
function c10700277.dcsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandler():GetControler()
local g=eg:Filter(c10700277.desfilter,nil,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(c10700277.distg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCondition(c10700277.discon)
e3:SetOperation(c10700277.disop)
e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
tc=g:GetNext()
end
end
function c10700277.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c10700277.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c10700277.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--奇术师 狂欢节Q
function c10700278.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c10700278.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_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,10700278)
e1:SetCondition(c10700278.spcon)
e1:SetOperation(c10700278.spop)
c:RegisterEffect(e1)
--coin
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c10700278.regcon)
e3:SetOperation(c10700278.regop)
c:RegisterEffect(e3)
--SearchCard
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700278,0))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c10700278.reccon)
e4:SetTarget(c10700278.rectg)
e4:SetOperation(c10700278.recop)
c:RegisterEffect(e4)
end
function c10700278.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c10700278.rfilter(c,ft,tp)
return c.toss_coin
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c10700278.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c10700278.rfilter,1,nil,ft,tp)
end
function c10700278.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c10700278.rfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c10700278.regcon(e,tp,eg,ep,ev,re,r,rp)
local ex=Duel.GetOperationInfo(ev,CATEGORY_COIN)
return ex
end
function c10700278.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TOSS_COIN)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,10700279)
e1:SetCondition(c10700278.effcon)
e1:SetOperation(c10700278.effop)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN)
c:RegisterEffect(e1)
end
function c10700278.effcon(e,tp,eg,ep,ev,re,r,rp)
local ct=0
local res={Duel.GetCoinResult()}
for i=1,ev do
if res[i]==1 then
ct=ct+1
end
end
return re==e:GetLabelObject() and ct>0
end
function c10700278.rmfilter(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function c10700278.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700278.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,10700278)
local ct=0
local res={Duel.GetCoinResult()}
for i=1,ev do
if res[i]==1 then
ct=ct+1
end
end
if ct>0 then
local g=Duel.GetMatchingGroup(c10700278.rmfilter,tp,0,LOCATION_EXTRA,nil)
if g:GetCount()==0 then return end
local rc=g:RandomSelect(tp,1):GetFirst()
if Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)~=0 and rc:IsLocation(LOCATION_REMOVED) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
if ct>2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10700278.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
if g:GetCount()>0 then
Duel.SpecialSummon(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c10700278.reccon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(10700278)
end
function c10700278.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function c10700278.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--内核的泛式升华
function c10700318.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10700318+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c10700318.cost)
e1:SetOperation(c10700318.activate)
c:RegisterEffect(e1)
--protection
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79086452,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,0x11e0)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(aux.exccon)
e2:SetCountLimit(1,10700319)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c10700318.sptg)
e2:SetOperation(c10700318.spop)
c:RegisterEffect(e2)
end
function c10700318.ngfilter1(c)
return c:IsSetCard(0xf39) and c:IsAbleToGraveAsCost()
end
function c10700318.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700318.ngfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700318.ngfilter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c10700318.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c10700318.efftg)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c10700318.efftg(e,c)
return c:IsSetCard(0xf39) and c:IsType(TYPE_MONSTER)
end
function c10700318.filter(c,e,tp)
return c:IsSetCard(0xf39) and c:IsLevel(1) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700318.xyzfilter(c,mg,ct)
return c:IsXyzSummonable(mg,2,ct)
end
function c10700318.fgoal(sg,exg)
return aux.dncheck(sg) and exg:IsExists(Card.IsXyzSummonable,1,nil,sg,#sg,#sg)
end
function c10700318.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local mg=Duel.GetMatchingGroup(c10700318.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local exg=Duel.GetMatchingGroup(c10700318.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg,ct)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and ct>1 and mg:CheckSubGroup(c10700318.fgoal,2,ct,exg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=mg:SelectSubGroup(tp,c10700318.fgoal,false,2,ct,exg)
Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,sg1:GetCount(),0,0)
end
function c10700318.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700318.spfilter(c,mg,ct)
return c:IsXyzSummonable(mg,ct,ct)
end
function c10700318.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c10700318.filter2,nil,e,tp)
local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local xyzg=Duel.GetMatchingGroup(c10700318.spfilter,tp,LOCATION_EXTRA,0,nil,g,ct)
if ct>=2 and xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g)
end
end
\ No newline at end of file
...@@ -16,7 +16,6 @@ function cm.initial_effect(c) ...@@ -16,7 +16,6 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_NEGATE) e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(cm.condition) e2:SetCondition(cm.condition)
......
--心情放晴·白鹭千圣
function c26808001.initial_effect(c)
c:EnableReviveLimit()
--spsummon from hand
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c26808001.hspcon)
e1:SetOperation(c26808001.hspop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c26808001.descon)
e2:SetTarget(c26808001.destg)
e2:SetOperation(c26808001.desop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,26808001)
e3:SetCondition(c26808001.thcon)
e3:SetTarget(c26808001.thtg)
e3:SetOperation(c26808001.thop)
c:RegisterEffect(e3)
end
function c26808001.hspfilter(c,ft,tp)
return c:IsLevel(9) and not c:IsCode(26808001)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c26808001.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c26808001.hspfilter,1,nil,ft,tp)
end
function c26808001.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c26808001.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c26808001.descon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and rp==tp
end
function c26808001.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c26808001.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c26808001.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c26808001.thfilter(c)
return c:IsLevel(9) and c:IsAbleToHand()
end
function c26808001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26808001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c26808001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c26808001.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 c26808002.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,26808002)
e1:SetCondition(c26808002.spcon)
e1:SetOperation(c26808002.spop)
c:RegisterEffect(e1)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c26808002.efcon)
e3:SetOperation(c26808002.efop)
c:RegisterEffect(e3)
end
function c26808002.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c)
end
function c26808002.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c26808002.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c26808002.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c26808002.drcon2)
e1:SetTarget(c26808002.drtg)
e1:SetOperation(c26808002.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function c26808002.drcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c26808002.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c26808002.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--甜蜜秋千·白鹭千圣
function c26808003.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26808003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,26808003)
e1:SetCondition(c26808003.spcon)
e1:SetTarget(c26808003.sptg)
e1:SetOperation(c26808003.spop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,26808903)
e2:SetCondition(c26808003.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c26808003.thtg)
e2:SetOperation(c26808003.thop)
c:RegisterEffect(e2)
end
function c26808003.spfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLevel(9)
end
function c26808003.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c26808003.spfilter,1,nil,tp)
end
function c26808003.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 c26808003.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 c26808003.thcfilter(c)
return c:IsRank(9) and c:IsFaceup()
end
function c26808003.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c26808003.thcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c26808003.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c26808003.thop(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 c26808004.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,26808004)
e0:SetCondition(c26808004.sprcon)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c26808004.target)
e1:SetValue(c26808004.indct)
c:RegisterEffect(e1)
end
function c26808004.cfilter(c)
return c:IsFacedown() or not c:IsLevel(9)
end
function c26808004.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and not Duel.IsExistingMatchingCard(c26808004.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c26808004.target(e,c)
return c:IsLevel(9)
end
function c26808004.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
--东奔西走·白鹭千圣
function c26808005.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,9,2,nil,nil,99)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26808005,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,26808005)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c26808005.thtg)
e1:SetOperation(c26808005.thop)
c:RegisterEffect(e1)
--attach
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26808005,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c26808005.matcon)
e2:SetTarget(c26808005.mattg)
e2:SetOperation(c26808005.matop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c26808005.desreptg)
e3:SetValue(c26808005.desrepval)
e3:SetOperation(c26808005.desrepop)
c:RegisterEffect(e3)
end
function c26808005.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c26808005.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c26808005.thfilter(chkc) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(c26808005.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c26808005.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(26808005,2))
end
function c26808005.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function c26808005.matcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c26808005.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function c26808005.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
if c:IsRelateToEffect(e) and tc then
Duel.DisableShuffleCheck()
Duel.Overlay(c,tc)
end
end
function c26808005.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 c26808005.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c26808005.repfilter,1,nil,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c26808005.desrepval(e,c)
return c26808005.repfilter(c,e:GetHandlerPlayer())
end
function c26808005.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,1-tp,26808005)
end
--回归之风·白鹭千圣
function c26808006.initial_effect(c)
--material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e0:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e0:SetCountLimit(1,26808006)
e0:SetCondition(c26808006.matcon)
e0:SetTarget(c26808006.mattg)
e0:SetOperation(c26808006.matop)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c26808006.condition)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
end
function c26808006.cfilter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsCanBeEffectTarget(e)
end
function c26808006.matcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c26808006.cfilter1,1,nil,e,tp)
end
function c26808006.tgfilter(c,tp,eg)
return eg:IsContains(c) and c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp)
end
function c26808006.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c26808006.tgfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(c26808006.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg) end
if eg:GetCount()==1 then
Duel.SetTargetCard(eg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c26808006.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
end
end
function c26808006.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
function c26808006.condition(e)
return e:GetHandler():GetOriginalRank()==9
end
--冬季之光·白鹭千圣
function c26808007.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26808007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,26808007)
e1:SetCost(c26808007.spcost)
e1:SetTarget(c26808007.sptg)
e1:SetOperation(c26808007.spop)
c:RegisterEffect(e1)
--cannot be link material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c26808007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_COST)
end
function c26808007.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 c26808007.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 c26808008.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLevel,9),2,2)
--xyz
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,26808008)
e1:SetTarget(c26808008.target)
e1:SetOperation(c26808008.operation)
c:RegisterEffect(e1)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,26808908)
e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(c26808008.thcon)
e4:SetTarget(c26808008.thtg)
e4:SetOperation(c26808008.thop)
c:RegisterEffect(e4)
end
function c26808008.filter(c,e,tp)
return c:IsRank(9) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c26808008.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c26808008.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c26808008.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c26808008.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c26808008.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(26808008,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil)
Duel.Overlay(tc,sg)
end
end
end
function c26808008.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c26808008.thfilter(c,ec)
return c:IsLevel(9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and c:IsRace(ec:GetRace()) and c:IsAttribute(ec:GetAttribute())
end
function c26808008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26808008.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c26808008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c26808008.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--花之海洋·白鹭千圣
local m=26808009
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetOverlayCount(tp,1,1)>3
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--不负众望·白鹭千圣
local m=26808010
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,9,2,nil,nil,99)
--cannot material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.tg)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.tg(e,c)
return c:IsType(TYPE_XYZ) and c:IsFaceup()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,0,1,1,REASON_EFFECT) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,532)
local sg=Duel.SelectMatchingCard(tp,Card.CheckRemoveOverlayCard,tp,0,LOCATION_MZONE,1,1,nil,tp,1,REASON_EFFECT)
if #sg==0 then return end
Duel.HintSelection(sg)
sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
--雨中花·白鹭千圣
local m=26808011
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
end
function cm.spfilter(c,sp)
return c:GetSummonPlayer()==sp and c:IsType(TYPE_XYZ)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(cm.atkval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.atkval(e,c)
return Duel.GetOverlayCount(c:GetControler(),0,1)*400
end
--无法压抑的感情
local m=26808012
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--skip
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(cm.limit(g:GetFirst()))
end
end
function cm.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local mg=tc:GetOverlayGroup()
Duel.SendtoGrave(mg,REASON_EFFECT)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:IsType(TYPE_XYZ)
end
--花吹雪·白鹭千圣
local m=26808013
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,9,2,nil,nil,99)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_MZONE)
e0:SetCountLimit(1,m)
e0:SetCost(cm.cost)
e0:SetTarget(cm.target)
e0:SetOperation(cm.operation)
c:RegisterEffect(e0)
--cannot release
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
end
function cm.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(cm.ccfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp)
end
function cm.ccfilter(c,tp)
return c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,532)
local sg=Duel.SelectMatchingCard(tp,Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,1,REASON_EFFECT)
if #sg==0 then return end
Duel.HintSelection(sg)
sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
--华灯之宴·白鹭千圣
local m=26808014
local cm=_G["c"..m]
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetDescription(aux.Stringid(m,1))
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetCountLimit(1)
e1:SetValue(cm.valcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
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) or Duel.IsPlayerAffectedByEffect(tp,29065592)) 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()
local cs=0
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) or Duel.IsPlayerAffectedByEffect(tp,29065592) then return end
if Duel.IsPlayerAffectedByEffect(tp,29065592) and Duel.SelectYesNo(tp,aux.Stringid(29065592,0)) then
cs=1
end
if cs==0 then
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
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
Debug.Message("青色怒火,拂熄业炎;何堪魔冠,剑凌术燃!")
Debug.Message("融合召唤!LEVEL 8!阿米娅•影龙乘云!")
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,19065572)
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,09065572)
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,19065573)
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.filter1(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c29065574.exfilter0(c)
return (c:IsCode(29065577) or (c:IsSetCard(0x87af) and c:IsRace(RACE_DRAGON))) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c29065574.exfilter1(c,e)
return (c:IsCode(29065577) or (c:IsSetCard(0x87af) and c:IsRace(RACE_DRAGON))) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c29065574.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 c29065574.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function c29065574.gcheck(sg)
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,c,e,tp,att,rc) and Duel.GetLocationCountFromEx(tp,tp,c)>0 and c:IsLevelBelow(6)
end
function c29065574.xzfil(c,e,tp,att,rc)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsRace(rc) and c:IsAttribute(att) and c:IsRank(8)
end
function c29065574.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToGrave,nil)
if Duel.IsExistingMatchingCard(c29065574.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local sg=Duel.GetMatchingGroup(c29065574.exfilter0,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 then
mg1:Merge(sg)
Auxiliary.FCheckAdditional=c29065574.fcheck
Auxiliary.GCheckAdditional=c29065574.gcheck
end
end
local res=Duel.IsExistingMatchingCard(c29065574.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c29065574.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
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_EXTRA,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.filter1,nil,e)
local exmat=false
if Duel.IsExistingMatchingCard(c29065574.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local sg=Duel.GetMatchingGroup(c29065574.exfilter1,tp,LOCATION_DECK,0,nil,e)
if sg:GetCount()>0 then
mg1:Merge(sg)
exmat=true
end
end
if exmat then
Auxiliary.FCheckAdditional=c29065574.fcheck
Auxiliary.GCheckAdditional=c29065574.gcheck
end
local sg1=Duel.GetMatchingGroup(c29065574.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c29065574.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
mg1:RemoveCard(tc)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
Auxiliary.FCheckAdditional=c29065574.fcheck
Auxiliary.GCheckAdditional=c29065574.gcheck
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
tc:SetMaterial(mat1)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_DECK)
mat1:Sub(rg)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SendtoGrave(rg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
mat1:Merge(rg)
Duel.ConfirmCards(1-tp,mat1)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
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_EXTRA,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,c,e,tp,att,rc):GetFirst()
Duel.SpecialSummonStep(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(xc,tc)
Duel.SpecialSummonComplete()
end
end
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,19065577)
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,09065577)
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,09065578)
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,19065579)
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,09065579)
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
Debug.Message("漆黑意志的领导者,解放指尖的禁束,为我展现印证真实的力量!")
Debug.Message("XYZ召唤!RANK 8!阿米娅•奇美拉!")
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,19065582)
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,09065582)
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
Debug.Message("斩龙之剑,鞘中赤红;剑锋破矢,赤龙绝影!")
Debug.Message("XYZ召唤!RANK 8!陈•赤龙绝影!")
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
Debug.Message("血源沸腾的热流,滚动的炽热火花!热情!膨胀!大爆发!")
Debug.Message("XYZ召唤!RANK 8!煌•沸腾爆裂!")
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,19065586)
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,09065586)
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,19065588)
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,09065588)
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,19065589)
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,09065589)
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 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,09065597)
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)
Debug.Message("明王圣帝,何者可去兵哉!")
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
Debug.Message("天有洪炉,地生五金,晖冶寒淬照云清!")
Debug.Message("XYZ召唤!RANK12!年•众相之柱!")
end
--方舟的骑士·廷达
function c29065598.initial_effect(c)
c:EnableCounterPermit(0x11ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065598,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065598)
e1:SetCost(c29065598.spcost)
e1:SetTarget(c29065598.sptg)
e1:SetOperation(c29065598.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,19065598)
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
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065598,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,09065598)
e4:SetCondition(c29065598.thcon)
e4:SetTarget(c29065598.thtg)
e4:SetOperation(c29065598.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
end
function c29065598.rlfil(c)
return c:IsReleasable() and (c:IsSetCard(0xa900) or c:IsSetCard(0x87af))
end
function c29065598.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) or Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) end
if Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) and (not (Duel.IsCanRemoveCounter(tp,1,0,0x11ae,1,REASON_COST) or Duel.IsPlayerAffectedByEffect(tp,29065592)) or Duel.SelectYesNo(tp,aux.Stringid(29065598,0))) then
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
e:SetLabel(1)
else
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
end
function c29065598.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 c29065598.xthfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065598.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)
if e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(29065598,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065598.xthfilter,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
end
end
function c29065598.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065598.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065598.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065598.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065598.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065598.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 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 not xc:IsCode(ac) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29065598,2)) then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT,nil)
Duel.Draw(tp,1,REASON_EFFECT)
elseif 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,09065599)
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)
Debug.Message("以有形摹无垠,以无形应天下!")
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
Debug.Message("藏点雪,月隐晦明,拙山枯水大江行!")
Debug.Message("XYZ召唤!RANK12!夕•虚实之笔!")
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+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
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,19065600)
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)
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,19065602)
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(0x46) 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_EQUIP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
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,19065603)
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.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if e:GetHandler():IsType(TYPE_LINK) then
Duel.SetChainLimit(c29065603.chainlm)
end
end
function c29065603.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c and c:IsSetCard(0x87ad)
end
function c29065603.chainlm(e,ep,tp)
return tp==ep
end
function c29065603.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
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(re:GetHandler())
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(re:GetHandler())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
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,19065604)
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_PHASE+PHASE_END)
c:RegisterEffect(e1)
--
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)
--actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetTargetRange(0,1)
e3:SetValue(1)
e3:SetCondition(c29065604.actcon)
c:RegisterEffect(e3)
end
function c29065604.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
--AR15·罪罚者
function c29065605.initial_effect(c)
c:SetSPSummonOnce(29065605)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,c29065605.matfilter1,nil,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)
--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(29065604)
c:RegisterEffect(e2)
--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)
--CalculateDamage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065605,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29065605)
e3:SetCondition(c29065605.descon)
e3:SetTarget(c29065605.destg)
e3:SetOperation(c29065605.desop)
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
function c29065605.descon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetFlagEffect(tp,29065605)~=0
end
function c29065605.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
end
function c29065605.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 return end
tc=g:Select(tp,1,1,nil):GetFirst()
Duel.CalculateDamage(c,tc)
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)
--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(29065600)
c:RegisterEffect(e2)
--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,29065606)
e3:SetCondition(c29065606.descon)
e3:SetTarget(c29065606.destg)
e3:SetOperation(c29065606.desop)
c:RegisterEffect(e3)
--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(c29065606.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)
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
function c29065606.idtg(e,c)
if c:GetEquipTarget()==nil then return false end
return c:GetEquipTarget():IsSetCard(0x87ad)
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)
--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(29065603)
c:RegisterEffect(e2)
--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,29065607)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c29065607.destg)
e3:SetOperation(c29065607.desop)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065607,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,19065607)
e4:SetCondition(c29065607.thcon)
e4:SetTarget(c29065607.thtg)
e4:SetOperation(c29065607.thop)
c:RegisterEffect(e4)
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(c29065607.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 c29065607.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c29065607.thfilter(c)
return c:IsSetCard(0x87ad) and c:IsAbleToHand()
end
function c29065607.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29065607.thfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
end
function c29065607.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29065607.thfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetClassCount(Card.GetCode)>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SendtoHand(g1,nil,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:IsLevel(8) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK)
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.IsSetCard,0x87ad),2,2)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(29065603)
c:RegisterEffect(e0)
--extra material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetValue(c29065610.matval)
c:RegisterEffect(e1)
--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)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c29065610.actcon)
e3:SetOperation(c29065610.actop)
c:RegisterEffect(e3)
--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,29065610)
e4:SetCost(c29065610.eqcost1)
e4:SetTarget(c29065610.eqtg1)
e4:SetOperation(c29065610.eqop1)
c:RegisterEffect(e4)
end
function c29065610.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or not mg:IsExists(Card.IsLocation,1,nil,LOCATION_SZONE)
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.actcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return ep==tp and rc:IsSetCard(0x87ad) and e:GetHandler():GetLinkedGroup():IsContains(rc) and e:GetHandler():GetSequence()>4
end
function c29065610.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29065610)
Duel.SetChainLimit(c29065610.chainlm)
end
function c29065610.chainlm(e,rp,tp)
return tp==rp
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:IsSetCard(0x87ad) and c:IsAbleToHand()
end
function c29065610.eqcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065610.cthfil,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c29065610.cthfil,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
function c29065610.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065610.eqfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c29065610.eqtfil,tp,LOCATION_MZONE,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 g=Duel.GetMatchingGroup(c29065610.eqfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,c29065610.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(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,19065611)
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,19065613)
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,19065614)
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
--雨泪·砂冢明音
local m=81002015
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--extra link
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.lkcon)
e0:SetOperation(cm.lkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
--set
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,m+900)
e5:SetCondition(cm.setcon)
e5:SetTarget(cm.settg)
e5:SetOperation(cm.setop)
c:RegisterEffect(e5)
end
function cm.lkfilter(c,lc,tp)
local flag=c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
if c:IsType(TYPE_MONSTER) then
return flag and c:IsLinkType(TYPE_EFFECT)
else
return c:IsFaceup() and c:IsType(TYPE_TRAP)
end
end
function cm.lvfilter(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else
return 1
end
end
--
function cm.lcheck(tp,sg,lc,minc,ct)
return ct>=minc and sg:CheckWithSumEqual(cm.lvfilter,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
end
function cm.lkchenk(c,tp,sg,mg,lc,ct,minc,maxc)
sg:AddCard(c)
ct=ct+1
local res=cm.lcheck(tp,sg,lc,minc,ct) or (ct<maxc and mg:IsExists(cm.lkchenk,1,sg,tp,sg,mg,lc,ct,minc,maxc))
sg:RemoveCard(c)
ct=ct-1
return res
end
function cm.lkcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.lkfilter,tp,LOCATION_ONFIELD,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
local pc=pe:GetHandler()
if not mg:IsContains(pc) then return false end
sg:AddCard(pc)
end
local ct=sg:GetCount()
local minc=2
local maxc=2
if ct>maxc then return false end
return cm.lcheck(tp,sg,c,minc,ct) or mg:IsExists(cm.lkchenk,1,nil,tp,sg,mg,c,ct,minc,maxc)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.lkfilter,tp,LOCATION_ONFIELD,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
sg:AddCard(pe:GetHandler())
end
local ct=sg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
sg:Select(tp,ct,ct,nil)
local minc=2
local maxc=2
for i=ct,maxc-1 do
local cg=mg:Filter(cm.lkchenk,sg,tp,sg,mg,c,i,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if cm.lcheck(tp,sg,c,minc,i) then
if not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then break end
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function cm.tdfilter(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--A-chasing-Y
function c81004002.initial_effect(c)
local e1=aux.AddRitualProcEqual2(c,c81004002.filter,nil,c81004002.mfilter)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81004002)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c81004002.regop)
c:RegisterEffect(e2)
end
function c81004002.filter(c)
return c:IsType(TYPE_PENDULUM)
end
function c81004002.mfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL)
end
function c81004002.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c81004002.thcon)
e1:SetOperation(c81004002.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c81004002.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() and c:IsFaceup()
end
function c81004002.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c81004002.thfilter,tp,LOCATION_REMOVED,0,1,nil)
end
function c81004002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c81004002.thfilter),tp,LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--Flea
local m=81004004
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.Attack_Defense_Listed=1
function cm.Mayumi(c)
local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed
end
function cm.dfilter(c)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsLevelAbove(1) and c:IsAbleToGrave()
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_PENDULUM)
end
function cm.rcheck(tp,g,c)
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.rgcheck(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local dg=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_DECK,0,nil)
aux.RCheckAdditional=cm.rcheck
aux.RGCheckAdditional=cm.rgcheck
local res=Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg,dg,Card.GetLevel,"Equal")
aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local m=Duel.GetRitualMaterial(tp)
local dg=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.RCheckAdditional=cm.rcheck
aux.RGCheckAdditional=cm.rgcheck
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,cm.filter,e,tp,m,dg,Card.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
local mg=m:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(dg)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Equal")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Equal")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then
aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil
return
end
tc:SetMaterial(mat)
local dmat=mat:Filter(Card.IsLocation,nil,LOCATION_DECK)
if dmat:GetCount()>0 then
mat:Sub(dmat)
Duel.SendtoGrave(dmat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e2,true)
end
aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil
end
--Dye the sky
local m=81004005
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsLevelAbove(8)
end
function cm.mfilter(c)
return c:IsType(TYPE_PENDULUM)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local mg2=nil
if Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
mg2=Duel.GetMatchingGroup(aux.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil,cm.mfilter)
end
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.filter,e,tp,mg,mg2,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
e:SetLabel(1)
else
e:SetLabel(0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local mg2=nil
if e:GetLabel()==1 then
mg2=Duel.GetMatchingGroup(aux.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil,cm.mfilter)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.filter,e,tp,mg,mg2,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if mg2 then
mg:Merge(mg2)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--重复不断的宿命
local m=81005023
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x81e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.eqlimit(e,c)
return e:GetLabelObject()==c
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetHandler():GetEquipTarget()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--落花天使·七草一花
local m=81005026
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--change type
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetCost(cm.cost)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.sccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sctg)
e2:SetOperation(cm.scop)
c:RegisterEffect(e2)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_TUNER)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x81e)
end
function cm.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.scfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelAbove(8) and c:IsSynchroSummonable(nil)
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.scfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
--信念之剑
local m=81005028
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.spcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SUMMON,cm.counterfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsRace(RACE_FAIRY)
end
function cm.drumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SUMMON)==0
and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsRace(RACE_FAIRY)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function cm.filter(c)
return c:GetLevel()>0 and c:IsFaceup() and c:IsRace(RACE_FAIRY) and not c:IsLevel(4)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return cm.drumcost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x81e,0x11,800,1500,4,RACE_FAIRY,ATTRIBUTE_DARK)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
cm.drumcost(e,tp,eg,ep,ev,re,r,rp,1)
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(4)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x81e,0x11,800,1500,4,RACE_FAIRY,ATTRIBUTE_DARK) then
Duel.BreakEffect()
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
end
end
end
function cm.acfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_FAIRY)
end
function cm.actcon(e)
return Duel.IsExistingMatchingCard(cm.acfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x81e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--缄默天使·七草一花
local m=81005074
local cm=_G["c"..m]
Duel.LoadScript("c33500200.lua")
function cm.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.sum)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(Suyu.sumcond)
e2:SetOperation(Suyu.sum)
c:RegisterEffect(e2)
--Pos Change
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_POSITION)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(cm.poscon)
e3:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e3)
--must attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_MUST_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function cm.sum(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.poscon(e)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=e:GetHandler():GetControler()
and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
--白雪安娜·星痕
local m=81007001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
Tenka.Shizuka(c)
--destroy1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon1)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(cm.descon2)
c:RegisterEffect(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetCondition(cm.sumcon)
e8:SetOperation(cm.sumsuc)
c:RegisterEffect(e8)
end
cm.is_named_with_shirayukianna=1
function cm.IsShirayukiAnna(c)
local m=_G["c"..c:GetCode()]
return m and m.is_named_with_shirayukianna
end
function cm.descon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsCode(81017001)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end
--Needle Light
local m=81009025
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,81010004)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return (c:IsCode(81010004) or aux.IsCodeListed(c,81010004)) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.cfilter(c,tp)
return c:IsType(TYPE_FIELD) and (c:IsCode(81010004) or aux.IsCodeListed(c,81010004)) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp,true,true))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
local b1=tc:IsAbleToHand()
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local b2=te:IsActivatable(tp,true,true)
Duel.ResetFlagEffect(tp,15248873)
if b1 and (not b2 or Duel.SelectOption(tp,1190,1150)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
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())
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81010004,2))
end
end
end
--风雅水镜
local m=81010022
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsType(TYPE_TOKEN)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetCount()>0 and g:FilterCount(cm.cfilter,nil)==g:GetCount()
end
function cm.filter1(c,e)
return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil,e)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(cm.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(cm.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)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
if Duel.GetCurrentPhase()&PHASE_DAMAGE~=0 or Duel.GetCurrentPhase()&PHASE_DAMAGE_CAL~=0 then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cm.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(cm.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.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()
end
end
--花色幸福论·大崎甘奈
function c81011004.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,c81011004.lcheck)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,81011004)
e1:SetCondition(c81011004.thcon)
e1:SetTarget(c81011004.thtg)
e1:SetOperation(c81011004.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c81011004.descon)
e2:SetTarget(c81011004.destg)
e2:SetOperation(c81011004.desop)
c:RegisterEffect(e2)
end
function c81011004.lcheck(g,lc)
return g:IsExists(c81011004.mzfilter,1,nil)
end
function c81011004.mzfilter(c)
return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_TRAP)~=0 and c:IsType(TYPE_MONSTER)
end
function c81011004.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c81011004.thfilter(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c81011004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c81011004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81011004.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 c81011004.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousControler()==tp
end
function c81011004.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c81011004.cfilter,1,nil,tp)
end
function c81011004.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c81011004.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 c81011005.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c81011005.matfilter,2)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81011005)
e1:SetCondition(c81011005.thcon)
e1:SetTarget(c81011005.thtg)
e1:SetOperation(c81011005.thop)
c:RegisterEffect(e1)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,81011905)
e4:SetCondition(c81011005.tpcon)
e4:SetTarget(c81011005.tptg)
e4:SetOperation(c81011005.tpop)
c:RegisterEffect(e4)
end
function c81011005.thcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c81011005.matfilter(c)
return c:IsLinkType(TYPE_EFFECT) and c:IsLinkAttribute(ATTRIBUTE_WIND)
end
function c81011005.thfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_TUNER) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c81011005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011005.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c81011005.cfilter(c)
return c:IsFacedown() or not c:IsAttribute(ATTRIBUTE_WIND)
end
function c81011005.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsType(TYPE_TUNER)
end
function c81011005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81011005,1))
local g1=Duel.SelectMatchingCard(tp,c81011005.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 then
local tc=g1:GetFirst()
local res=false
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
res=true
end
else
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
res=true
end
end
local g2=Duel.GetMatchingGroup(c81011005.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if res and g2:GetCount()>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and not Duel.IsExistingMatchingCard(c81011005.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(81011005,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c81011005.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c81011005.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WIND)
end
function c81011005.tpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c81011005.tpfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c81011005.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c81011005.tpfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c81011005.tpop(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,c81011005.tpfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--花色幸福论·桑山千雪
function c81011006.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c81011006.matfilter,2)
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c81011006.sumcon)
e0:SetOperation(c81011006.sumsuc)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SUMMON_NEGATED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c81011006.descon)
e1:SetCost(c81011006.descost)
e1:SetTarget(c81011006.destg)
e1:SetOperation(c81011006.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_NEGATED)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_CUSTOM+81011006)
c:RegisterEffect(e3)
if not c81011006.global_check then
c81011006.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetOperation(c81011006.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c81011006.checkop(e,tp,eg,ep,ev,re,r,rp)
local dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_PLAYER)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+81011006,e,0,dp,0,0)
end
function c81011006.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDisabled()
end
function c81011006.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c81011006.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c81011006.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c81011006.actlimit(e,re,tp)
return re:IsHasCategory(CATEGORY_NEGATE) or re:IsHasCategory(CATEGORY_DISABLE) or re:IsHasCategory(CATEGORY_DISABLE_SUMMON)
end
function c81011006.descon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c81011006.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c81011006.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500)
end
function c81011006.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
local sg=Duel.GetOperatedGroup()
if sg:GetCount()>0 then
Duel.Damage(1-tp,sg:GetCount()*500,REASON_EFFECT)
end
end
--花色之翼·大崎甘奈
local m=81011007
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,cm.lcheck)
c:EnableReviveLimit()
--tohand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.dutg)
e0:SetOperation(cm.duop)
c:RegisterEffect(e0)
--synchro effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+900)
e1:SetCondition(cm.sccon)
e1:SetTarget(cm.sctg)
e1:SetOperation(cm.scop)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sumtg)
e2:SetOperation(cm.sumop)
c:RegisterEffect(e2)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_DUAL)
end
function cm.dufilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end
function cm.dutg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.dufilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.dufilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.dufilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.duop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and cm.dufilter(tc) then
tc:EnableDualState()
end
end
function cm.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function cm.scfilter(c)
return c:IsSummonable(true,nil) and c:IsType(TYPE_DUAL)
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.scfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,m)==0 end
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_DUAL))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
--花色之翼·大崎甜花
local m=81011008
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),3,99,cm.lcheck)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetCost(cm.spcost)
c:RegisterEffect(e0)
--discard oppo deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function cm.lcheck(g,lc)
return g:GetClassCount(Card.GetOriginalCode)==g:GetCount()
end
function cm.spcost(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_LINK)~=SUMMON_TYPE_LINK then return true end
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_ONFIELD)
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_ONFIELD)
if ct>0 then
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
end
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp~=tp and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
end
end
--花色之翼·桑山千雪
local m=81011009
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,4,cm.lcheck)
--disable attack
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.atkcon)
e1:SetCost(cm.atkcost)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.desreptg)
e3:SetOperation(cm.desrepop)
c:RegisterEffect(e3)
end
function cm.lcheck(g)
return g:GetClassCount(Card.GetLinkAttribute)<3
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsControler(1-tp)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.tdfilter(c)
return c:IsFacedown() and c:IsAbleToDeck()
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil)
if Duel.NegateAttack() and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,5)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==5 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.desrepfilter(c)
return c:IsFacedown() and c:IsAbleToDeck()
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(cm.desrepfilter,tp,LOCATION_REMOVED,0,3,nil) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetMatchingGroup(cm.desrepfilter,tp,LOCATION_REMOVED,0,nil)
local sg=g:RandomSelect(tp,3)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT+REASON_REPLACE)
end
--甜美之花·大崎甘奈
function c81011010.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,c81011010.lcheck)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,81011010)
e1:SetTarget(c81011010.remtg)
e1:SetOperation(c81011010.remop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81011910)
e2:SetCost(c81011010.spcost)
e2:SetTarget(c81011010.sptg)
e2:SetOperation(c81011010.spop)
c:RegisterEffect(e2)
end
function c81011010.lcheck(g,lc)
return g:IsExists(c81011010.mzfilter,1,nil)
end
function c81011010.mzfilter(c)
return (bit.band(c:GetLinkType(),0x81)==0x81 or c:IsLinkType(TYPE_FUSION)) and c:IsLevelBelow(6)
end
function c81011010.remfilter(c)
return (bit.band(c:GetType(),0x81)==0x81 or c:IsType(TYPE_FUSION)) and c:IsLevelBelow(6) and c:IsAbleToGrave()
end
function c81011010.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011010.remfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c81011010.remfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK+LOCATION_EXTRA)
end
function c81011010.remop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c81011010.remfilter,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c81011010.remfilter,tp,LOCATION_EXTRA,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoGrave(sg1,REASON_EFFECT)
end
end
function c81011010.cfilter(c,tp)
return (bit.band(c:GetType(),0x81)==0x81 or c:IsType(TYPE_FUSION)) and c:IsLevelBelow(6) and Duel.GetMZoneCount(tp,c)>0
end
function c81011010.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81011010.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c81011010.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c81011010.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c81011010.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 c81011011.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,c81011011.lcheck)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,81011011)
e1:SetCondition(c81011011.thcon)
e1:SetTarget(c81011011.thtg)
e1:SetOperation(c81011011.thop)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c81011011.splimit)
c:RegisterEffect(e2)
--ritual summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_DAMAGE)
e3:SetCountLimit(1,81011911)
e3:SetCondition(c81011011.spcondition)
e3:SetCost(c81011011.spcost)
e3:SetTarget(c81011011.sptg)
e3:SetOperation(c81011011.spop)
c:RegisterEffect(e3)
end
function c81011011.lcheck(g,lc)
return g:IsExists(c81011011.mzfilter,1,nil)
end
function c81011011.mzfilter(c)
return c:IsLinkType(TYPE_RITUAL) and c:IsLinkType(TYPE_PENDULUM)
end
function c81011011.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c81011011.thfilter(c)
return c:GetType()==0x82 and c:IsAbleToHand()
end
function c81011011.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011011.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c81011011.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81011011.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 c81011011.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_PENDULUM) and bit.band(sumtype,SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c81011011.spcondition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp==1-tp))
end
function c81011011.cfilter(c,e,tp)
return c:GetType()&0x81==0x81 and c:IsType(TYPE_PENDULUM) and Duel.IsExistingMatchingCard(c81011011.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
and Duel.GetMZoneCount(tp,c)>0
end
function c81011011.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c81011011.cfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroupEx(tp,c81011011.cfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
end
function c81011011.spfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsLevel(4,8) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
function c81011011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c81011011.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c81011011.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,c81011011.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--甜美之花·桑山千雪
function c81011012.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--avoid damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c81011012.damval)
c:RegisterEffect(e1)
--battle damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81011012)
e2:SetCondition(c81011012.damcon1)
e2:SetCost(c81011012.cost)
e2:SetTarget(c81011012.damtg1)
e2:SetOperation(c81011012.damop1)
c:RegisterEffect(e2)
end
function c81011012.damval(e,re,val,r,rp,rc)
local atk=e:GetHandler():GetLinkedGroupCount()*1500
if val<=atk and bit.band(r,REASON_EFFECT)~=0 then return 0 else return val end
end
function c81011012.damcon1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c81011012.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable()
end
function c81011012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011012.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c81011012.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c81011012.damtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLinkedGroupCount()>0 end
end
function c81011012.damop1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c81011012.damcon3)
e1:SetOperation(c81011012.damop3)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c81011012.damcon3(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetLinkedGroupCount()*1500
return Duel.GetBattleDamage(tp)<=ct
end
function c81011012.damop3(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,0)
end
--木村有容·星痕
local m=81017001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
Tenka.Shizuka(c)
--destroy1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon1)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(cm.descon2)
c:RegisterEffect(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetCondition(cm.sumcon)
e8:SetOperation(cm.sumsuc)
c:RegisterEffect(e8)
end
function cm.descon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsCode(81007001)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end
--二度自闭
local m=81044022
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local code1,code2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2)
return ep==tp and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and code1~=m and (not code2 or code2~=m)
end
function cm.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():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoHand(ec,nil,REASON_EFFECT)
end
end
--无言的大龄少女
local m=81044031
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--cost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_COST)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_EXTRA,LOCATION_EXTRA)
e1:SetCost(cm.ccost)
e1:SetOperation(cm.acop)
c:RegisterEffect(e1)
end
function cm.ccost(e,c,tp)
return Duel.CheckLPCost(tp,1000)
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,1000)
end
--虚拟主播 电波酱
function c81046009.initial_effect(c)
--summon with no tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(81046009,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetCondition(c81046009.sumcon)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,81046009)
e1:SetTarget(c81046009.rmtg)
e1:SetOperation(c81046009.rmop)
c:RegisterEffect(e1)
end
function c81046009.sumcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local cg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and cg:GetClassCount(Card.GetCode)==cg:GetCount()
end
function c81046009.rmfilter(c,e,tp)
return c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c81046009.bfilter,tp,0,LOCATION_GRAVE,1,nil,c)
end
function c81046009.bfilter(c,tc)
return tc:IsCode(c:GetCode()) and c:IsFaceup()
end
function c81046009.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c81046009.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81046009.rmfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c81046009.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c81046009.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--虚拟主播 电波酱 Hyper
function c81046010.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,81046010)
e0:SetCondition(c81046010.spcon)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,81006930)
e1:SetTarget(c81046010.rmtg)
e1:SetOperation(c81046010.rmop)
c:RegisterEffect(e1)
end
function c81046010.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local cg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and cg:GetCount()>4 and cg:GetClassCount(Card.GetCode)==cg:GetCount()
end
function c81046010.rmfilter(c,e,tp)
return c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c81046010.bfilter,tp,0,LOCATION_ONFIELD,1,nil,c)
end
function c81046010.bfilter(c,tc)
return tc:IsCode(c:GetCode()) and c:IsFaceup()
end
function c81046010.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c81046010.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81046010.rmfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c81046010.rmfilter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c81046010.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--虚拟主播 电波酱 Another
function c81046011.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,81046011)
e1:SetCondition(c81046011.spcon)
e1:SetTarget(c81046011.sptg)
e1:SetOperation(c81046011.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81006931)
e2:SetCondition(c81046011.discon)
e2:SetCost(c81046011.discost)
e2:SetTarget(c81046011.distg)
e2:SetOperation(c81046011.disop)
c:RegisterEffect(e2)
end
function c81046011.spcon(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return cg:GetCount()>7 and cg:GetClassCount(Card.GetCode)==cg:GetCount()
end
function c81046011.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 c81046011.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 c81046011.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return rp==1-tp and Duel.IsExistingMatchingCard(Card.IsCode,tp,0,LOCATION_GRAVE,1,nil,re:GetHandler():GetCode())
and Duel.IsChainNegatable(ev)
end
function c81046011.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end
Duel.DiscardDeck(tp,2,REASON_COST)
end
function c81046011.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c81046011.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--虚拟主播 莉泽·赫露艾斯塔
function c81046012.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c81046012.spcon)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c81046012.efilter)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(c81046012.indval)
c:RegisterEffect(e3)
--control
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c81046012.cttg)
e4:SetOperation(c81046012.ctop)
c:RegisterEffect(e4)
end
function c81046012.filter(c)
return c:GetSequence()>=5
end
function c81046012.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c81046012.filter,tp,0,LOCATION_MZONE,1,nil)
and not Duel.IsExistingMatchingCard(c81046012.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c81046012.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner():GetSequence()>=5
end
function c81046012.indval(e,c)
return c:GetSequence()>=5
end
function c81046012.ctfilter(c)
return c:GetSequence()>=5 and c:IsControlerCanBeChanged()
end
function c81046012.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c81046012.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81046012.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c81046012.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c81046012.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp)
end
end
--虚拟主播 安洁·卡特莉娜
local m=81046015
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--control
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.cstg)
e3:SetOperation(cm.csop)
c:RegisterEffect(e3)
--control
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.ctcon)
e4:SetTarget(cm.cttg)
e4:SetOperation(cm.ctop)
c:RegisterEffect(e4)
end
function cm.tgfilter(c)
return c:GetOwner()~=c:GetControler()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.cstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function cm.csop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(tp) then
Duel.GetControl(tc,1-tp)
end
end
function cm.ctfilter(c,tp)
return c:GetOwner()==tp and c:GetControler()==1-tp
end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.GetControl(tc,tp)
end
end
--虚拟主播 电波酱 Leggendaria
local m=81046024
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,m)
--special summon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--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:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local cg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and cg:GetCount()>14 and cg:GetClassCount(Card.GetCode)==cg:GetCount()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.thfilter(c,tp)
return c:IsAbleToHand() and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
--空鸽兔女郎
local m=81053008
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+900)
e3:SetCost(cm.descost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--空鸽妹妹
local m=81053009
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,3)
c:EnableReviveLimit()
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
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)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
--cannot be fusion material
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e6)
--indes
local e7=e4:Clone()
e7:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e7)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsLevel(0) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--空鸽萝莉
local m=81053010
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--overlay
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.costfil(c)
return not c:IsPublic()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfil,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function cm.filter(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function cm.drfil(c)
return not (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMatchingGroupCount(cm.drfil,tp,LOCATION_HAND,0,nil)==0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and e:GetHandler():IsRelateToEffect(e) then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if e:GetHandler():IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
end
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,63,nil)
if g:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,g:GetCount(),REASON_EFFECT)
end
...@@ -153,17 +153,6 @@ ...@@ -153,17 +153,6 @@
#秦白颖 1435839960 104 0x680-0x68f #秦白颖 1435839960 104 0x680-0x68f
!counter 0x680 时域指示物 !counter 0x680 时域指示物
#洛基卡奥斯 670489248 107 0x7c0-0x7cf
!setname 0x7c0 精生幻虫
!setname 0x7c1 姬绊连结
!setname 0x17c1 夏日连结
!setname 0x27c1 美食连结
!setname 0x37c1 破晓连结
!setname 0x47c1 墨丘利连结
!setname 0x7c2 奇术师
!setname 0x17c2 奇术师狂欢节
#AddCodeList(10700270) 奇术师 狂欢节K卡名记述
#嘿子 2686488312 109 0x230-0x23f #嘿子 2686488312 109 0x230-0x23f
!setname 0x233 纸上 !setname 0x233 纸上
!setname 0x1233 纸上魔法使 !setname 0x1233 纸上魔法使
...@@ -634,13 +623,6 @@ ...@@ -634,13 +623,6 @@
!setname 0xddd 基板 !setname 0xddd 基板
!counter 0xddd 浴霸指示物 !counter 0xddd 浴霸指示物
#其空あおい - 2906557145 290 0x87a0-0x87af
!setname 0x87ac 钢铁方舟
!setname 0x87ad 战械人形
!setname 0x87af 方舟之骑士
#AddCodeList(29065577) 方舟之骑士•阿米娅卡名记述
!counter 0x11ae COST指示物
#沃亚森斯奥克斯 2201771890 300 0x930-0x93f #沃亚森斯奥克斯 2201771890 300 0x930-0x93f
!setname 0x93a 能力者 !setname 0x93a 能力者
!setname 0x93c 深土 !setname 0x93c 深土
...@@ -981,7 +963,7 @@ ...@@ -981,7 +963,7 @@
#baka 1274658599 622 #baka 1274658599 622
#named_with_FragileArticles 玻离之物 #named_with_FragileArticles 玻离之物
#02 1164477469 648+65010xXX 0xda0 #02 1164477469 648+65010xXX 0xda0 0x641-0x64f
!setname 0x5da0 瓶之骑士 !setname 0x5da0 瓶之骑士
!setname 0x6da0 幻梦迷境 !setname 0x6da0 幻梦迷境
!setname 0x9da0 星光歌剧 !setname 0x9da0 星光歌剧
......
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