Commit 36bc153b authored by Aephiex's avatar Aephiex Committed by nanahira

Fix Gagaga Head (#1040)

* Update c67120578.lua

* Update c23998625.lua

* Update c67120578.lua

* Update utility.lua

* Update c67120578.lua
parent 4a2786ae
......@@ -63,7 +63,8 @@ function c23998625.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsLocation(LOCATION_GRAVE)
end
function c23998625.spfilter(c,e,tp)
return c:IsCode(97403510) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
return c:IsCode(97403510) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c23998625.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
......
......@@ -65,26 +65,39 @@ function c67120578.spop(e,tp,eg,ep,ev,re,r,rp)
if ct>0 and (ct==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c67120578.splimtg)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
e1:SetTarget(c67120578.splimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e2:SetTargetRange(0x7f,0x7f)
e2:SetTarget(c67120578.splimtg_target)
e2:SetValue(c67120578.splimtg_value)
e2:SetLabel(tp)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(c67120578.splimit)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(67120578)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c67120578.splimtg(e,c)
function c67120578.splimtg_target(e,c)
return not c:IsSetCard(0x54)
end
function c67120578.splimtg_value(e,c)
if not c then return false end
return c:GetControler()~=e:GetLabel()
end
function c67120578.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return sumtype~=SUMMON_TYPE_XYZ
end
......
......@@ -533,6 +533,9 @@ end
function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,op)
return alterf(c) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0 and (not op or op(e,tp,0,c))
end
function Auxiliary.CanPlayerXyzSummonCardWithoutMaterial(xc,tp)
return Duel.IsPlayerAffectedByEffect(tp,67120578)==nil
end
--Xyz monster, lv k*n
function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
local e1=Effect.CreateEffect(c)
......
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