Commit 2b47e83c authored by nekrozar's avatar nekrozar Committed by GitHub

fix&update fusion material (#1238)

parent aff370d0
...@@ -34,7 +34,7 @@ function c14088859.filter1(c,e) ...@@ -34,7 +34,7 @@ function c14088859.filter1(c,e)
end end
function c14088859.filter2(c,e,tp,m,chkf) function c14088859.filter2(c,e,tp,m,chkf)
return c.neos_fusion and aux.IsMaterialListCode(c,89943723) return c.neos_fusion and aux.IsMaterialListCode(c,89943723)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf,true)
end end
function c14088859.target(e,tp,eg,ep,ev,re,r,rp,chk) function c14088859.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -52,7 +52,7 @@ function c14088859.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function c14088859.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf,true)
Duel.SendtoGrave(mat,REASON_EFFECT) Duel.SendtoGrave(mat,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
......
...@@ -4,6 +4,13 @@ function c15661378.initial_effect(c) ...@@ -4,6 +4,13 @@ function c15661378.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c15661378.ffilter,3,false) aux.AddFusionProcFunRep(c,c15661378.ffilter,3,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL):SetValue(1) aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL):SetValue(1)
--material limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_MATERIAL_LIMIT)
e0:SetValue(c15661378.matlimit)
c:RegisterEffect(e0)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -31,7 +38,11 @@ function c15661378.initial_effect(c) ...@@ -31,7 +38,11 @@ function c15661378.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c15661378.ffilter(c,fc,sub,mg,sg) function c15661378.ffilter(c,fc,sub,mg,sg)
return c:IsControler(fc:GetControler()) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) return not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())
end
function c15661378.matlimit(e,c,fc,st)
if st~=SUMMON_TYPE_FUSION then return true end
return c:IsControler(fc:GetControler()) and c:IsLocation(LOCATION_ONFIELD+LOCATION_HAND)
end end
function c15661378.splimit(e,se,sp,st) function c15661378.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
...@@ -42,7 +53,7 @@ function c15661378.mfilter(c) ...@@ -42,7 +53,7 @@ function c15661378.mfilter(c)
end end
function c15661378.valcheck(e,c) function c15661378.valcheck(e,c)
local mg=c:GetMaterial() local mg=c:GetMaterial()
if not mg:IsExists(c15661378.mfilter,1,nil) then if mg:GetCount()>0 and not mg:IsExists(c15661378.mfilter,1,nil) then
e:GetLabelObject():SetLabel(1) e:GetLabelObject():SetLabel(1)
else else
e:GetLabelObject():SetLabel(0) e:GetLabelObject():SetLabel(0)
......
...@@ -22,7 +22,7 @@ function c29455728.mgfilter(c,e,tp,fusc,mg) ...@@ -22,7 +22,7 @@ function c29455728.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c) and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end end
function c29455728.target(e,tp,eg,ep,ev,re,r,rp,chk) function c29455728.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetMaterial() local g=e:GetHandler():GetMaterial()
......
...@@ -15,7 +15,7 @@ function c35255456.filter1(c,e) ...@@ -15,7 +15,7 @@ function c35255456.filter1(c,e)
end end
function c35255456.filter2(c,e,tp,m,chkf) function c35255456.filter2(c,e,tp,m,chkf)
return c:IsSetCard(0x3008) and aux.IsMaterialListCode(c,89943723) return c:IsSetCard(0x3008) and aux.IsMaterialListCode(c,89943723)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf,true)
end end
function c35255456.target(e,tp,eg,ep,ev,re,r,rp,chk) function c35255456.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -36,7 +36,7 @@ function c35255456.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function c35255456.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf,true)
local cf=mat:Filter(c35255456.cffilter,nil) local cf=mat:Filter(c35255456.cffilter,nil)
if cf:GetCount()>0 then if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf) Duel.ConfirmCards(1-tp,cf)
......
...@@ -38,7 +38,7 @@ function c66290900.filter1(c,e) ...@@ -38,7 +38,7 @@ function c66290900.filter1(c,e)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function c66290900.filter2(c,e,tp,m,chkf) function c66290900.filter2(c,e,tp,m,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf,true)
end end
function c66290900.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66290900.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -60,7 +60,7 @@ function c66290900.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c66290900.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf,true)
local cf=mat:Filter(c66290900.cffilter,nil) local cf=mat:Filter(c66290900.cffilter,nil)
if cf:GetCount()>0 then if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf) Duel.ConfirmCards(1-tp,cf)
......
...@@ -35,7 +35,7 @@ function c69270537.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c69270537.activate(e,tp,eg,ep,ev,re,r,rp)
and tc:IsLocation(LOCATION_EXTRA) then and tc:IsLocation(LOCATION_EXTRA) then
aux.FCheckAdditional=c69270537.fcheck(tp) aux.FCheckAdditional=c69270537.fcheck(tp)
local sg=Duel.GetMatchingGroup(c69270537.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc) local sg=Duel.GetMatchingGroup(c69270537.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc)
if tc:CheckFusionMaterial(sg) and Duel.SelectYesNo(tp,aux.Stringid(69270537,0)) then if tc:CheckFusionMaterial(sg,nil,PLAYER_NONE,true) and Duel.SelectYesNo(tp,aux.Stringid(69270537,0)) then
Duel.BreakEffect() Duel.BreakEffect()
local mats=Duel.SelectFusionMaterial(tp,tc,sg) local mats=Duel.SelectFusionMaterial(tp,tc,sg)
Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -23,10 +23,11 @@ function c71628381.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,10 +23,11 @@ function c71628381.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end end
function c71628381.mgfilter(c,e,tp,fusc) function c71628381.mgfilter(c,e,tp,fusc,mg)
return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE)
or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc
or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or not fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end end
function c71628381.spop(e,tp,eg,ep,ev,re,r,rp) function c71628381.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -36,7 +37,7 @@ function c71628381.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +37,7 @@ function c71628381.spop(e,tp,eg,ep,ev,re,r,rp)
local sumtype=c:GetSummonType() local sumtype=c:GetSummonType()
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)==0 or bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0 if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)==0 or bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0
or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE)
or mg:IsExists(c71628381.mgfilter,1,nil,e,tp,c) then or mg:IsExists(c71628381.mgfilter,1,nil,e,tp,c,mg) then
sumable=false sumable=false
end end
if sumable and Duel.SelectYesNo(tp,aux.Stringid(71628381,1)) then if sumable and Duel.SelectYesNo(tp,aux.Stringid(71628381,1)) then
......
...@@ -108,7 +108,7 @@ function c76647978.mgfilter(c,e,tp,fusc,mg) ...@@ -108,7 +108,7 @@ function c76647978.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c) and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end end
function c76647978.spfilter(c,e,tp) function c76647978.spfilter(c,e,tp)
if c:IsFaceup() and c:GetFlagEffect(76647978)~=0 and c==e:GetLabelObject() then if c:IsFaceup() and c:GetFlagEffect(76647978)~=0 and c==e:GetLabelObject() then
......
...@@ -115,7 +115,7 @@ function c9113513.mgfilter(c,e,tp,fusc,mg) ...@@ -115,7 +115,7 @@ function c9113513.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c) and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end end
function c9113513.desop(e,tp,eg,ep,ev,re,r,rp) function c9113513.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
......
...@@ -24,7 +24,7 @@ function c95286165.mgfilter(c,e,tp,fusc,mg) ...@@ -24,7 +24,7 @@ function c95286165.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c) and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end end
function c95286165.activate(e,tp,eg,ep,ev,re,r,rp) function c95286165.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -542,7 +542,7 @@ EFFECT_ADD_LINK_RACE =357 --用作连接素材时的种族 ...@@ -542,7 +542,7 @@ EFFECT_ADD_LINK_RACE =357 --用作连接素材时的种族
EFFECT_EXTRA_LINK_MATERIAL =358 --手卡的连接素材 EFFECT_EXTRA_LINK_MATERIAL =358 --手卡的连接素材
EFFECT_QP_ACT_IN_SET_TURN =359 --速攻魔法可以在盖放的回合发动 EFFECT_QP_ACT_IN_SET_TURN =359 --速攻魔法可以在盖放的回合发动
EFFECT_EXTRA_PENDULUM_SUMMON =360 --extra pendulum summon EFFECT_EXTRA_PENDULUM_SUMMON =360 --extra pendulum summon
EFFECT_IRON_WALL =361 --N/A EFFECT_MATERIAL_LIMIT =361 --
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发) --下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
EVENT_STARTUP =1000 --N/A EVENT_STARTUP =1000 --N/A
......
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