Commit 9323a0e1 authored by mercury233's avatar mercury233

fix

parent 8eef6338
......@@ -23,7 +23,7 @@ function c18678554.initial_effect(c)
e2:SetOperation(c18678554.matop)
c:RegisterEffect(e2)
end
function c18678554.xyzfilter(c,tp)
function c18678554.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126)
end
function c18678554.matfilter(c)
......@@ -34,7 +34,7 @@ function c18678554.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c18678554.matfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SelectTarget(tp,c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c18678554.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -51,15 +51,13 @@ function c18678554.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SelectTarget(tp,c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c18678554.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(18678554,2))
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.TRUE),tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Overlay(tc,g)
end
end
......@@ -34,13 +34,14 @@ function c82496097.matfilter(c)
end
function c82496097.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c82496097.matfilter(chkc) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c82496097.matfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c82496097.matfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c82496097.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c82496097.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_XYZ) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.TRUE),tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Overlay(tc,g)
......
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