Commit 150deab6 authored by mallu11's avatar mallu11 Committed by GitHub

fix 煉獄の契約 (#1626)

parent 3f04441f
...@@ -11,11 +11,13 @@ function c19828680.initial_effect(c) ...@@ -11,11 +11,13 @@ function c19828680.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c19828680.condition(e,tp,eg,ep,ev,re,r,rp) function c19828680.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0,e:GetHandler())>=3 return Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,e:GetHandler())>=3
end end
function c19828680.target(e,tp,eg,ep,ev,re,r,rp,chk) function c19828680.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end local exc=nil
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsLocation(LOCATION_HAND) then exc=e:GetHandler() end
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,exc)
if chk==0 then return sg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0)
end end
function c19828680.spfilter(c,e,tp) function c19828680.spfilter(c,e,tp)
...@@ -25,6 +27,7 @@ end ...@@ -25,6 +27,7 @@ end
function c19828680.activate(e,tp,eg,ep,ev,re,r,rp) function c19828680.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)~=0 if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c19828680.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c19828680.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(19828680,0)) then and Duel.SelectYesNo(tp,aux.Stringid(19828680,0)) then
Duel.BreakEffect() Duel.BreakEffect()
......
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