Commit 97238e28 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix must material for Contact "C" (#1727)

* update must material

* fix

* revert & fix
parent 16efcf5c
...@@ -44,6 +44,7 @@ function c3096468.syngoal(g,tp,lv,syncard,minc,ct) ...@@ -44,6 +44,7 @@ function c3096468.syngoal(g,tp,lv,syncard,minc,ct)
and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0 and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=1
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
end end
function c3096468.syncon(e) function c3096468.syncon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
......
...@@ -86,6 +86,7 @@ function c33541430.syngoal(g,tp,lv,syncard,minc,ct) ...@@ -86,6 +86,7 @@ function c33541430.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0 return ct>=minc and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and (g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and (g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
or g:CheckWithSumEqual(c33541430.cardiansynlevel,lv,ct,ct,syncard)) or g:CheckWithSumEqual(c33541430.cardiansynlevel,lv,ct,ct,syncard))
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
end end
function c33541430.syntg(e,syncard,f,min,max) function c33541430.syntg(e,syncard,f,min,max)
local minc=min+1 local minc=min+1
......
...@@ -46,6 +46,7 @@ function c55863245.syngoal(g,tp,lv,syncard,minc,ct) ...@@ -46,6 +46,7 @@ function c55863245.syngoal(g,tp,lv,syncard,minc,ct)
and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0 and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=1
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
end end
function c55863245.syncon(e) function c55863245.syncon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
......
...@@ -99,6 +99,7 @@ function c57261568.syngoal(g,tp,lv,syncard,minc,ct) ...@@ -99,6 +99,7 @@ function c57261568.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0 return ct>=minc and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and (g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and (g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
or g:CheckWithSumEqual(c57261568.cardiansynlevel,lv,ct,ct,syncard)) or g:CheckWithSumEqual(c57261568.cardiansynlevel,lv,ct,ct,syncard))
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
end end
function c57261568.syntg(e,syncard,f,min,max) function c57261568.syntg(e,syncard,f,min,max)
local minc=min+1 local minc=min+1
......
...@@ -42,6 +42,7 @@ function c64910482.syngoal(g,tp,lv,syncard,minc,ct) ...@@ -42,6 +42,7 @@ function c64910482.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc return ct>=minc
and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0 and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
end end
function c64910482.syntg(e,syncard,f,min,max) function c64910482.syntg(e,syncard,f,min,max)
local minc=min+1 local minc=min+1
......
--波動竜フォノン・ドラゴン --波動竜フォノン・ドラゴン
function c67556500.initial_effect(c) function c67556500.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_MUST_BE_SMATERIAL)
c:SetSPSummonOnce(67556500) c:SetSPSummonOnce(67556500)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......
...@@ -91,6 +91,7 @@ function c89818984.syngoal(g,tp,lv,syncard,minc,ct) ...@@ -91,6 +91,7 @@ function c89818984.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0 return ct>=minc and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and (g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and (g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
or g:CheckWithSumEqual(c89818984.cardiansynlevel,lv,ct,ct,syncard)) or g:CheckWithSumEqual(c89818984.cardiansynlevel,lv,ct,ct,syncard))
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
end end
function c89818984.syntg(e,syncard,f,min,max) function c89818984.syntg(e,syncard,f,min,max)
local minc=min+1 local minc=min+1
......
...@@ -822,7 +822,7 @@ GLOBALFLAG_BRAINWASHING_CHECK =0x2 --洗脑解除标记 ...@@ -822,7 +822,7 @@ GLOBALFLAG_BRAINWASHING_CHECK =0x2 --洗脑解除标记
GLOBALFLAG_SCRAP_CHIMERA =0x4 --废铁奇美拉标记 GLOBALFLAG_SCRAP_CHIMERA =0x4 --废铁奇美拉标记
GLOBALFLAG_DELAYED_QUICKEFFECT =0x8 --N/A GLOBALFLAG_DELAYED_QUICKEFFECT =0x8 --N/A
GLOBALFLAG_DETACH_EVENT =0x10 --EVENT_DETACH_MATERIAL GLOBALFLAG_DETACH_EVENT =0x10 --EVENT_DETACH_MATERIAL
GLOBALFLAG_MUST_BE_SMATERIAL =0x20 --必须作为同调素材(波动龙 声子龙) GLOBALFLAG_MUST_BE_SMATERIAL =0x20 --N/A
GLOBALFLAG_SPSUMMON_COUNT =0x40 --玩家的特殊召唤次数限制 GLOBALFLAG_SPSUMMON_COUNT =0x40 --玩家的特殊召唤次数限制
GLOBALFLAG_XMAT_COUNT_LIMIT =0x80 --超量素材数量限制标记(光天使 天座) GLOBALFLAG_XMAT_COUNT_LIMIT =0x80 --超量素材数量限制标记(光天使 天座)
GLOBALFLAG_SELF_TOGRAVE =0x100 --不入連鎖的送墓檢查(EFFECT_SELF_TOGRAVE) GLOBALFLAG_SELF_TOGRAVE =0x100 --不入連鎖的送墓檢查(EFFECT_SELF_TOGRAVE)
......
...@@ -366,27 +366,13 @@ function Auxiliary.GetValueType(v) ...@@ -366,27 +366,13 @@ function Auxiliary.GetValueType(v)
else return "Card" end else return "Card" end
else return t end else return t end
end end
function Auxiliary.GetMustMaterialGroup(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
function Auxiliary.MustMaterialCheck(v,tp,code) function Auxiliary.MustMaterialCheck(v,tp,code)
local g=Auxiliary.GetMustMaterialGroup(tp,code) local g=Duel.GetMustMaterial(tp,code)
if not v then if not v then
if code==EFFECT_MUST_BE_XMATERIAL and Duel.IsPlayerAffectedByEffect(tp,67120578) then return false end if code==EFFECT_MUST_BE_XMATERIAL and Duel.IsPlayerAffectedByEffect(tp,67120578) then return false end
return #g==0 return #g==0
end end
local t=Auxiliary.GetValueType(v) return Duel.CheckMustMaterial(tp,v,code)
for tc in Auxiliary.Next(g) do
if (t=="Card" and v~=tc)
or (t=="Group" and not v:IsContains(tc)) then return false end
end
return true
end end
function Auxiliary.MustMaterialCounterFilter(c,g) function Auxiliary.MustMaterialCounterFilter(c,g)
return not g:IsContains(c) return not g:IsContains(c)
...@@ -917,7 +903,7 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct) ...@@ -917,7 +903,7 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
else else
mg=Duel.GetMatchingGroup(Auxiliary.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f) mg=Duel.GetMatchingGroup(Auxiliary.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end end
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
...@@ -943,7 +929,7 @@ function Auxiliary.XyzLevelFreeTarget(f,gf,minct,maxct) ...@@ -943,7 +929,7 @@ function Auxiliary.XyzLevelFreeTarget(f,gf,minct,maxct)
else else
mg=Duel.GetMatchingGroup(Auxiliary.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f) mg=Duel.GetMatchingGroup(Auxiliary.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end end
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
...@@ -1017,7 +1003,7 @@ function Auxiliary.XyzLevelFreeConditionAlter(f,gf,minct,maxct,alterf,alterdesc, ...@@ -1017,7 +1003,7 @@ function Auxiliary.XyzLevelFreeConditionAlter(f,gf,minct,maxct,alterf,alterdesc,
if minc>maxc then return false end if minc>maxc then return false end
end end
mg=mg:Filter(Auxiliary.XyzLevelFreeFilter,nil,c,f) mg=mg:Filter(Auxiliary.XyzLevelFreeFilter,nil,c,f)
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
...@@ -1043,7 +1029,7 @@ function Auxiliary.XyzLevelFreeTargetAlter(f,gf,minct,maxct,alterf,alterdesc,alt ...@@ -1043,7 +1029,7 @@ function Auxiliary.XyzLevelFreeTargetAlter(f,gf,minct,maxct,alterf,alterdesc,alt
else else
mg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) mg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
end end
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
local mg2=mg:Filter(Auxiliary.XyzLevelFreeFilter,nil,c,f) local mg2=mg:Filter(Auxiliary.XyzLevelFreeFilter,nil,c,f)
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
local b1=mg2:CheckSubGroup(Auxiliary.XyzLevelFreeGoal,minc,maxc,tp,c,gf) local b1=mg2:CheckSubGroup(Auxiliary.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
...@@ -2069,7 +2055,7 @@ function Auxiliary.LinkCondition(f,minc,maxc,gf) ...@@ -2069,7 +2055,7 @@ function Auxiliary.LinkCondition(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -2094,7 +2080,7 @@ function Auxiliary.LinkTarget(f,minc,maxc,gf) ...@@ -2094,7 +2080,7 @@ function Auxiliary.LinkTarget(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
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