Commit 7b50638a authored by wind2009's avatar wind2009

Merge branch 'new-fusion-unused-function' into 'master'

fix: prune unused functions

See merge request !64
parents 3760c1e7 fbacc133
...@@ -19,10 +19,6 @@ function s.initial_effect(c) ...@@ -19,10 +19,6 @@ function s.initial_effect(c)
e1:SetLabelObject(e0) e1:SetLabelObject(e0)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.filter0(c)
return c:IsSetCard(0x1047) and not c:IsRace(RACE_ROCK)
and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function s.fusfilter(c) function s.fusfilter(c)
return c:IsSetCard(0x1047) return c:IsSetCard(0x1047)
......
...@@ -79,10 +79,6 @@ function s.alimit(e,te) ...@@ -79,10 +79,6 @@ function s.alimit(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetHandler():IsCode(e:GetLabel()) return te:IsActiveType(TYPE_MONSTER) and te:GetHandler():IsCode(e:GetLabel())
end end
function s.mfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function s.fusfilter(c) function s.fusfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE)
end end
......
...@@ -36,11 +36,6 @@ function s.spfilter(c,e,tp) ...@@ -36,11 +36,6 @@ function s.spfilter(c,e,tp)
return c:IsRace(RACE_ILLUSION+RACE_SPELLCASTER+RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_ILLUSION+RACE_SPELLCASTER+RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.filter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk) function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
local res1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
......
...@@ -63,25 +63,6 @@ function s.fusfilter(c) ...@@ -63,25 +63,6 @@ function s.fusfilter(c)
return c:IsSetCard(0x1bc) return c:IsSetCard(0x1bc)
end end
function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end end
......
...@@ -9,7 +9,8 @@ function s.initial_effect(c) ...@@ -9,7 +9,8 @@ function s.initial_effect(c)
mat_operation_code_map={ mat_operation_code_map={
{ [LOCATION_SZONE]=FusionSpell.FUSION_OPERATION_BANISH }, { [LOCATION_SZONE]=FusionSpell.FUSION_OPERATION_BANISH },
{ [0xff]=FusionSpell.FUSION_OPERATION_GRAVE } { [0xff]=FusionSpell.FUSION_OPERATION_GRAVE }
} },
additional_fcheck=s.fcheck,
}) })
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -9,7 +9,8 @@ function s.initial_effect(c) ...@@ -9,7 +9,8 @@ function s.initial_effect(c)
{ [0xff]=FusionSpell.FUSION_OPERATION_GRAVE } { [0xff]=FusionSpell.FUSION_OPERATION_GRAVE }
}, },
extra_target=s.extra_target, extra_target=s.extra_target,
fusion_spell_matfilter=s.fusion_spell_matfilter fusion_spell_matfilter=s.fusion_spell_matfilter,
additional_fcheck=s.fcheck,
}) })
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TODECK) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TODECK)
......
...@@ -29,11 +29,6 @@ function s.initial_effect(c) ...@@ -29,11 +29,6 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.filter1(c,e)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER)
and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function s.fusfilter(c) function s.fusfilter(c)
return c:IsRace(RACE_DRAGON) return c:IsRace(RACE_DRAGON)
end end
......
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