Commit 72dfb4bf authored by mercury233's avatar mercury233 Committed by GitHub

fix 黄金狂エルドリッチ

parent fdf6924e
......@@ -24,7 +24,7 @@ function c74889525.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,74889525)
e4:SetCost(c74889525.cost)
e4:SetCost(c74889525.ctcost)
e4:SetTarget(c74889525.cttg)
e4:SetOperation(c74889525.ctop)
c:RegisterEffect(e4)
......@@ -32,20 +32,32 @@ end
function c74889525.matfilter(c)
return c:IsLevelAbove(5) and c:IsRace(RACE_ZOMBIE)
end
function c74889525.cfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and (c:IsControler(tp) or c:IsFaceup())
function c74889525.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c74889525.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c74889525.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c74889525.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
function c74889525.rfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
and Duel.IsExistingTarget(c74889525.ctfilter,tp,0,LOCATION_MZONE,1,c)
end
function c74889525.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
return c:IsFaceup() and c:IsAbleToChangeControler()
end
function c74889525.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c74889525.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c74889525.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c74889525.rfilter,1,nil,tp)
else
return Duel.IsExistingTarget(c74889525.ctfilter,tp,0,LOCATION_MZONE,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c74889525.rfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c74889525.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
......
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