Commit 750d4131 authored by Tachibana's avatar Tachibana 🐟

pic

parent de7233bc
Pipeline #26449 passed with stage
in 7 minutes and 35 seconds
No preview for this file type
......@@ -107,7 +107,6 @@
09910654 0 --绝界星景
09910816 2 --飓曙龙 葛簇特
09910823 0 --虹曙龙 开普勒-90
09966000 0 --黑野紫
#100
10030011 1 --暗世界的青蛙骑士
10030081 1 --绝念的少女 美纱
......@@ -1558,6 +1557,7 @@
81004304 1 --茶莉子·碧海世界
81008008 0 --啦啦队·露卡希娅
81010015 1 --真实的一瞬
81010043 1 --融化的彼此
81011001 0 --静谧青龙 拉斯托克
81027019 0 --灯火之苍钟
81027026 1 --灯火之魔女·盛夏
......@@ -1661,8 +1661,6 @@
98600005 1 --夜樱之宴
98610007 1 --少女分形·冻结之世
98622201 2 --子虚之罠
98626800 0 --菲诺蒙丹帕·娜美塞拉
98626803 1 --失落的圣诞节
98657312 1 --库拉丽丝-心配
98666901 0 --寒灵刻使 雾水
98670704 1 --破坏能力者 枯轲
......
--梦之中的不稳定物质
local s,id,o=GetID()
function s.initial_effect(c)
c:SetSPSummonOnce(id)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetCode(EFFECT_SPSUMMON_PROC)
e11:SetRange(LOCATION_GRAVE)
e11:SetCondition(s.spcon)
e11:SetOperation(s.spop)
c:RegisterEffect(e11)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.cost)
e2:SetTarget(s.target)
e2:SetOperation(s.prop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetCost(s.cost2)
e3:SetCondition(s.con2)
e3:SetTarget(s.target2)
e3:SetOperation(s.prop2)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonType(SUMMON_TYPE_PENDULUM) and (not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_PENDULUM))
end
function s.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function s.filter3(c)
return c:IsFacedown() and c:IsAbleToRemoveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_EXTRA,0,1,nil) and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.filter3,tp,LOCATION_EXTRA,0,1,99,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return (c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_PENDULUM)) or bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function s.filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:GetAttack()==0 and c:GetDefense()==1500 and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function s.prop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP) then
Duel.SpecialSummon(g,nil,tp,tp,true,false,POS_FACEUP)
end
end
end
function s.drcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.drcfilter,1,nil,tp)
end
function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function s.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsRace(RACE_FAIRY)
end
function s.filter2(c)
return c:IsFacedown() and c:IsAbleToDeck()
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function s.prop2(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.IsExistingMatchingCard(s.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_REMOVED,0,1,nil)) then
return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,nil,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local g=Duel.SelectMatchingCard(tp,s.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--梦野
local m=52580000
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,4,cm.lcheck)
c:EnableReviveLimit()
--spsummon bgm
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(cm.sumcon)
e0:SetOperation(cm.sumsuc)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(500)
c:RegisterEffect(e2)
end
function cm.lcheck(g,lc)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_TOGRAVE)
e:SetLabel(0)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--梦野·流离王女
local m=52580001
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,cm.mfilter1,cm.mfilter2,1,63,true)
--cannot be fusion 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_FUSION_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--atk buff
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(cm.atkcalc)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.atkcon)
e2:SetOperation(cm.atkop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(cm.indval)
c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCountLimit(1,m)
e5:SetTarget(cm.rmtg)
e5:SetOperation(cm.rmop)
c:RegisterEffect(e5)
end
function cm.mfilter1(c)
return c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.mfilter2(c)
return c:IsFusionType(TYPE_PENDULUM)
end
function cm.atkcalc(e,c)
local g=c:GetMaterial()
local atk=0
for tc in aux.Next(g) do
if tc:IsType(TYPE_PENDULUM) then
atk=atk+tc:GetBaseAttack()
end
end
e:SetLabel(atk)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabelObject():GetLabel()
if atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function cm.efilter(e,te)
return te:GetHandler():IsType(TYPE_PENDULUM)
end
function cm.indval(e,c)
return c:IsType(TYPE_PENDULUM)
end
function cm.chkfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToRemove() and c:IsFaceup()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.chkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.chkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.chkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
end
--梦野·风之记忆
local m=52580002
local cm=_G["c"..m]function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,m+900)
e3:SetCost(cm.cost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.thfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsLevel(3) 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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.rmfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToRemove()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.operation(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:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local ct=1
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then ct=2 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabelObject(tc)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
end
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(81006999,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,ct)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end
return e:GetLabelObject():GetFlagEffect(81006999)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.ReturnToField(tc)
end
--梦野·无处可逃
local m=52580003
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--atk/def
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetRange(LOCATION_PZONE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(cm.atktg)
e0:SetValue(500)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rmcost)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
end
function cm.atktg(e,c)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.rmfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToRemove()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return c:IsType(TYPE_EFFECT)
end
--梦野·青之仗剑
local m=52580004
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetValue(DOUBLE_DAMAGE)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.damcon)
e3:SetTarget(cm.damtg)
e3:SetOperation(cm.damop)
c:RegisterEffect(e3)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)
local og=Duel.GetOperatedGroup()
local tc=og:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=og:GetNext()
end
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.damfilter(c)
return c:IsPosition(POS_DEFENSE)
end
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,0,LOCATION_MZONE,nil)
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*800)
end
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,0,LOCATION_MZONE,nil)
Duel.Damage(p,ct*800,REASON_EFFECT)
end
--鲜为人知的女仆
local m=81011009
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()
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.sccon)
e1:SetTarget(cm.sctg)
e1:SetOperation(cm.scop)
c:RegisterEffect(e1)
--synchro level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SYNCHRO_LEVEL)
e2:SetValue(cm.slevel)
c:RegisterEffect(e2)
end
function cm.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function cm.slevel(e,c)
local lv=e:GetHandler():GetLevel()
return 1*65536+lv
end
--鲜为人知的少女
local m=81011010
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.sscon)
e3:SetTarget(cm.sstg)
e3:SetOperation(cm.ssop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFacedown() or c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.ssfilter(c,e,tp)
return c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.ssfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.ssfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--鲜为人知的王女
local m=81011011
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(nil),1,1)
--immune
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(cm.imcon)
e0:SetOperation(cm.imop)
c:RegisterEffect(e0)
--destroy&damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.material_type=TYPE_SYNCHRO
function cm.imcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.imop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsCode(81011009) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.ssfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function cm.ssfilter(c,e,tp)
return c:IsCode(81011010) 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 false end
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if e:GetHandler():GetSequence()<5 then ft=ft+1 end
return ft>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,cm.ssfilter,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst(),e,tp)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
if g:GetCount()<=ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_RULE)
end
end
--不为人知的王女
local m=81011012
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(nil),1,1)
--immune
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(cm.imcon)
e0:SetOperation(cm.imop)
c:RegisterEffect(e0)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_SPSUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
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.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.material_type=TYPE_SYNCHRO
function cm.imcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.imop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA+LOCATION_DECK)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and eg:IsExists(cm.cfilter,1,nil,1-tp) and Duel.GetCurrentChain()==0
and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function cm.spfilter(c,e,tp)
return c:IsCode(81011011) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and 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)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
--青色蝴蝶 苏娜
local m=81011013
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_TOKEN),2,2)
--token
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.tkcost)
e3:SetTarget(cm.tktg)
e3:SetOperation(cm.tkop)
c:RegisterEffect(e3)
end
function cm.tkcostfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function cm.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(cm.tkcostfilter,tp,loc,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tkcostfilter,tp,loc,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,TYPES_TOKEN_MONSTER,400,400,2,RACE_SPELLCASTER,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,TYPES_TOKEN_MONSTER,400,400,2,RACE_SPELLCASTER,ATTRIBUTE_WIND) then return end
local token=Duel.CreateToken(tp,m+1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
token:RegisterEffect(e1,true)
end
--有栖川蓝子
local m=81980000
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--change battle target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.cbcon)
e2:SetCost(cm.cbcost)
e2:SetOperation(cm.cbop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.cbcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()~=e:GetHandler()
end
function cm.cbcost(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.cbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
Duel.CalculateDamage(at,c)
end
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:GetTextAttack()==0 and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(8) 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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--热浪·有栖川蓝子
local m=81980001
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.cfilter(c)
return c:GetBaseAttack()~=0 and c:IsFaceup()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.cfilter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:GetBaseAttack()~=0
end
--十十六木花奏子
local m=98625000
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.damcost)
e1:SetTarget(cm.damtg)
e1:SetOperation(cm.damop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(cm.dancon)
e2:SetTarget(cm.dantg)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
end
function cm.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function cm.dancon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.dantg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,800)
end
--十十六木花奏子·歌
local m=98625001
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.rectg)
e1:SetOperation(cm.recop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
cm.material_type=TYPE_SYNCHRO
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ep==tp end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.rmfilter(c,tp)
return c:IsSummonLocation(LOCATION_HAND) and c:IsPreviousControler(tp)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.rmfilter,1,nil,tp)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,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,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--菲诺蒙丹帕·娜美塞拉
local m=98626800
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddLinkProcedure(c,cm.mfilter,1,1)
c:EnableReviveLimit()
--open
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_TO_GRAVE)
e0:SetCountLimit(1,m)
e0:SetOperation(cm.operation)
c:RegisterEffect(e0)
end
cm.toss_dice=true
function cm.mfilter(c)
return not c:IsLinkType(TYPE_LINK) and c:IsLinkType(TYPE_EFFECT)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d1,d2=Duel.TossDice(tp,2)
if d1==1 or d2==1 then
Duel.Draw(1-tp,2,REASON_EFFECT)
end
if d1==2 or d2==2 then
Duel.Draw(tp,2,REASON_EFFECT)
end
if d1==3 or d2==3 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
if d1==4 or d2==4 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
if d1==5 or d2==5 then
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-4000)
end
if d1==6 or d2==6 then
Duel.SetLP(tp,Duel.GetLP(tp)-4000)
end
end
--彼岸花之泉
local m=98626801
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
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.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
--约束的星空
local m=98626802
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil,tp,POS_FACEDOWN)
local tg=g:GetFirst()
if tg==nil then return end
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
e1:SetLabel(0)
tg:RegisterEffect(e1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==1 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
else e:SetLabel(1) end
end
--失落的圣诞节
local m=98626803
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(cm.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function cm.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
--盛开的百合花
local m=98626804
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.costfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return sumtype~=SUMMON_TYPE_RITUAL and e:GetLabelObject()~=se
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--千年标本
local m=98626805
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:IsFacedown() or c:IsType(TYPE_EFFECT)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetCount()>0 and not g:IsExists(cm.cfilter,1,nil)
end
function cm.tfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0x8,tp,false,false)
and not Duel.IsExistingMatchingCard(cm.bfilter,tp,LOCATION_ONFIELD,0,1,nil,c)
end
function cm.bfilter(c,tc)
return tc:IsCode(c:GetCode()) and c:IsFaceup()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0x8,tp,tp,false,false,POS_FACEUP)
end
end
end
--矛盾天使
local m=98626806
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
--control
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Attribute Dark
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(ATTRIBUTE_LIGHT)
c:RegisterEffect(e2)
end
function cm.cfilter(c,g)
return g:IsContains(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function cm.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--温柔彗星
local m=98626807
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
return at and ((a:IsControler(tp) and a:GetBaseAttack()==0)
or (at:IsControler(tp) and at:IsFaceup() and at:GetBaseAttack()==0))
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
if a:IsControler(1-tp) then a,at=at,a end
if not a:IsRelateToBattle() or a:IsFacedown() or not at:IsRelateToBattle() or at:IsFacedown() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
e1:SetValue(math.max(at:GetAttack(),at:GetDefense()))
a:RegisterEffect(e1)
end
--特色
local m=98626808
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(aux.dscon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.afilter(c,tp)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsAbleToHand()
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function cm.bfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOHAND)
local g1=Duel.SelectTarget(tp,cm.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g2=Duel.SelectTarget(tp,cm.bfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g2,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TOHAND)
local ex,g2=Duel.GetOperationInfo(0,CATEGORY_ATKCHANGE)
local tc1=g1:GetFirst()
local tc2=g2:GetFirst()
if tc1 and tc2 and tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(tc1:GetAttack())
if tc2:RegisterEffect(e1) then
Duel.SendtoHand(tc1,nil,REASON_EFFECT)
end
end
end
--永远的陪伴 佐仓杏子
local m=98626809
local cm=_G["c"..m]
function cm.initial_effect(c)
--sp
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_SPSUMMON_PROC)
e12:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e12:SetRange(LOCATION_HAND)
e12:SetCondition(cm.spcon2)
e12:SetOperation(cm.spop2)
c:RegisterEffect(e12)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,m-1)
e3:SetCondition(cm.con)
e3:SetTarget(cm.target2)
e3:SetOperation(cm.activate2)
c:RegisterEffect(e3)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function cm.spfilter2(c)
return ((c:IsSetCard(0x6b25) and c:IsType(TYPE_MONSTER))
or (c:IsType(TYPE_TOKEN) and c:IsAttribute(ATTRIBUTE_FIRE))) and c:IsReleasable()
end
function cm.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then
return Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
else
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
end
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp,c)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
local tc2=g:GetFirst()
while tc2 do
if not tc2:IsFaceup() then Duel.ConfirmCards(1-tp,tc2) end
tc2=g:GetNext()
end
Duel.Release(g,REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
local tc=g1:GetFirst()
while tc do
if not tc:IsFaceup() then Duel.ConfirmCards(1-tp,tc) end
tc=g1:GetNext()
end
Duel.Release(g1,REASON_COST)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Release(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if rg:GetCount()>0 then
Duel.BreakEffect()
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
end
function cm.filter2(c)
return c:IsSetCard(0x6b25) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--She is my wife
local m=98626810
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter1(c)
local tp=c:GetControler()
return c:IsFaceup() and not c:IsType(TYPE_EFFECT)
and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function cm.filter2(c)
local tp=c:GetControler()
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(cm.filter2,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,cm.filter2,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local a=g:GetFirst()
local b=g:GetNext()
if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then
Duel.SwapControl(a,b)
end
end
--虚拟水神喵咪
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(98626813,"VrAqua")
function cm.initial_effect(c)
--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)
c:RegisterEffect(e0)
--normal summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.nscon)
e1:SetValue(1)
c:RegisterEffect(e1)
--summon with no tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1)
e2:SetCondition(cm.ntcon)
e2:SetTarget(cm.nttg)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFacedown() or not rsva.IsSetM(c)
end
function cm.nscon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil))
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.nttg(e,c)
return c:IsLevelAbove(5) and c:IsRace(RACE_CYBERSE)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(cm.rettg)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--虚拟水神随拍
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(98626814,"VrAqua")
function cm.initial_effect(c)
--Normal Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(cm.sumcon)
e1:SetTarget(cm.sumtg)
e1:SetOperation(cm.sumop)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function cm.sumfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if Duel.Summon(tp,tc,true,nil)~=0 and tc:IsLevel(10) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.drfilter(c)
return rsva.IsSet(c) and c:IsAbleToDeck() and not c:IsPublic()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.drfilter,p,LOCATION_HAND,0,1,3,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g)
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct==0 then return end
Duel.SortDecktop(p,p,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
Duel.BreakEffect()
Duel.Draw(p,ct,REASON_EFFECT)
end
end
--虚拟水神女仆长
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(98626815,"VrAqua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--extra summon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(cm.sumop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_FLIP)
c:RegisterEffect(e5)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetTarget(cm.rmlimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.target(e,c)
return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsLevel(10)
end
function cm.rmlimit(e,c,tp,r)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsLevel(10) and r==REASON_EFFECT
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,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(cm.extg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.extg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_CYBERSE)
end
--虚拟水神之忆
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(98626816,"VrAqua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thcfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function cm.thfilter(c,code)
return c:IsType(TYPE_MONSTER) and rsva.IsSetM(c) and not c:IsCode(code) and c:IsAbleToHand()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.thcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.SendtoGrave(g,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,code):GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,tc)
if tc:IsSummonable(true,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Summon(tp,tc,true,nil)
end
end
end
--虚拟水神学妹
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(98626817,"VrAqua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and rsva.IsSet(c) 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_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.tdtg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_TO_HAND)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetTarget(cm.tdtg)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.tdtg(e,c)
return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsLevel(10) and c:IsOnField()
end
--用浴霸保护团员的铁华团团长 奥尔加
local m=98626818
local cm=_G["c"..m]
function cm.initial_effect(c)
--code
aux.AddCodeList(c,81010001)
aux.EnableChangeCode(c,33374561,LOCATION_MZONE+LOCATION_GRAVE)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsCode(33374565)
end
function cm.cfilter1(c)
return c:IsFaceup() and c:IsCode(33374567)
end
function cm.cfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x558) and c:IsLevel(4)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(33374560,PLAYER_ALL,LOCATION_FZONE)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1: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:IsCode(33374565) and c:IsLocation(LOCATION_EXTRA)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(cm.cfilter1,tp,0,LOCATION_MZONE,nil)
if #g>0 and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.thfilter(c)
return c:IsCode(81010001) 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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--水晶回廊
local m=98626820
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,81010004)
aux.EnableChangeCode(c,81010004,LOCATION_ONFIELD+LOCATION_GRAVE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.sumsuc)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetCost(cm.cost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOEXTRA)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,m+900)
e4:SetCondition(cm.thcon)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,2))
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,81010005,0,TYPES_TOKEN_MONSTER,800,800,3,RACE_ROCK,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,81010005,0,TYPES_TOKEN_MONSTER,800,800,3,RACE_ROCK,ATTRIBUTE_WIND) then
local token=Duel.CreateToken(tp,81010005)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_FZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function cm.tdfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsAbleToExtra()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,g:GetCount(),0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
end
end
--夜之未眠
local m=98626821
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>9
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,5) and Duel.IsPlayerCanDraw(1-tp,5) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0xe,0xe,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,5)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,aux.ExceptThisCard(e))
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Draw(tp,5,REASON_EFFECT)
Duel.Draw(1-tp,5,REASON_EFFECT)
Duel.BreakEffect()
local ag=Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)
if ag>0 then
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-ag*2000)
end
end
--花之未眠
local m=98626822
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
Duel.Draw(p,ct,REASON_EFFECT)
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--水之未眠
local m=98626823
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 and sg>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,sg)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return not (e:GetHandler():IsType(TYPE_MONSTER) or e:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if Duel.DiscardHand(1-tp,nil,sg,sg,REASON_EFFECT+REASON_DISCARD)~=0 and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==0 then
local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
--朝你大胯捏一把
local m=98626824
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK,0x11e0)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.Hint(HINT_MUSIC,0,aux.Stringid(26807020,0))
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--音羽真寻
local m=98626899
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,cm.synfilter,aux.NonTuner(cm.synfilter),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to grave
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_TOGRAVE)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_MZONE)
e8:SetCountLimit(1,m)
e8:SetTarget(cm.tgtg)
e8:SetOperation(cm.tgop)
c:RegisterEffect(e8)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.synfilter(c)
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.counterfilter(c)
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1: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 c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.spfilter(c,e,tp)
return c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if ct<=0 or g:GetCount()==0 then return end
ct=math.min(ct,g:GetClassCount(Card.GetCode))
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if sg and sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.assfilter(c)
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.assfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.assfilter,1-tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE)
end
end
--神崎春瑚
local m=98630000
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()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.atkcon2)
e2:SetOperation(cm.atkop2)
c:RegisterEffect(e2)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(cm.indval)
c:RegisterEffect(e5)
--immune
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetValue(cm.efilter)
c:RegisterEffect(e6)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and re:GetHandler():GetAttack()~=re:GetHandler():GetBaseAttack()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return d and a:GetControler()~=d:GetControler()
end
function cm.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsFaceup() and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(a:GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
a:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(d:GetBaseAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
d:RegisterEffect(e2)
end
end
function cm.indval(e,c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:GetOwner():GetAttack()~=te:GetOwner():GetBaseAttack()
end
--梦色标本·神崎春瑚
local m=98630002
local cm=_G["c"..m]
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_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.atkcon)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(cm.indval)
c:RegisterEffect(e5)
--immune
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetValue(cm.efilter)
c:RegisterEffect(e6)
end
function cm.filter(c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack()) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function cm.atkfilter(c,tp)
return c:IsSummonPlayer(1-tp)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.atkfilter,1,nil,tp)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(-300)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
function cm.indval(e,c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:GetOwner():GetAttack()~=te:GetOwner():GetBaseAttack()
end
--白切黑·神崎春瑚
local m=98630003
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2)
c:EnableReviveLimit()
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(-800)
c:RegisterEffect(e2)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(cm.indval)
c:RegisterEffect(e5)
--immune
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetValue(cm.efilter)
c:RegisterEffect(e6)
end
function cm.indval(e,c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:GetOwner():GetAttack()~=te:GetOwner():GetBaseAttack()
end
--女仆店员·神崎春瑚
local m=98630004
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.atktg)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.indval(e,c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(100)
tc:RegisterEffect(e1)
end
end
--春之约会·神崎春瑚
local m=98630005
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.atktg)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.indval(e,c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-100)
tc:RegisterEffect(e1)
end
end
--黑野紫
local m=9966000
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetTarget(cm.reptg)
e4:SetOperation(cm.repop)
c:RegisterEffect(e4)
end
function cm.tgfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function cm.thfilter(c,code)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() and not c:IsCode(code)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.cefilter(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and Duel.IsExistingMatchingCard(cm.cefilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(3) 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
function cm.repfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup()
and Duel.IsExistingMatchingCard(cm.repfilter,tp,LOCATION_ONFIELD,0,1,c,e) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,cm.repfilter,tp,LOCATION_ONFIELD,0,1,1,c,e)
Duel.SetTargetCard(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end
--约会·黑野紫
local m=9966001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PSYCHO),2,2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsContains(c)
end
function cm.thfilter2(c)
return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--花嫁·黑野紫
local m=9966002
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.lfilter,2,99,cm.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
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:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.lfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_WIND) and c:IsLinkType(TYPE_LINK)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkMarker,1,nil,LINK_MARKER_BOTTOM)
and g:IsExists(Card.IsLinkMarker,1,nil,LINK_MARKER_LEFT)
and g:IsExists(Card.IsLinkMarker,1,nil,LINK_MARKER_RIGHT)
end
function cm.filter(c,e,tp)
return c:IsLinkBelow(2) and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return race&RACE_PSYCHO>0 and re:GetHandler()~=e:GetHandler()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
......@@ -1475,9 +1475,6 @@
!setname 0x870 少女分形
!setname 0x871 濑名歌铃
##◇兔锅 1874883039 222
##◇清雅 - 250
##SUPER STAR 满-MITSURU- 2490909197 268
##◇▲ - 300
##◇花糖 2236141431 573-574
!setname 0x87c 库拉丽丝
#named_with_sanae 早苗H
......
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