Commit d4831e03 authored by wind2009's avatar wind2009

Fix 怒小児様

①效果应为1回合1次
①效果应可以从双方墓地选各最多1张
parent d5dff83b
Pipeline #25114 passed with stages
in 46 seconds
...@@ -7,8 +7,9 @@ function s.initial_effect(c) ...@@ -7,8 +7,9 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAIN_NEGATED) e1:SetCode(EVENT_CHAIN_NEGATED)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(s.ovtg) e1:SetTarget(s.ovtg)
e1:SetOperation(s.ovop) e1:SetOperation(s.ovop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -59,7 +60,7 @@ end ...@@ -59,7 +60,7 @@ end
function s.negcheck(e,tp,eg,ep,ev,re,r,rp) function s.negcheck(e,tp,eg,ep,ev,re,r,rp)
local de=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON) local de=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON)
if de then if de then
Duel.RaiseEvent(re,EVENT_CUSTOM+id,te,0,tp,tp,0) Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+id,te,0,tp,tp,0)
end end
end end
function s.ofilter(c,e) function s.ofilter(c,e)
...@@ -68,21 +69,26 @@ end ...@@ -68,21 +69,26 @@ end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(s.ofilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.ofilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(s.ofilter,tp,0,LOCATION_GRAVE,1,nil) or Duel.IsExistingMatchingCard(s.ofilter,tp,0,LOCATION_GRAVE,1,nil)
end end
end end
function s.gchecktp(c,tp)
return c:GetOwner()==tp
end
function s.gcheck(g,tp)
return g:FilterCount(s.gchecktp,nil,tp)<=1 and g:FilterCount(s.gchecktp,nil,1-tp)<=1
end
function s.ovop(e,tp,eg,ep,ev,re,r,rp) function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) if c:IsRelateToEffect(e) then
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.ofilter),tp,LOCATION_GRAVE,0,1,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ofilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.ofilter),tp,0,LOCATION_GRAVE,1,nil) then if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.ofilter),tp,LOCATION_GRAVE,0,1,1,nil,e) local sg=g:SelectSubGroup(tp,s.gcheck,false,1,2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) if sg:GetCount()>0 then
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.ofilter),tp,0,LOCATION_GRAVE,1,1,nil,e):GetFirst() Duel.HintSelection(sg)
g:AddCard(tc) Duel.Overlay(c,sg)
if g:GetCount()==2 then end
Duel.Overlay(c,g)
end end
end end
end end
......
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