Commit ee56ac99 authored by Tachibana's avatar Tachibana

ndyd

parent ef02ea10
--六曜的牙月丘依儿 --六曜的牙月丘依儿
function c12005012.initial_effect(c) function c12005012.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xfb0),3,true) aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xfb0),3,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12005012,0)) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetDescription(aux.Stringid(12005012,0))
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetOperation(c12005012.thop) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1) e1:SetOperation(c12005012.thop)
--tohand c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) --tohand
e2:SetDescription(aux.Stringid(12005012,1)) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LEAVE_GRAVE) e2:SetDescription(aux.Stringid(12005012,1))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c12005012.drcost) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c12005012.sptg1) e2:SetCost(c12005012.drcost)
e2:SetOperation(c12005012.spop1) e2:SetTarget(c12005012.sptg1)
c:RegisterEffect(e2) e2:SetOperation(c12005012.spop1)
c:RegisterEffect(e2)
end end
function c12005012.cfilter1(c,tp,g) function c12005012.cfilter1(c,tp,g)
return c:IsFaceup() return c:IsFaceup()
end end
function c12005012.spfilter(c,fc) function c12005012.spfilter(c,fc)
return c12005012.matfilter(c) and c:IsCanBeFusionMaterial(fc) return c12005012.matfilter(c) and c:IsCanBeFusionMaterial(fc)
end end
function c12005012.spfilter1(c,tp,g) function c12005012.spfilter1(c,tp,g)
return g:IsExists(c12005012.spfilter2,1,c,tp,c) return g:IsExists(c12005012.spfilter2,1,c,tp,c)
end end
function c12005012.spfilter2(c,tp,mc) function c12005012.spfilter2(c,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0 return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end end
function c12005012.spcon(e,c) function c12005012.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local g=Duel.GetReleaseGroup(tp):Filter(c12005012.spfilter,nil,c) local g=Duel.GetReleaseGroup(tp):Filter(c12005012.spfilter,nil,c)
return g:IsExists(c12005012.spfilter1,1,nil,tp,g) return g:IsExists(c12005012.spfilter1,1,nil,tp,g)
end end
function c12005012.spop(e,tp,eg,ep,ev,re,r,rp,c) function c12005012.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetReleaseGroup(tp):Filter(c12005012.spfilter,nil,c) local g=Duel.GetReleaseGroup(tp):Filter(c12005012.spfilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=g:FilterSelect(tp,c12005012.spfilter1,1,1,nil,tp,g) local g1=g:FilterSelect(tp,c12005012.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst() local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=g:FilterSelect(tp,c12005012.spfilter2,2,2,mc,tp,mc) local g2=g:FilterSelect(tp,c12005012.spfilter2,2,2,mc,tp,mc)
g1:Merge(g2) g1:Merge(g2)
c:SetMaterial(g1) c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL) Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end end
function c12005012.matfilter(c) function c12005012.matfilter(c)
return c:IsSetCard(0xfb0) and c:IsReleasable() and c:IsFaceup() return c:IsSetCard(0xfb0) and c:IsReleasable() and c:IsFaceup()
end end
function c12005012.thop(e,tp,eg,ep,ev,re,r,rp) function c12005012.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND) e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetTargetRange(0,LOCATION_DECK) e1:SetTargetRange(0,LOCATION_DECK)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW) e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c12005012.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c12005012.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
end end
function c12005012.filter(c) function c12005012.filter(c)
return c:IsSetCard(0xfbb) and c:IsAbleToHand() return c:IsSetCard(0xfbb) and c:IsAbleToHand()
end end
function c12005012.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c12005012.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c12005012.filter(chkc) end if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c12005012.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12005012.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c12005012.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c12005012.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c12005012.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c12005012.spop1(e,tp,eg,ep,ev,re,r,rp) function c12005012.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
...@@ -41,6 +41,11 @@ function cm.initial_effect(c) ...@@ -41,6 +41,11 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c12030002.halo_yatori=1
function c12030002.named_with_yatori(c)
local m=_G["c"..c:GetCode()]
return m and m.halo_yatori
end
function cm.spfilter(c) function cm.spfilter(c)
return c:CheckSetCard("yatori") return c:CheckSetCard("yatori")
end end
......
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