Commit 138afc07 authored by Tachibana's avatar Tachibana

hole

parent 2f1cc0c1
......@@ -8,28 +8,27 @@
72412180
72412210
75646560
81005017
81008098
81011089
81011007
81011086
81013066
81013085
81013086
81013087
81013090
81019014
81019044
81019045
81019053
81019054
81019055
81019056
81019057
81019058
81019060
81019061
81019062
81019063
81019064
81019065
81019066
81019067
81019070
81040068
81040069
81044034
......@@ -40,9 +39,12 @@
64800080
75646555
!side
81005088
81005089
81005090
81005040
81005044
81005045
81005046
81005077
81005078
81009024
81011037
81013083
......@@ -50,7 +52,4 @@
81013088
81013089
81019055
81019059
81019068
81019069
81022057
No preview for this file type
......@@ -534,7 +534,6 @@
26801004 0 --樱木真乃的卡拉OK
26801005 1 --樱木真乃的读书之秋
26801009 1 --樱木真乃的小礼物
26802007 2 --Nation Blue·高垣枫
26802017 0 --吃葡萄不吐葡萄皮
26802022 2 --花之未眠
26803002 1 --真实的一瞬
......@@ -1081,6 +1080,7 @@
65020212 0 --行星驱逐舰 风雪游隼号
65020213 0 --「六兆年零一夜物语」凑友希那
#650-2
65001014 0 --魔梦夜之谜 司书
65001029 1 --浮游星龙 丰神土星龙
65020008 2 --幻念的华瑕
65020044 2 --暮色居城 不祥
......@@ -1192,7 +1192,6 @@
81000017 2 --幸福论诞生
81005008 1 --薇薇安·伊文捷琳 Ω
81005026 2 --水晶艾蕾娜·雨夜
81005044 0 --二宫爱丽丝
81005053 0 --黑野紫
81005076 1 --浅见空子·月色
81008016 1 --不被吓个半死是不可能的
......
expansions/pics/81005017.jpg

129 KB | W: | H:

expansions/pics/81005017.jpg

71.2 KB | W: | H:

expansions/pics/81005017.jpg
expansions/pics/81005017.jpg
expansions/pics/81005017.jpg
expansions/pics/81005017.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005040.jpg

132 KB | W: | H:

expansions/pics/81005040.jpg

182 KB | W: | H:

expansions/pics/81005040.jpg
expansions/pics/81005040.jpg
expansions/pics/81005040.jpg
expansions/pics/81005040.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005044.jpg

141 KB | W: | H:

expansions/pics/81005044.jpg

175 KB | W: | H:

expansions/pics/81005044.jpg
expansions/pics/81005044.jpg
expansions/pics/81005044.jpg
expansions/pics/81005044.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005045.jpg

145 KB | W: | H:

expansions/pics/81005045.jpg

181 KB | W: | H:

expansions/pics/81005045.jpg
expansions/pics/81005045.jpg
expansions/pics/81005045.jpg
expansions/pics/81005045.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005046.jpg

138 KB | W: | H:

expansions/pics/81005046.jpg

175 KB | W: | H:

expansions/pics/81005046.jpg
expansions/pics/81005046.jpg
expansions/pics/81005046.jpg
expansions/pics/81005046.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005068.jpg

182 KB | W: | H:

expansions/pics/81005068.jpg

179 KB | W: | H:

expansions/pics/81005068.jpg
expansions/pics/81005068.jpg
expansions/pics/81005068.jpg
expansions/pics/81005068.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005077.jpg

137 KB | W: | H:

expansions/pics/81005077.jpg

157 KB | W: | H:

expansions/pics/81005077.jpg
expansions/pics/81005077.jpg
expansions/pics/81005077.jpg
expansions/pics/81005077.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005078.jpg

146 KB | W: | H:

expansions/pics/81005078.jpg

180 KB | W: | H:

expansions/pics/81005078.jpg
expansions/pics/81005078.jpg
expansions/pics/81005078.jpg
expansions/pics/81005078.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005083.jpg

156 KB | W: | H:

expansions/pics/81005083.jpg

149 KB | W: | H:

expansions/pics/81005083.jpg
expansions/pics/81005083.jpg
expansions/pics/81005083.jpg
expansions/pics/81005083.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81011007.jpg

170 KB | W: | H:

expansions/pics/81011007.jpg

157 KB | W: | H:

expansions/pics/81011007.jpg
expansions/pics/81011007.jpg
expansions/pics/81011007.jpg
expansions/pics/81011007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81011086.jpg

67.7 KB | W: | H:

expansions/pics/81011086.jpg

187 KB | W: | H:

