Commit 5ea39571 authored by salix5's avatar salix5

fix: add material

https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=22941&keyword=&tag=-1
Adding material is a effect that affects the Xyz Monster.

https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=19250&keyword=&tag=-1
It still applies when the Xyz is face-down.
parent ed765515
...@@ -59,7 +59,7 @@ function c10877309.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -59,7 +59,7 @@ function c10877309.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c10877309.matop(e,tp,eg,ep,ev,re,r,rp) function c10877309.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c10877309.matfilter),tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c10877309.matfilter),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:SelectSubGroup(tp,c10877309.fselect,false,3,3) local sg=g:SelectSubGroup(tp,c10877309.fselect,false,3,3)
......
...@@ -55,7 +55,7 @@ function c18678554.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -55,7 +55,7 @@ function c18678554.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c18678554.matop(e,tp,eg,ep,ev,re,r,rp) function c18678554.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
......
...@@ -92,7 +92,7 @@ function c68159562.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -92,7 +92,7 @@ function c68159562.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c68159562.matop(e,tp,eg,ep,ev,re,r,rp) function c68159562.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c68159562.matfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c68159562.matfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -54,7 +54,7 @@ function c720147.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,7 +54,7 @@ function c720147.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c720147.activate(e,tp,eg,ep,ev,re,r,rp) function c720147.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local rg=e:GetLabelObject() local rg=e:GetLabelObject()
local exg=rg:Filter(Card.IsRelateToEffect,nil,e) local exg=rg:Filter(Card.IsRelateToEffect,nil,e)
exg:AddCard(tc) exg:AddCard(tc)
......
...@@ -41,7 +41,7 @@ function c82496097.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,7 +41,7 @@ function c82496097.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c82496097.matop(e,tp,eg,ep,ev,re,r,rp) function c82496097.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
......
...@@ -67,7 +67,7 @@ function c83199011.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -67,7 +67,7 @@ function c83199011.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c83199011.ovop(e,tp,eg,ep,ev,re,r,rp) function c83199011.ovop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c83199011.ovfilter,tp,LOCATION_EXTRA,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,c83199011.ovfilter,tp,LOCATION_EXTRA,0,1,1,nil,e)
local oc=g:GetFirst() local oc=g:GetFirst()
......
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