Commit 7bf8d732 authored by nanahira's avatar nanahira

new

parent e41e2e9e
No preview for this file type
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
--e1:SetCost(cm.spcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
--Glitter -Halozy Remix-
local m=37564569
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and Duel.GetFlagEffect(tp,m)==0
end)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.sfilter(c,e,tp,mc)
return c:IsType(TYPE_FUSION) and Senya.check_set_3L(c) and c:IsLevel(7)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and mc:IsCanBeFusionMaterial(c)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.mfilter(c,e,tp)
return cm.Senya_desc_with_nanahira and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_EXTRA,0,1,c,e,tp,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)~=0 then return end
Duel.RegisterFlagEffect(tp,m,0,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.mfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_EXTRA,0,1,1,tc,e,tp,tc)
local sc=sg:GetFirst()
if sc then
sc:SetMaterial(Group.FromCards(tc))
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummonStep(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
local ex=Effect.CreateEffect(e:GetHandler())
ex:SetType(EFFECT_TYPE_SINGLE)
ex:SetCode(EFFECT_ADD_CODE)
ex:SetValue(37564765)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ex:SetReset(RESET_EVENT+0xfe0000)
sc:RegisterEffect(ex,true)
Duel.SpecialSummonComplete()
sc:CompleteProcedure()
end
end
end
\ No newline at end of file
......@@ -17,27 +17,23 @@ function cm.initial_effect(c)
end
function cm.tgfilter0(c,e,tp)
return c:IsFaceup() and Senya.check_set_3L(c) and Senya.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and c:IsCanBeFusionMaterial() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function cm.tgfilter(c,e,tp)
return c:IsFaceup() and Senya.check_set_3L(c)
and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function cm.spfilter(c,e,tp,tc)
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) then return false end
return Senya.check_set_3L(c) and c.fusion_att_3L and tc:IsFusionAttribute(c.fusion_att_3L) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(tc),c)>0
and tc:IsCanBeFusionMaterial(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter(chkc,e,tp) end
if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter0(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter0,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SelectTarget(tp,cm.tgfilter0,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=sg:GetFirst()
......
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