expansions/pics/81011086.jpg
expansions/pics/81011086.jpg
expansions/pics/81011086.jpg
expansions/pics/81011086.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81019044.jpg

199 KB | W: | H:

expansions/pics/81019044.jpg

162 KB | W: | H:

expansions/pics/81019044.jpg
expansions/pics/81019044.jpg
expansions/pics/81019044.jpg
expansions/pics/81019044.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81019045.jpg

195 KB | W: | H:

expansions/pics/81019045.jpg

184 KB | W: | H:

expansions/pics/81019045.jpg
expansions/pics/81019045.jpg
expansions/pics/81019045.jpg
expansions/pics/81019045.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81019055.jpg

182 KB | W: | H:

expansions/pics/81019055.jpg

179 KB | W: | H:

expansions/pics/81019055.jpg
expansions/pics/81019055.jpg
expansions/pics/81019055.jpg
expansions/pics/81019055.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81019056.jpg

179 KB | W: | H:

expansions/pics/81019056.jpg

170 KB | W: | H:

expansions/pics/81019056.jpg
expansions/pics/81019056.jpg
expansions/pics/81019056.jpg
expansions/pics/81019056.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81019060.jpg

71.2 KB | W: | H:

expansions/pics/81019060.jpg

160 KB | W: | H:

expansions/pics/81019060.jpg
expansions/pics/81019060.jpg
expansions/pics/81019060.jpg
expansions/pics/81019060.jpg
  • 2-up
  • Swipe
  • Onion skin
