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)
end
function c14088859.filter2(c,e,tp,m,chkf)
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
function c14088859.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -52,7 +52,7 @@ function c14088859.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
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.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
......
......@@ -4,6 +4,13 @@ function c15661378.initial_effect(c)
c:EnableReviveLimit()
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)
--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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -31,7 +38,11 @@ function c15661378.initial_effect(c)
c:RegisterEffect(e4)
end
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
function c15661378.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
......@@ -42,7 +53,7 @@ function c15661378.mfilter(c)
end
function c15661378.valcheck(e,c)
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)
else
e:GetLabelObject():SetLabel(0)
......
......@@ -22,7 +22,7 @@ function c29455728.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c)
and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function c29455728.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetMaterial()
......
......@@ -15,7 +15,7 @@ function c35255456.filter1(c,e)
end
function c35255456.filter2(c,e,tp,m,chkf)
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
function c35255456.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -36,7 +36,7 @@ function c35255456.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
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)
if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf)
......
......@@ -38,7 +38,7 @@ function c66290900.filter1(c,e)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end
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
function c66290900.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -60,7 +60,7 @@ function c66290900.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
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)
if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf)
......
......@@ -35,7 +35,7 @@ function c69270537.activate(e,tp,eg,ep,ev,re,r,rp)
and tc:IsLocation(LOCATION_EXTRA) then
aux.FCheckAdditional=c69270537.fcheck(tp)
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()
local mats=Duel.SelectFusionMaterial(tp,tc,sg)
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)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
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)
or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc
or not c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or not fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function c71628381.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -36,7 +37,7 @@ function c71628381.spop(e,tp,eg,ep,ev,re,r,rp)
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
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
end
if sumable and Duel.SelectYesNo(tp,aux.Stringid(71628381,1)) then
......
......@@ -108,7 +108,7 @@ function c76647978.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c)
and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function c76647978.spfilter(c,e,tp)
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)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c)
and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function c9113513.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
......
......@@ -24,7 +24,7 @@ function c95286165.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c)
and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function c95286165.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -542,7 +542,7 @@ EFFECT_ADD_LINK_RACE =357 --用作连接素材时的种族
EFFECT_EXTRA_LINK_MATERIAL =358 --手卡的连接素材
EFFECT_QP_ACT_IN_SET_TURN =359 --速攻魔法可以在盖放的回合发动
EFFECT_EXTRA_PENDULUM_SUMMON =360 --extra pendulum summon
EFFECT_IRON_WALL =361 --N/A
EFFECT_MATERIAL_LIMIT =361 --
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
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