Commit c038521e authored by mercury233's avatar mercury233

fix

parent 307731ed
...@@ -21,6 +21,7 @@ function c100235016.initial_effect(c) ...@@ -21,6 +21,7 @@ function c100235016.initial_effect(c)
e2:SetDescription(aux.Stringid(100235016,1)) e2:SetDescription(aux.Stringid(100235016,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235116) e2:SetCountLimit(1,100235116)
...@@ -75,6 +76,7 @@ function c100235016.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,6 +76,7 @@ function c100235016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c100235016.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) return Duel.IsExistingMatchingCard(c100235016.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c100235016.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local rg=Duel.SelectMatchingCard(tp,c100235016.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetLevel()) e:SetLabel(rg:GetFirst():GetLevel())
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
......
...@@ -14,7 +14,7 @@ function c100411038.initial_effect(c) ...@@ -14,7 +14,7 @@ function c100411038.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetLabel(1) e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c100411038.descost) e2:SetCost(c100411038.descost)
e2:SetTarget(c100411038.destg) e2:SetTarget(c100411038.destg)
...@@ -33,8 +33,8 @@ function c100411038.initial_effect(c) ...@@ -33,8 +33,8 @@ function c100411038.initial_effect(c)
e3:SetOperation(c100411038.damop) e3:SetOperation(c100411038.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100411038.rmfilter(c) function c100411038.rmfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end end
function c100411038.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c100411038.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
...@@ -45,7 +45,7 @@ function c100411038.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,7 @@ function c100411038.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if e:GetLabel()==100 then if e:GetLabel()==100 then
e:SetLabel(0) e:SetLabel(0)
return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) return Duel.IsExistingMatchingCard(c100411038.rmfilter,tp,LOCATION_MZONE,0,1,tp)
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
else return false end else return false end
end end
...@@ -54,7 +54,7 @@ function c100411038.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,7 +54,7 @@ function c100411038.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local min=1 local min=1
while ct<rt do while ct<rt do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local sg=Duel.SelectMatchingCard(tp,Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,0,min,1,nil,tp,1,REASON_COST) local sg=Duel.SelectMatchingCard(tp,c100411038.rmfilter,tp,LOCATION_MZONE,0,min,1,nil,tp)
if #sg==0 then break end if #sg==0 then break end
sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_COST) sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_COST)
ct=ct+1 ct=ct+1
......
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