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

vme50

parent 1f3bd04e
No preview for this file type
......@@ -136,9 +136,6 @@
#107
10700031 1 --剑之艺术 千羽荧华
10700231 1 --剑之艺术 幽府妖刀
10701011 0 --幽府溟域 酆都城
10701231 0 --幽府判官司 使者钟馗
10701241 0 --幽府大阎罗 秦广王
10702021 0 --ULTRAMAN 机动艾斯
10702041 1 --ULTRAMAN 机动玛丽
10702051 1 --ULTRAMAN 早田进次郎
......@@ -316,7 +313,6 @@
12400087 0 --连结之心·奥契丝
#128
12800000 0 --提灯剑舞姬
12800006 0 --拳头
12812001 1 --恋爱头脑战-四宫辉夜姬
12812005 0 --恋爱头脑战-石上优
12812006 0 --恋爱头脑战-藤原千花
......@@ -496,7 +492,6 @@
18001005 1 --冒险遗产的先导者
18001010 0 --不灭的冒险遗产
18003007 0 --单调音乐厅
18004008 0 --性感手枪拔枪术
18005010 0 --封锁的拟魂
18005011 0 --改造的拟魂
18005012 0 --拟魂电路 K2R
......
--剑之艺术 幽府妖刀
local m=10700231
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--tograve and Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.tgcon)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
youfu.ex_effect(c,m,e3)
end
function cm.costfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToGraveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and c:IsLevelBelow(6) and not c:IsCode(m) 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 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--check
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.limop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_EXTRA)
end
--tograve
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.tgfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_TRAP) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(tc,REASON_EFFECT)
end
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
--幽府奈何—鬼门开
local m=10701001
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
--SpecialSummon
function cm.filter(c,e,tp)
return c:IsSetCard(0x3481) 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 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) and tc:IsSetCard(0x5481) and Duel.GetTurnPlayer()~=1-tp then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
--
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) and Duel.GetTurnPlayer()~=1-tp
end
function cm.thfilter(c,e,tp)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local count=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,m)
if chk==0 then return count>0 and Duel.IsPlayerCanDiscardDeck(tp,count) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local count=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,m)
if count>0 and Duel.IsPlayerCanDiscardDeck(tp,count) then
Duel.ConfirmDecktop(tp,count)
local g=Duel.GetDecktopGroup(tp,count)
if g:GetCount()>0 then
if g:IsExists(cm.thfilter,1,nil,e,tp) then
Duel.DisableShuffleCheck()
local sg=g:FilterSelect(tp,cm.thfilter,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.SortDecktop(tp,tp,count-1)
else
local g2=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
if #g2>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
end
function cm.thfilter2(c)
return c:IsCode(m) and c:IsAbleToHand()
end
\ No newline at end of file
--幽府奈何—鬼门开
local m=10701011
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--Trap activate in set turn
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_SZONE,0)
e3:SetCondition(cm.condition)
e3:SetCountLimit(1,m+1)
c:RegisterEffect(e3)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.ddcost)
e2:SetTarget(cm.ddtg)
e2:SetOperation(cm.ddop)
c:RegisterEffect(e2)
end
--tograve
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_GRAVE and re:GetHandler():IsSetCard(0x3481)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.IsPlayerCanDiscardDeck(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,1)
end
function cm.tdfilter(c)
return c:IsAbleToDeck()
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)~=0 and Duel.DiscardDeck(1-tp,1,REASON_EFFECT)~=0 then
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=sg:Select(tp,1,1,nil)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
end
end
end
--
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x3481)
end
--damage and draw
function cm.costfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function cm.ddcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(400)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400)
end
function cm.ddop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
This diff is collapsed.
--幽府地藏—渡魂
local m=10701031
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
--link
function cm.cfilter(c)
return c:GetSequence()>=5
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.matfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3481)
end
function cm.lkfilter(c)
return c:IsType(TYPE_LINK) and c:IsSpecialSummonable(SUMMON_TYPE_LINK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local el={}
local mg=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,mg)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
tc:RegisterEffect(e1)
table.insert(el,e1)
end
local res=Duel.IsExistingMatchingCard(cm.lkfilter,tp,LOCATION_EXTRA,0,1,nil)
for _,e in ipairs(el) do
e:Reset()
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
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 el={}
local mg=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,mg)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
tc:RegisterEffect(e1)
table.insert(el,e1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xg=Duel.SelectMatchingCard(tp,cm.lkfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=xg:GetFirst()
Duel.SpecialSummonRule(tp,tc,SUMMON_TYPE_LINK)
if tc and tc:IsSetCard(0x3481) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
Duel.SSet(tp,tc1)
if tc1:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
end
end
end
end
function cm.setfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
--SpecialSummon
function cm.spcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:GetPreviousSequence()>=5 and c:GetLink()>0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spcfilter,1,nil,tp)
end
function cm.spfilter(c,e,tp,link)
return c:IsType(TYPE_LINK) and c:IsLink(link) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local g=eg:Filter(cm.spcfilter,nil,tp)
local link=g:GetFirst():GetLink()
e:SetLabel(link)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,link)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
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_GRAVE,0,1,1,nil,e,tp,e:GetLabel())
local tc=g:GetFirst()
if tc then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_EFFECT)
end
end
end
--幽府望乡—魂迷
local m=10701041
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e0)
--activate (return)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
c:RegisterEffect(e2)
--Destroy + SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.tgfilter(c,e,tp)
return c:IsSetCard(0x3481) or c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave() 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:IsSetCard(0x3481) and not 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 chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) and (Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) or Duel.GetTurnPlayer()~=tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local code=tc:GetCode()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,0,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) and Duel.GetTurnPlayer()==tp then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g1,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
end
--SpecialSummon
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and Duel.GetTurnPlayer()~=tp
end
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0x3481) and not c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT) and g:GetFirst():IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--幽府轮转司 奈河
local m=10701051
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function c10701051.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3481))
e1:SetValue(100)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
youfu.ex_effect(c,m,e2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
and Duel.GetTurnPlayer()~=tp
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x5481) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
Duel.ConfirmDecktop(tp,4)
local g=Duel.GetDecktopGroup(tp,4)
local ct=g:GetCount()
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(cm.spfilter,nil,e,tp)>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,cm.spfilter,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
ct=g:GetCount()-sg:GetCount()
Duel.SortDecktop(tp,tp,ct)
else
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
end
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
--幽府功曹司 城隍
local m=10701061
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--ntr
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.ntrcon)
e3:SetTarget(cm.ntrtg)
e3:SetOperation(cm.ntrop)
c:RegisterEffect(e3)
youfu.ex_effect(c,m,e3)
--SpecialSummon
local e4=e3:Clone()
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCondition(cm.spcon)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
youfu.ex_effect(c,m,e4)
end
--tohand
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ntr
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) and Duel.GetFieldGroupCount(1-tp,0,LOCATION_MZONE)>0
end
function cm.filter(c)
return c:IsControlerCanBeChanged() and c:GetSequence()<=4
end
function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function cm.ntrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.GetControl(tc,tp)
--cannot attack, trigger
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_TRIGGER)
tc:RegisterEffect(e5)
end
end
--SpecialSummon
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) and Duel.GetFieldGroupCount(1-tp,0,LOCATION_MZONE)==0
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and not c:IsCode(m) 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 return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
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,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
\ No newline at end of file
--幽府判官司 赏善
local m=10701071
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--select
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_DESTROY+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.scon)
e2:SetTarget(cm.stg)
e2:SetOperation(cm.sop)
c:RegisterEffect(e2)
youfu.ex_effect(c,m,e2)
end
--SpecialSummon
function cm.ntfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3481)
end
function cm.spcon(e,c)
if c==nil then return true end
return (Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0 or Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==Duel.GetMatchingGroupCount(cm.ntfilter,tp,LOCATION_ONFIELD,0,nil)) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
--select
function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
and Duel.GetTurnPlayer()~=tp
end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil)
local b2=Duel.IsPlayerCanDraw(1-tp,1)
if chk==0 then return b1 or b2 end
end
function cm.sop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil)
local b2=Duel.IsPlayerCanDraw(1-tp,1)
local op=0
if b1 and b2 then op=Duel.SelectOption(1-tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then op=Duel.SelectOption(1-tp,aux.Stringid(m,0))
elseif b2 then op=Duel.SelectOption(1-tp,aux.Stringid(m,1))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
if Duel.IsExistingMatchingCard(cm.spfilter,1-tp,LOCATION_GRAVE,0,1,nil,e,1-tp) and Duel.SelectYesNo(1-tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(1-tp,aux.NecroValleyFilter(cm.spfilter),1-tp,LOCATION_GRAVE,0,1,1,nil,e,1-tp)
local tc1=g:GetFirst()
if tc1 and Duel.SpecialSummonStep(tc1,0,1-tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
else
Duel.Draw(tp,1,REASON_EFFECT)
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc and tc:IsSetCard(0x3481) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc1=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
if tc1 and Duel.Destroy(tc1,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,1-tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(1-tp,cm.thfilter,1-tp,LOCATION_GRAVE,0,1,1,nil)
local tc2=g:GetFirst()
Duel.SendtoHand(tc2,REASON_EFFECT)
end
end
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup()
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
--幽府判官司 阴律
local m=10701081
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetCondition(cm.setcon)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
--tograve and SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
youfu.ex_effect(c,m,e3)
end
--set
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE and rp==1-tp
end
function cm.setfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_QUICKPLAY+TYPE_TRAP) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SSet(tp,g:GetFirst())~=0 and g:GetFirst():IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e1)
end
end
--SpecialSummon
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) 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 return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA+LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_EXTRA+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,1-tp,LOCATION_HAND+LOCATION_EXTRA,0,1,99,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) then
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct>g:GetCount() then ct=g:GetCount() end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
aux.GCheckAdditional=aux.dncheck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:SelectSubGroup(tp,aux.TRUE,false,1,ct)
aux.GCheckAdditional=nil
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
--幽府判官司 罚恶
local m=10701091
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon1)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(cm.spcon2)
c:RegisterEffect(e1)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCondition(cm.tgcon1)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCondition(cm.tgcon2)
c:RegisterEffect(e4)
youfu.ex_effect(c,m,e3)
end
--SpecialSummon
function cm.spfilter1(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE) and c:IsSetCard(0x3481)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.spfilter1,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.spfilter2(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsSetCard(0x3481) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsType(TYPE_MONSTER)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.spfilter2,1,nil,tp)
end
--to grave
function cm.tgcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g:GetFirst(),REASON_EFFECT)
end
end
function cm.tgcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE)
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
--幽府冥王 东岳大帝
local m=10701101
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3481),4,4)
--To hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7480763,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
--to hand
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--SpecialSummon
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if ct>c:GetLink() then ct=c:GetLink() end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,1,ct)
aux.GCheckAdditional=nil
if sg:GetCount()>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,LOCATION_DECK+LOCATION_EXTRA,0,sg:GetCount(),sg:GetCount(),nil)
if g2:GetCount()>0 then
Duel.Remove(g2,POS_FACEDOWN,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.checkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(m)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and aux.ExtraDeckSummonCountLimit[sump]<=0
end
function cm.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.cfilter,1,nil,tp) then
aux.ExtraDeckSummonCountLimit[tp]=aux.ExtraDeckSummonCountLimit[tp]-1
end
if eg:IsExists(cm.cfilter,1,nil,1-tp) then
aux.ExtraDeckSummonCountLimit[1-tp]=aux.ExtraDeckSummonCountLimit[1-tp]-1
end
end
--幽府阎罗 十殿君
local m=10701111
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(cm.synfilter),1)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--SpecialSummon self
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.scon)
e3:SetTarget(cm.stg)
e3:SetOperation(cm.sop)
c:RegisterEffect(e3)
--SpecialSummon others
local e4=e3:Clone()
e4:SetCondition(cm.ocon)
e4:SetTarget(cm.otg)
e4:SetOperation(cm.oop)
c:RegisterEffect(e4)
end
function cm.synfilter(c)
return c:IsRace(RACE_ZOMBIE)
end
--SpecialSummon
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3481) and c:IsControler(tp)
end
function cm.spfilter(c,e,tp)
return not c:IsCode(m) and c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.GetTurnPlayer()~=tp then
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(cm.atklimit)
e1:SetLabel(tc:GetRealFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,0)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(cm.tgtg)
e2:SetValue(aux.tgoval)
e2:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2,true)
end
end
function cm.atklimit(e,c)
return c:GetRealFieldID()==e:GetLabel()
end
function cm.tgtg(e,c)
return c~=e:GetHandler()
end
--SpecialSummon self
function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3481) and c:IsAbleToGrave()
end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--SpecialSummon others
function cm.ofilter(c)
return c:IsFaceup() and c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER)
end
function cm.ocon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) and not
Duel.IsExistingMatchingCard(cm.ofilter,tp,0,LOCATION_MZONE,1,nil)
end
function cm.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.oop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=tg:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--幽府阴阳司 无常黑白
local m=10701121
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--nontuner
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_NONTUNER)
e0:SetValue(cm.tnval)
c:RegisterEffect(e0)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.discost)
e1:SetCondition(cm.discon)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
youfu.ex_effect(c,m,e3)
end
function cm.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler()) and c:IsRace(RACE_ZOMBIE)
end
--negate
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:GetActivateLocation()==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateEffect(ev) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp)
if sg:GetCount() and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and not c:IsCode(m) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.splimit(e,c)
return not (c:IsRace(RACE_ZOMBIE) and c:IsLocation(LOCATION_GRAVE))
end
--
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.sppfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
--self
local a1=Duel.IsExistingMatchingCard(Card.IsDiscardable,1-tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(cm.sppfilter,1-tp,LOCATION_GRAVE,0,1,nil,e,1-tp)
local a2=Duel.GetFieldGroupCount(1-tp,0,LOCATION_HAND)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.IsExistingMatchingCard(cm.sppfilter,1-tp,0,LOCATION_GRAVE,1,nil,e,1-tp)
if chk==0 then return a1 or a2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a1=Duel.IsExistingMatchingCard(Card.IsDiscardable,1-tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(cm.sppfilter,1-tp,LOCATION_GRAVE,0,1,nil,e,1-tp)
local a2=Duel.GetFieldGroupCount(1-tp,0,LOCATION_HAND)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.IsExistingMatchingCard(cm.sppfilter,1-tp,0,LOCATION_GRAVE,1,nil,e,1-tp)
local op=-1
if a1 and a2 then op=Duel.SelectOption(1-tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif a1 then op=Duel.SelectOption(1-tp,aux.Stringid(m,2))
elseif a2 then op=Duel.SelectOption(1-tp,aux.Stringid(m,3))+1
else return end
if op==0 then
if Duel.DiscardHand(1-tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(1-tp,aux.NecroValleyFilter(cm.sppfilter),1-tp,LOCATION_GRAVE,0,1,1,nil,e,1-tp):GetFirst()
Duel.SpecialSummonStep(tc,0,1-tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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)
tc:RegisterEffect(e2)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetLabel(fid)
e4:SetLabelObject(tc)
e4:SetCondition(cm.tdcon)
e4:SetOperation(cm.tdop)
Duel.RegisterEffect(e4,tp)
--cannot be material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(1)
tc:RegisterEffect(e3)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e5)
Duel.SpecialSummonComplete()
end
elseif op==1 then
local ct=Duel.GetFieldGroupCount(1-tp,0,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,ct,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(1-tp,aux.NecroValleyFilter(cm.sppfilter),1-tp,0,LOCATION_GRAVE,1,1,nil,e,1-tp):GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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)
tc:RegisterEffect(e2)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
--幽府速报司 包公
local m=10701131
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetCost(cm.tgcost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.setcon)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
youfu.ex_effect(c,m,e3)
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) and c:IsPreviousControler(tp)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ttp=tp
if tn==tp then ttp=1-tp end
return eg:IsExists(cm.cfilter,1,nil,ttp)
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.tgfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function cm.fselect(g)
return aux.dncheck(g)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x3481)
local ct=0
if g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount()>0 then ct=ct+1 end
local hg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetCount()>0 and ct>0 and hg:GetCount()>0 and hg:CheckSubGroup(cm.fselect,ct,99) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x3481)
local ct=0
if g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount()>0 then ct=ct+1 end
if g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount()>0 then ct=ct+1 end
if ct<1 then return end
local hg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=hg:SelectSubGroup(tp,cm.fselect,false,ct,ct)
local sg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,nil)
local sg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,nil)
if tg:GetCount()>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and (sg1:GetCount()>0 or sg2:GetCount()>0) then
sg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,nil)
sg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,nil)
local op=-1
if sg1:GetCount()>0 and sg2:GetCount()>0 then
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif sg1:GetCount()>0 then
op=Duel.SelectOption(tp,aux.Stringid(m,1))
elseif sg2:GetCount()>0 then
op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=sg1:Select(tp,1,1,nil):GetFirst()
Duel.SendtoHand(sc,tp,REASON_EFFECT)
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=sg2:Select(tp,1,1,nil):GetFirst()
Duel.SSet(tp,sc)
end
end
end
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.setfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
--set
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.setfilter1(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function cm.setfilter2(c)
return c:IsType(TYPE_TRAP) and not c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_HAND,0,1,nil) or Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_GRAVE,0,1,nil)) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(cm.setfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter2),tp,LOCATION_GRAVE,0,nil)
local g=Group.__add(g1,g2)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e2,true)
end
end
end
--
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
--幽府溟王 酆都大帝
local m=10701141
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,3)
c:EnableReviveLimit()
--MATERIAL_LINK
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.effcon)
e3:SetOperation(cm.spsumsuc)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.setcon)
e4:SetTarget(cm.settg)
e4:SetOperation(cm.setop)
c:RegisterEffect(e4)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(cm.damcon)
e2:SetTarget(cm.damtg)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e5:SetCondition(cm.thcon1)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e6:SetCondition(cm.thcon2)
c:RegisterEffect(e6)
end
function cm.mfilter(c)
return c:IsLinkSetCard(0x3481) or c:GetOwner()~=c:GetControler()
end
--splimit
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(m) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
--cannot active
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function cm.spsumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
--check
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(Card.IsSetCard,nil,0x3481)
if mg:GetCount()==fg:GetCount() then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--set
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.setfilter(c)
return c:IsType(TYPE_FIELD) and not c:IsForbidden()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
--Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--damage
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) and Duel.GetTurnPlayer()~=tp
end
function cm.damfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3481)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.damfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetCount()>0 end
local dam=g:GetClassCount(Card.GetCode)*444
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dg=Duel.GetMatchingGroup(cm.damfilter,tp,LOCATION_GRAVE,0,nil)
local dam=dg:GetClassCount(Card.GetCode)*444
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.Damage(p,dam,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and not c:IsType(TYPE_FUSION+TYPE_XYZ+TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
--tohand
function cm.thcfilter(c)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0x3481) and c:IsFaceup()
end
function cm.thcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--幽府阴阳 三生彼岸
local m=10701151
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--return grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,m+1)
--e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--disable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_ONFIELD)
e5:SetCondition(cm.discon)
e5:SetOperation(cm.disop)
c:RegisterEffect(e5)
end
--tograve
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER+TYPE_TRAP) and c:IsSetCard(0x3481) and c:IsAbleToGrave()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,m):GetCount()
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if ct>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,ct,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--return grave
function cm.filter(c)
return c:IsPreviousLocation(LOCATION_DECK)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(LOCATION_GRAVE+LOCATION_DECK,LOCATION_GRAVE+LOCATION_DECK)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
--disable
function cm.cfilter(c)
return c:IsCode(10701101,10701141) and c:IsFaceup()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local loc,pos=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION)
return not e:GetHandler():IsLocation(LOCATION_FZONE) and Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) and loc==LOCATION_GRAVE and rp==1-tp
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--幽府地狱 罗酆六天
local m=10701161
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.tgcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
--tohand
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3481)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.tgfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,sg:GetCount(),nil)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sc=sg:Select(tp,g:GetCount(),g:GetCount(),nil)
if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--to grave
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and aux.exccon(e)
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end
function cm.tgcfilter(c)
return c:IsSetCard(0x3481) and c:IsFaceup() and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgcfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_MZONE)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,cm.tgcfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #g1==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.HintSelection(g1)
if Duel.SendtoGrave(g1,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgdfilter,tp,0,LOCATION_DECK,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.tgdfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave()
end
--幽府地狱 阿鼻地狱
local m=10701171
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(cm.regcon)
e4:SetOperation(cm.regop)
c:RegisterEffect(e4)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
--SpecialSummon
function cm.cfilter(c)
return c:IsDiscardable(REASON_EFFECT)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) 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 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_DISCARD+REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
if tc:IsSetCard(0x3481) and tc:IsType(TYPE_TRAP) and tc:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_ZOMBIE)
end
--hand
function cm.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end
--tohand
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) and re:GetHandler():IsSetCard(0x3481)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.thfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand()
end
function cm.tgfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,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,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--幽府烈狱 刀尖火山
local m=10701181
local cm=_G["c"..m]
function cm.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
--tograve
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3481) and c:IsAbleToGrave()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x3481)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil)
and #g>0 end
local count=0
if g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount()>0 then count=count+1 end
if g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount()>0 then count=count+1 end
if g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount()>0 then count=count+1 end
local dam=count*444
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x3481)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local hg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if hg:GetCount()>0 and Duel.SendtoGrave(hg,REASON_EFFECT)>0 then
local count=0
if g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount()>0 then count=count+1 end
if g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount()>0 then count=count+1 end
if g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount()>0 then count=count+1 end
Duel.Damage(p,count*444,REASON_EFFECT)
end
end
--SpecialSummon
function cm.cfilter(c)
return c:IsSetCard(0x3481) and c:IsDiscardable()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,c) and c:IsDiscardable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3481) and c:IsLevelBelow(5) 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 return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_QUICKPLAY+TYPE_TRAP) and c:IsAbleToHand()
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,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end
--幽府大狱—永刑
local m=10701191
local cm=_G["c"..m]
function cm.initial_effect(c)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DISABLE+CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_TO_GRAVE)
--e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.condition)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+1)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.dctg)
e2:SetOperation(cm.dcop)
c:RegisterEffect(e2)
end
function cm.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.tdfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local a1=Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
local a2=Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil)
if chk==0 then return a1 or a2 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local a1=Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
local a2=Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil)
local op=-1
if a1 and a2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif a1 then op=Duel.SelectOption(tp,aux.Stringid(m,0))
elseif a2 then op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
else return end
if op==0 then
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g==0 then return end
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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)
tc:RegisterEffect(e2)
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local b1=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
local b2=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
local opp=-1
if #b1>0 and #b2>0 then opp=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif #b1>0 then opp=Duel.SelectOption(tp,aux.Stringid(m,2))
elseif #b2>0 then opp=Duel.SelectOption(tp,aux.Stringid(m,3))+1
else return end
if opp==0 then
local sg1=b1:RandomSelect(tp,1)
sg:Merge(sg1)
end
if opp==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg1=b1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
--discard
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsAbleToHand()
end
function cm.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.dcop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local ct=Duel.DiscardHand(1-tp,nil,1,99,REASON_EFFECT+REASON_DISCARD)
if ct>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,ct,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,ct,ct,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--幽府彼岸—花落
local m=10701201
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.tdfilter(c)
return c:IsSetCard(0x3481) and c:IsAbleToDeck()
end
function cm.spfilter(c,e,tp)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
return c:IsType(TYPE_LINK) and c:IsSetCard(0x3481) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and g:GetClassCount(Card.GetCode)>=c:GetLink()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
Duel.ConfirmCards(1-tp,g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,g:GetFirst():GetLink(),tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetClassCount(Card.GetCode)>=tc:GetLink() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=g:SelectSubGroup(tp,aux.dncheck,false,tc:GetLink(),tc:GetLink())
if Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)>0 then
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
end
end
end
--tohan
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_HAND)
end
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--幽府判官司 省忧察
local m=10701211
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE),2,2,cm.lcheck)
c:EnableReviveLimit()
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.indcon)
e2:SetOperation(cm.indop)
c:RegisterEffect(e2)
--tograve
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(cm.tgcon)
e5:SetTarget(cm.tgtg)
e5:SetOperation(cm.tgop)
c:RegisterEffect(e5)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x5481)
end
--indes
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetTargetRange(LOCATION_SZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3481))
e2:SetValue(aux.indoval)
if Duel.GetTurnPlayer()==tp then
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e2,tp)
end
--tograve
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgfilter(c)
return c:IsSetCard(0x3481) and c:IsLevelBelow(4) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--幽府阴鬼使 鬼王
local m=10701221
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--lv up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1006081,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tograve and SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
youfu.ex_effect(c,m,e3)
end
function cm.costfilter(c)
return c:IsSetCard(0x3481) and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsLevelBelow,9))
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetCondition(cm.condition)
e2:SetValue(RACE_ZOMBIE)
e2:SetReset(RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
function cm.condition(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end
--tohand
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.thfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT) then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Draw(p,d,REASON_EFFECT)
end
end
--幽府判官司 使者钟馗
local m=10701231
local cm=_G["c"..m]
Duel.LoadScript("c51300039.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--set and tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
youfu.ex_effect(c,m,e3)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.tffilter,tp,LOCATION_DECK,0,nil)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) and
not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_SZONE,0,1,nil) and
#g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local sg=g:Select(tp,1,1,nil)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.tffilter(c)
return c:IsSetCard(0x3481) and (c:GetType()==TYPE_SPELL+TYPE_FIELD or c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS)
and not c:IsForbidden()
end
--set and tohand
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.setfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
local hg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and
Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and
#hg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=hg:Select(tp,1,1,nil):GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function cm.cfilter(c)
return c:GetSequence()<5
end
function cm.thfilter(c)
return c:IsSetCard(0x3481) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
--幽幽府大阎罗 秦广王
local m=10701241
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE),aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon1)
e2:SetOperation(cm.sprop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,2))
e3:SetCondition(cm.sprcon2)
e3:SetOperation(cm.sprop2)
c:RegisterEffect(e3)
--Search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
--to field
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetTarget(cm.tstg)
e6:SetOperation(cm.tsop)
c:RegisterEffect(e6)
end
--SpecialSummon rule
function cm.spcfilter01(c,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spcfilter02,tp,LOCATION_HAND,0,2,c)
end
function cm.spcfilter02(c)
return c:IsSetCard(0x3481) and c:IsAbleToGraveAsCost()
end
function cm.sprcon1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spcfilter01,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sprop1(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,cm.spcfilter01,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,cm.spcfilter02,tp,LOCATION_HAND,0,2,2,nil)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function cm.spcfilter11(c,tp)
return (c:GetType()==TYPE_SPELL+TYPE_FIELD or c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS) and
c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spcfilter12,tp,LOCATION_HAND,0,1,c)
end
function cm.spcfilter12(c,tp)
return c:IsSetCard(0x3481) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(cm.spcfilter13,tp,LOCATION_HAND,0,1,c)
end
function cm.spcfilter13(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost()
end
function cm.sprcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spcfilter11,tp,LOCATION_ONFIELD,0,1,nil,tp)
end
function cm.sprop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,cm.spcfilter11,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,cm.spcfilter12,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,cm.spcfilter13,tp,LOCATION_HAND,0,1,1,g2:GetFirst())
g1:Merge(g2)
g1:Merge(g3)
Duel.SendtoGrave(g1,REASON_COST)
end
--tohand
function cm.tdfilter(c,tp)
return c:IsAbleToDeck() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x3481)
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5481)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end
--to szone
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1)
e3:SetCost(cm.cost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e3)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,nil,RACE_ZOMBIE) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,nil,RACE_ZOMBIE)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,1-tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--“物质天”王国
Duel.LoadScript("c10908888.lua")
local s,o,id = GetID()
--///
if not s.switch then
s.switch = true
--name "Hei_Zi_Tian_Ceng"
hztc = { }
function hztc.Filter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY)
end
function hztc.CheckSameName()
local g = Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
return #g > 1 and g:GetClassCount(Card.GetCode) < #g
end
function hztc.ActivateLimit()
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.ctf1)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.ctf1)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.ctf2)
Duel.AddCustomActivityCounter(id,ACTIVITY_ATTACK,s.ctf1)
end
function s.ctf1(c)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.ctf2(re,tp,cid)
local attr=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_ATTRIBUTE)
return not (re:IsActiveType(TYPE_MONSTER) and attr&ATTRIBUTE_LIGHT==0)
end
hztc.ActivateLimit()
function hztc.CheckLimit(e,tp,chk,string)
local c = e:GetHandler()
local list = rsof.String_Split(string)
local id_list = { ["sum"] = ACTIVITY_SUMMON, ["sp"] = ACTIVITY_SPSUMMON, ["act"] = ACTIVITY_CHAIN, ["atk"] = ACTIVITY_ATTACK }
if chk == 0 then
for _,v in pairs(list) do
if Duel.GetCustomActivityCount(id,tp,id_list[v]) > 0 then
return false
end
end
return true
end
if rsof.Table_List(list, "sp") then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
if rsof.Table_List(list, "sum") then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(s.splimit)
Duel.RegisterEffect(e2,tp)
end
if rsof.Table_List(list, "act") then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(1,0)
e3:SetValue(s.aclimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
if rsof.Table_List(list, "atk") then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetTargetRange(1,0)
e4:SetValue(s.splimit)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetAttribute()~=ATTRIBUTE_LIGHT
end
function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT)
end
function hztc.LimitCost(cost,string)
cost = cost or aux.TRUE
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return cost(e,tp,eg,ep,ev,re,r,rp,0) and hztc.CheckLimit(e,tp,0,string) end
cost(e,tp,eg,ep,ev,re,r,rp,1)
hztc.CheckLimit(e,tp,1,string)
end
end
--///
end
function s.initial_effect(c)
local e1 = rsef.STO(c,EVENT_SUMMON_SUCCESS,"th",{1,id},"se,th","de",nil,nil,
rsop.target(s.thfilter,"th",LOCATION_DECK),s.thop)
local e2 = rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
local e3 = rsef.I(c,{id,1},1,nil,"tg,ntr",LOCATION_MZONE,nil,nil,
rstg.target(s.tgfilter,"dum",LOCATION_FZONE,LOCATION_FZONE),s.cop)
end
function s.cfilter(c)
return c:IsCode(10908091) and c:IsFaceup()
end
function s.thfilter(c,e,tp)
local b1 = c:IsCode(10908091)
local b2 = Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and c:IsType(TYPE_FIELD)
return (b1 or b2) and c:IsAbleToHand()
end
function s.thop(e,tp)
rsop.SelectOperate("th",tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function s.tgfilter(c,e,tp)
local tc = e:GetHandler()
return c:IsFaceup() and not tc:IsRace(RACE_FAIRY) and not tc:IsCode(c:GetCode())
end
function s.cop(e,tp)
local c, tc = rscf.GetFaceUpSelf(e), rscf.GetTargetCard(Card.IsFaceup)
if not c or not tc or c:IsRace(RACE_FAIRY) then return end
local e1,e2 = rscf.QuickBuff(c,"race",RACE_FAIRY,"code",tc:GetCode())
end
\ No newline at end of file
--希伯莱天层
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
-----------------------------------
function s.initial_effect(c)
hztc.ActivateLimit(id,true,nil,true)
local e1 = rsef.A(c)
local e2 = rsef.I(c,"th",{1,id},"se,th",nil,LOCATION_SZONE,
nil,hztc.LimitCost(rscost.setlab(100),"act,sp"),s.tg,s.op)
local e3 = rsef.SV_Card(c,"im",s.imval,"sr",LOCATION_SZONE,hztc.CheckSameName)
local e4 = rsef.FV_Card(c,"tge~",aux.tgoval,aux.TargetBoolFunction(
Card.IsRace,RACE_FAIRY),{LOCATION_MZONE,0},nil,LOCATION_SZONE,s.excon)
local e5 = rsef.FV_Card(c,"im",s.imval2,aux.TargetBoolFunction(Card.IsRace,
RACE_FAIRY),{LOCATION_MZONE,0},nil,LOCATION_SZONE,s.excon)
end
function s.rmfilter(c,tp)
return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel())
end
function s.thfilter(c,lv)
local clv = c:GetLevel()
return c:IsAbleToHand() and c:IsLevelAbove(1) and math.abs(clv - lv) == 1
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then
if e:GetLabel() ~= 100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
end
e:SetLabel(0)
local ct,og,tc = rsop.SelectOperate("rm",tp,s.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,{POS_FACEUP,REASON_COST},tp)
e:SetValue(tc:GetLevel())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function s.op(e,tp)
rsop.SelectOperate("th",tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,{},e:GetValue())
end
function s.imval(e,re)
return not re:GetHandler():IsRace(RACE_FAIRY)
end
function s.imval2(e,re)
return rsval.imoe(e,re) and re:IsActiveType(TYPE_SPELL)
end
function s.exfilter(c)
return c:IsFaceup() and c:IsCode(10908100)
end
function s.excon(e)
return Duel.IsExistingMatchingCard(s.exfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
\ No newline at end of file
--月球天天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.I(c,"sp",{1,id},"sp","tg",LOCATION_HAND,nil,nil,
rstg.target({s.tfilter,"dum",LOCATION_ONFIELD,LOCATION_ONFIELD},
{"opc",rscf.spfilter2(),"sp"}),s.spop)
local e2 = rsef.STO(c,EVENT_REMOVE,"dr",{1,id+100},"tg,dr","de",nil,nil,
rsop.target({s.tgfilter,"tg",LOCATION_REMOVED},{1,"dr"}),s.drop)
end
function s.tfilter(c,e,tp)
return c:IsFaceup() and (not c:IsType(TYPE_MONSTER) or hztc.Filter(c)) and not c:IsCode(e:GetHandler():GetCode())
end
function s.spop(e,tp)
local c,tc = rscf.GetSelf(e), rscf.GetTargetCard(Card.IsFaceup)
if not c or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) <= 0 or not tc or tc:IsCode(c:GetCode()) then return end
local e1 = rscf.QuickBuff(c,"code",tc:GetCode())
end
function s.tgfilter(c)
return c:IsLevelAbove(3) and c:IsRace(RACE_FAIRY) and c:IsFaceup()
end
function s.drop(e,tp)
if rsop.SelectOperate("tg",tp,s.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil,{REASON_EFFECT+REASON_RETURN}) > 0 and rsop.CheckOperateCorrectly(LOCATION_GRAVE) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--水星天大天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.STO(c,EVENT_SUMMON_SUCCESS,"rm",{1,id},"rm","de",
nil,hztc.CheckSameName(),
rsop.target(s.rmfilter,"rm",LOCATION_DECK),s.rmop)
local e2 = rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
local e3 = rsef.STO(c,EVENT_REMOVE,"td",{1,id+100},"td","de",nil,nil,
rsop.target(s.tdfilter,"td",0,LOCATION_ONFIELD),s.tdop)
end
function s.rmfilter(c)
return c:IsAbleToRemove() and hztc.Filter(c)
end
function s.rmop(e,tp)
rsop.SelectOperate("rm",tp,s.rmfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function s.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function s.tdop(e,tp)
rsop.SelectOperate("td",tp,s.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
\ No newline at end of file
--金星天权天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.STO(c,EVENT_SUMMON_SUCCESS,"th",{1,id},"th","de",nil,nil,
rsop.target(s.thfilter,"th",LOCATION_REMOVED),s.thop)
local e2 = rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
local e3 = rsef.STO(c,EVENT_REMOVE,"des",{1,id+100},"des","de",
hztc.CheckSameName,nil,
rsop.target(aux.TRUE,"des",0,LOCATION_MZONE),s.desop)
end
function s.thfilter(c)
return c:IsFaceup() and hztc.Filter(c) and c:IsAbleToHand()
end
function s.thop(e,tp)
rsop.SelectOperate("th",tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil,{})
end
function s.desop(e,tp)
rsop.SelectOperate("des",tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil,{})
end
\ No newline at end of file
--太阳天能天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.I(c,"th",{1,id},"th",nil,LOCATION_GRAVE,s.thcon,aux.bfgcost,
rsop.target(s.thfilter,"th",LOCATION_REMOVED,true),s.thop)
local e2 = rsef.I(c,"th",{1,id+100},"se,th",nil,LOCATION_REMOVED,
hztc.CheckSameName,nil,rsop.target({Card.IsAbleToDeck,"td"},
{s.thfilter2,"th",LOCATION_DECK}),s.thop2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY)
end
function s.thcon(e,tp)
local g = Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:FilterCount(s.cfilter,nil) == #g
end
function s.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_FIELD)
end
function s.thop(e,tp)
local g = Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.thfilter2(c)
return hztc.Filter(c) and c:IsLevelAbove(8) and c:IsAbleToHand()
end
function s.thop2(e,tp)
local c = rscf.GetSelf(e)
if c and Duel.SendtoDeck(c,nil,2,REASON_EFFECT) > 0 and c:IsLocation(LOCATION_DECK) then
rsop.SelectOperate("th",tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil,{})
end
end
\ No newline at end of file
--火星天力天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.I(c,"rm",nil,"rm",nil,LOCATION_GRAVE,nil,aux.bfgcost,
rsop.target(s.rmfilter,"rm",LOCATION_DECK),s.rmop)
local e2 = rsef.I(c,"sp",{1,id},"sp,dr",nil,LOCATION_REMOVED,hztc.CheckSameName,
nil,rsop.target(rscf.spfilter2(),"sp"),s.spop)
local e3 = rsef.FC_Global(0,EVENT_DRAW,id,s.rcon,s.rop)
end
function s.rmfilter(c)
return c:IsLevel(5) and c:IsAbleToRemove() and c:IsRace(RACE_FAIRY)
end
function s.rmop(e,tp)
rsop.SelectOperate("rm",tp,s.rmfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function s.spop(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.limit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) <= 0 then return end
local g = Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ct = 0
for tc in aux.Next(g) do
if g:IsExists(Card.IsCode,1,tc,tc:GetCode()) then
ct = ct + 1
end
end
if ct < 1 or not Duel.IsPlayerCanDraw(tp,ct-1) or not rshint.SelectYesNo(tp,"dr") then return end
Duel.Draw(tp,ct-1,REASON_EFFECT)
end
function s.rcon(e,tp,eg,ep,ev,re)
return not re or not re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT)
end
function s.rop(e,tp,eg)
for p = 0,1 do
if eg:IsExists(Card.IsControler,1,nil,p) then
Duel.RegisterFlagEffect(p,id,rsrst.ep,0,1)
end
end
end
function s.limit(c,a1,a2,a3)
return not a3 or not a3:GetHandler():IsAttribute(ATTRIBUTE_LIGHT)
end
\ No newline at end of file
--木星天主天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.I(c,"th",nil,"se,th",nil,LOCATION_GRAVE,nil,aux.bfgcost,
rsop.target(s.thfilter,"th",LOCATION_DECK),s.thop)
local e2 = rsef.I(c,"sp",{1,id},"sp,tg",nil,LOCATION_REMOVED,nil,
hztc.LimitCost(rscost.cost2(s.chk,s.rmfilter,"rm",LOCATION_DECK),"atk"),
rsop.target(rscf.spfilter2(),"sp"),s.spop)
end
function s.thfilter(c)
return c:IsLevel(6) and c:IsAbleToHand() and c:IsRace(RACE_FAIRY)
end
function s.thop(e,tp)
rsop.SelectOperate("th",tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function s.chk(g,e,tp)
e:SetLabel(g:GetFirst():GetCode())
end
function s.rmfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToRemoveAsCost()
end
function s.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function s.spop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) <= 0 then return end
if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e:GetLabel()) then
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
\ No newline at end of file
--土星天座天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.I(c,"tg",nil,"tg",nil,LOCATION_HAND,nil,aux.bfgcost,
rsop.target(s.tgfilter,"tg",LOCATION_DECK),s.tgop)
local e2 = rsef.I(c,"sp",{1,id},"sp,dr",nil,LOCATION_REMOVED,nil,
hztc.LimitCost(rscost.cost2(s.chk,s.rmfilter,"rm",LOCATION_HAND),"sum"),
rsop.target(rscf.spfilter2(),"sp"),s.spop)
local e3 = rsef.QO(c,nil,"rec",1,"rec","ptg",LOCATION_MZONE,hztc.CheckSameName,
rscost.cost(s.rcfilter,"rm",LOCATION_GRAVE),
rsop.target(2000,"rec"),s.revop)
end
function s.tgfilter(c)
return c:IsLevel(7) and c:IsAbleToGrave() and c:IsRace(RACE_FAIRY)
end
function s.tgop(e,tp)
rsop.SelectOperate("tg",tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function s.chk(g,e,tp)
e:SetLabel(g:GetFirst():GetCode())
end
function s.rmfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToRemoveAsCost()
end
function s.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function s.spop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) <= 0 then return end
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e:GetLabel()) and Duel.IsPlayerCanDraw(tp,2) and rshint.SelectYesNo(tp,"dr") then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function s.rcfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function s.revop(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--恒星天智天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.I(c,"tg",nil,"tg,rm",nil,LOCATION_HAND,nil,aux.bfgcost,
rsop.target(s.tgfilter,"dum",LOCATION_DECK),s.tgop)
local e2 = rsef.I(c,"sp",{1,id},"sp",nil,LOCATION_REMOVED,nil,
hztc.LimitCost(rscost.cost2(s.chk,s.rmfilter,"rm",LOCATION_GRAVE),"act"),
rsop.target(rscf.spfilter2(),"sp"),s.spop)
local e3 = rsef.QO(c,nil,"dr",1,"dr","ptg",LOCATION_MZONE,hztc.CheckSameName,
rscost.cost(s.rcfilter,"rm",LOCATION_GRAVE),s.drtg,s.drop)
end
function s.tgfilter(c)
return c:IsLevel(8) and (c:IsAbleToGrave() or c:IsAbleToRemove()) and c:IsRace(RACE_FAIRY)
end
function s.tgop(e,tp)
local og, tc = rsop.SelectCards("tg",tp,s.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b2 = tc:IsAbleToRemove()
local b1 = tc:IsAbleToGrave()
local op = rshint.SelectOption(tp,b1,"tg",b2,"rm")
if op == 1 then
Duel.SendtoGrave(tc,REASON_EFFECT)
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.chk(g,e,tp)
e:SetLabel(g:GetFirst():GetCode())
end
function s.rmfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToRemoveAsCost()
end
function s.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function s.spop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) <= 0 then return end
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e:GetLabel()) then
rsop.SelectExPara("sp",true)
rsop.SelectOperate("sp",tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,{},e,0,tp,false,false)
end
end
function s.rcfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and (Duel.GetTurnPlayer() == tp or Duel.IsPlayerCanDraw(1-tp,1)) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if Duel.GetTurnPlayer() ~= tp then
Duel.Draw(1-p,1,REASON_EFFECT)
end
end
--至高天炽天使
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e1 = rsef.I(c,"tg",nil,"tg,se,th",nil,LOCATION_HAND,nil,aux.bfgcost,
rsop.target(s.tgfilter,"dum",LOCATION_DECK),s.tgop)
local e2 = rsef.I(c,"sp",{1,id},"sp",nil,LOCATION_REMOVED,nil,
hztc.LimitCost(rscost.cost2(s.chk,s.rmfilter,"tg",LOCATION_ONFIELD),"sp"),
rsop.target(rscf.spfilter2(),"sp"),s.spop)
local e3 = rsef.QO(c,nil,"th",1,"th",nil,LOCATION_MZONE,hztc.CheckSameName,
rscost.cost(s.rcfilter,"rm",LOCATION_GRAVE,0,2),
rsop.target(s.thfilter,"th",0,LOCATION_ONFIELD,true),s.thop)
end
function s.tgfilter(c)
return c:IsLevel(9) and (c:IsAbleToGrave() or c:IsAbleToHand()) and c:IsRace(RACE_FAIRY)
end
function s.tgop(e,tp)
local og, tc = rsop.SelectCards("tg",tp,s.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b2 = tc:IsAbleToHand()
local b1 = tc:IsAbleToGrave()
local op = rshint.SelectOption(tp,b1,"tg",b2,"th")
if op == 1 then
Duel.SendtoGrave(tc,REASON_EFFECT)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function s.chk(g,e,tp)
e:SetLabel(g:GetFirst():GetCode())
end
function s.rmfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToGraveAsCost()
end
function s.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function s.spfilter(c,e,tp)
return hztc.Filter(c) and c:IsLevelBelow(4) and rscf.spfilter2()(c,e,tp)
end
function s.spop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) <= 0 then return end
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e:GetLabel()) then
rsop.SelectExPara("sp",true)
rsop.SelectOperate("sp",tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
end
function s.rcfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function s.thfilter(c,e,tp)
if not c:IsAbleToHand() then return false end
return Duel.GetTurnPlayer() == tp or (c:IsLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SPECIAL))
end
function s.thop(e,tp)
local g = Duel.GetMatchingGroup(s.thfilter,tp,0,LOCATION_ONFIELD,nil,e,tp)
if #g > 0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--神之顶点—宙斯
Duel.LoadScript("c10908090.lua")
local s,id,o = GetID()
function s.initial_effect(c)
local e0 = rscf.SetSummonCondition(c,false)
local e1 = rscf.AddSpecialSummonProcdure(c,LOCATION_HAND+LOCATION_GRAVE,
s.sprcon,nil,s.sprop)
local e3 = rsef.I(c,"dr",{1,id},"dr","ptg",LOCATION_HAND,nil,
rscost.cost({s.rmfilter,s.rgchk},"rm",LOCATION_HAND,0,3),
rsop.target(3,"dr"),s.drop)
local e4 = rsef.QO_NegateActivation(c,"des",1,LOCATION_MZONE,s.negcon,
rscost.cost({s.rmfilter2,s.rgchk2},"rm",rsloc.hmg+LOCATION_EXTRA,0,3,6,c))
local e5 = rsef.FTO(c,EVENT_PHASE+PHASE_BATTLE_START,"atk",1,"atk",nil,LOCATION_MZONE,
nil,nil,nil,s.atkop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(s.ccop)
c:RegisterEffect(e2)
end
function s.sprfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsFaceup() and c:IsLevelAbove(7)
end
function s.gchk(g,tp)
return Duel.GetMZoneCount(tp,g,tp) > 0
end
function s.sprcon(e,c,tp)
local g = Duel.GetReleaseGroup(tp):Filter(s.sprfilter,nil)
return g:CheckSubGroup(s.gchk,3,3,tp)
end
function s.sprop(e,tp)
local g = Duel.GetReleaseGroup(tp):Filter(s.sprfilter,nil)
rsgf.SelectOperate("res",g,tp,{aux.TRUE,s.gchk},3,3,nil,{},tp)
end
function s.ccop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler() == e:GetHandler() then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.rmfilter(c,e)
return c:IsAbleToRemoveAsCost() and (c == e:GetHandler() or c:IsRace(RACE_FAIRY))
end
function s.rgchk(g,e)
return g:IsContains(e:GetHandler())
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.negcon(e,tp,...)
return rscon.neg("m",1)(e,tp,...) and hztc.CheckSameName()
end
function s.rmfilter2(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_FAIRY)
end
function s.rgchk2(g,e,tp)
local ct1 = g:GetClassCount(Card.IsLocation,rsloc.hmg)
local ct2 = g:GetClassCount(Card.IsLocation,LOCATION_EXTRA)/2
return math.ceil(ct2) == ct2 and ct2 + ct1 == 3
end
function s.atkop(e,tp)
local c = e:GetHandler()
local rst = rsrst.std+rsrst.bp
local g = Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if #g > 0 then
for tc in aux.Next(g) do
local e1 = rscf.QuickBuff({c,tc},"atk+",-3000,"rst",rst)
end
end
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e2 = rscf.QuickBuff(c,"atkd~",1,"rst",rst)
end
local e3 = rsef.FV_Player({c,tp},"act~",aux.TRUE,nil,{0,1},nil,nil,nil,rst)
end
\ No newline at end of file
--忒亚
function c10908102.initial_effect(c)
c:SetSPSummonOnce(10908102)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c10908102.spcon)
e1:SetOperation(c10908102.spop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10908102,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c10908102.cost)
e1:SetOperation(c10908102.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10908102,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,10908102)
e3:SetCondition(c10908102.condition)
e3:SetTarget(c10908102.thtg)
e3:SetOperation(c10908102.thop)
c:RegisterEffect(e3)
end
function c10908102.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsFaceup()
end
function c10908102.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10908102.filter,tp,LOCATION_REMOVED,0,1,c)
end
function c10908102.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10908102.filter,tp,LOCATION_REMOVED,0,1,1,c)
Duel.SendtoGrave(g,REASON_RETURN)
end
function c10908102.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsFaceup()
end
function c10908102.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10908102.cfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10908102.cfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_RETURN)
end
function c10908102.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTarget(c10908102.tg)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetTarget(c10908102.tg)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
function c10908102.tg(e,c)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c10908102.condition(e)
return Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c10908102.thfilter(c)
return (c:GetAttack()==2700 and c:GetDefense()==2100) or (c:GetAttack()==2100 and c:GetDefense()==2700) and c:IsRace(RACE_FAIRY) and c:IsAbleToHand()
end
function c10908102.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10908102.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10908102.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10908102.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--嘿的外包
Duel.LoadScript("c10199990.lua")
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment