Commit 5d435d09 authored by 聖園ミカ's avatar 聖園ミカ 🐟

update

parent a91548f7
No preview for this file type
...@@ -143,16 +143,6 @@ ...@@ -143,16 +143,6 @@
12041005 0 --幼奏龙 碧斯安 12041005 0 --幼奏龙 碧斯安
12062001 1 --诞源的神子 艾尔儿 12062001 1 --诞源的神子 艾尔儿
#128 #128
12847011 1 --再来一发?
12847022 0 --女仆教育
12847039 1 --恐怖☆暴走☆袭击☆三点式!
12847056 0 --死域领主 契丝提亚
12847098 1 --宇宙·埃列什基伽勒
12847222 1 --原罪的白色魔女 迪亚贝鲁
12847321 0 --再见绘梨
12847333 0 --凤凰神·亚莉丝塔·捷琳
12847401 2 --你休想天使
12847405 2 --这好吗魔女
12855501 1 --封璇击·结界 12855501 1 --封璇击·结界
12855503 1 --封璇击·雷姬 12855503 1 --封璇击·雷姬
12855504 1 --封璇击·风姬 12855504 1 --封璇击·风姬
......
...@@ -23,8 +23,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -23,8 +23,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end if chk==0 then return true end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if Duel.NegateAttack() and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
end end
end end
--25时-#33CCBB Miku
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(2,id)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,id)
e1:SetCondition(s.spcon)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and c:IsDiscardable() end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.filter(c,tp,fc)
return c:IsType(TYPE_FIELD) and not c:IsCode(fc:GetCode()) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if chk==0 then return fc and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp,fc) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,fc,1,0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if not fc or Duel.SendtoGrave(fc,REASON_EFFECT)==0 then return end
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp,fc):GetFirst()
if tc then
Duel.BreakEffect()
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function s.cfilter(c,tp)
return c:IsSummonPlayer(1-tp)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local loc=math.log(c:GetLocation(),2)
return Duel.GetCurrentChain()>0 and Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)>0 and Duel.GetFlagEffect(tp,id+loc)==0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and c:IsAbleToRemoveAsCost() end
local loc=math.log(c:GetLocation(),2)
Duel.RegisterFlagEffect(tp,id+loc,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_REMOVED) and c:GetReasonEffect()==e then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectOption(tp,1152,aux.Stringid(id,2))==0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
elseif Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
end
end
\ No newline at end of file
--春日野 高松灯
function c12841122.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12841122,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,12841122)
e1:SetCondition(c12841122.sccon)
e1:SetTarget(c12841122.sctg)
e1:SetOperation(c12841122.scop)
--c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12841122,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(c12841122.spcon)
e2:SetTarget(c12841122.sptg)
e2:SetOperation(c12841122.spop)
--c:RegisterEffect(e2)
end
function c12841122.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c12841122.synfilter(c)
return (c:IsSynchroSummonable(nil) and c:IsLevel(9))
end
function c12841122.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12841122.synfilter,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12841122.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c12841122.synfilter,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
function c12841122.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c12841122.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,12841123,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PSYCHO,ATTRIBUTE_LIGHT) and c:GetFlagEffect(12841122)<2 end
c:RegisterFlagEffect(12841122,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c12841122.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,12841123,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PSYCHO,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,12841123)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--天与暴君 伏黑甚尔
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,s.matfilter,2,99)
c:EnableReviveLimit()
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(s.sumsuc)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--battle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(s.damtg)
e2:SetOperation(s.damop)
e2:SetCountLimit(1,id)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.damcon)
c:RegisterEffect(e3)
--immume
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
--indes battle
local e5=e4:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(s.indes)
c:RegisterEffect(e5)
end
function s.matfilter(c)
return not (c:IsLinkType(TYPE_EFFECT) or c:IsLinkType(TYPE_TOKEN))
end
function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(id,0))
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetAttackableTarget()
if chk==0 then return #g>0 end
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=c:GetAttackableTarget()
if g and #g>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.CalculateDamage(c,tc)
end
local bc=Duel.GetAttackTarget()
if bc and bc:IsRelateToBattle() and bc:IsFaceup() then
Duel.Hint(HINT_CARD,0,id)
Duel.Damage(1-tp,bc:GetBaseAttack(),REASON_EFFECT)
end
end
end
end
function s.cfilter(c,tp)
return c:IsSummonPlayer(1-tp) and c:IsAttackAbove(3000) and c:IsFaceup()
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true
else return te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and te:GetOwner()~=e:GetOwner() end
end
function s.indes(e,c)
return c:IsType(TYPE_EFFECT)
end
\ No newline at end of file
--魔术贤者的演示
local m=12847001
local cm=_G["c"..m]
function cm.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.IsChainNegatable(ev) and re:GetHandler():GetType()==TYPE_SPELL
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local tg=re:GetTarget()
local event=re:GetCode()
if event==EVENT_CHAINING then return
not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)
else
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(event,true)
return not tg or tg(e,tp,teg,tep,tev,tre,tr,trp,0)
end
return re:GetHandler():IsRelateToEffect(re)
end
local event=re:GetCode()
e:SetLabelObject(re)
e:SetCategory(re:GetCategory())
e:SetProperty(re:GetProperty())
local tg=re:GetTarget()
if event==EVENT_CHAINING then
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
else
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(event,true)
if tg then tg(e,tp,teg,tep,tev,tre,tr,trp,1) end
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:GetOriginalCode()==m then return end
local te=e:GetLabelObject()
if not te then return end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect()
Duel.NegateActivation(ev)
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,0)
e1:SetTarget(cm.actlimit)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
function cm.actlimit(e,re,rp)
local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsType(TYPE_SPELL)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.ConfirmCards(tp,tc)
if tc:GetType()==TYPE_SPELL then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
--妖精骑士-兰斯洛特
local m=12847005
local cm=_G["c"..m]
cm.upside_code=m+1
cm.downside_code=m
function cm.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(cm.atkcon)
e1:SetCountLimit(1,12847005)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,12847005)
e2:SetCondition(cm.ctcon)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,12847005)
e3:SetTarget(cm.reptg)
c:RegisterEffect(e3)
--to face up
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e0:SetCountLimit(1,12847005)
e0:SetCondition(cm.backon)
e0:SetOperation(cm.backop)
c:RegisterEffect(e0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() then return false end
e:SetLabel(tc:GetAttack())
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabel()
if c:IsRelateToEffect(e) and c:IsFaceup() 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)
Duel.ChainAttack()
end
end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tcode=c.upside_code
local g=Group.FromCards(c)
Duel.HintSelection(g)
Duel.Hint(HINT_CARD,0,m)
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,m+1)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local atk=c:GetAttack()/2
if chk==0 then return c:GetAttack()>0 end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-atk)
c:RegisterEffect(e1)
return true
else return false end
end
function cm.backon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c.upside_code and c:GetOriginalCode()==c.upside_code
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,m-1)
end
\ No newline at end of file
--妖精舞者-美露莘
local m=12847006
local cm=_G["c"..m]
cm.upside_code=m
cm.downside_code=m-1
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atk down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48905153,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(cm.atkcon)
e1:SetCost(cm.atkcost)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.ctcon)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 and e:GetHandler():GetFlagEffect(m)==0
end
function cm.atkcost(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
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
local ctype=0
for i,type in ipairs({TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP}) do
if tc:GetOriginalType()&type~=0 then
ctype=ctype|type
end
end
e:SetLabel(ctype)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ctype=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetChainLimit(cm.chlimit(ctype))
end
function cm.chlimit(ctype)
return function(e,ep,tp)
return tp==ep or e:GetHandler():GetOriginalType()&ctype==0
end
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(-2000)
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
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x50,1) end
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tcode=c.downside_code
local g=Group.FromCards(c)
Duel.HintSelection(g)
Duel.Hint(HINT_CARD,0,m)
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,m-1)
end
function cm.efilter1(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) and te:GetHandler():GetAttack()<=e:GetHandler():GetAttack()
end
\ No newline at end of file
--再来一发?
local s,id,o=GetID()
function s.initial_effect(c)
--cannot set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SSET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(0xff)
e2:SetTargetRange(1,1)
e2:SetTarget(s.atarget)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_NEGATED)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(s.discon)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
s.sumgroup=Group.CreateGroup()
s.sumgroup:KeepAlive()
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON)
ge1:SetOperation(s.sumop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_FLIP_SUMMON)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_SPSUMMON)
Duel.RegisterEffect(ge3,0)
s.sumsgroup=Group.CreateGroup()
s.sumsgroup:KeepAlive()
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_SUMMON_SUCCESS)
ge4:SetOperation(s.sumsop)
Duel.RegisterEffect(ge1,0)
local ge5=ge4:Clone()
ge5:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(ge5,0)
local ge6=ge4:Clone()
ge6:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge6,0)
end
end
function s.atarget(e,c)
return c==e:GetHandler()
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
if eg then s.sumgroup:Merge(eg) end
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_END)
ge1:SetLabelObject(s.sumgroup)
ge1:SetOperation(s.resetop)
Duel.RegisterEffect(ge1,0)
end
function s.sumsop(e,tp,eg,ep,ev,re,r,rp)
if eg then s.sumsgroup:Merge(eg) end
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_END)
ge1:SetLabelObject(s.sumsgroup)
ge1:SetOperation(s.resetop)
Duel.RegisterEffect(ge1,0)
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Clear()
e:Reset()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local p,dp,te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER,CHAININFO_DISABLE_PLAYER,CHAININFO_TRIGGERING_EFFECT)
return dp==1-tp and e:GetHandler():IsPublic()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,dp,te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER,CHAININFO_DISABLE_PLAYER,CHAININFO_TRIGGERING_EFFECT)
local ec=te:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.ConfirmCards(tp,c)
Duel.SendtoGrave(c,REASON_RULE)
local res=Duel.TossCoin(tp,1)
if res==1 then
Duel.Hint(HINT_CARD,0,ec:GetOriginalCode())
local erg=Group.CreateGroup()
local fre=Effect.GlobalEffect()
local feg=Group.CreateGroup()
local code=te:GetCode()
if code==EVENT_CHAINING then
fre=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
local fc=fre:GetHandler()
feg:AddCard(fc)
end
if code==EVENT_SUMMON or code==EVENT_FLIP_SUMMON or code==EVENT_SPSUMMON then
feg:Merge(s.sumgroup)
end
if code==EVENT_SUMMON_SUCCESS or code==EVENT_FLIP_SUMMON_SUCCESS or code==EVENT_SPSUMMON_SUCCESS then
feg:Merge(s.sumsgroup)
end
ec:CreateEffectRelation(te)
local operation=te:GetOperation()
local ftgpy=Duel.GetChainInfo(ev,CHAININFO_TARGET_PLAYER)
local ftgpr=Duel.GetChainInfo(ev,CHAININFO_TARGET_PARAM)
local ftgc=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
Duel.SetTargetPlayer(ftgpy)
Duel.SetTargetParam(ftgpr)
if ftgc then
for tc in aux.Next(ftgc) do
tc:CreateEffectRelation(te)
erg:AddCard(tc)
end
Duel.SetTargetCard(ftgc)
end
if operation then operation(te,p,feg,ep,ev-1,fre,r,rp) end
ec:ReleaseEffectRelation(te)
if erg then
for tc in aux.Next(erg) do
tc:ReleaseEffectRelation(te)
end
end
else
Duel.SetLP(tp,math.floor(Duel.GetLP(tp)/2))
end
end
end
--时与空的调停者
function c12847015.initial_effect(c)
c:SetUniqueOnField(1,0,12847015)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12847015,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,12847015)
e3:SetTarget(c12847015.adtg2)
e3:SetOperation(c12847015.adop2)
c:RegisterEffect(e3)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12847015,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c12847015.negcon)
e2:SetTarget(c12847015.negtg)
e2:SetOperation(c12847015.negop)
c:RegisterEffect(e2)
--negate attack
local e21=Effect.CreateEffect(c)
e21:SetDescription(aux.Stringid(220414,1))
e21:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e21:SetCode(EVENT_ATTACK_ANNOUNCE)
e21:SetRange(LOCATION_MZONE)
e21:SetCountLimit(1)
e21:SetCondition(c12847015.negcon1)
e21:SetOperation(c12847015.negop1)
c:RegisterEffect(e21)
end
function c12847015.cfilter(c)
return c:IsFaceup() and c:IsDisabled() and c:IsType(TYPE_EFFECT) and c:IsReleasable()
end
function c12847015.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsDisabled() and chkc:IsType(TYPE_EFFECT) and chkc:IsReleasable() end
if chk==0 then return Duel.IsExistingTarget(c12847015.cfilter,tp,LOCATION_MZONE,0,1,nil,0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c12847015.cfilter,tp,LOCATION_MZONE,0,1,1,nil,0)
end
function c12847015.adop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.Release(tc,REASON_EFFECT)
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
c:RegisterFlagEffect(12847015,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c12847015.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and e:GetHandler():GetFlagEffect(12847015)>0 and rp==1-tp
end
function c12847015.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
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 c12847015.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
function c12847015.negcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp and e:GetHandler():GetFlagEffect(12847015)>0 and e:GetHandler():IsAbleToDeck()
end
function c12847015.negop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then
if Duel.NegateAttack() then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
end
\ No newline at end of file
--女仆教育
local m=12847022
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)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return false
end
function cm.handcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)~=0
end
function cm.check(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
local fid=c:GetFieldID()
if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END,1)
e1:SetLabel(fid,0)
e1:SetLabelObject(rc)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
Duel.RegisterEffect(e1,tp)
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(rc:GetCode())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_HAND)
e2:SetCondition(cm.smcon)
e2:SetOperation(cm.regop)
e2:SetLabelObject(e1)
e2:SetLabel(rc:GetCode())
Duel.RegisterEffect(e2,tp)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local fid=e:GetLabel()
local tc=e:GetLabelObject()
return tc:GetFlagEffectLabel(m)==fid
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)==fid then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function cm.trigfilter(c,tp,code)
return c:IsCode(code) and c:IsControler(tp) and c:IsType(TYPE_MONSTER) and not c:IsReason(REASON_DRAW)
and not (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and not c:IsPublic())
and (not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM) or (c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM) and c:IsPublic()))
end
function cm.smcon(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
return eg:IsExists(cm.trigfilter,1,nil,tp,code)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Reset()
e:Reset()
end
\ No newline at end of file
--心动时刻
local m=12847033
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
end
--恐怖☆暴走☆袭击☆三点式!中国僵尸
local m=12847039
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(cm.regcon)
e3:SetTarget(cm.regtg)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.econ)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--count
Duel.RegisterFlagEffect(tp,m,0,0,1)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(10000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
--count
function cm.ccon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler():IsCode(m)
end
function cm.cop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,0,0,1)
end
--immune
function cm.econ(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>=3
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
--死域领主 契丝提亚
local s,id,o=GetID()
function s.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e3:SetTarget(s.actlimit)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
--adjust
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e01:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e01:SetCode(EVENT_ADJUST)
e01:SetRange(0xff)
e01:SetOperation(s.adjustop)
c:RegisterEffect(e01)
end
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
local _cRegisterEffect=Card.RegisterEffect
function Card.RegisterEffect(rc,re,bool)
if not re:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
local con=re:GetCondition()
if not con then con=aux.TRUE end
re:SetCondition(s.fcon(con))
end
return _cRegisterEffect(rc,re,bool)
end
local g=Duel.GetFieldGroup(0,0x7f,0x7f)
local xg=Duel.GetOverlayGroup(0,0x7f,0x7f)
g:Merge(xg)
local ini=s.initial_effect
for tc in aux.Next(g) do
if tc.initial_effect then
s.initial_effect=function() end
tc:ReplaceEffect(id,0)
s.initial_effect=ini
tc.initial_effect(tc)
end
end
e:Reset()
end
function s.fcon(con)
return function (e,tp,...)
return e:GetHandler():GetFlagEffect(id)==0 and con(e,tp,...)
end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.cfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g then
local tc=g:GetFirst()
Duel.HintSelection(g)
local ctype=tc:GetType()
if ctype|TYPE_EFFECT>0 then ctype=ctype-TYPE_EFFECT end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(ctype)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(s.spop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
Duel.RegisterEffect(e1,tp)
end
end
function s.actlimit(e,c)
local face=c:GetColumnGroup()
return face:IsContains(e:GetHandler())
end
function s.spfilter(c,e,tp)
return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.costfilter(c,tp)
return c:IsFaceup() and not c:IsType(TYPE_EFFECT) and c:IsReleasable(REASON_EFFECT) and Duel.GetMZoneCount(tp,c,tp)>0
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if g:GetCount()>0 and g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_CARD,0,id)
Duel.Release(g:Select(tp,1,1,nil),REASON_EFFECT)
Duel.SpecialSummon(g2:Select(tp,1,1,nil),0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--暗夜死神 奎因
function c12847068.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12847068,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c12847068.spcost)
e1:SetTarget(c12847068.sptg)
e1:SetOperation(c12847068.spop)
e1:SetCountLimit(1,12847068)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e2)
--ToGrave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12847068,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,12847069)
e3:SetTarget(c12847068.tgtg)
e3:SetOperation(c12847068.tgop)
c:RegisterEffect(e3)
end
function c12847068.cfilter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function c12847068.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12847068.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12847068.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c12847068.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12847068.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsPreviousLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
end
function c12847068.tgfilter(c,type)
return c:IsAbleToGrave() and c:IsFaceup() and c:IsType(type)
end
function c12847068.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFieldCard(tp,LOCATION_GRAVE,Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)-1)
local type=bit.band(tc:GetType(),0x7)
if chk==0 then return tc and Duel.IsExistingMatchingCard(c12847068.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,type) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD)
end
function c12847068.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.GetFieldCard(tp,LOCATION_GRAVE,Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)-1)
if tc then
local type=bit.band(tc:GetType(),0x7)
local g=Duel.SelectMatchingCard(tp,c12847068.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,type)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--祝你幸福 丰川祥子
local m=12847087
local cm=_G["c"..m]
cm.code=12847087
cm.side_code=12847088
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,cm.matfilter1,nil,nil,nil,1,99)
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(cm.sumsuc)
c:RegisterEffect(e0)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetCondition(cm.con2)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetCondition(cm.con2)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e3:SetCondition(cm.con2)
e3:SetValue(1)
c:RegisterEffect(e3)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCountLimit(1,m)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.con1)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck)
c:RegisterEffect(e3)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,m+200)
e5:SetCode(EVENT_CUSTOM+m)
e5:SetOperation(cm.setop)
c:RegisterEffect(e5)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m+100)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCondition(cm.condition)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,m+300)
e6:SetCondition(cm.con2)
e6:SetTarget(cm.distg2)
e6:SetOperation(cm.operation2)
c:RegisterEffect(e6)
if not cm.Side_Check then
cm.Side_Check=true
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCondition(cm.backon)
e0:SetOperation(cm.backop)
Duel.RegisterEffect(e0,tp)
end
end
function cm.matfilter1(c,syncard)
return c:IsTuner(syncard) or c:IsLevel(3)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(m,0))
end
function cm.con1(e)
return e:GetHandler():GetFlagEffect(16100000)==0
end
function cm.con2(e)
return e:GetHandler():GetFlagEffect(16100000)>0
end
function cm.checkitside(c)
return c.code and c.side_code and c:GetFlagEffect(16100000)==0 and c:GetOriginalCode()==c.side_code
end
function cm.backon(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil)
return dg:GetCount()>0
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil)
for c in aux.Next(dg) do
local tcode=c.code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then
local sp=c:GetControler()
Duel.ShuffleHand(sp)
end
end
Duel.Readjust()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(cm.discheck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>=3 and e:GetHandler():GetFlagEffect(16100000)==0 and e:GetHandler():GetFlagEffect(16100001)==0
end
function cm.discheck(c)
return c:IsFaceup() and c:IsDisabled()
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.discheck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local num=g:GetCount()
if num>0 then
local atk=num*1000
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(16100000)==0 then
Duel.Hint(HINT_CARD,0,12847088)
local sidecode=c.side_code
c:SetEntityCode(sidecode)
c:RegisterFlagEffect(16100000,RESET_EVENT+0x7e0000,0,0)
Duel.Hint(24,0,aux.Stringid(m+1,0))
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,0)
end
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(16100001,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,0)
local dg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,nil)
if c:GetFlagEffect(16100000)>0 then
local tc=dg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
tc=dg:GetNext()
end
Duel.Hint(HINT_CARD,0,12847087)
local g=c:GetOverlayGroup()
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local sidecode=c.code
c:SetEntityCode(code)
c:ResetFlagEffect(16100000)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,0)
end
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ct=0
if c:GetFlagEffectLabel(m) then ct=c:GetFlagEffectLabel(m) end
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(16100000)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,ct,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dg=Duel.GetTargetsRelateToChain()
local tc=dg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
tc=dg:GetNext()
end
end
function cm.distg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end
function cm.valcheck(e,c)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1,c:GetMaterial():FilterCount(Card.IsLevel,nil,3))
end
--AveMujica Oblivionis
local m=12847088
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
end
--宇宙·埃列什基伽勒
local m=12847098
local cm=_G["c"..m]
cm.code=12847098
cm.side_code=12847099
function cm.initial_effect(c)
c:EnableCounterPermit(0xa7f)
c:SetCounterLimit(0xa7f,64)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(cm.sumsuc)
c:RegisterEffect(e0)
local e0_1=Effect.CreateEffect(c)
e0_1:SetType(EFFECT_TYPE_SINGLE)
e0_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0_1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0_1:SetCondition(cm.con2)
e0_1:SetValue(1)
c:RegisterEffect(e0_1)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetCondition(cm.con2)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--link summon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--remove
local e2_1=Effect.CreateEffect(c)
e2_1:SetDescription(aux.Stringid(m,0))
e2_1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e2_1:SetType(EFFECT_TYPE_QUICK_O)
e2_1:SetRange(LOCATION_MZONE)
e2_1:SetCountLimit(1,m)
e2_1:SetCode(EVENT_FREE_CHAIN)
e2_1:SetCondition(cm.con2)
e2_1:SetTarget(cm.remtg)
e2_1:SetOperation(cm.remop)
c:RegisterEffect(e2_1)
--attackup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.con)
e3:SetValue(cm.attackup)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.imcon)
e4:SetValue(cm.efilter)
c:RegisterEffect(e4)
--change
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.con)
e5:SetCost(cm.chcost)
e5:SetTarget(cm.chtg)
e5:SetOperation(cm.chop)
c:RegisterEffect(e5)
if not cm.Side_Check then
cm.Side_Check=true
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCondition(cm.backon)
e0:SetOperation(cm.backop)
Duel.RegisterEffect(e0,tp)
end
end
function cm.checkitside(c)
return c.code and c.side_code and c:GetFlagEffect(16100000)==0 and c:GetOriginalCode()==c.side_code
end
function cm.backon(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil)
return dg:GetCount()>0
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil)
for c in aux.Next(dg) do
local tcode=c.code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then
local sp=c:GetControler()
Duel.ShuffleHand(sp)
end
end
Duel.Readjust()
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(m,14))
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler()~=e:GetHandler() and e:GetHandler():GetFlagEffect(16100000)==0 and Duel.GetFlagEffect(tp,m)<15
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0xa7f,1) end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:AddCounter(0xa7f,1)
local num=Duel.GetRandomNumber(2,13)
Duel.Hint(24,0,aux.Stringid(m,num))
end
function cm.attackup(e,c)
return c:GetCounter(0xa7f)*200
end
function cm.imcon(e)
return e:GetHandler():IsAttackAbove(4000) and e:GetHandler():GetFlagEffect(16100000)==0
end
function cm.con(e)
return e:GetHandler():GetFlagEffect(16100000)==0
end
function cm.con2(e)
return e:GetHandler():GetFlagEffect(16100000)>0
end
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function cm.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0xa7f,15,REASON_COST) end
c:RemoveCounter(tp,0xa7f,15,REASON_COST)
end
function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(16100000)==0 then
Duel.Hint(HINT_CARD,0,12847099)
local sidecode=c.side_code
c:SetEntityCode(sidecode)
c:RegisterFlagEffect(16100000,RESET_EVENT+0x7e0000,0,0)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m+1,5))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetValue(cm.effectfilter)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_DISEFFECT)
Duel.RegisterEffect(e4,tp)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m+1,5))
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetTargetRange(1,0)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
Duel.RegisterEffect(e4,tp)
Duel.Hint(24,0,aux.Stringid(m+1,0))
end
end
function cm.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
local label=e:GetLabel()
return te:GetHandler():IsCode(m+1)
end
function cm.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) and c:GetFlagEffect(16100000)>0 end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.remop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.Hint(24,0,aux.Stringid(m+1,1))
Duel.Hint(24,0,aux.Stringid(m+1,2))
for i=1,1 do
Duel.Hint(HINT_CARD,0,12847097)
end
if Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)~=0 and c:GetFlagEffect(16100000)>0 then
Duel.Hint(HINT_CARD,0,12847098)
local sidecode=c.code
c:SetEntityCode(sidecode)
c:ResetFlagEffect(16100000)
Duel.AdjustAll()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,cm.ccheck,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
tc:AddCounter(0xa7f,5)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(-2000)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.ccheck(c)
return c:IsCode(m) and c:IsCanAddCounter(0xa7f,5)
end
\ No newline at end of file
--太空·埃列什基伽勒
local m=12847099
local cm=_G["c"..m]
cm.code=12847098
cm.side_code=12847099
function cm.initial_effect(c)
end
--五条悟
local m=12847127
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--spsummon condition
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(aux.linklimit)
c:RegisterEffect(e3)
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(cm.sumsuc)
c:RegisterEffect(e0)
--無下限术式
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.mkcon)
e1:SetOperation(cm.mkop)
c:RegisterEffect(e1)
--虚式·茈
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
--leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(cm.leaveop)
c:RegisterEffect(e4)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(m,1))
end
function cm.mkcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.mkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
c:SetHint(CHINT_CARD,ac)
cm[c]=cm[c] or {}
c:RegisterFlagEffect(m+ac,RESET_EVENT+RESETS_STANDARD,0,1)
table.insert(cm[c],m+ac)
if c:GetFlagEffect(m)==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.indval)
c:RegisterEffect(e2,true)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function cm.efilter(e,te)
return e~=te and e:GetHandler():GetFlagEffect(m+te:GetHandler():GetCode())>0
end
function cm.indval(e,c)
return e:GetHandler():GetFlagEffect(m+c:GetCode())>0
end
function cm.rmfilter(c,ec)
return ec:GetFlagEffect(m+c:GetCode())>0 and c:IsAbleToRemove()
end
function cm.rmfilter2(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
local dg=Duel.GetMatchingGroup(cm.rmfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
if not cm[c] or #cm[c]==0 then return false end
for _,code in pairs(cm[c]) do
if #dg>0 and c:GetFlagEffect(code)>0 then return true end
end
return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil,e:GetHandler())
end
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,nil,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
Duel.Hint(24,0,aux.Stringid(m,0))
local dg=Duel.GetMatchingGroup(cm.rmfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
Duel.ConfirmCards(tp,dg)
Duel.ConfirmCards(1-tp,dg)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,nil,e:GetHandler())
if g:GetCount()>0 then
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then
Duel.BreakEffect()
cm[c]=cm[c] or {}
for _,code in pairs(cm[c]) do
c:ResetFlagEffect(code)
end
cm[c]={}
c:SetHint(CHINT_CARD,0)
end
end
end
function cm.leaveop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(m,2))
end
\ No newline at end of file
--原罪的白色魔女 迪亚贝鲁
local m=12847222
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--fusion summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.fstg)
e1:SetOperation(cm.fsop)
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_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+30000)
e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
cm.fusion_effect=true
function cm.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function cm.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf,sc)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,sc,chkf)
end
function cm.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function cm.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(cm.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf,c)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.fsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf,c)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,c)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function cm.filter4(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter4,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--再见绘梨
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--time 999
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.tiop)
c:RegisterEffect(e2)
--time 30
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCondition(s.ticon)
e3:SetOperation(s.tiop1)
c:RegisterEffect(e3)
--time reset
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCondition(s.ticon3)
e4:SetOperation(s.tiop3)
c:RegisterEffect(e4)
end
function s.tiop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetTimeLimit(tp,999)
Duel.ResetTimeLimit(1-tp,999)
end
function s.ticon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function s.tiop1(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetLabel(rp)
e2:SetOperation(s.tiop2)
Duel.RegisterEffect(e2,tp)
end
function s.tiop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetTimeLimit(e:GetLabel(),30)
end
function s.ticon3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsReason(REASON_DESTROY)
end
function s.tiop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsLocation(LOCATION_SZONE) then return end
Duel.ResetTimeLimit(tp,240)
Duel.ResetTimeLimit(1-tp,240)
end
\ No newline at end of file
--凤凰神·亚莉丝塔·捷琳
local m=12847333
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--link summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(1166)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(cm.LinkCondition(aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1,5,nil))
e1:SetTarget(cm.LinkTarget(aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1,5,nil))
e1:SetOperation(cm.LinkOperation(aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1,5,nil))
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(cm.dscon)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.LConditionFilter(c,f,lc)
return (((c:IsFaceup() or not c:IsOnField()) and c:IsCanBeLinkMaterial(lc))) and (not f or f(c))
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(aux.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
local count=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
return sg:GetCount()==math.max(1,lc:GetLink()-count) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg)) and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp) and (not lmat or sg:IsContains(lmat))
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp
end
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
aux.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
local count1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local count2=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
return (count2-count1)>2 and ep~=tp
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
c:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetReset(RESET_EVENT+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
e:Reset()
end
\ No newline at end of file
--你休想天使
local s,id,o=GetID()
function s.initial_effect(c)
--cannot lose
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(s.clop)
e1:SetCost(s.clcost)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(s.clcon)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp and bit.band(r,REASON_EFFECT)~=0 or bit.band(r,REASON_BATTLE)~=0 then
Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1)
end
end
function s.clcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,12847401)~=0
end
function s.clcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.clop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ex1=Effect.CreateEffect(e:GetHandler())
ex1:SetType(EFFECT_TYPE_FIELD)
ex1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ex1:SetCode(EFFECT_CANNOT_LOSE_KOISHI)
ex1:SetTargetRange(1,0)
ex1:SetValue(1)
ex1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(ex1,tp)
return ex1
end
\ No newline at end of file
--我偏要恶魔
local m=12847402
local cm=_G["c"..m]
function cm.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12847402,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,12847402)
e1:SetTarget(cm.rmtg)
e1:SetCost(cm.rmcost)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
end
function cm.rmfilter(c)
return c:IsAbleToRemove()
end
function cm.spfilter(c,e,tp)
return not c:IsType(TYPE_TOKEN) and c:IsFaceup() and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,c:GetControler())
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_REMOVED)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup():Filter(cm.spfilter,nil,e,tp)
if #og<=0 then return end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 and ft2<=0 then return end
local spg=Group.CreateGroup()
if ft1>0 and ft2>0 then
local p=tp
for i=1,2 do
local sg=og:Filter(Card.IsControler,nil,p)
local ft=Duel.GetLocationCount(p,LOCATION_MZONE,tp)
if #sg>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
spg:Merge(sg)
p=1-tp
end
end
if #spg>0 then
Duel.BreakEffect()
local tc=spg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tc:GetControler(),false,false,POS_FACEUP)
tc=spg:GetNext()
end
Duel.SpecialSummonComplete()
local cg=spg:Filter(Card.IsFacedown,nil)
if #cg>0 then
Duel.ConfirmCards(1-tp,g)
end
end
end
end
\ No newline at end of file
--多多小妹妹
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(s.drop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
if ct>0 and Duel.Draw(tp,ct,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,ct-1,ct-1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--奇怪大姐姐
local s,id,o=GetID()
function s.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tg)
e1:SetCost(s.cost)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return true
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.cfilter(c) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,s.cfilter,tp,0,LOCATION_GRAVE,1,1,nil)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
end
end
\ No newline at end of file
--这好吗魔女
local s,id,o=GetID()
function s.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(s.descost)
e1:SetCondition(s.descon1)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(s.descon2)
c:RegisterEffect(e2)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.descon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)<3
end
function s.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=3
end
function s.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToRemove()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,1-tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bool=true
while bool do
local tc=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
bool=tc and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.Draw(1-tp,1,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(1-tp,1) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(id,1))
end
end
\ No newline at end of file
--不好吧骑士
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(s.dacost)
e1:SetCondition(s.dacon)
e1:SetTarget(s.datg)
e1:SetOperation(s.daop)
c:RegisterEffect(e1)
end
function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.dacon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function s.dafilter(c)
return c:IsFaceup() and c:IsControler(Duel.GetTurnPlayer())
end
function s.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.dafilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.daop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MUST_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
--tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DIRECT_ATTACK)
tc:RegisterEffect(e2)
--cannot attack directly
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(s.atlimit)
tc:RegisterEffect(e3)
end
end
function s.atlimit(e,c)
return true
end
\ No newline at end of file
--月社妃·深爱之人
local m=12847513
local cm=_G["c"..m]
function cm.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--redirect
aux.AddBanishRedirect(c)
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(cm.sumsuc)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.tgcost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
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_IGNITION)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,m+100)
e3:SetCost(cm.spcost)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
if not cm.drawcheck then
cm.drawccheck=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(cm.drawreg)
Duel.RegisterEffect(ge1,0)
end
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,3))
Duel.Hint(24,0,aux.Stringid(m,4))
end
function cm.drawreg(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsReason(REASON_DRAW) and tc:IsReason(REASON_EFFECT) then
Duel.RegisterFlagEffect(tc:GetControler(),m,RESET_PHASE+PHASE_END,0,1)
end
end
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(function(ec) return ec:IsFaceup() and ec:IsAbleToRemove() end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,function(ec) return ec:IsFaceup() and ec:IsAbleToRemove() end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,2,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) and tc==e:GetHandler()
and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Draw(tp,2,REASON_EFFECT)
end
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.mainfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<=4
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,e:GetHandler(),POS_FACEDOWN)
if chk==0 then return sg:GetCount()>=7 and (ft>0 or sg:IsExists(cm.mainfilter,ct,nil)) end
local g=nil
if ft<=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=sg:FilterSelect(tp,cm.mainfilter,ct,ct,nil)
if ct<7 then
sg:Sub(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=sg:Select(tp,7-ct,7-ct,nil)
g:Merge(g1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=sg:Select(tp,7,7,nil)
end
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return 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
\ No newline at end of file
-- 古木寻斋
local m=12847555
local cm=_G["c"..m]
function cm.initial_effect(c)
-- special summon rule
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
e0:SetCondition(cm.sprcon)
e0:SetTarget(cm.sprtg)
e0:SetOperation(cm.sprop)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PREDRAW)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetRange(0xff)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
-- act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(cm.aclimit)
c:RegisterEffect(e2)
-- disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_ONFIELD)
e3:SetTarget(cm.distarget)
c:RegisterEffect(e3)
-- disable effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(cm.disoperation)
c:RegisterEffect(e4)
end
function cm.sprfilter(c,tp)
return (c:IsFaceup() or c:IsControler(tp)) and c:IsCode(m+1) and c:IsReleasable(REASON_SPSUMMON)
end
function cm.fselect(g,tp,sc)
return Duel.GetMZoneCount(tp,g,tp)>0
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
return g:CheckSubGroup(cm.fselect,1,#g,tp,c)
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,cm.fselect,true,1,#g,tp,c)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function cm.check(c)
return not c:IsCode(m+1) and c:IsType(TYPE_MONSTER)
end
function cm.op(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.check,tp,0,0xff,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(m+1)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
tc:RegisterEffect(e1)
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(m+1)
end
function cm.distarget(e,c)
return c~=e:GetHandler() and c:IsCode(m+1)
end
function cm.disoperation(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsCode(m+1) and re:GetHandler():IsFaceup() then
Duel.NegateEffect(ev)
end
end
\ No newline at end of file
--领域突破
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local ct2=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
return ct1>ct2 and Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil) end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(id,1))
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local og=Duel.GetOperatedGroup()
local fid=og:GetFirst():GetFieldID()
for tc in aux.Next(og) do
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.retfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(s.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(s.retfilter,nil,e:GetLabel())
g:DeleteGroup()
for tc in aux.Next(sg) do
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
end
\ No newline at end of file
--贯穿世界的雷枪
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,9,3,nil,nil,99)
c:EnableReviveLimit()
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(s.sumsuc)
c:RegisterEffect(e0)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.discon)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
--direct atk&double damage&attack all
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetCost(s.cost)
e3:SetTarget(s.tg)
e3:SetOperation(s.op)
c:RegisterEffect(e3)
end
function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(id,4))
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() end
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(s.discon1)
e1:SetOperation(s.disop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.discon1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return rp==1-tp and Duel.IsChainDisablable(ev) and e:GetHandler():GetFlagEffect(id)<=0 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function s.disop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,0)) then
Duel.Hint(HINT_CARD,0,id)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1,0)
end
end
function s.atkval(e,c)
return c:GetOverlayCount()*2000
end
function s.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 s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsAbleToEnterBP() and c:IsAttackable() end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (Duel.IsAbleToEnterBP() and c:IsAttackable()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2),aux.Stringid(id,3))
if op==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
elseif op==1 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetValue(DOUBLE_DAMAGE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
elseif op==2 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
end
\ No newline at end of file
--绝对毁灭的阎炮
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCost(s.cost)
e2:SetCondition(s.condition)
e2:SetDescription(aux.Stringid(id,1))
c:RegisterEffect(e2)
end
function s.cost(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 s.condition(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)==0 then
Duel.Hint(HINT_CARD,0,id)
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==0 then
Duel.Hint(HINT_CARD,0,id)
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then
Duel.Hint(HINT_CARD,0,id)
Duel.SendtoGrave(tc,REASON_RULE,1-tp)
end
end
end
end
end
\ No newline at end of file
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