Commit 04fb735e authored by mercury233's avatar mercury233 Committed by GitHub

partly fix Cupid Pitch (#2014)

parent 00a5a0b6
...@@ -43,19 +43,27 @@ end ...@@ -43,19 +43,27 @@ end
function c21915012.valcheck(e,c) function c21915012.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
local mg=g:Filter(Card.IsType,nil,TYPE_TUNER) local mg=g:Filter(Card.IsType,nil,TYPE_TUNER)
if #mg==1 then local tc=mg:GetFirst()
local tc=mg:GetFirst() if not tc then
local lv=tc:GetSynchroLevel(c) e:GetLabelObject():SetLabel(0)
local lv2=lv>>16 return
lv=lv&0xffff end
if lv2>0 and not g:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),#g,#g,c) then if #mg>1 then
lv=lv2 local tg=g-(g:Filter(Card.IsNotTuner,nil,c))
end if #tg>0 then
if tc:IsHasEffect(89818984) and not g:CheckWithSumEqual(Card.GetSynchroLevel,c:GetLevel(),#g,#g,c) then tc=tg:GetFirst()
lv=2
end end
e:GetLabelObject():SetLabel(lv)
end end
local lv=tc:GetSynchroLevel(c)
local lv2=lv>>16
lv=lv&0xffff
if lv2>0 and not g:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),#g,#g,c) then
lv=lv2
end
if tc:IsHasEffect(89818984) and not g:CheckWithSumEqual(Card.GetSynchroLevel,c:GetLevel(),#g,#g,c) then
lv=2
end
e:GetLabelObject():SetLabel(lv)
end end
function c21915012.lvcon(e,tp,eg,ep,ev,re,r,rp) function c21915012.lvcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
...@@ -64,6 +72,7 @@ function c21915012.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,6 +72,7 @@ function c21915012.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local ct=e:GetLabel() local ct=e:GetLabel()
if ct==0 then return end
local sel=nil local sel=nil
if c:IsLevel(1) then if c:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(21915012,1)) sel=Duel.SelectOption(tp,aux.Stringid(21915012,1))
......
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