--Nation Blue·高垣枫
local m=26802007
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_XYZ),1,1)
c:EnableReviveLimit()
--effect gain
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_BE_MATERIAL)
e0:SetCondition(cm.efcon)
e0:SetOperation(cm.efop)
c:RegisterEffect(e0)
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--change name
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)
e2:SetValue(81009011)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.mttg)
e3:SetOperation(cm.mtop)
c:RegisterEffect(e3)
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:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.sumcon)
e1:SetOperation(cm.sumsuc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81009011,1))
end
function cm.mtfilter(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(cm.mtfilter,tp,0,LOCATION_GRAVE,1,nil,e) end
end
function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.mtfilter,tp,0,LOCATION_GRAVE,1,1,nil,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
--悠久的羽根·高垣枫
local m=26802008
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,cm.ovfilter,aux.Stringid(m,0))
c:EnableReviveLimit()
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.desreptg)
e1:SetValue(cm.desrepval)
e1:SetOperation(cm.desrepop)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
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_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.matcon)
e2:SetTarget(cm.mattg)
e2:SetOperation(cm.matop)
c:RegisterEffect(e2)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function cm.repfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.desrepval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,m)
end
function cm.cfilter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsCanBeEffectTarget(e) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and eg:IsExists(cm.cfilter1,1,nil,e,tp)
end
function cm.tgfilter(c,tp,eg)
return eg:IsContains(c) and c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg)
and e:GetHandler():IsCanOverlay() end
if eg:GetCount()==1 then
Duel.SetTargetCard(eg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.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
--等身的距离·高垣枫
local m=26802009
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2,cm.ovfilter,aux.Stringid(m,0))
c:EnableReviveLimit()
--return grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rtgcost)
e1:SetTarget(cm.rtgtg)
e1:SetOperation(cm.rtgop)
c:RegisterEffect(e1)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,m+900)
e5:SetCost(cm.cost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function cm.rtgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function cm.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.rtgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_XYZ)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
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:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(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)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--深渊月影·高垣枫
local m=26802023
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,cm.ovfilter,aux.Stringid(m,0))
c:EnableReviveLimit()
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.indtg)
e1:SetOperation(cm.indop)
c:RegisterEffect(e1)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m+1)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function cm.indfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ+TYPE_LINK)
end
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.indfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.indfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.indfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.indop(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_INDESTRUCTABLE_EFFECT)
e1:SetValue(aux.indoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--月光回想·高垣枫
local m=26802024
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,cm.lcheck)
c:EnableReviveLimit()
--cannot link material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(81009011)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(cm.efcon)
e3:SetOperation(cm.efop)
c:RegisterEffect(e3)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_XYZ)
end
function cm.filter(c,tp)
return c:IsType(TYPE_LINK+TYPE_XYZ) and (c:IsControler(tp) or c:IsAbleToChangeControler())
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,tp) and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp)
end
function cm.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 not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
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:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.sumcon)
e1:SetOperation(cm.sumsuc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81009011,1))
end
--二宫爱丽丝
local m=28316000
local cm=_G["c"..m]
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--cannot attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsType,TYPE_SPIRIT)))
c:RegisterEffect(e5)
end
--二宫爱丽丝·雪山
local m=81005045
local m=28316001
local cm=_G["c"..m]
function cm.initial_effect(c)
--spirit return
......
--二宫爱丽丝·雪夜
local m=28316002
local cm=_G["c"..m]
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--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(aux.FALSE)
c:RegisterEffect(e0)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(cm.rmcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsType(TYPE_SPIRIT) and c:IsAbleToRemoveAsCost()
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--二宫爱丽丝·人形
local m=28316003
local cm=_G["c"..m]
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--cannot act
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(1,1)
e2:SetValue(cm.aclimit)
c:RegisterEffect(e2)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsType(TYPE_TRAP)
end
--雨草古都
local m=28316004
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--direct attack
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DIRECT_ATTACK)
e0:SetCondition(cm.dicon)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.discost)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e5)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc and c:GetLinkedGroup():IsContains(bc) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function cm.dicon(e)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function cm.cfilter(c,g)
return g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function cm.filter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(cm.filter,nil,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
Duel.SendtoGrave(tc,REASON_EFFECT)
tc=g:GetNext()
end
end
--自信未满·雨草古都
local m=28316005
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--direct attack
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DIRECT_ATTACK)
e0:SetCondition(cm.dicon)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--disable summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON)
e2:SetCountLimit(1)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e4)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc and c:GetLinkedGroup():IsContains(bc) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function cm.dicon(e)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function cm.cfilter(c,g)
return g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
end
--浅仓纱花
local m=28316006
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2)
c:EnableReviveLimit()
--disable effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--reload
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.drcost)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
--cannot remove
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_REMOVE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
c:RegisterEffect(e4)
--spsummon bgm
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(cm.sumcon)
e5:SetOperation(cm.sumsuc)
c:RegisterEffect(e5)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_REMOVED then
Duel.NegateEffect(ev)
end
end
function cm.drcost(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 cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_DECK,1,nil,1-tp) end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_DECK,0,nil,tp)
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,1-tp,LOCATION_DECK,0,nil,1-tp)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local rg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local rg2=g2:Select(1-tp,1,1,nil)
rg1:Merge(rg2)
Duel.SendtoGrave(rg1,REASON_EFFECT)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end
--黑白堕天使·浅仓纱花
local m=28316007
local cm=_G["c"..m]
function cm.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.starget)
e2:SetOperation(cm.soperation)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_ONFIELD)
e4:SetCondition(cm.indcon)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.sfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.starget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.sfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.sfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.sfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.soperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,1500,1000,4,RACE_FAIRY,ATTRIBUTE_DARK) end
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()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,1500,1000,4,RACE_FAIRY,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function cm.indcon(e)
return Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0):FilterCount(Card.IsType,nil,TYPE_MONSTER)==0
end
--夏川瞳美
function c28316008.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,3,3)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(c28316008.dircon)
c:RegisterEffect(e1)
--battle damage to effect damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_BATTLE_DAMAGE_TO_EFFECT)
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:SetTargetRange(0,1)
e3:SetValue(c28316008.aclimit)
e3:SetCondition(c28316008.actcon)
c:RegisterEffect(e3)
end
function c28316008.dircon(e)
return e:GetHandler():GetColumnGroupCount()==0
end
function c28316008.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c28316008.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
--风町比奈
--浅见空子·夜眠
local m=81005017
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--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(aux.FALSE)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--spsummon
--pendulum summon
aux.EnablePendulumAttribute(c)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(cm.splimcon)
e2:SetTarget(cm.splimit)
c:RegisterEffect(e2)
--extra summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_NORMAL))
c:RegisterEffect(e3)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_GRAVE,0,nil)
return g:GetCount()>=15 and g:GetClassCount(Card.GetCode)==g:GetCount()
function cm.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function cm.thfilter(c)
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) 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)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsLocation(LOCATION_HAND) then
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_ACTIVATE)
e0:SetTargetRange(1,0)
e0:SetValue(cm.aclimit)
e0:SetLabel(tc:GetCode())
Duel.RegisterEffect(e0,tp)
end
if tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.sumlimit)
e1:SetLabel(tc:GetCode())
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
end
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.sumlimit(e,c)
return c:IsCode(e:GetLabel())
function cm.splimit(e,c)
return c:IsType(TYPE_EFFECT)
end
--二宫爱丽丝·人形
--砂冢明音·源流
local m=81005040
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
aux.AddCodeList(c,81011027)
--code
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(81011027)
c:RegisterEffect(e1)
--cannot act
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(1,1)
e2:SetValue(cm.aclimit)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsType(TYPE_TRAP)
function cm.thfilter(c)
return c:IsCode(1111001) and c:IsAbleToHand()
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) 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)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--二宫爱丽丝
--八宫一月·念
local m=81005044
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--cannot attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsType,TYPE_SPIRIT)))
c:RegisterEffect(e5)
--
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.immcon)
e2:SetOperation(cm.immop)
c:RegisterEffect(e2)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterial():IsExists(cm.pmfilter,1,nil)
end
function cm.pmfilter(c)
return c:IsRace(RACE_FAIRY)
end
function cm.thfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and c:IsSetCard(0x81e) and c:IsAbleToHand()
end
function cm.thtg(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.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.immcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsRace(RACE_FAIRY)
end
function cm.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
--二宫爱丽丝·雪夜
--星曜女神·一月
local m=81005046
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--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(aux.FALSE)
c:RegisterEffect(e0)
--destroy
Tenka.EightOne(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(cm.rmcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
e3:SetCode(EVENT_SPSUMMON)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsType(TYPE_SPIRIT) and c:IsAbleToRemoveAsCost()
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x1374) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
g:GetFirst():CompleteProcedure()
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetAbsoluteRange(tp,1,0)
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e3,true)
end
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function cm.filter(c)
return c:IsCode(66915001) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--二宫爱丽丝·夙愿
--砂冢明音·流回
local m=81005068
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
aux.AddCodeList(c,81011027)
c:EnableReviveLimit()
--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:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--code
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(81011027)
c:RegisterEffect(e1)
--spsummon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(cm.sumlimit)
c:RegisterEffect(e3)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_DECK+LOCATION_GRAVE)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return (bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and c:IsAbleToGraveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
if ft<=0 then
local ct=-ft+1
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,ct,nil)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_ONFIELD,0,2,nil)
else
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_ONFIELD,0,2,nil)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_ONFIELD,0,nil)
local ct=-ft+1
local g1=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE)
if ct<2 then
sg:Sub(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=sg:Select(tp,2-ct,2-ct,nil)
g1:Merge(g2)
end
Duel.SendtoGrave(g1,REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function cm.actfilter(c)
return c:IsFaceup() and ((c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT) or c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsStatus(STATUS_EFFECT_ENABLED)
end
function cm.ssfilter(c)
return (bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(cm.actfilter,c:GetControler(),LOCATION_ONFIELD,0,1,c) and c:GetFlagEffect(m)==0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ssfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.ssfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(cm.actfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.actfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--浅仓纱花
--清凉一夏·鹭泽由依
local m=81005077
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--disable effect
--cannot direct attack
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(cm.disop)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.tdcon)
e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop)
c:RegisterEffect(e1)
--reload
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.drcost)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.damcon)
e2:SetTarget(cm.damtg)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
--cannot remove
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_REMOVE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
c:RegisterEffect(e4)
--spsummon bgm
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(cm.sumcon)
e5:SetOperation(cm.sumsuc)
c:RegisterEffect(e5)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_REMOVED then
Duel.NegateEffect(ev)
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.drcost(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)
function cm.tdfilter(c)
return c:IsFaceup() and not c:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_DECK,1,nil,1-tp) end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_DECK,0,nil,tp)
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,1-tp,LOCATION_DECK,0,nil,1-tp)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local rg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local rg2=g2:Select(1-tp,1,1,nil)
rg1:Merge(rg2)
Duel.SendtoGrave(rg1,REASON_EFFECT)
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
end
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function cm.damfilter(c)
return c:IsFaceup() and c:GetAttackAnnouncedCount()==0
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(cm.damfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*600)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(cm.damfilter,tp,LOCATION_MZONE,0,nil)
Duel.Damage(p,ct*600,REASON_EFFECT)
end
--黑白堕天使·浅仓纱花
--无口少女·鹭泽由依
local m=81005078
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--cannot direct attack
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e0)
--Synchro Summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.damcon)
e1:SetCost(cm.damcost)
e1:SetTarget(cm.damtg)
e1:SetOperation(cm.damop)
c:RegisterEffect(e1)
--
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.starget)
e2:SetOperation(cm.soperation)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.atkcon)
e2:SetTarget(cm.atktg)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_ONFIELD)
e4:SetCondition(cm.indcon)
e4:SetValue(1)
c:RegisterEffect(e4)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(cm.check)
Duel.RegisterEffect(ge1,0)
end
end
function cm.sfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
function cm.check(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if Duel.GetAttackTarget()==nil then
Duel.RegisterFlagEffect(tc:GetControler(),m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.starget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.sfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.sfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.sfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function cm.soperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
function cm.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local atk=e:GetHandler():GetBaseAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,1500,1000,4,RACE_FAIRY,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=c:GetBaseAttack()
Duel.Damage(1-tp,atk,REASON_EFFECT)
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,1500,1000,4,RACE_FAIRY,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.indcon(e)
return Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0):FilterCount(Card.IsType,nil,TYPE_MONSTER)==0
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--二宫爱丽丝·约会
--白雪琉璃·幻象
local m=81005083
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--Atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.valop)
c:RegisterEffect(e1)
--cannot be target
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(aux.TargetBoolFunction(Card.IsType,TYPE_SPIRIT))
e2:SetValue(cm.indesval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(aux.tgoval)
--battle
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.drcon)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function cm.valop(e,tp,eg,ep,ev,re,r,rp)
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a:IsControler(tp)) or (d and d:IsControler(tp))
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_SYNCHRO) then return end
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
while tc do
local tatk=tc:GetTextAttack()
if tatk<0 then tatk=0 end
atk=atk+tatk
tc=g:GetNext()
end
if not c:IsRelateToEffect(e) or Duel.GetMZoneCount(tp)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function cm.indesval(e,re,rp)
return rp~=e:GetHandlerPlayer()
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
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
--白雪琉璃·幻象
local m=81005087
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--battle
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.drcon)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a:IsControler(tp)) or (d and d:IsControler(tp))
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetMZoneCount(tp)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
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
--八宫一月·念
local m=81005088
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--
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.immcon)
e2:SetOperation(cm.immop)
c:RegisterEffect(e2)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterial():IsExists(cm.pmfilter,1,nil)
end
function cm.pmfilter(c)
return c:IsRace(RACE_FAIRY)
end
function cm.thfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and c:IsSetCard(0x81e) and c:IsAbleToHand()
end
function cm.thtg(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.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.immcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsRace(RACE_FAIRY)
end
function cm.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
--星曜女神·一月
local m=81005090
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.EightOne(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SPSUMMON)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x1374) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
g:GetFirst():CompleteProcedure()
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetAbsoluteRange(tp,1,0)
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e3,true)
end
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function cm.filter(c)
return c:IsCode(66915001) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--华美之宴·高垣枫
function c81009009.initial_effect(c)
c:SetSPSummonOnce(81009009)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2,c81009009.ovfilter,aux.Stringid(81009009,0))
c:EnableReviveLimit()
--material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81009909)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c81009009.mattg)
e2:SetOperation(c81009009.matop)
c:RegisterEffect(e2)
--disable special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(81009009,1))
e5:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_SPSUMMON)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,81009009)
e5:SetCondition(c81009009.discon)
e5:SetCost(c81009009.discost)
e5:SetTarget(c81009009.distg)
e5:SetOperation(c81009009.disop)
c:RegisterEffect(e5)
end
function c81009009.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function c81009009.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c81009009.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c81009009.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c81009009.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c81009009.xyzfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_XYZ)
end
function c81009009.matfilter(c)
return c:IsType(TYPE_LINK) and c:IsType(TYPE_MONSTER)
end
function c81009009.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81009009.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81009009.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c81009009.matfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c81009009.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c81009009.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c81009009.matfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
--圣夜的祝宴·高垣枫
function c81009010.initial_effect(c)
c:SetSPSummonOnce(81009010)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2,c81009010.ovfilter,aux.Stringid(81009010,0))
c:EnableReviveLimit()
--change effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81009010,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81009010)
e1:SetCondition(c81009010.chcon)
e1:SetCost(c81009010.chcost)
e1:SetTarget(c81009010.chtg)
e1:SetOperation(c81009010.chop)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81009910)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c81009010.tdtg)
e2:SetOperation(c81009010.tdop)
c:RegisterEffect(e2)
end
function c81009010.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function c81009010.chcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==1-tp and (rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c81009010.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c81009010.thfilter(c)
return c:IsFaceup() and c:IsAbleToDeck()
end
function c81009010.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81009010.thfilter,rp,0,LOCATION_REMOVED,1,nil) end
end
function c81009010.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c81009010.repop)
end
function c81009010.repop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,c81009010.thfilter,tp,0,LOCATION_REMOVED,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
function c81009010.tdfilter(c)
return c:IsType(TYPE_LINK) and c:IsAbleToExtra()
end
function c81009010.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c81009010.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81009010.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c81009010.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
end
function c81009010.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
--恋风·高垣枫
local m=81009011
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_XYZ),1,1)
c:EnableReviveLimit()
Tenka.PyroLink(c)
Tenka.KaedeMusic(c)
--battle
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(cm.xyzcon)
e4:SetOperation(cm.xyzop)
c:RegisterEffect(e4)
end
function cm.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and not tc:IsType(TYPE_TOKEN)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if c:IsFaceup() and c:IsType(TYPE_XYZ) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,tc)
end
end
--白南风的淑女·高垣枫
function c81009012.initial_effect(c)
c:SetSPSummonOnce(81009012)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,c81009012.ovfilter,aux.Stringid(81009012,0))
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81009012,1))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81009012)
e1:SetCost(c81009012.cost)
e1:SetTarget(c81009012.target)
e1:SetOperation(c81009012.operation)
c:RegisterEffect(e1)
--return
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,81009912)
e3:SetTarget(c81009012.tdtg)
e3:SetOperation(c81009012.tdop)
c:RegisterEffect(e3)
end
function c81009012.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function c81009012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c81009012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3)
end
function c81009012.cfilter(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_SPELL)
end
function c81009012.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(1-tp,3,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
local ct=g:FilterCount(c81009012.cfilter,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
function c81009012.filter(c)
return c:IsType(TYPE_LINK) and c:IsAbleToExtra()
end
function c81009012.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81009012.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81009012.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c81009012.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
end
function c81009012.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
end
--芳声的花姬·高垣枫
function c81009013.initial_effect(c)
c:SetSPSummonOnce(81009013)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2,c81009013.ovfilter,aux.Stringid(81009013,0))
c:EnableReviveLimit()
--atk down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81009013,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,81009013)
e1:SetCost(c81009013.atkcost)
e1:SetTarget(c81009013.atktg)
e1:SetOperation(c81009013.atkop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81009913)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c81009013.tdtg)
e2:SetOperation(c81009013.tdop)
c:RegisterEffect(e2)
end
function c81009013.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function c81009013.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c81009013.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c81009013.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(346)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c81009013.tdfilter(c)
return c:IsType(TYPE_LINK) and c:IsAbleToExtra()
end
function c81009013.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81009013.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81009013.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c81009013.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c81009013.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--新绿的淑女·高垣枫
function c81009014.initial_effect(c)
c:SetSPSummonOnce(81009014)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2,c81009014.ovfilter,aux.Stringid(81009014,0))
c:EnableReviveLimit()
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81009014,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81009014)
e1:SetCondition(c81009014.dacon)
e1:SetCost(c81009014.dacost)
e1:SetOperation(c81009014.daop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,81009914)
e2:SetTarget(c81009014.tdtg)
e2:SetOperation(c81009014.tdop)
c:RegisterEffect(e2)
end
function c81009014.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function c81009014.dafilter(c,atk)
return c:IsFaceup() and c:GetAttack()>atk
end
function c81009014.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
and Duel.IsExistingMatchingCard(c81009014.dafilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack())
end
function c81009014.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c81009014.daop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c81009014.dafilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c81009014.tdfilter(c)
return c:IsType(TYPE_XYZ+TYPE_LINK) and c:IsAbleToExtra()
end
function c81009014.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81009014.tdfilter(chkc) and chkc:IsAbleToExtra() and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsAbleToExtra()
and Duel.IsExistingTarget(c81009014.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c81009014.tdfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function c81009014.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--诱惑的邀约·高垣枫
local m=81009015
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,cm.ovfilter,aux.Stringid(m,0))
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.sscost)
e2:SetTarget(cm.sstg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function cm.spcost(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.spfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsRank(7,8,9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(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)
end
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function cm.ssfilter(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsLinkBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.ssfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.ssfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.ssfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
--甘美之姬·高垣枫
local m=81009016
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2,cm.ovfilter,aux.Stringid(m,0))
c:EnableReviveLimit()
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1,m)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+900)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function cm.thfilter(c)
return c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local b1=Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
else
op=2
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=nil
if op==0 then
g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
elseif op==1 then
g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
else
g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_ONFIELD+LOCATION_ONFIELD,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.tdfilter(c)
return c:IsType(TYPE_XYZ) and c:IsAbleToDeck() and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(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.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--月下之花·高垣枫
function c81009017.initial_effect(c)
c:SetSPSummonOnce(81009017)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,c81009017.ovfilter,aux.Stringid(81009017,0))
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81009017,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81009017)
e1:SetCost(c81009017.descost)
e1:SetTarget(c81009017.destg)
e1:SetOperation(c81009017.desop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,81009917)
e2:SetCondition(c81009017.thcon)
e2:SetTarget(c81009017.thtg)
e2:SetOperation(c81009017.thop)
c:RegisterEffect(e2)
end
function c81009017.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function c81009017.desfilter(c)
return c:IsFaceup() and c:IsAttackAbove(0) and c:IsAbleToRemove()
end
function c81009017.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c81009017.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81009017.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c81009017.desfilter,tp,0,LOCATION_MZONE,nil)
local dg=g:GetMaxGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,dg,dg:GetCount(),0,0)
end
function c81009017.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c81009017.desfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local dg=g:GetMaxGroup(Card.GetAttack)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
end
end
function c81009017.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c81009017.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c81009017.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
--夏川瞳
s--风纪委员·冴岛清
function c81011007.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,3,3)
--direct attack
--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:SetCondition(c81011007.spcon)
c:RegisterEffect(e0)
--negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(c81011007.dircon)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,81011007)
e1:SetCondition(c81011007.discon)
e1:SetCost(c81011007.discost)
e1:SetTarget(c81011007.distg)
e1:SetOperation(c81011007.disop)
c:RegisterEffect(e1)
--battle damage to effect damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_BATTLE_DAMAGE_TO_EFFECT)
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:SetTargetRange(0,1)
e3:SetValue(c81011007.aclimit)
e3:SetCondition(c81011007.actcon)
c:RegisterEffect(e3)
end
function c81011007.dircon(e)
return e:GetHandler():GetColumnGroupCount()==0
function c81011007.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c81011007.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
function c81011007.discon(e,tp,eg,ep,ev,re,r,rp)
local ex1,g1,gc1,dp1,dv1=Duel.GetOperationInfo(ev,CATEGORY_TOHAND)
local ex2,g2,gc2,dp2,dv2=Duel.GetOperationInfo(ev,CATEGORY_TODECK)
local ex3,g3,gc3,dp3,dv3=Duel.GetOperationInfo(ev,CATEGORY_TOGRAVE)
local ex4,g4,gc4,dp4,dv4=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
local ex5,g5,gc5,dp5,dv5=Duel.GetOperationInfo(ev,CATEGORY_REMOVE)
return ((ex1 and (bit.band(dv1,LOCATION_EXTRA)==LOCATION_EXTRA or g1 and g1:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex2 and (bit.band(dv2,LOCATION_EXTRA)==LOCATION_EXTRA or g2 and g2:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex3 and (bit.band(dv3,LOCATION_EXTRA)==LOCATION_EXTRA or g3 and g3:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex4 and (bit.band(dv4,LOCATION_EXTRA)==LOCATION_EXTRA or g4 and g4:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex5 and (bit.band(dv5,LOCATION_EXTRA)==LOCATION_EXTRA or g5 and g5:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA))))
and Duel.IsChainNegatable(ev)
end
function c81011007.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
function c81011007.discost(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 c81011007.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)
end
function c81011007.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
end
......@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.tdfilter(c)
return c:IsCode(81005077,81011057) and c:IsAbleToExtra()
return c:IsCode(81011057) and c:IsAbleToExtra() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
......
......@@ -20,26 +20,10 @@ function cm.initial_effect(c)
e1:SetCondition(cm.efcon)
e1:SetOperation(cm.efop)
c:RegisterEffect(e1)
--xyzlv
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_XYZ_LEVEL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.xyzlv)
e2:SetLabel(7)
c:RegisterEffect(e2)
end
function cm.xyzlv(e,c,rc)
if rc:IsCode(81005077) then
return c:GetLevel()+0x10000*e:GetLabel()
else
return c:GetLevel()
end
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_XYZ and c:GetReasonCard():IsCode(81005077,81011057)
return r==REASON_XYZ and c:GetReasonCard():IsCode(81011057)
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -65,7 +49,7 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.ifilter(c)
return c:IsFaceup() and c:IsCode(81005077,81011057)
return c:IsFaceup() and c:IsCode(81011057)
end
function cm.indcon(e)
return Duel.IsExistingMatchingCard(cm.ifilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
......
......@@ -46,7 +46,7 @@ function cm.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(81005077,81011057)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(81011057)
end
function cm.xyztg(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
......@@ -65,7 +65,7 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsCode(81005077,81011057)
return c:IsCode(81011057)
and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and Duel.IsChainNegatable(ev)
and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRank(7) and c:IsType(TYPE_XYZ)
return c:IsFaceup() and c:IsRank(4) and c:IsType(TYPE_XYZ)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......@@ -40,20 +40,11 @@ end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and not c:IsAttribute(ATTRIBUTE_DARK)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(7)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.drfilter(c)
return c:IsCode(81011057,81005077) and c:IsAbleToRemoveAsCost()
return c:IsCode(81011057) and c:IsAbleToRemoveAsCost()
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
--二宫爱丽丝·凝望
--淡野美妙子
local m=81011086
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.setcon)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(cm.chainop)
c:RegisterEffect(e3)
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsType(TYPE_SPIRIT) and re:IsActiveType(TYPE_MONSTER) and ep==tp then
Duel.SetChainLimit(cm.chainlm)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.setfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSSetable()
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,c:GetCode())
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
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
function cm.chainlm(e,rp,tp)
return tp==rp
function cm.costfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:GetSummonLocation()==LOCATION_SZONE and (c:GetType()&(TYPE_TRAP+TYPE_CONTINUOUS))==TYPE_TRAP+TYPE_CONTINUOUS and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
--风纪委员·冴岛清美
function c81011089.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:SetCondition(c81011089.spcon)
c:RegisterEffect(e0)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,81011089)
e1:SetCondition(c81011089.discon)
e1:SetCost(c81011089.discost)
e1:SetTarget(c81011089.distg)
e1:SetOperation(c81011089.disop)
c:RegisterEffect(e1)
end
function c81011089.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c81011089.discon(e,tp,eg,ep,ev,re,r,rp)
local ex1,g1,gc1,dp1,dv1=Duel.GetOperationInfo(ev,CATEGORY_TOHAND)
local ex2,g2,gc2,dp2,dv2=Duel.GetOperationInfo(ev,CATEGORY_TODECK)
local ex3,g3,gc3,dp3,dv3=Duel.GetOperationInfo(ev,CATEGORY_TOGRAVE)
local ex4,g4,gc4,dp4,dv4=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
local ex5,g5,gc5,dp5,dv5=Duel.GetOperationInfo(ev,CATEGORY_REMOVE)
return ((ex1 and (bit.band(dv1,LOCATION_EXTRA)==LOCATION_EXTRA or g1 and g1:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex2 and (bit.band(dv2,LOCATION_EXTRA)==LOCATION_EXTRA or g2 and g2:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex3 and (bit.band(dv3,LOCATION_EXTRA)==LOCATION_EXTRA or g3 and g3:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex4 and (bit.band(dv4,LOCATION_EXTRA)==LOCATION_EXTRA or g4 and g4:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA)))
or (ex5 and (bit.band(dv5,LOCATION_EXTRA)==LOCATION_EXTRA or g5 and g5:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA))))
and Duel.IsChainNegatable(ev)
end
function c81011089.discost(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 c81011089.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)
end
function c81011089.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
end
......@@ -37,7 +37,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsCode(81005077,81011057)
return c:IsFaceup() and c:IsCode(81011057)
end
function cm.value(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*800
......@@ -82,7 +82,7 @@ function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.ssfilter(c,e,tp)
return c:IsCode(81005077) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
return c:IsCode(81011057) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ssfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
......
--璃池樱空·初遇
Duel.LoadScript("c81000000.lua")
function c81019037.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c81019037.matfilter,1)
Tenka.PyroLink(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
--雨草古都
--睡意朦胧·鹭泽由依
local m=81019044
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()
--direct attack
--cannot direct attack
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DIRECT_ATTACK)
e0:SetCondition(cm.dicon)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e0)
--destroy
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.sumop)
c:RegisterEffect(e1)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.discost)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e5)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc and c:GetLinkedGroup():IsContains(bc) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
--indes
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.indcon)
e2:SetOperation(cm.indop)
c:RegisterEffect(e2)
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,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PSYCHO))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function cm.dicon(e)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function cm.cfilter(c,g)
return g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function cm.filter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(cm.filter,nil,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
Duel.SendtoGrave(tc,REASON_EFFECT)
tc=g:GetNext()
end
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
--自信未满·雨草古都
--崭新出厂·鹭泽由依
local m=81019045
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()
--direct attack
--cannot direct attack
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DIRECT_ATTACK)
e0:SetCondition(cm.dicon)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e0)
--destroy
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.sumtg)
e1:SetOperation(cm.sumop)
c:RegisterEffect(e1)
--disable summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON)
e2:SetCountLimit(1)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON)
--level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.lvtg)
e3:SetOperation(cm.lvop)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e4)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc and c:GetLinkedGroup():IsContains(bc) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function cm.dicon(e)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
function cm.sumtg(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.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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)
end
function cm.cfilter(c,g)
return g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
function cm.sumop(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)
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)
end
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
function cm.filter(c)
return c:IsRace(RACE_PSYCHO) and c:IsFaceup() and c:GetLevel()>0
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
function cm.lvtg(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,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local sel=0
local lvl=1
if tc:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(m,1))
else
sel=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
end
if sel==1 then
lvl=-1
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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