Commit e37f816b authored by 聖園ミカ's avatar 聖園ミカ 🐟

man!

parent 440efd2e
No preview for this file type
......@@ -1316,7 +1316,7 @@
37564909 0 --Sayuri·永远鲜红的幼月
37564912 2 --Sayuri·Rise to be
37564914 1 --Sayuri & 3L
37573001 0 --夏恋花火-Otokaze
37573001 1 --夏恋花火-Otokaze
#379
37900004 2 --现世的神隐事件
37900005 0 --神隐之地的守护结界
......@@ -1919,20 +1919,6 @@
75646618 1 --幻海深渊 伊瑟琳
75646854 0 --柴郡猫 雷电芽衣
#777
77700341 0 --BB,永久与炫目的月癌
77702003 1 --Cross Bouquet
77702004 1 --Lost Nostalgia
77702005 0 --Another Flower
77702007 0 --楽園図
77702010 1 --Mirage
77707701 0 --大罪之器 露西菲尼亚的四面镜
77707702 0 --大罪之器 维诺姆之剑
77707006 0 --魔女萨姆赫菲的逃亡
77707029 0 --円尾坂的裁缝店
77707037 0 --使之沉睡公主的贈品
77707043 0 --庭园造景的少女
77707048 1 --法庭之主
77707057 0 --大罪狩猎令
77707704 0 --大罪之器 克洛克沃克人偶
77707705 0 --Vessel of Sin 祸世之剪
77707706 0 --大罪之器 马隆汤匙
......
......@@ -58,7 +58,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
if Duel.IsPlayerCanDraw(tp,1) then
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
......
......@@ -8,7 +8,7 @@ function s.initial_effect(c)
e0:SetOperation(s.regop)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(s.activate)
......@@ -47,17 +47,27 @@ function s.initial_effect(c)
e5:SetTarget(s.atktg)
e4:SetLabelObject(e5)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,2))
e6:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetRange(LOCATION_REMOVED)
e6:SetCountLimit(1,id)
e6:SetCondition(s.tdcon)
e6:SetTarget(s.tdtg)
e6:SetOperation(s.tdop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsSetCard(0x97c0) and c:IsAbleToRemove()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.handcon(e)
......@@ -82,16 +92,16 @@ end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.thfilter2(c)
return c:IsSetCard(0x97c0) and c:IsAbleToHand()
end
function s.tdop(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)
and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
--BB,永久与炫目的月癌
local m=77700341
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function cm.cfilter(c,e,tp)
return Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function cm.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,e,tp)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel())
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
cm.ReplaceEffectExtraCount(g:GetFirst(),3,code,0x1fe1000+RESET_PHASE+PHASE_END,1)
end
end
function cm.ReplaceEffectExtraCount(c,ctlm,code,res,resct)
if not ctlm then return c:CopyEffect(code,res,resct) end
local et={}
local ef=Effect.SetCountLimit
local rf=Card.RegisterEffect
Effect.SetCountLimit=cm.replace_set_count_limit(et)
Card.RegisterEffect=cm.replace_register_effect(et,ctlm,ef,rf)
c:RegisterFlagEffect(37564768,res,0,resct,ctlm)
local cid=c:ReplaceEffect(code,res,resct)
Effect.SetCountLimit=ef
Card.RegisterEffect=rf
c:ResetFlagEffect(37564768)
return cid
end
function cm.replace_set_count_limit(et)
return function(e,ct,cd)
et[e]={ct,cd}
end
end
function cm.replace_register_effect(et,ctlm,ef,rf)
return function(c,e,forced)
local t=et[e]
if t then
if e:IsHasType(0x7e0) then
t[1]=math.max(t[1],ctlm)
end
ef(e,table.unpack(t))
end
rf(c,e,forced)
end
end
\ No newline at end of file
local m=77702003
local cm=_G["c"..m]
function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetTarget(cm.thtg1)
e3:SetOperation(cm.thop1)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m-1)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.thfilter1(c)
return c:IsAbleToHand() and c:IsLevelAbove(7) and c:IsType(TYPE_RITUAL) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
local mg=Duel.GetMatchingGroup(Auxiliary.RitualExtraFilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,aux.TRUE)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_MAP_OF_HEAVEN) then
local exg=Duel.GetMatchingGroup(function(c)
return c:IsLevelAbove(1)
end,tp,LOCATION_EXTRA,0,nil)
mg:Merge(exg)
end
local sg=Duel.GetMatchingGroup(Auxiliary.RitualUltimateFilter,tp,LOCATION_HAND,0,nil,nil,e,tp,Group.CreateGroup(),mg,Card.GetLevel,"Equal")
Duel.ShuffleHand(tp)
if #sg>0 and Duel.SelectYesNo(tp,m*16) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Select(tp,1,1,nil):GetFirst()
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local lv=tc:GetLevel()
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(tc,lv,"Equal")
local mat=mg:SelectSubGroup(tp,Auxiliary.RitualCheck,false,1,lv,tp,tc,lv,"Equal")
Auxiliary.GCheckAdditional=nil
tc:SetMaterial(mat)
Duel.BreakEffect()
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
local m=77702004
local cm=_G["c"..m]
function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.DiscardHandCost(1,function(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL)
end))
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.DiscardHandCostFilter(c,f,ext_params)
return c:IsDiscardable() and (not f or f(c,table.unpack(ext_params)))
end
function cm.DiscardHandCost(ct,f,...)
local ext_params={...}
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.DiscardHandCostFilter,tp,LOCATION_HAND,0,ct,e:GetHandler(),f,ext_params) end
Duel.DiscardHand(tp,cm.DiscardHandCostFilter,ct,ct,REASON_COST+REASON_DISCARD,e:GetHandler(),f,ext_params)
end
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m-1)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsType(TYPE_RITUAL) and c:IsLevelAbove(7)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
end
local m=77702005
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end,tp,0,LOCATION_ONFIELD,2,nil)
end)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL)
end,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #g>0 end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL)
end,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetDescription(m*16+1)
e1:SetValue(1)
e1:SetReset(0x1fe1000)
tc:RegisterEffect(e1)
end
end)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(function(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og then
local count=0
for p=0,1 do
local ct=og:FilterCount(function(c)
return c:IsLocation(LOCATION_DECK) and c:IsControler(p)
end,nil)
count=count|(ct<<(p*8))
end
local allow=true
if (count>>(tp*8))&0xff>0 then
Duel.ShuffleDeck(tp)
allow=false
end
if (count>>((1-tp)*8))&0xff>0 then
Duel.ShuffleDeck(1-tp)
end
if allow then
local tg=Duel.GetMatchingGroup(function(c)
return c:IsAbleToHand() and c:IsLevelAbove(7) and c:IsType(TYPE_RITUAL)
end,tp,LOCATION_DECK,0,nil)
if #tg>0 and Duel.SelectYesNo(tp,m*16) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
end
end
local m=77702007
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
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.operation)
c:RegisterEffect(e1)
--[[local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_REMOVED)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_EXTRA,0)
e2:SetCode(EFFECT_MAP_OF_HEAVEN)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end)
e2:SetValue(1)
c:RegisterEffect(e2)]]
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_EXTRA,0)
e2:SetCode(EFFECT_MAP_OF_HEAVEN)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--[[local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)]]
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetLabelObject(e2)
e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e3:SetTargetRange(0xff,0xff)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(function(e,c)
return bit.band(c:GetType(),0x81)==0x81
end)
e3:SetValue(function(e,c)
--Debug.Message(0)
if c:GetMaterial():IsExists(function(c)
if not c:IsLocation(LOCATION_EXTRA) then return false end
local eset={c:IsHasEffect(EFFECT_MAP_OF_HEAVEN)}
for _,te in ipairs(eset) do
if te==e:GetLabelObject() then return true end
end
return false
end,1,nil) then
--Debug.Message(1)
local ex=Effect.CreateEffect(e:GetHandler())
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_SPSUMMON_SUCCESS)
ex:SetLabelObject(e:GetLabelObject())
ex:SetReset(RESET_PHASE+PHASE_END)
ex:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(c)
end)
ex:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Reset()
e:Reset()
end)
Duel.RegisterEffect(ex,tp)
e:Reset()
end
end)
Duel.RegisterEffect(e3,tp)
end)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function cm.filter(c)
return c:IsAbleToHand() and c:IsType(TYPE_RITUAL) and c:IsLevelAbove(7)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local res=0
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5):Filter(cm.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
res=Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
--[[if res>0 then
Duel.BreakEffect()
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(m,0x1fe1000,0,1)
end]]
end
local m=77702008
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(function(e,c)
return c:IsLevelAbove(1)
end)
c:RegisterEffect(e3)
--mat
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c)
return e:GetHandler():GetEquipTarget()==c
end,1,nil)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget()
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_TOFIELD)
e2:SetCondition(cm.condition1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2,true)
end)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsLevelAbove(1) end
if chk==0 then return Duel.IsExistingTarget(function(c)
return c:IsLevelAbove(1) and c:IsFaceup()
end,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7)
e:SetLabel(lv)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(e:GetLabel())
e2:SetReset(0x1fe1000)
c:RegisterEffect(e2)
end
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst()
while rc do
if rc:GetFlagEffect(m)==0 and rc:IsLevelAbove(7) then
--cannot special summon
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetAbsoluteRange(ep,0,1)
rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
rc=eg:GetNext()
end
end
local m=77702009
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local function select_gc(gc)
return function(c)
Duel.SetSelectedCard(gc)
return true
end
end
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local gc=e:GetHandler():GetEquipTarget()
local mg=Duel.GetRitualMaterial(tp)
if not gc or not mg:IsContains(gc) then return false end
return Duel.IsExistingMatchingCard(Auxiliary.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,select_gc(gc),e,tp,mg,nil,Card.GetLevel,"Equal")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local gc=e:GetHandler():GetEquipTarget()
local mg=Duel.GetRitualMaterial(tp)
if not gc or not mg:IsContains(gc) then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,Auxiliary.NecroValleyFilter(Auxiliary.RitualUltimateFilter),tp,LOCATION_HAND,0,1,1,nil,select_gc(gc),e,tp,mg,nil,Card.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local lv=tc:GetLevel()
Duel.SetSelectedCard(gc)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(tc,lv,greater_or_equal)
local mat=mg:SelectSubGroup(tp,Auxiliary.RitualCheck,false,1,lv,tp,tc,lv,"Equal")
Auxiliary.GCheckAdditional=nil
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(function(c)
return c:IsFaceup()
end,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK+LOCATION_EXTRA)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
cm.announce_filter={TYPE_MONSTER,OPCODE_ISTYPE}
local ac=Duel.AnnounceCard(tp,table.unpack(cm.announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK+LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
if g:IsExists(Card.IsCode,1,nil,ac) then
Duel.Hint(HINT_CARD,0,m)
c:CopyEffect(ac,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
end
end
local m=77702010
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.dfc_front_side=m+1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Senya.DiscardHandCost(1))
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(m*16)
e1:SetCountLimit(1)
e1:SetCost(Senya.DescriptionCost())
local function dfilter(c)
return c:IsAbleToGrave() and c:GetLevel()>1
end
local function rfilter(c)
return c:IsLevelAbove(7)
end
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(dfilter,tp,LOCATION_DECK,0,nil)
return Duel.IsExistingMatchingCard(Auxiliary.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,rfilter,e,tp,mg,nil,Card.GetLevel,"Equal")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(dfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,Auxiliary.NecroValleyFilter(Auxiliary.RitualUltimateFilter),tp,LOCATION_HAND,0,1,1,nil,rfilter,e,tp,mg,nil,Card.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local lv=tc:GetLevel()
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(tc,lv,"Equal")
local mat=mg:SelectSubGroup(tp,Auxiliary.RitualCheck,false,1,lv,tp,tc,lv,"Equal")
Auxiliary.GCheckAdditional=nil
tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_RITUAL+REASON_MATERIAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetDescription(m*16+1)
e1:SetCost(Senya.DescriptionCost())
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local atks={}
for p=0,1 do
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
atks[p]=g:GetSum(Card.GetAttack)
end
--Debug.Message(atks[1])
return atks[1-tp]>atks[tp]
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Senya.IsDFCTransformable(e:GetHandler()) end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not cm.target(e,tp,eg,ep,ev,re,r,rp,0) or c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Senya.TransformDFCCard(c)
end)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+37564777)
e1:SetProperty(0x14000)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
local m=77702011
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.dfc_back_side=m-1
function cm.initial_effect(c)
Senya.DFCBackSideCommonEffect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(function(e,c)
return c:IsType(TYPE_RITUAL) and c:IsLevelAbove(7)
end)
e2:SetValue(function(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(function(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end,tp,LOCATION_GRAVE,0,nil)*300
end)
c:RegisterEffect(e2)
end
local m=77705263
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,1)
e2:SetCost(Senya.DescriptionCost())
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1)
e2:SetCost(Senya.DescriptionCost())
e2:SetTarget(cm.potg)
e2:SetOperation(cm.poop)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(Senya.DescriptionCost())
e1:SetCondition(function(e,tp)
local ct={}
for p=0,1 do
ct[p]=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD+LOCATION_HAND,0)
end
return ct[1-tp]-ct[tp]>=5
end)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
local function getDestroyedCards(c,extended)
local g=c:GetColumnGroup()
local tp=c:GetControler()
local loc=c:GetLocation()
local seq=c:GetSequence()
if extended and seq<5 then
if seq>0 then
local tc=Duel.GetFieldCard(tp,loc,seq-1)
if tc then g:AddCard(tc) end
end
if seq<4 then
local tc=Duel.GetFieldCard(tp,loc,seq+1)
if tc then g:AddCard(tc) end
end
end
return g
end
local function f(c,extended)
return #getDestroyedCards(c,extended)>0
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local extended=e:GetHandler():IsHasEffect(m+1)
if chkc then return chkc:IsOnField() and f(chkc,extended) end
if chk==0 then return Duel.IsExistingTarget(f,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,extended) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,f,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,extended)
local tg=getDestroyedCards(g:GetFirst(),extended)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local extended=e:GetHandler():IsHasEffect(m+1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=getDestroyedCards(tc,extended)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function cm.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAttackPos() and not e:GetHandler():IsType(TYPE_LINK) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function cm.poop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return #rg>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
Duel.SetChainLimit(aux.FALSE)
end
function cm.filter(c)
return c:IsAbleToDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SendtoDeck(rg,nil,0,REASON_EFFECT)
local ct1=0
local ct2=0
rg=Duel.GetOperatedGroup()
local tc=rg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_DECK) and tc:IsType(TYPE_MONSTER) then
if tc:GetControler()==tp then ct1=ct1+1
else ct2=ct2+1 end
end
tc=rg:GetNext()
end
if ct1>0 then Duel.ShuffleDeck(tp) end
if ct2>0 then Duel.ShuffleDeck(1-tp) end
Duel.BreakEffect()
local g1=nil
local g2=nil
if ct1>0 then g1=cm.sp(e,tp,ct1) end
if ct2>0 then g2=cm.sp(e,1-tp,ct2) end
--Duel.SpecialSummonComplete()
if g1 then Duel.ShuffleSetCard(g1) end
if g2 then Duel.ShuffleSetCard(g2) end
end
function cm.spfilter(c)
return c:IsLevelBelow(7) and c:IsAbleToHand()
end
function cm.sp(e,tp,ct)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local dt=g:GetCount()
if dt==0 then return false end
local dlist={}
local tc=g:GetFirst()
while tc do
if tc:IsType(TYPE_MONSTER) then dlist[tc:GetSequence()]=tc end
tc=g:GetNext()
end
local i=dt-1
local a=0
local last=nil
g=Group.CreateGroup()
while a<ct and i>=0 do
tc=dlist[i]
if tc then
g:AddCard(tc)
last=tc
a=a+1
end
i=i-1
end
local conf=dt-last:GetSequence()
Duel.ConfirmDecktop(tp,conf)
g=g:Filter(cm.spfilter,nil)
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,tp,REASON_EFFECT+REASON_REVEAL)
Duel.ConfirmCards(1-tp,g)
if conf-g:GetCount()>0 then
Duel.DiscardDeck(tp,conf-g:GetCount(),REASON_EFFECT+REASON_REVEAL)
end
return g
end
local m=77705264
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(m)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function cm.spfilter1(c,e,tp)
return c:IsCode(m-1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local sc=sg:GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP)~=0 and sc:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if not Duel.Equip(tp,c,sc,false) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(sc)
e1:SetValue(cm.eqlimit)
c:RegisterEffect(e1)
end
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
--巴利索尔的孩子是独生子
local m=77707002
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
if not Duel.IsExistingMatchingCard(function(c,tc)
return c:GetOriginalCodeRule()==tc:GetOriginalCodeRule()
end,tp,0,(LOCATION_GRAVE+LOCATION_MZONE)&(~c:GetLocation()),1,nil,c) or not c:IsType(TYPE_MONSTER) then return false end
if c:IsLocation(LOCATION_GRAVE) then return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetMZoneCount(tp)>0
else return c:IsControlerCanBeChanged() end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:GetControler()==1-tp
and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsLocation(LOCATION_GRAVE) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
elseif tc:IsLocation(LOCATION_MZONE) then
Duel.GetControl(tc,tp)
end
end
end
\ No newline at end of file
--预言者旋转木马
local m=77707003
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
c39913299.announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(c39913299.announce_filter))
Duel.SetTargetParam(ac)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac_=Duel.AnnounceCard(tp,table.unpack(c39913299.announce_filter))
e:SetLabel(ac_)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local code=e:GetLabel()
local c=e:GetHandler()
local function filter(c)
return c:IsCode(ac) or c:IsCode(code)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DRAW)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #hg==0 then return end
Duel.ConfirmCards(1-ep,hg)
Duel.ShuffleHand(ep)
local dg=hg:Filter(filter,nil)
if #dg>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DRAW)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_DRAW
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #hg==0 then return end
Duel.ConfirmCards(1-ep,hg)
Duel.ShuffleHand(ep)
local dg=hg:Filter(filter,nil)
if #dg>0 then
Duel.SendtoHand(dg,tp,REASON_EFFECT)
end
end)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
local m=77707006
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local function f1(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
local function f2(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
local function add_count_check(e,tp)
local c=e:GetHandler()
if Duel.GetTurnPlayer()~=tp and (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_ACT_FROM_HAND)) then return 1 else return 0 end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(Senya.multi_choice_target(m,
function(e,tp,eg,ep,ev,re,r,rp,chk)
local count=1
local cost_target=Senya.DiscardHandCost(count+add_count_check(e,tp))
if chk==0 then return Duel.IsExistingMatchingCard(f1,tp,LOCATION_DECK,0,count,nil) and cost_target(e,tp,eg,ep,ev,re,r,rp,chk) end
cost_target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,count,tp,LOCATION_DECK)
end,
function(e,tp,eg,ep,ev,re,r,rp,chk)
local count=2
local cost_target=Senya.DiscardHandCost(count+add_count_check(e,tp))
if chk==0 then return Duel.IsExistingMatchingCard(f1,tp,LOCATION_DECK,0,count,nil) and cost_target(e,tp,eg,ep,ev,re,r,rp,chk) end
cost_target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,count,tp,LOCATION_DECK)
end,
function(e,tp,eg,ep,ev,re,r,rp,chk)
local count=3
local cost_target=Senya.DiscardHandCost(count+add_count_check(e,tp))
local hand_count={}
for p=0,1 do
hand_count[p]=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
end
if chk==0 then return hand_count[tp]-3-add_count_check(e,tp)<hand_count[1-tp] and Duel.IsPlayerCanDraw(tp,hand_count[1-tp]-hand_count[tp]+3) and cost_target(e,tp,eg,ep,ev,re,r,rp,chk) end
cost_target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,hand_count[1-tp]-hand_count[tp],0,0)
end
))
e1:SetOperation(Senya.multi_choice_operation(
function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,f1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end,
function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,f2,tp,LOCATION_DECK,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end,
function(e,tp,eg,ep,ev,re,r,rp)
local hand_count={}
for p=0,1 do
hand_count[p]=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
end
local diff=hand_count[1-tp]-hand_count[tp]
if diff>0 then
Duel.Draw(tp,diff,REASON_EFFECT)
end
end
))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m+1)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
local m=77707007
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.dfc_front_side=m+7
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.operation1)
c:RegisterEffect(e1)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),TYPE_MONSTER) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler(),TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,aux.ExceptThisCard(e),TYPE_MONSTER)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
end
end
function cm.check(g)
return g:GetClassCount(Card.GetOrignalCode)==1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
local mg=Duel.IsExistingTarget(function(c)
return c:IsCanBeEffectTarget(e) and c:IsControlerCanBeChanged()
end,tp,0,LOCATION_MZONE,nil)
if chk==0 then return Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_CONTROL)>1 and mg:CheckSubGroup(cm.check,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=mg:SelectSubGroup(tp,cm.check,false,2,2)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_CONTROL)>1 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
for tc in aux.Next(g) do
Duel.GetControl(tc,tp)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Senya.IsDFCTransformable(e:GetHandler()) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND)<=2
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
Senya.TransformDFCCard(e:GetHandler())
end
\ No newline at end of file
--奇迹的去向 -CATASTROPHE-
local m=77707010
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_LINK_SPELL_KOISHI)
e2:SetValue(LINK_MARKER_TOP+LINK_MARKER_TOP_LEFT)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
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_LEAVE_FIELD)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial()
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetMZoneCount(tp)<=0 then return false end
local chkf=PLAYER_NONE
local mg1=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return false end
local chkf=PLAYER_NONE
local mg1=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil):Filter(cm.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_GRAVE,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_GRAVE,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,true,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
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,0,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,0,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--在某处曾听过的歌谣
local m=77707011
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(cm.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(cm.desop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--Destroy2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(cm.descon2)
e4:SetOperation(cm.desop2)
c:RegisterEffect(e4)
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(function(c)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end,nil)
if chkc==0 then return #eg==1 and #g==1 end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY)
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
\ No newline at end of file
local m=77707014
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.dfc_back_side=m-7
function cm.initial_effect(c)
Senya.DFCBackSideCommonEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND)<=2
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local mg1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return Duel.GetMZoneCount(tp)>1 and mg1:CheckSubGroup(cm.check,2,2) and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,2,e:GetHandler(),TYPE_MONSTER) end
local g=Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,e:GetHandler(),TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg1,2,0,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=1 or not e:GetHandler():IsRelateToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=mg1:SelectSubGroup(tp,cm.check,false,2,2)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>1 then
local dg=Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,e:GetHandler(),TYPE_MONSTER)
if #dg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg_=dg:Select(tp,2,2,nil)
Duel.BreakEffect()
Duel.Destroy(dg_,REASON_EFFECT)
end
end
end)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.check(g)
return g:GetClassCount(Card.GetOrignalCode)==1
end
\ No newline at end of file
local m=77707019
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
Auxiliary.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNIITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m+100)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.operation1)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1)
if Duel.GetTurnPlayer()==tp then
e1:SetLabel(Duel.GetTurnCount()+2)
else
e1:SetLabel(Duel.GetTurnCount()+1)
end
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
tc:RegisterEffect(e1)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel()
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetHandler())
e:Reset()
end
function cm.filter1(c)
return c:IsAbleToRemove()
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter1(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1)
if Duel.GetTurnPlayer()~=tp then
e1:SetLabel(Duel.GetTurnCount()+2)
else
e1:SetLabel(Duel.GetTurnCount()+1)
end
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(cm.retcon1)
e1:SetOperation(cm.retop1)
tc:RegisterEffect(e1)
end
end
function cm.retcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel()
end
function cm.retop1(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetHandler())
e:Reset()
end
--那位王自泥而生
local m=77707022
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
c:EnableCounterPermit(0x9c0)
c:SetCounterLimit(0x9c0,3)
c:SetUniqueOnField(1,0,m)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp)
return not Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(m)
end,tp,LOCATION_ONFIELD,0,1,nil)
end)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(cm.ctcon)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.ctcon)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0x1e0)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x9c0,3,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x9c0,3,REASON_COST)
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,1900,1700,10,RACE_WARRIOR,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x21,1900,1700,10,RACE_AQUA,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:AddMonsterAttributeComplete()
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.negcon)
e1:SetCost(cm.negcost)
e1:SetTarget(cm.negtg)
e1:SetOperation(cm.negop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end)
c:RegisterEffect(e2)
end
function cm.ctfilter(c)
return c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR+RACE_FIELD)
end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.ctfilter,1,nil)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x9c0,1)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsChainNegatable(ev)
end
function cm.cfilter(c,rtype)
return c:IsType(rtype) and c:IsAbleToGraveAsCost()
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rtype=bit.band(re:GetActiveType(),0x7)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,rtype) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,rtype)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--逆转墓碑的新玛丽安
function c77707024.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c77707024.con)
e1:SetTarget(c77707024.tg)
e1:SetOperation(c77707024.op)
c:RegisterEffect(e1)
end
function c77707024.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN2 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==3
end
function c77707024.tgfil(c,e)
return c:IsAttackable() and not c:IsImmuneToEffect(e) and Duel.IsExistingMatchingCard(c77707024.tgfil2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,e)
end
function c77707024.tgfil2(c,e)
return not c:IsImmuneToEffect(e)
end
function c77707024.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77707024.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e) end
end
function c77707024.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(77707024,0))
local g=Duel.SelectMatchingCard(tp,c77707024.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(77707024,1))
local sg=Duel.SelectMatchingCard(tp,c77707024.tgfil2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc,e)
Duel.HintSelection(sg)
local sc=sg:GetFirst()
if tc and sc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=e1:Clone()
sc:RegisterEffect(e3)
local e4=e2:Clone()
sc:RegisterEffect(e4)
Duel.CalculateDamage(tc,sc)
end
end
end
\ No newline at end of file
--英雄之铠常染红
function c77707025.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c77707025.con)
e1:SetOperation(c77707025.op)
c:RegisterEffect(e1)
end
function c77707025.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==3
end
function c77707025.op(e,tp,eg,ep,ev,re,r,rp)
--actlimit
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(c77707025.actcon)
Duel.RegisterEffect(e2,tp)
end
function c77707025.actcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
\ No newline at end of file
local m=77707026
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(function(e,c)
return cm[e:GetHandlerPlayer()][c:GetCode()] and (cm[e:GetHandlerPlayer()][c:GetCode()]+1)*400 or 400
end)
c:RegisterEffect(e2)
if not cm.gchk then
cm.gchk=true
cm[0]={}
cm[1]={}
local ex=Effect.GlobalEffect()
ex:SetType(EFFECT_TYPE_FIELD)
ex:SetCode(EVENT_SPSUMMON_SUCCESS)
ex:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local done_={[0]={},[1]={}}
for tc in aux.Next(eg) do
if not done_[tc:GetSummonPlayer()][tc:GetCode()] then
if cm[tc:GetSummonPlayer()][tc:GetCode()] then
cm[tc:GetSummonPlayer()][tc:GetCode()]=cm[tc:GetSummonPlayer()][tc:GetCode()]+1
else
cm[tc:GetSummonPlayer()][tc:GetCode()]=1
end
done_[tc:GetSummonPlayer()][tc:GetCode()]=true
end
end
end)
Duel.RegisterEffect(ex,0)
local ex=Effect.GlobalEffect()
ex:SetType(EFFECT_TYPE_FIELD)
ex:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ex:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
cm[0]={}
cm[1]={}
end)
Duel.RegisterEffect(ex,0)
end
end
--Evillious ● Daughter of Evil
c77707027.dfc_front_side=77707027+1
Duel.LoadScript("c37564765.lua")
function c77707027.initial_effect(c)
--Summon Allen and Riliane
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77707027,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,77707027+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c77707027.sptg)
e1:SetOperation(c77707027.spop)
c:RegisterEffect(e1)
--Give Allen
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77707027,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,77707101+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c77707027.gcon)
e2:SetTarget(c77707027.gtg)
e2:SetOperation(c77707027.gop)
c:RegisterEffect(e2)
--Give effects, take Allen, send a monster Towers style
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(77707027,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,77707201+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(c77707027.efcon)
e3:SetTarget(c77707027.eftg)
e3:SetOperation(c77707027.efop)
c:RegisterEffect(e3)
--Summon Tokens and REVERSE
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(77707027,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,77707301+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e4:SetCondition(c77707027.tokcon)
e4:SetTarget(c77707027.toktg)
e4:SetOperation(c77707027.tokop)
c:RegisterEffect(e4)
end
function c77707027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c77707027.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,77708001,0,0x4011,0,1800,3,RACE_FAIRY,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,77708001)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(77708001,1))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_ATTACK)
e6:SetCondition(c77707027.atcon)
token:RegisterEffect(e6,true)
local e7=e6:Clone()
e7:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
token:RegisterEffect(e7,true)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,77708000,0,0x4011,1800,0,3,RACE_FIEND,ATTRIBUTE_LIGTH) then
local token=Duel.CreateToken(tp,77708000)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(77708000,1))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5,true)
end
Duel.SpecialSummonComplete()
Duel.RegisterFlagEffect(tp,77707027,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c77707027.alfilter(c)
return c:IsFaceup() and c:IsCode(77708000)
end
function c77707027.atcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c77707027.alfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c77707027.gcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,77707027)~=0 and Duel.GetTurnPlayer()==tp
end
function c77707027.gtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c77707027.alfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c77707027.alfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function c77707027.gop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c77707027.alfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.GetControl(g,1-tp)
end
Duel.RegisterFlagEffect(tp,77707101,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c77707027.efcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,77707101)~=0
end
function c77707027.effilter(c,tp)
return c:IsFaceup()
end
function c77707027.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c77707027.effilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c77707027.alfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c77707027.effilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function c77707027.efop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
--take current mzones
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,tc)
--copy effects
for card in aux.Next(g) do
local code=card:GetOriginalCode()
local cid=tc:CopyEffect(code,RESET_EVENT+0x1fe0000,1)
end
end
if Duel.SelectYesNo(tp,aux.Stringid(77707027,4)) then
local g1=Duel.SelectTarget(tp,c77707027.alfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g1:GetCount()>0 then
Duel.GetControl(g1,tp)
local g2=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE,0,nil,TYPE_MONSTER)
if g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g2:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE)
end
end
end
Duel.RegisterFlagEffect(tp,77707201,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c77707027.tokcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,77707201)~=0 and Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c77707027.toktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ct=math.min(ft1,ft2)
if chk==0 then return ct>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,77708002,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_WIND,POS_FACEUP_ATTACK)
and Duel.IsPlayerCanSpecialSummonMonster(tp,77708002,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_WIND,POS_FACEUP_ATTACK,1-tp)
and Senya.IsDFCTransformable(c) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct*2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct*2,0,0)
end
function c77707027.tokop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ct=math.min(ft1,ft2)
if ct>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,77708002,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_WIND,POS_FACEUP_ATTACK)
and Duel.IsPlayerCanSpecialSummonMonster(tp,77708002,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_WIND,POS_FACEUP_ATTACK,1-tp) then
for i=1,ct do
local token=Duel.CreateToken(tp,77708002)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
token=Duel.CreateToken(tp,77708002)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
Senya.TransformDFCCard(c)
end
end
\ No newline at end of file
c77707028.dfc_back_side=77707028-1
Duel.LoadScript("c37564765.lua")
function c77707028.initial_effect(c)
Senya.DFCBackSideCommonEffect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,77707028+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Destroy monsters, Allen gain 3k
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77707028,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,77707102+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c77707028.descon1)
e2:SetTarget(c77707028.destg1)
e2:SetOperation(c77707028.desop1)
c:RegisterEffect(e2)
--Negate Allen and Rilian and take no dmg
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(77707028,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,77707202+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(c77707028.negcon)
e3:SetTarget(c77707028.negtg)
e3:SetOperation(c77707028.negop)
c:RegisterEffect(e3)
--Remove all
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(77707028,2))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,77707302+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e4:SetCondition(c77707028.rmcon)
e4:SetCost(c77707028.rmcost)
e4:SetTarget(c77707028.rmtg)
e4:SetOperation(c77707028.rmop)
c:RegisterEffect(e4)
--Destroy all and SS a Drift Bottle Token
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(77707028,3))
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,77707402+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e5:SetCondition(c77707028.descon2)
e5:SetTarget(c77707028.destg2)
e5:SetOperation(c77707028.desop2)
c:RegisterEffect(e5)
end
function c77707028.alfilter(c)
return c:IsFaceup() and c:IsCode(77707004)
end
function c77707028.rifilter(c)
return c:IsFaceup() and c:IsCode(77708001)
end
function c77707028.alrifilter(c)
return c:IsFaceup() and (c:IsCode(77708001) or c:IsCode(77707004))
end
function c77707028.descon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c77707028.cfilter(c)
return c:IsCode(77708002) and c:IsFaceup()
end
function c77707028.desfilter1(c)
return c:IsType(TYPE_MONSTER) and not (c:IsCode(77707004) or c:IsCode(77708001))
end
function c77707028.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77707028.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(c77707028.desfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function c77707028.desop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(c77707028.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(1-tp,c77707028.desfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
local tg=Duel.GetMatchingGroup(c77707028.alfilter,tp,LOCATION_ONFIELD,0,nil)
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
Duel.RegisterFlagEffect(tp,77707028,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c77707028.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER)
or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)))
and Duel.GetFlagEffect(tp,77707028)~=0
end
function c77707028.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77707028.alfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c77707028.rifilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,nil,1,0,0)
end
function c77707028.negop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetMatchingGroup(c77707028.alrifilter,tp,LOCATION_ONFIELD,0,nil)
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=tg:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local tg2=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
local tc2=tg2:GetFirst()
while tc2 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc2:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc2:RegisterEffect(e2)
if tc2:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc2:RegisterEffect(e3)
end
tc2=tg2:GetNext()
end
Duel.RegisterFlagEffect(tp,77707102,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c77707028.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,77707102)~=0
and Duel.IsExistingMatchingCard(c77707028.rifilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c77707028.alfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c77707028.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>1 end
local lp=Duel.GetLP(tp)
Duel.PayLPCost(tp,lp-1)
end
function c77707028.rmfilter(c)
return c:IsAbleToRemove() and not c:IsCode(77708001)
end
function c77707028.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c77707028.rmfilter,tp,0x1e,0x1e,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c77707028.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c77707028.rmfilter,tp,0x1e,0x1e,aux.ExceptThisCard(e))
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,77707202,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c77707028.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,77707202)~=0 and Duel.GetLP(tp)>0
and tp~=Duel.GetTurnPlayer()
end
function c77707028.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,77708003,0,0x4011,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c77707028.desop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
local token=Duel.CreateToken(tp,77708003)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.SetLP(tp,0)
end
end
local m=77707029
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddMaterialCodeList(c,77707705)
aux.AddSynchroProcedure(c,cm.tfilter,aux.NonTuner(nil),2)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,m)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon1)
e1:SetOperation(cm.drop1)
c:RegisterEffect(e1)
--sp_summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.drcon2)
e3:SetOperation(cm.drop2)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(cm.condition2)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.tfilter(c)
return c:IsCode(77707705)
end
function cm.dfilter(c,sp)
return c:GetSummonPlayer()==sp
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.dfilter,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.dfilter,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m)
Duel.ResetFlagEffect(tp,m)
Duel.Draw(tp,n,REASON_EFFECT)
end
function cm.cfilter2(c,tp)
return c:IsPreviousLocation(LOCATION_HAND) and c:GetPreviousControler()==tp and c:GetReasonPlayer()==1-tp
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter2,3,nil,tp)
end
function cm.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 cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local dr=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and dr>0 and Duel.IsPlayerCanDraw(tp,dr) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not cm.target(e,tp,eg,ep,ev,re,r,rp,0) then return end
local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local dr=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if dr>0 then
Duel.BreakEffect()
Duel.Draw(tp,dr,REASON_EFFECT)
end
end
end
--我与青蛙的爱情罗曼史
local m=77707031
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:IsExists(function(c)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp
end,1,nil)
end)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
local m=77707037
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCost(cm.rmcost)
e2:SetTarget(cm.sstg)
e2:SetOperation(cm.ssop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetTarget(cm.desreptg)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsLevel(1) and not c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost()
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_MZONE,0,e:GetHandler())
if chk==0 then return g:GetClassCount(Card.GetCode)>2 end
local tg=Group.CreateGroup()
for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
tg:Merge(sg)
end
Duel.SendtoGrave(tg,REASON_COST)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
c:CompleteProcedure()
end
function cm.repfilter(c)
return c:IsSetCard(47552) and c:IsAbleToRemoveAsCost()
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(cm.repfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.repfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
return true
else return false end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
if g2:GetCount()>0 then
Duel.ChangePosition(g2,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
--庭园造景的少女
local m=77707043
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,function(c)
return c:IsAttackBelow(0) and c:IsAttribute(ATTRIBUTE_DARK)
end,1,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(m*16)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(SUMMON_TYPE_LINK)
local mat_filter=function(c,lc)
return c:IsCanBeLinkMaterial(lc) and c:IsAbleToRemoveAsCost() and c:IsCode(77707706)
end
e1:SetCondition(function(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(mat_filter,tp,LOCATION_GRAVE,0,nil,c)
return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and #mg>0
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(mat_filter,tp,LOCATION_GRAVE,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=mg:Select(tp,1,1,nil)
c:SetMaterial(g)
Duel.Remove(g,POS_FACEUP,REASON_MATERIAL+REASON_LINK)
end)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MINIATURE_GARDEN_GIRL)
e1:SetValue(1)
e1:SetTarget(function(e,c)
return c:IsAttribute(ATTRIBUTE_DARK)
end)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(0x14000)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsAttackBelow(0) and c:IsAbleToDeck() and not c:IsPublic()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.filter,p,LOCATION_HAND,0,1,99,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,ct+1,REASON_EFFECT)
Duel.ShuffleHand(p)
end
end
\ No newline at end of file
--最后的左轮手枪
local m=77707044
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local tg=g:GetMaxGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
else Duel.Destroy(tg,REASON_EFFECT) end
end
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
\ No newline at end of file
local m=77707045
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
e4:SetTarget(cm.eqtg)
e4:SetOperation(cm.eqop)
c:RegisterEffect(e4)
end
function cm.f(c)
return c:IsType(TYPE_RITUAL+TYPE_PENDULUM+TYPE_LINK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.f,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(cm.f,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.f,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g<=0 then return end
local list={
[1057]=TYPE_RITUAL,
[1074]=TYPE_PENDULUM,
[1076]=TYPE_LINK
}
local announce_list={}
local ty_list={}
for string,ty in pairs(list) do
if g:IsExists(Card.IsType,1,nil,ty) then
table.insert(announce_list,string)
table.insert(ty_list,ty)
end
end
local selected_option=Duel.SelectOption(tp,table.unpack(announce_list))
local selected_type=ty_list[selected_option+1]
local sg=g:Filter(Card.IsType,nil,selected_type)
Duel.Destroy(sg,REASON_EFFECT)
end
function cm.eqfilter(c,ec)
return c:IsCode(m-1) and
c:CheckEquipTarget(ec)
end
function cm.eqfilter2(c,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and
Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_DECK,0,1,nil,c)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local h=Duel.SelectMatchingCard(tp,cm.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK,0,1,1,nil,h:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=g:GetFirst()
Duel.Equip(tp,tc,h:GetFirst())
end
--墓场之主
local m=77707047
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
--remain field
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e1)
--activate limit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77707047,0))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
Senya.EvilliousCheckList=Senya.EvilliousCheckList or {[0]=0,[1]=0}
if chk==0 then return true end
Senya.EvilliousCheckList[tp]=Senya.EvilliousCheckList[tp]|0x4
end)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--link spell
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_LINK_SPELL_KOISHI)
e3:SetValue(LINK_MARKER_TOP_LEFT)
c:RegisterEffect(e3)
--Self-Destroyed
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)>0 then
end
end
end
\ No newline at end of file
--法庭之主
local m=77707048
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_LINK_SPELL_KOISHI)
e2:SetValue(LINK_MARKER_TOP)
c:RegisterEffect(e2)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(function(e,c)
return (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT) and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetSummonLocation()~=LOCATION_GRAVE
end)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
local function f(c)
return c:IsPreviousLocation(LOCATION_DECK)
end
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(f,1,nil)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local g=eg:Filter(f,nil)
for p=0,1 do
if g:IsExists(Card.IsControler,1,nil,p) then
Duel.DiscardHand(p,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
end)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Senya.EvilliousCheckList=Senya.EvilliousCheckList or {[0]=0,[1]=0}
if chk==0 then return true end
Senya.EvilliousCheckList[tp]=Senya.EvilliousCheckList[tp]|0x2
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e:GetHandler():RegisterEffect(e1)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(c,REASON_RULE)
end
--冥界之主
local m=77707052
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND,0)>7
end)
e1:SetTarget(cm.target)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.Destroy(sg,REASON_EFFECT)>0 then
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc&LOCATION_ONFIELD==0
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end)
Duel.RegisterEffect(e4,tp)
end
end)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_LINK_SPELL_KOISHI)
e2:SetValue(LINK_MARKER_TOP_RIGHT)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SPSUMMON_COUNT_LIMIT)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetValue(3)
c:RegisterEffect(e4)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Senya.EvilliousCheckList=Senya.EvilliousCheckList or {[0]=0,[1]=0}
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Senya.EvilliousCheckList[tp]=Senya.EvilliousCheckList[tp]|0x1
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
cm[e:GetHandler()]=e1
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
Duel.Destroy(c,REASON_RULE)
c:ResetFlagEffect(1082946)
end
end
--A Hero's Armor is Always Crimson
function c77707057.initial_effect(c)
--Change effect to nothing
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77707057,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCondition(c77707057.chcon)
e1:SetTarget(c77707057.chtg)
e1:SetOperation(c77707057.chop)
c:RegisterEffect(e1)
end
function c77707057.chcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and (re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_HAND)
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>=10
end
function c77707057.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c77707057.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c77707057.repop)
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
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_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
--Negate Grave effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c77707057.discon)
e2:SetTarget(c77707057.distg)
e2:SetOperation(c77707057.disop)
c:RegisterEffect(e2)
end
end
function c77707057.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
end
function c77707057.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc==LOCATION_GRAVE and Duel.IsChainNegatable(ev)
end
function c77707057.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c77707057.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.NegateActivation(ev) and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
--Rebirthday_Truth
local m=77707066
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0xb9c0)
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=5-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) and Duel.IsPlayerCanDraw(1-tp,ct) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct=5-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)>0 then
Duel.ShuffleDeck(1-tp)
Duel.Draw(1-tp,ct,REASON_EFFECT)
Duel.SetLP(1-tp,8000)
Duel.SwapDeckAndGrave(tp)
end
end)
c:RegisterEffect(e1)
end
--序曲·十分钟的恋爱
local m=77707067
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local function f(c)
return c:IsSetCard(0xb9c0) and c:IsAbleToGraveAsCost()
end
local mx=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if chk==0 then return mx>0 and Duel.IsExistingMatchingCard(f,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(f,tp,LOCATION_DECK,0,nil)
local sg=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,g,function(g)
return g:GetClassCount(Card.GetCode)==#g
end,nil,1,mx)
e:SetLabel(#sg)
Duel.SendtoGrave(sg,REASON_COST)
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,e:GetLabel())
for tc in aux.Next(g) do
Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)
if tc:IsControler(tp) and tc:IsLocation(LOCATION_DECK) then
tc:ReverseInDeck()
end
end
end)
c:RegisterEffect(e1)
end
--天界之主
local m=77707068
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Senya.EvilliousCheckList and Senya.EvilliousCheckList[tp]&0x7==0x7
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local c=e:GetHandler()
if chk==0 then return #g>0 and c:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT) then
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_REMOVED)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetReset(0x1fe1000)
e5:SetHintTiming(0x3c0)
e5:SetCountLimit(1)
e5:SetCondition(cm.condition)
e5:SetCost(cm.cost)
e5:SetTarget(cm.target)
e5:SetOperation(cm.operation)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_REMOVED)
e6:SetCode(EVENT_CHAINING)
e6:SetReset(0x1fe1000)
e6:SetCountLimit(1)
e6:SetCost(cm.cost)
e6:SetTarget(cm.target2)
e6:SetOperation(cm.operation)
c:RegisterEffect(e6)
end
end)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.CheckEvent(EVENT_CHAINING)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.filter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xb9c0) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return e:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function cm.filter2(c,e,tp,eg,ep,ev,re,r,rp)
if c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xb9c0) and c:IsAbleToGraveAsCost() then
if c:CheckActivateEffect(false,true,false)~=nil then return true end
local te=c:GetActivateEffect()
if te:GetCode()~=EVENT_CHAINING then return false end
local con=te:GetCondition()
if con and not con(e,tp,eg,ep,ev,re,r,rp) then return false end
local tg=te:GetTarget()
if tg and not tg(e,tp,eg,ep,ev,re,r,rp,0) then return false end
return true
else return false end
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return e:GetLabelObject():GetTarget()(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
local te,ceg,cep,cev,cre,cr,crp
local fchain=cm.filter1(tc)
if fchain then
te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
else
te=tc:GetActivateEffect()
end
Duel.SendtoGrave(g,REASON_COST)
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then
if fchain then
tg(e,tp,ceg,cep,cev,cre,cr,crp,1)
else
tg(e,tp,eg,ep,ev,re,r,rp,1)
end
end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end
local m=77707069
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local function uni_effect(mark,code)
local function costf(c,e,tp)
return c:IsCode(code) and c:IsAbleToRemoveAsCost()
and (mark>0 or Duel.IsExistingMatchingCard(revf,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil))
end
local function revf(c,e,tp)
return c:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_DEVINE) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
return {
function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(costf,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,costf,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
if mark>0 then
e:SetCategory(0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
end,
function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if mark>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LINK_SPELL_KOISHI)
e1:SetValue(0)
e1:SetReset(0x1fe1000)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetValue(mark)
e1:SetReset(0x1fe1000)
c:RegisterEffect(e1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,revf,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
end
end
}
end
local effect_list={
[LINK_MARKER_TOP]=77707048,
[LINK_MARKER_TOP_LEFT]=77707047,
[LINK_MARKER_TOP_RIGHT]=77707052,
[0]=77707068,
}
local target_list={}
local operation_list={}
for mark,code in pairs(effect_list) do
local func=uni_effect(mark,code)
table.insert(target_list,func[1])
table.insert(operation_list,func[2])
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(Senya.multi_choice_target(m,table.unpack(target_list)))
e1:SetOperation(Senya.multi_choice_operation(table.unpack(operation_list)))
c:RegisterEffect(e1)
end
--Black Box
function c77707070.initial_effect(c)
aux.AddLinkProcedure(c,c77707070.check,2,2,c77707070.lcheck)
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_REMOVE)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_MZONE)
e8:SetCountLimit(1)
e8:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e8:SetTarget(c77707070.tgtg)
e8:SetOperation(c77707070.tgop)
c:RegisterEffect(e8)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c77707070.cost)
e1:SetTarget(c77707070.target)
e1:SetOperation(c77707070.operation)
c:RegisterEffect(e1)
end
function c77707070.check(c)
return c:IsLevelAbove(1)
end
function c77707070.lcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function c77707070.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE)
end
function c77707070.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE,0,nil,TYPE_MONSTER)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=tg:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_RULE)
else Duel.Remove(tg,POS_FACEUP,REASON_RULE) end
end
end
function c77707070.costfilter(c)
return c:IsCode(77707057) and c:IsAbleToRemoveAsCost()
end
function c77707070.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77707070.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c77707070.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c77707070.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c77707070.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local m=77707080
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,TYPE_MONSTER) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,TYPE_MONSTER)
if g1:GetCount()>0 and Duel.Destroy(g1,REASON_EFFECT)~=0 then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
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)
end
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,77707047)
end
function cm.tgfilter(c)
return c:IsFaceup()
end
function cm.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>2
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_REMOVED,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,3,tp,LOCATION_REMOVED)
end
function cm.eqcheck(g)
return g:GetClassCount(Card.GetCode)==#g
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ft<=2 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.GetMatchingGroup(cm.eqfilter,tp,LOCATION_REMOVED,0,nil)
if #g<3 then return end
local sg=g:Select(tp,3,3,nil)
local ec=sg:GetFirst()
while ec do
Duel.Equip(tp,ec,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1)
ec=sg:GetNext()
end
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
local m=77729300
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
Senya.AddSummonMusic(c,m*16)
Senya.AddAttackSE(c,aux.Stringid(m,1))
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1e0)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_HAND)
e2:SetCost(Senya.SelfDiscardCost)
e2:SetCountLimit(1,m)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(m,3))
local turn=Duel.GetTurnCount()
local c=e:GetHandler()
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_PHASE+PHASE_STANDBY)
ex:SetReset(0x1fe1000+RESET_PHASE+PHASE_END,2)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
ex:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
ex:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 and Duel.GetTurnCount()==turn+1
end)
ex:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end)
c:RegisterEffect(ex)
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(41546*16)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(Senya.DescriptionCost())
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetDecktopGroup(1-tp,1)
local tc=tg:GetFirst()
if chk==0 then
return tc and tc:IsAbleToHand()
end
Duel.Hint(HINT_SOUND,0,aux.Stringid(m,2))
Duel.ConfirmCards(tp,tg)
Duel.SetTargetCard(tg)
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,0,0)
else
local v=tc:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,1,tp,v)
end
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if not tc:IsLocation(LOCATION_DECK) then return end
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
else
local v=tc:GetAttack()
Duel.Damage(1-tp,v,REASON_EFFECT)
end
end)
e2:SetCountLimit(1,m-100)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(41546*16+1)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(Senya.DescriptionCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
end))
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return cm.filter(e:GetHandler())
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.Hint(HINT_SOUND,0,aux.Stringid(m,2))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local ft=math.min(4,Duel.GetLocationCount(tp,LOCATION_MZONE))
if ft<1 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()<1 then return end
local tc=e:GetHandler()
if not tc or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil)
if tc:IsFaceup() then
if tc:IsHasEffect(EFFECT_DEVINE_LIGHT) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
else
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
tc:ClearEffectRelation()
end
end
local tg=sg:GetFirst()
local fid=e:GetHandler():GetFieldID()
while tg do
local e1=Effect.CreateEffect(tg)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
tg:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_RACE)
e2:SetValue(RACE_ALL)
tg:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_REMOVE_ATTRIBUTE)
e3:SetValue(0xff)
tg:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetValue(0)
tg:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(0)
tg:RegisterEffect(e5,true)
tg:RegisterFlagEffect(81210420,RESET_EVENT+0x47c0000+RESET_PHASE+PHASE_BATTLE,0,1,fid)
tg:SetStatus(STATUS_NO_LEVEL,true)
tg=sg:GetNext()
end
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
sg:AddCard(tc)
Duel.ShuffleSetCard(sg)
sg:RemoveCard(tc)
sg:KeepAlive()
local de=Effect.CreateEffect(e:GetHandler())
de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
de:SetCode(EVENT_DESTROYED)
de:SetLabel(fid)
de:SetLabelObject(sg)
de:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c)
return e:GetLabelObject():IsContains(c)
end,1,nil)
end)
de:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end)
Duel.RegisterEffect(de,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end)
e2:SetCountLimit(1,m-200)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:GetSequence()<5 and not c:IsType(TYPE_TOKEN+TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,0x11,0,0,0,0,0,POS_FACEDOWN)
end
function cm.AddAttackBGM(c,desc)
if not cm.AttackSEList then
cm.AttackSEList={}
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(function()
return cm.AttackSEList[Duel.GetAttacker()]
end)
e1:SetOperation(function()
Duel.Hint(HINT_SOUND,0,cm.AttackSEList[Duel.GetAttacker()])
end)
Duel.RegisterEffect(e1,0)
end
cm.AttackSEList[c]=desc
end
local m=77732113
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
Senya.AddSummonMusic(c,m*16)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(-1700)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(function(e,c)
return e:GetHandler():GetEquipTarget()==c
end)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(function(e,c)
return e:GetHandler():GetEquipTarget()==c and c:IsAttack(0) and c:GetBaseAttack()>0
end)
e2:SetValue(aux.TRUE)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OWNER_RELATE)
e1:SetValue(cm.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function cm.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
end
local m=77757301
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
local function gf(g,lc,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,lc)>0
end
local function spf(c,mg,e,tp)
return c:IsType(TYPE_LINK) and c:IsLinkBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not mg or mg:CheckSubGroup(gf,2,2,c,tp))
end
local function mf(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local mg=Duel.GetMatchingGroup(mf,tp,LOCATION_MZONE,LOCATION_MZONE,0,nil)
if chk==0 then
return Duel.IsExistingMatchingCard(spf,tp,LOCATION_EXTRA,0,1,nil,mg,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=mg:SelectSubGroup(tp,gf,false,2,2,TYPE_LINK,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g:FilterCount(Card.IsRelateToEffect,nil,e)==#g and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
local sg=Duel.SelectMatchingCard(tp,spf,tp,LOCATION_EXTRA,0,1,1,nil,g,e,tp)
if #sg>0 then
local tc=sg:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local tg=tc:GetColumnGroup()
tg:RemoveCard(tc)
if #tg>0 and Duel.SelectYesNo(tp,m*16) then
Duel.BreakEffect()
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
end
end
end)
c:RegisterEffect(e1)
end
local m=77757302
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c)
Senya.AddSummonMusic(c,m*16)
c:EnableReviveLimit()
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(aux.Stringid(37564765,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+76794549)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.sptg2)
e4:SetOperation(cm.spop2)
c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+10)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
Senya.MokouReborn(c,1,m+20)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_DESTROYED)
ge2:SetCondition(cm.regcon)
ge2:SetOperation(cm.regop)
Duel.RegisterEffect(ge2,0)
end
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil)
end
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return end
return Senya.CheckRitualMaterial(c,mg,tp,c:GetLevel(),nil,true)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return end
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil)
end
local mat=Senya.SelectRitualMaterial(c,mg,tp,c:GetLevel(),nil,true)
c:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then
tc:RegisterFlagEffect(m,RESET_EVENT+0x1f20000+RESET_PHASE+PHASE_END,0,1)
elseif tc:IsLocation(LOCATION_EXTRA) then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
tc=eg:GetNext()
end
end
function cm.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(cm.spcfilter,1,nil,0) then v=v+1 end
if eg:IsExists(cm.spcfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,e:GetLabel())
end
function cm.desgf(g,tp)
local c1=g:GetFirst()
local c2=g:GetNext()
local function f1(c)
return c:IsControler(tp)
end
local function f2(c)
return c:IsOnField()
end
return f1(c1) and f2(c2) or f2(c1) and f1(c2)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD)
if chk==0 then return g:CheckSubGroup(cm.desgf,2,2,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not cm.destg(e,tp,eg,ep,ev,re,r,rp,0) then return end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=g:SelectSubGroup(tp,cm.desgf,false,2,2,tp)
if #tg>0 then
Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT)
end
end
if Kaguya then return end
Kaguya={}
Duel.LoadScript("c37564765.lua")
function Kaguya.IsDifficulty(c)
return Senya.check_set(c,"difficulty")
end
function Kaguya.IsTreasure(c)
return Senya.check_set(c,"treasure")
end
local function KaguyaFilter(c,e,tp,cc)
local p=c:GetControler()
local code=c.dfc_front_side
Duel.DisableActionCheck(true)
local tc=Duel.CreateToken(tp,code)
Duel.DisableActionCheck(false)
if tc then
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 --and tc:CheckEquipTarget(c)
else
return false
end
end
local function KaguyaTransformTarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
local function KaguyaTransformOperation(extra_opreation)
return function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not KaguyaTransformTarget(e,tp,eg,ep,ev,re,r,rp,0) or not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
if extra_opreation and not extra_opreation(e,tp,eg,ep,ev,re,r,rp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
local tc=g:GetFirst()
local p=tc:GetControler()
if p~=tp then
Duel.MoveToField(c,p,p,LOCATION_SZONE,POS_FACEUP,false)
end
Senya.TransformDFCCard(c)
Duel.Equip(p,e:GetHandler(),tc)
Duel.RaiseEvent(c,EVENT_CUSTOM+77765000,re,r,rp,ep,ev)
end
end
function Kaguya.ContinuousCommonEffect(c,effect_code,effect_codition,effect_cost,reserve,extra_opreation)
effect_codition=effect_codition or aux.TRUE
effect_cost=effect_cost or aux.TRUE
local cd=c:GetOriginalCode()
local mt=getmetatable(c)
if not c:IsStatus(STATUS_COPYING_EFFECT) then
mt.dfc_front_side=cd+1
end
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
ex:SetCode(effect_code)
ex:SetRange(LOCATION_SZONE)
ex:SetProperty(0x14000+EFFECT_FLAG_IGNORE_IMMUNE)
ex:SetCondition(effect_codition)
ex:SetTarget(KaguyaTransformTarget)
ex:SetOperation(KaguyaTransformOperation(extra_opreation))
if not reserve then
c:RegisterEffect(ex)
end
return ex
end
local function KaguyaEquipLimit(e,c)
return c:IsCode(77765001)
end
function Kaguya.EquipCommonEffect(c)
local cd=c:GetOriginalCode()
local mt=getmetatable(c)
if not c:IsStatus(STATUS_COPYING_EFFECT) then
mt.dfc_back_side=cd-1
end
Senya.DFCBackSideCommonEffect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(KaguyaEquipLimit)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(function(e,te)
return te:GetOwner()~=e:GetOwner()
end)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DISABLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(1)
c:RegisterEffect(e3)
end
......@@ -1399,9 +1399,7 @@
#AddCodeList(75646327) 终焉律者琪亚娜卡名记述
#△雪花 598403759 777 0x9c0-0x9cf
!counter 0x9c0 露西菲尼亚指示物
!setname 0xa9c0 大罪之器
!setname 0xb9c0 Evillious
#黑夜童谣 912052555 780 0x780-0x78f
!setname 0x780 伪神域
......
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