You need to sign in or sign up before continuing.
Commit 2b01bb4e authored by Huangnan's avatar Huangnan

fix

parent 362407d9
Pipeline #39757 failed with stages
in 5 minutes and 58 seconds
......@@ -1115,7 +1115,7 @@ function KanKan.MALlinkcondition(f,minc,maxc,gf)
if not KanKan.MALlinkConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(KanKan.MALlinkcheck,minc,maxc,tp,c,gf,lmat)
......@@ -1140,7 +1140,7 @@ function KanKan.MALlinklinktarget(f,minc,maxc,gf)
if not KanKan.MALlinkConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount() and g:IsExists(Card.IsSetCard,1,nil,0x1fb3)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
......@@ -136,7 +136,7 @@ function c12009046.LinkCondition(f,minc,maxc,gf)
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=c12009046.GetLinkMaterials(tp,f,c)
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
local ct=sg:GetCount()
if ct>maxc then return false end
......@@ -161,7 +161,7 @@ function c12009046.LinkTarget(f,minc,maxc,gf)
return
function(e,tp,eg,ep,ev,re,r,rp,chk,c)
local mg=c12009046.GetLinkMaterials(tp,f,c)
local bg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local bg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if #bg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
bg:Select(tp,#bg,#bg,nil)
......
......@@ -78,7 +78,7 @@ function c12028011.LinkCondition(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
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
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat)
......@@ -103,7 +103,7 @@ function c12028011.LinkTarget(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
......
......@@ -81,7 +81,7 @@ function c12028012.LinkCondition(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
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
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat)
......@@ -106,7 +106,7 @@ function c12028012.LinkTarget(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
......
......@@ -19,7 +19,7 @@ function s.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.FilterBoolFunction(Card.IsSetCard,0xa2a2))
e3:SetTarget(s.efilter)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
......@@ -37,6 +37,9 @@ function s.initial_effect(c)
--c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(id+1,ACTIVITY_CHAIN,s.chainfilter)
end
function s.efilter(e,c)
return c:IsSetCard(0xa2a2) and c:IsFaceup()
end
function s.chainfilter(re,tp,cid)
return not (re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
......
......@@ -17,9 +17,8 @@ function s.syncheckadditional(c,level)
return sum <= level
end
end
function s.syncheck(g,tp,c,level)
local sum = g:GetSum(Card.GetLevel)
return sum == level and c:IsSynchroSummonable(nil,g)
function s.syncheck(g,tp,syncard)
return syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function s.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1) and c:IsFaceup() and c:IsAbleToRemove()
......@@ -27,19 +26,19 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_EXTRA,nil)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg,1,4)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg,nil,4)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_EXTRA,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,1,4):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,nil,4):GetFirst()
if tc then
local level=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
aux.GCheckAdditional=s.syncheckadditional(tc,level)
local sg=mg:SelectSubGroup(tp,s.syncheck,false,1,4,tp,tc,level)
local sg=mg:SelectSubGroup(tp,s.syncheck,false,1,4,tp,tc)
aux.GCheckAdditional=nil
if sg then
tc:SetMaterial(sg)
......@@ -52,102 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
--[[
if not s.global_check then
s.global_check=true
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
ge0:SetCode(EVENT_ADJUST)
ge0:SetRange(0xff)
ge0:SetOperation(s.adjustop)
Duel.RegisterEffect(ge0,0)
end
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
local _cRegisterEffect=Card.RegisterEffect
function Card.RegisterEffect(rc,re,bool)
if re:IsHasProperty(EFFECT_FLAG_CANNOT_DISABLE) and re:IsHasProperty(EFFECT_FLAG_UNCOPYABLE)
and re:IsHasType(EFFECT_TYPE_FIELD) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) then
local con=re:GetCondition()
if not con then con=aux.TRUE end
re:SetCondition(s.fcon(con))
end
return _cRegisterEffect(rc,re,bool)
end
local g=Duel.GetFieldGroup(0,LOCATION_EXTRA,0)
local ini=s.initial_effect
for tc in aux.Next(g) do
if tc.initial_effect then
s.initial_effect=function() end
tc:ReplaceEffect(id,0)
s.initial_effect=ini
tc.initial_effect(tc)
end
end
e:Reset()
end
function s.fcon(con)
return function (e,tp,...)
return e:GetHandler():GetFlagEffect(id)==0 and con(e,tp,...)
end
end
function s.syncheckadditional(c,level)
return function(g)
local sum = g:GetSum(Card.GetLevel)
return sum <= level
end
end
function s.syncheck(g,tp,c,level)
local sum = g:GetSum(Card.GetLevel)
return sum == level and c:IsSynchroSummonable(nil,g)
end
function s.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1) and c:IsFaceup() and c:IsAbleToRemove()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_EXTRA,nil)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg,1,4)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_EXTRA,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,1,4):GetFirst()
if tc then
local level=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
aux.GCheckAdditional=s.syncheckadditional(tc,level)
local sg=mg:SelectSubGroup(tp,s.syncheck,false,1,4,tp,tc,level)
aux.GCheckAdditional=nil
if sg then
sg:KeepAlive()
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetLabelObject(sg)
e0:SetOperation(s.spop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
Duel.BreakEffect()
Duel.SpecialSummonRule(tp,tc)
end
end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
--]]
\ No newline at end of file
end
\ No newline at end of file
......@@ -48,11 +48,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,s.mfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,mg)
local race=g:GetFirst():GetRace()
e:SetValue(race)
Duel.SetChainLimit(s.chainlm(race))
Duel.SendtoDeck(g,nil,1,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
Duel.SetChainLimit(s.chainlm)
end
function s.chainlm(e,rp,tp,race)
function s.chainlm(e,ep,tp)
local race=e:GetValue()
return not e:GetHandler():IsRace(race)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -80,9 +80,9 @@ function cm.initial_effect(c)
end
--
function cm.adconcheck(e,tp,eg)
return eg:IsExists(cm.adcheck,1,nil)
return eg:IsExists(cm.adcheckfunc,1,nil)
end
function cm.adcheck(c)
function cm.adcheckfunc(c)
return c:IsFaceup() and c:IsCode(m)
end
function cm.adconop(e,tp,eg)
......
......@@ -35,9 +35,10 @@ end
function s.nafilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsCode(47390041) and c:IsCanBeEffectTarget(e)
end
function s.chlimit(e,ep,tp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return tp==ep or not g:IsContains(e:GetHandler())
function s.chlimit(g)
return function (e,lp,tp)
return g:IsContains(e:GetHandler())
end
end
function s.ef1cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -55,8 +56,8 @@ function s.ef1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(s.nafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e) end
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.nafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil)
Duel.SetChainLimit(s.chlimit)
local g=Duel.SelectTarget(tp,s.nafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil,e)
Duel.SetChainLimit(s.chlimit(g))
end
function s.ef1op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
......@@ -107,13 +108,13 @@ function s.desrepval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(1-tp,1)
if #g==1 then
local tc=g:GetFirst()
Duel.DisableShuffleCheck()
Duel.Overlay(tc,g)
Duel.Overlay(c,g)
end
e:GetHandler():RegisterFlagEffect(47390041,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,0,1)
c:RegisterFlagEffect(47390041,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,0,1)
Duel.Hint(HINT_CARD,0,47390041)
end
function s.initial_effect(c)
......
......@@ -25,7 +25,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
......
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