Commit 6c2d9430 authored by POLYMER's avatar POLYMER

fix

parent f79b9f58
...@@ -2,49 +2,77 @@ ...@@ -2,49 +2,77 @@
function c11570001.initial_effect(c) function c11570001.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x810),2,true) aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x810),2,true)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCondition(c11570001.regcon)
e0:SetOperation(c11570001.regop)
c:RegisterEffect(e0)
--spsummon rule
local se1=Effect.CreateEffect(c)
se1:SetType(EFFECT_TYPE_FIELD)
se1:SetCode(EFFECT_SPSUMMON_PROC)
se1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
--se1:SetCountLimit(1,11570001+EFFECT_COUNT_CODE_OATH)
se1:SetRange(LOCATION_EXTRA+LOCATION_GRAVE)
se1:SetCondition(c11570001.spcon)
se1:SetOperation(c11570001.spop)
se1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(se1)
--spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,11570001+EFFECT_COUNT_CODE_OATH) --e1:SetRange(LOCATION_EXTRA)
e1:SetRange(LOCATION_EXTRA+LOCATION_GRAVE) e1:SetValue(c11570001.splimit)
e1:SetCondition(c11570001.spcon)
e1:SetOperation(c11570001.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--dissummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11570001,0)) e2:SetDescription(aux.Stringid(11570001,0))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON) e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11670001) e2:SetCountLimit(1,11670001)
e2:SetCost(c11570001.cost) e2:SetCost(c11570001.cost)
e2:SetCondition(c11570001.condition) e2:SetCondition(c11570001.condition)
e2:SetTarget(c11570001.target) e2:SetTarget(c11570001.target)
e2:SetOperation(c11570001.operation) e2:SetOperation(c11570001.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11570001,1)) e3:SetDescription(aux.Stringid(11570001,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11770001) e3:SetCountLimit(1,11770001)
e3:SetCondition(c11570001.spcon2) e3:SetTarget(c11570001.tgtg)
e3:SetTarget(c11570001.sptg2) e3:SetOperation(c11570001.tgop)
e3:SetOperation(c11570001.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_DISABLE)
e4:SetValue(1) e4:SetValue(1)
e4:SetCondition(c11570001.condition3) e4:SetCondition(c11570001.condition3)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c11570001.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) or c:IsSummonType(SUMMON_VALUE_SELF)
end
function c11570001.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11570001,RESET_PHASE+PHASE_END,0,1)
end
function c11570001.splimit(e,se,sp,st)
return (bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and Duel.GetFlagEffect(sp,11570001)==0) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c11570001.spcfilter(c) function c11570001.spcfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x810) and c:IsAbleToGraveAsCost() return c:IsFaceupEx() and c:IsSetCard(0x810) and c:IsAbleToGraveAsCost()
end end
...@@ -67,9 +95,9 @@ function c11570001.cormfilter(c) ...@@ -67,9 +95,9 @@ function c11570001.cormfilter(c)
return c:IsSetCard(0x810) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x810) and c:IsAbleToRemoveAsCost()
end end
function c11570001.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c11570001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11570001.cormfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c11570001.cormfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11570001.cormfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c11570001.cormfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c11570001.filter(c) function c11570001.filter(c)
...@@ -138,17 +166,17 @@ end ...@@ -138,17 +166,17 @@ end
function c11570001.spfilter(c,e,tp) function c11570001.spfilter(c,e,tp)
return c:IsSetCard(0x810) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x810) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c11570001.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c11570001.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return true end
and Duel.IsExistingMatchingCard(c11570001.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end end
function c11570001.spop2(e,tp,eg,ep,ev,re,r,rp) function c11570001.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11570001.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
function c11570001.cfilter(c) function c11570001.cfilter(c)
...@@ -157,4 +185,4 @@ end ...@@ -157,4 +185,4 @@ end
function c11570001.condition3(e) function c11570001.condition3(e)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
return not Duel.IsExistingMatchingCard(c11570001.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c11570001.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
\ No newline at end of file
...@@ -79,7 +79,6 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -79,7 +79,6 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
......
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