Commit 3b1d135d authored by Amiya's avatar Amiya

修复

parent 4c0ba4d3
Pipeline #31293 passed with stages
in 1 minute and 15 seconds
--龙王绝火 琐罗亚 --竜王絶火ゾロア
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x150),s.mfilter,true) aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x150),s.mfilter,true)
--equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
...@@ -13,6 +14,7 @@ function s.initial_effect(c) ...@@ -13,6 +14,7 @@ function s.initial_effect(c)
e1:SetTarget(s.eqtg) e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop) e1:SetOperation(s.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE) e2:SetCategory(CATEGORY_DISABLE)
...@@ -30,7 +32,7 @@ function s.mfilter(c) ...@@ -30,7 +32,7 @@ function s.mfilter(c)
return c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) return c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end end
function s.eqfilter(c,tp) function s.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsType(TYPE_EFFECT) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
and (c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and (c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
or c:IsLocation(LOCATION_MZONE) and c:IsControler(1-tp)) or c:IsLocation(LOCATION_MZONE) and c:IsControler(1-tp))
end end
...@@ -53,15 +55,15 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,15 +55,15 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) return re:IsActiveType(TYPE_MONSTER)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsSetCard(0x150) and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToGraveAsCost() return c:IsSetCard(0x150) and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToGraveAsCost()
end end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -71,7 +73,7 @@ end ...@@ -71,7 +73,7 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if Duel.NegateEffect(ev) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
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