Commit 1091379d authored by TanakaKotoha's avatar TanakaKotoha

emergency update

parent f4c53378
......@@ -4,8 +4,8 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2020.6.22"
CURRENT_UPDATE_DATE: "2020.7.5"
LAST_UPDATE_DATE: "2020.7.6"
CURRENT_UPDATE_DATE: "2020.7.7"
redtext:
stage: prepare
......
No preview for this file type
--忍妖 粉雪
function c12017000.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12017000,0))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCost(c12017000.discost)
e1:SetTarget(c12017000.distg)
e1:SetOperation(c12017000.disop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12017000,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(c12017000.thcon)
e2:SetTarget(c12017000.thtg)
e2:SetOperation(c12017000.thop)
c:RegisterEffect(e2)
end
function c12017000.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) or (Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.GetFlagEffect(tp,12017000)==0 ) and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then Duel.RegisterFlagEffect(tp,12017000,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
else
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end
end
function c12017000.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c12017000.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
if rg:GetCount()>0 then
Duel.SendtoGrave(rg,REASON_EFFECT)
end
end
function c12017000.cfilter(c,tp)
return c:GetPreviousControler()==tp
and c:IsSetCard(0xfb4)
end
function c12017000.cfilter1(c,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c12017000.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12017000.cfilter,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and not re:GetHandler():IsCode(12017000)
end
function c12017000.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=(c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetFlagEffect(tp,12017000+100)==0 )
local b2=(c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c12017000.cfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,12017000+200)==0 )
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local g=Duel.GetMatchingGroup(c12017000.cfilter1,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12017000.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetFlagEffect(tp,12017000+100)==0 )
local b2=(c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c12017000.cfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,12017000+200)==0 )
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(12017000,1),aux.Stringid(12017000,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(12017000,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(12017000,2))+1
else return end
if op==0 then
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
Duel.RegisterFlagEffect(tp,12017000+100,RESET_PHASE+PHASE_END,0,1)
else
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoGrave(c,REASON_EFFECT)>=0 and Duel.IsExistingMatchingCard(c12017000.cfilter1,tp,LOCATION_GRAVE,0,1,nil)
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local cg=Duel.SelectMatchingCard(tp,c12017000.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
if cg:GetCount()>0 then
Duel.SendtoHand(cg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,cg)
end
Duel.RegisterFlagEffect(tp,12017000+200,RESET_PHASE+PHASE_END,0,1)
end
end
end
\ No newline at end of file
--忍妖 粉雪
function c12017001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12017001,0))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCost(c12017001.discost)
e1:SetTarget(c12017001.distg)
e1:SetOperation(c12017001.disop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12017001,3))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(c12017001.thcon)
e2:SetTarget(c12017001.thtg)
e2:SetOperation(c12017001.thop)
c:RegisterEffect(e2)
end
function c12017001.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) or (Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.GetFlagEffect(tp,12017001)==0 ) end
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then Duel.RegisterFlagEffect(tp,12017001,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
else
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end
end
function c12017001.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c12017001.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c12017001.filter2(c,e,tp,m,f,gc)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_DARK) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc)
end
function c12017001.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c12017001.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)>0
and Duel.IsExistingMatchingCard(c12017001.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c12017001.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12017001.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c12017001.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c12017001.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c12017001.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if (Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION) and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c12017001.cfilter(c,tp)
return c:GetPreviousControler()==tp
and c:IsSetCard(0xfb4)
end
function c12017001.cfilter1(c,e,tp)
return c:IsSetCard(0xfb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12017001.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12017001.cfilter,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and not re:GetHandler():IsCode(12017001)
end
function c12017001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=(c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) and Duel.GetFlagEffect(tp,12017001+100)==0)
local b2=(c:IsAbleToDeck() and Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c12017001.cfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,12017001+200)==0 )
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,1,0)
local g=Duel.GetMatchingGroup(c12017001.cfilter1,tp,LOCATION_DECK,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c12017001.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) and Duel.GetFlagEffect(tp,12017001+100)==0 )
local b2=(c:IsAbleToDeck() and Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c12017001.cfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,12017001+200)==0 )
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(12017001,1),aux.Stringid(12017001,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(12017001,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(12017001,2))+1
else return end
if op==0 then
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
h1=Duel.Draw(tp,1,REASON_EFFECT)
h2=Duel.Draw(1-tp,1,REASON_EFFECT)
if h1>0 then
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
if h2>0 then
Duel.ShuffleHand(1-tp)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
Duel.RegisterFlagEffect(tp,12017001+100,RESET_PHASE+PHASE_END,0,1)
else
if c:IsRelateToEffect(e) then
if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>=0 and Duel.GetMZoneCount(tp)>=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12017001.cfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,12017002+200,RESET_PHASE+PHASE_END,0,1)
end
end
end
end
\ No newline at end of file
--忍妖 玉雪
function c12017002.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12017002,0))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCost(c12017002.discost)
e1:SetTarget(c12017002.distg)
e1:SetOperation(c12017002.disop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12017002,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(c12017002.thcon)
e2:SetTarget(c12017002.thtg)
e2:SetOperation(c12017002.thop)
c:RegisterEffect(e2)
end
function c12017002.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) or (Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.GetFlagEffect(tp,12017002)==0 ) and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then Duel.RegisterFlagEffect(tp,12017002,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
else
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end
end
function c12017002.tgfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove()
end
function c12017002.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12017002.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c12017002.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12017002.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c12017002.cfilter(c,tp)
return c:GetPreviousControler()==tp
and c:IsSetCard(0xfb4)
end
function c12017002.filter1(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12017002.filter2(c,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand()
end
function c12017002.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12017002.cfilter,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and not re:GetHandler():IsCode(12017002)
end
function c12017002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=(Duel.GetFlagEffect(tp,12017002+100)==0 and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(c12017002.filter1,tp,LOCATION_REMOVED,0,1,c,e,tp) and Duel.GetMZoneCount(tp)>0)
local b2=(c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c12017002.cfilter2,tp,LOCATION_REMOVED,0,1,c) and Duel.GetFlagEffect(tp,12017002+200)==0)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0)
local g=Duel.GetMatchingGroup(c12017002.filter2,tp,LOCATION_REMOVED,0,c)
local g1=Duel.GetMatchingGroup(c12017002.filter1,tp,LOCATION_REMOVED,0,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12017002.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(Duel.GetFlagEffect(tp,12017002+100)==0 and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(c12017002.filter1,tp,LOCATION_REMOVED,0,1,c,e,tp) and Duel.GetMZoneCount(tp)>0)
local b2=(c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c12017002.cfilter2,tp,LOCATION_REMOVED,0,1,c) and Duel.GetFlagEffect(tp,12017002+200)==0)
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(12017002,1),aux.Stringid(12017002,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(12017002,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(12017002,2))+1
else return end
if op==0 then
if c:IsRelateToEffect(e) then
if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>=0 and Duel.GetMZoneCount(tp)>=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12017002.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
Duel.RegisterFlagEffect(tp,12017002+100,RESET_PHASE+PHASE_END,0,1)
else
if c:IsRelateToEffect(e) then
if Duel.SendtoGrave(c,REASON_EFFECT)>=0 and Duel.GetMZoneCount(tp)>=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12017002.filter2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.RegisterFlagEffect(tp,12017002+200,RESET_PHASE+PHASE_END,0,1)
end
end
end
end
--忍妖 百变
function c12017003.initial_effect(c)
--fusion substitute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_FUSION_SUBSTITUTE)
e2:SetCondition(c12017003.subcon)
c:RegisterEffect(e2)
-- local e2=Effect.CreateEffect(c)
-- e2:SetDescription(aux.Stringid(12017003,1))
-- e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
-- e2:SetType(EFFECT_TYPE_IGNITION)
-- e2:SetRange(LOCATION_MZONE)
-- e2:SetTarget(c12017003.sctg)
-- e2:SetOperation(c12017003.scop)
-- c:RegisterEffect(e2)
end
function c12017003.subcon(e)
return e:GetHandler():IsLocation(0x1e)
end
function c12017003.tgfilter(c,rc)
if not c:IsType(TYPE_MONSTER) or not c:IsAbleToGrave() then return false end
local code=c:GetCode()
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
rc:RegisterEffect(e1)
local bool=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,rc)
e1:Reset()
return bool
end
function c12017003.mfilter(c)
return c:IsSetCard(0xfb4)
end
function c12017003.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12017003.tgfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12017003.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c12017003.tgfilter,tp,LOCATION_DECK,0,1,1,nil,c):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
if c:GetControler()==tp then
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetValue(c12017003.aclimit)
e2:SetLabelObject(tc)
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(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTargetRange(1,0)
e3:SetTarget(c12017003.sumlimit)
e3:SetLabelObject(tc)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e4,tp)
end
end
function c12017003.sumlimit(e,c)
return c:IsCode(e:GetLabelObject():GetCode())
end
function c12017003.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
function c12017003.checkop(e,tp,eg,ep,ev,re,r,rp)
local tct=Duel.GetTurnCount()
Duel.RegisterFlagEffect(rp,12017003+tct,RESET_PHASE+PHASE_END,0,2)
end
\ No newline at end of file
--忍妖 魔神龙
function c12017010.initial_effect(c)
--fusion material
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c12017010.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c12017010.sprcon)
e2:SetOperation(c12017010.sprop)
c:RegisterEffect(e2)
--lv change
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c12017010.tg)
e3:SetOperation(c12017010.op)
c:RegisterEffect(e3)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c12017010.econ)
e1:SetValue(c12017010.efilter)
c:RegisterEffect(e1)
end
function c12017010.econ(e,c)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c12017010.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c12017010.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c12017010.spfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_ZOMBIE)
end
function c12017010.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c12017010.spfilter,tp,LOCATION_HAND,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and Duel.GetLocationCountFromEx(tp)>0
end
function c12017010.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c12017010.spfilter,tp,LOCATION_HAND,0,1,1,nil)
c:SetMaterial(g)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c12017010.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),0,0,1)
end
function c12017010.mfilter(c)
return c:IsRace(RACE_ZOMBIE) or c:IsAttribute(ATTRIBUTE_DARK)
end
function c12017010.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(700)
c:RegisterEffect(e1)
mat1=g:Filter(c12017010.mfilter,nil)
g:Sub(mat1)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
tc=g:GetNext()
end
function c12017010.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local cg=g:GetCount()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
-- if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(700*cg)
c:RegisterEffect(e1)
-- mat1=g:Filter(c12017010.mfilter,nil)
-- g:Sub(mat1)
-- if g:GetCount() then
-- local tc=g:GetFirst()
-- while tc do
-- local e1=Effect.CreateEffect(e:GetHandler())
-- e1:SetType(EFFECT_TYPE_SINGLE)
-- e1:SetCode(EFFECT_CANNOT_TRIGGER)
-- e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
-- e1:SetReset(RESET_PHASE+PHASE_END)
-- tc:RegisterEffect(e1)
-- end
-- tc=g:GetNext()
-- end
end
\ No newline at end of file
--忍妖 暗化龙
function c12017011.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0xfb4),aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE),false)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12017011,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c12017011.cost)
e1:SetTarget(c12017011.tg)
e1:SetOperation(c12017011.op)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12017011,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c12017011.descon)
e3:SetTarget(c12017011.destg)
e3:SetOperation(c12017011.desop)
c:RegisterEffect(e3)
end
function c12017011.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end
function c12017011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12017011.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c12017011.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c12017011.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c12017011.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c12017011.descon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xfb4) and not re:GetHandler():IsCode(12017011) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c12017011.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,1,0)
end
function c12017011.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--忍妖 变化之术
function c12017020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c12017020.target)
e1:SetOperation(c12017020.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12017020,4))
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,0x1e0)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c12017020.cost)
e2:SetCondition(c12017020.thcon)
e2:SetTarget(c12017020.thtg)
e2:SetOperation(c12017020.thop)
c:RegisterEffect(e2)
end
function c12017020.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,1,nil,RACE_ZOMBIE)and Duel.GetFlagEffect(tp,12017020)==0 end
Duel.RegisterFlagEffect(tp,12017020,RESET_CHAIN,0,1)
local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_GRAVE,0,1,1,nil,RACE_ZOMBIE)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c12017020.target(e,tp,eg,ep,ev,re,r,rp,chk)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if chk==0 then return h1>0 and Duel.IsPlayerCanDiscardDeck(tp,h1)
end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,0,1)
end
function c12017020.filter(c)
return c:IsSetCard(0xfb4) and c:IsAbleToHand()
end
function c12017020.activate(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.SendtoGrave(h,REASON_EFFECT+REASON_DISCARD)
Duel.DiscardDeck(tp,h1,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c12017020.filter,tp,LOCATION_DECK,0,nil)
if Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12017020,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function c12017020.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c12017020.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local b1=Duel.GetFlagEffect(tp,12017020+100)==0
local b2=Duel.GetFlagEffect(tp,12017020+200)==0
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,300)
end
function c12017020.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.GetFlagEffect(tp,12017020+100)==0
local b2=Duel.GetFlagEffect(tp,12017020+200)==0
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(12017020,1),aux.Stringid(12017020,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(12017020,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(12017020,2))+1
else return end
if op==0 then
Duel.Recover(tp,1000,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,12017020+100,RESET_PHASE+PHASE_END,0,1)
else
Duel.Damage(1-tp,300,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,12017020+200,RESET_PHASE+PHASE_END,0,1)
end
end
Duel.LoadScript("c12000000.lua")
--墓城
HakaShiro=HakaShiro or {}
function HakaShiro.SPSummon(c,code)
local e1=srre.SPSummon(c,code,{code,0},{1,code},LOCATION_HAND+LOCATION_GRAVE,HakaShiro.SPSummoncon,HakaShiro.SPSummonop)
return e1
end
function HakaShiro.SPSummoncon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local cc=Duel.GetFlagEffect(tp,12048004)*2
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_GRAVE,0,5-cc,c)
end
function HakaShiro.SPSummonop(e,tp,eg,ep,ev,re,r,rp,c)
local cc=Duel.GetFlagEffect(tp,12048004)*2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_GRAVE,0,5-cc,5-cc,c)
Duel.SendtoDeck(g,nil,0,REASON_COST)
Duel.ShuffleDeck(tp)
end
function HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(12048001,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
Duel.LoadScript("c12048000.lua")
--墓城七姬 六之姬 涅依
local m=12048001
local cm=_G["c"..m]
cm.named_with_SeHakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--SpecialSummoneffect
local e2=srre.SPSummoneffect(c,m,1,4,CATEGORY_TOGRAVE,nil,{1,m+100},nil,cm.spcost,cm.sptg,cm.spop)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.filter(c)
return srre.check_set_HakaShiro(c) and c:IsAbleToGrave()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--幻梦的探求者 墓城姬涅依
local m=12048002
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--tohand
local e3=srre.QFEffect(c,m,{m,1},CATEGORY_TOHAND,nil,LOCATION_MZONE,{1,m+100},cm.qecon,nil,cm.qetg,cm.qeop)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) or not Duel.IsPlayerCanDiscardDeck(1-tp,1) then return end
local g=Duel.GetDecktopGroup(tp,1)
local g1=Duel.GetDecktopGroup(1-tp,1)
g:Merge(g1)
Duel.SendtoGrave(g,REASON_EFFECT)
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.qecon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.True,tp,LOCATION_GRAVE,0,nil)
return tt>19
end
function cm.chainfilter(re,tp,cid)
return not ( re:GetHandler():GetLocation(LOCATION_GRAVE) )
end
function cm.qecon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>19 and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN,cm.chainfilter)>0
end
function cm.filter(c)
return c:IsAbleToHand()
end
function cm.qetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.qeop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(cm.actlimit)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function cm.actlimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
Duel.LoadScript("c12048000.lua")
--如己所愿 墓城姬涅依
local m=12048003
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--handeffect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.cost)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(m,2))
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.cost(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.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon1)
e1:SetOperation(cm.drop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--sp_summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(cm.drcon2)
e3:SetOperation(cm.drop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.filter(c,sp)
return c:GetSummonPlayer()==sp
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,2) then return end
local g=Duel.GetDecktopGroup(tp,2)
Duel.SendtoGrave(g,REASON_EFFECT)
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m)
Duel.ResetFlagEffect(tp,m)
if not Duel.IsPlayerCanDiscardDeck(tp,2*n) then return end
local g=Duel.GetDecktopGroup(tp,2*n)
Duel.SendtoGrave(g,REASON_EFFECT)
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>19
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,c) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城的款待者 萨文
local m=12048004
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--SpecialSummoneffect
local e1=srre.SPSummoneffect(c,m,0,4,CATEGORY_TOGRAVE,nil,{1,m},nil,nil,cm.sptg,cm.spop)
if not cm.global_check then
cm.global_check=true
HakaShiro_EndEffect={}
HakaShiro_EndEffect[1]=0
end
--handeffect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetHintTiming(0,TIMING_STANDBY_PHASE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(2,m+100)
e2:SetCost(cm.cost)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsAbleToGrave()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local tt=Duel.GetOperatedGroup():GetFirst()
HakaShiro_EndEffect[#HakaShiro_EndEffect+1]=tt:GetCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabel(tt:GetCode())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetLabel(tt:GetFieldID())
Duel.RegisterEffect(e2,tp)
e1:SetLabelObject(e2)
if Duel.GetFlagEffect(tp,m+100)==0 then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetOperation(cm.retop)
Duel.RegisterEffect(e3,tp)
end
end
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return rc:GetOriginalCode()==e:GetLabel() and (not rc:IsOnField() or rc:GetFieldID()~=e:GetLabelObject():GetLabel())
end
function cm.retfilter(c)
return HakaShiro_EndEffect and c:IsAbleToGrave() and c:IsCode(table.unpack(HakaShiro_EndEffect))
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.retfilter,tp,LOCATION_DECK,0,1,nil) then return end
local tt=Duel.GetMatchingGroup(cm.retfilter,tp,LOCATION_DECK,0,nil)
if tt:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=tt:Select(tt,tp,1,63,nil)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m+100,0,0,1)
end
end
end
function cm.cost(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.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
Duel.LoadScript("c12048000.lua")
--墓城的巡逻员 帕特拉
local m=12048005
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_GRAVE,cm.spcon,nil)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local cc=Duel.GetFlagEffect(tp,12048004)
local tt=c:GetReasonEffect():GetHandler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and srre.check_set_HakaShiro(tt)
end
function cm.filter(c)
return srre.check_set_HakaShiro(c) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.smfilter(c)
return srre.check_set_SeHakaShiroJyou(c)
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)
local tt=Duel.GetMatchingGroupCount(cm.smfilter,tp,LOCATION_GRAVE,0,nil)
if tt>0 and Duel.IsPlayerCanDiscardDeck(tp,tt) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local g=Duel.GetDecktopGroup(tp,tt)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
Duel.LoadScript("c12048000.lua")
--墓城的血姬 布璐缇雅
local m=12048006
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,1},{1,m},LOCATION_HAND,cm.spcon,cm.spop)
--Up up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,m+100)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanDiscardDeckAsCost(tp,1)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetLabel(tc:GetFieldID())
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_EVENT+RESET_PHASE+PHASE_END)
e1:SetLabel(tc:GetCode())
e1:SetLabelObject(e2)
Duel.RegisterEffect(e1,tp)
tc=g:GetNext()
end
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,0,tp,LOCATION_DECK)
end
function cm.filter(c,rc)
return not c:IsType(TYPE_EQUIP) and srre.check_set_HakaShiro(c)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5):Filter(cm.filter,nil,c)
if g:GetCount()>0 and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tg=g:FilterSelect(tp,cm.filter,1,5,nil,rc)
local tc=tg:GetFirst()
while tc do
if not Duel.Equip(tp,tc,c,true) then return end
if tc:GetOriginalType()~=TYPE_SPELL+TYPE_EQUIP then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
e1:SetLabelObject(c)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(300)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=tg:GetNext()
end
end
Duel.ShuffleDeck(tp)
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--万圣狼娘 墓城姬涅依
local m=12048007
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--DownSpecialSummon
local e2=srre.SPSummoneffect(c,m,1,4,CATEGORY_SPECIAL_SUMMON,nil,{1,m+100},nil,nil,cm.sptg,cm.spop)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetCost(cm.descost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
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.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.costfilter(c)
return c:IsReleasable() and srre.check_set_HakaShiro(c)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,1-tp,LOCATION_MZONE)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
Duel.LoadScript("c12048000.lua")
--至妙之漂浮 墓城姬涅依
local m=12048008
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--to grave
local e2=srre.SPSummoneffect(c,m,1,3,CATEGORY_DECKDES,nil,{1,m+100},cm.spcon,nil,cm.sptg,cm.spop)
--disable field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(cm.accon)
e3:SetValue(cm.aclimit)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)-Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)-Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
if ct>0 then
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:GetHandler():IsType(TYPE_TRAP) and not rc:IsImmuneToEffect(e)
end
function cm.accon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>29
end
Duel.LoadScript("c12048000.lua")
--至高之按摩 墓城姬涅依
local m=12048009
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--to grave
local e2=srre.SPSummoneffect(c,m,1,3,CATEGORY_DECKDES,nil,{1,m+100},cm.spcon,nil,cm.sptg,cm.spop)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetDescription(aux.Stringid(m,2))
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.discon)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if ct>0 then
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>29
end
function cm.disop(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_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
end
Duel.LoadScript("c12048000.lua")
--墓城的怠惰
local m=12048010
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct/2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local tt=math.floor(ct/2)
if ct>0 then
Duel.DiscardDeck(tp,tt,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
end
Duel.LoadScript("c12048000.lua")
--墓城七姬 壹之姬 亚希娅
local m=12048020
local cm=_G["c"..m]
cm.named_with_SeHakaShiroJyou=true
cm.srre_front_side=12048020
cm.srre_back_side=12048023
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_HAND+LOCATION_GRAVE,cm.spcon,nil)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.tgcon)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--qe
local e3=srre.negateeffect(c,m,{m,3},CATEGORY_DESTROY,LOCATION_MZONE,nil,cm.necon,cm.cost,cm.netg,cm.neop)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tt>29
end
function cm.cfilter(c,tp)
return c:IsFaceup() and srre.check_set_HakaShiroJyou(c) and c:GetSummonPlayer()==tp
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
local g=Duel.GetDecktopGroup(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(tp,m)>4 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.necon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and e:GetHandler():IsDestructable()
end
function cm.costfilter(c)
return c:IsAbleToDeckAsCost() and srre.check_set_HakaShiro(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,3,nil) end
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function cm.netg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function cm.neop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(eg,REASON_EFFECT)
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城七姬 二之姬 玛莉梅娜
local m=12048021
local cm=_G["c"..m]
cm.named_with_SeHakaShiroJyou=true
cm.srre_front_side=12048021
cm.srre_back_side=12048022
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_HAND+LOCATION_GRAVE,cm.spcon,nil)
--change EFFECT
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(m,1))
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tt>14
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
end
function cm.cfilter1(c)
return srre.check_set_HakaShiro(c)
end
function cm.cfilter2(c)
return srre.check_set_HakaShiroJyou(c)
end
function cm.cfilter3(c)
return srre.check_set_SeHakaShiroJyou(c)
end
function cm.filter(c,e,tp)
return srre.check_set_HakaShiro(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tt1=Duel.GetMatchingGroupCount(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
local tt2=Duel.GetMatchingGroupCount(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
if tt1>9 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if tt2>6 then
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local tt1=Duel.GetMatchingGroupCount(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
local tt2=Duel.GetMatchingGroupCount(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
local tt=Duel.GetMatchingGroup(cm.cfilter3,tp,LOCATION_GRAVE,0,nil)
local tt3=tt:GetClassCount(Card.GetCode)
if tt1>9 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if tt2>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
if tt3>3 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
end
Duel.LoadScript("c12048000.lua")
--墓城七姬 五之姬 哈谢尔
local m=12048024
local cm=_G["c"..m]
cm.srre_front_side=12048024
cm.srre_back_side=12048025
cm.named_with_SeHakaShiroJyou=true
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_HAND+LOCATION_GRAVE,cm.spcon,cm.spop)
--level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetRange(LOCATION_HAND)
e3:SetValue(cm.lvval)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
c:RegisterEffect(e3)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_GRAVE,0)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
--immune
local e4=srre.immuneffect(c,1,SUMMON_TYPE_NORMAL)
--arkup
local e5=srre.atk_up(c,cm.atkval,1)
end
function cm.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function cm.rfilter(c)
return srre.check_set_HakaShiro(c)
end
function cm.lvval(e)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroupCount(cm.rfilter,tp,LOCATION_GRAVE,0,nil)
return -g/2
end
function cm.spfilter(c)
return srre.check_set_SeHakaShiroJyou(c)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.atkval(e,c)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroupCount(cm.rfilter,tp,LOCATION_GRAVE,0,nil)
return g*300
end
Duel.LoadScript("c12048000.lua")
--血族之夏 墓城姬 哈谢尔
local m=12048025
local cm=_G["c"..m]
cm.srre_front_side=12048024
cm.srre_back_side=12048025
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetCondition(cm.tgcon)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--level_Redirect
local e3=srre.level_Redirect(c,LOCATION_HAND)
--back
local e4=srre.backeffect(c)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():GetEquipGroup():IsContains(e:GetHandler()) and Duel.IsPlayerCanDiscardDeck(tp,3)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,3)
Duel.SendtoGrave(g,REASON_EFFECT)
local th=re:GetHandler():GetEquipTarget()
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
if tt>29 and th:IsControlerCanBeChanged() then
Duel.GetControl(th,tp,PHASE_END)
end
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not cm.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(cm.eqlimit)
c:RegisterEffect(e1)
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment