Commit 0e2b7f38 authored by Vury Leo's avatar Vury Leo

prune code

parent d97d98da
......@@ -37,13 +37,6 @@ function s.initial_effect(c)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_SINGLE)
-- e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
-- e1:SetCode(EFFECT_FUSION_MATERIAL)
-- e1:SetCondition(s.fcondition)
-- e1:SetOperation(s.foperation)
-- c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
......@@ -68,54 +61,6 @@ function s.initial_effect(c)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.ffilter1(c,fc)
return c:IsFusionCode(23995346) or c:CheckFusionSubstitute(fc)
end
function s.ffilter2(c)
return c:IsFusionSetCard(0xdd) and c:IsType(TYPE_MONSTER)
end
function s.ffilter3(c)
return c:IsFusionSetCard(0xcf) and c:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL)
end
function s.ffilter(c,fc)
return c:IsCanBeFusionMaterial(fc) and (s.ffilter1(c,fc) or s.ffilter2(c) or s.ffilter3(c))
end
function s.f2filter3(c,sg)
return s.ffilter3(c) and sg:IsExists(s.ffilter2,3,c)
end
function s.fcheck(sg,fc,tp,gc,chkf)
local ct=#sg
if ct~=2 and ct~=4 then return false end
if gc and not sg:IsContains(gc) then return false end
if sg:IsExists(aux.TuneMagicianCheckX,1,nil,sg,EFFECT_TUNE_MAGICIAN_F) then return false end
if not aux.MustMaterialCheck(sg,tp,EFFECT_MUST_BE_FMATERIAL) then return false end
if not (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0) then return false end
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc)
or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,sg,fc) then return false end
if ct==2 then
return aux.gffcheck(sg,s.ffilter1,fc,s.ffilter3,nil)
else
return sg:IsExists(s.f2filter3,1,nil,sg)
end
end
function s.fcondition(e,g,gc,chkf)
local tp=e:GetHandlerPlayer()
if g==nil then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler()
local mg=g:Filter(s.ffilter,nil,c)
if gc and not mg:IsContains(gc) then return false end
return mg:CheckSubGroup(s.fcheck,2,4,c,tp,gc,chkf)
end
function s.foperation(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(s.ffilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:SelectSubGroup(tp,s.fcheck,false,2,4,c,tp,gc,chkf)
Duel.SetFusionMaterial(g)
end
function s.ultimate_fusion_check(tp,sg,fc)
return #sg==2 and aux.gffcheck(sg,Card.IsFusionCode,23995346,s.ffilter3,nil)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and ((re:IsActiveType(TYPE_MONSTER) and Duel.GetFlagEffect(tp,id)==0)
......
......@@ -36,19 +36,6 @@ function s.fusfilter(c)
return aux.IsMaterialListCode(c,89631139)==true or aux.IsMaterialListCode(c,23995346)==true
end
--- @type FUSION_FGCHECK_FUNCTION
function s.fcheck(tp,mg,fc,mg_all)
if fc.ultimate_fusion_check~=nil then
if fc.ultimate_fusion_check(tp,mg_all,fc)==false then
return false
end
-- elseif not (mg_all:IsExists(function(c) return c:IsFusionCode(89631139) end,1,nil) and aux.IsMaterialListCode(fc,89631139)==true
-- or mg_all:IsExists(function(c) return c:IsFusionCode(23995346) end,1,nil) and aux.IsMaterialListCode(fc,23995346)==true) then
-- return false
end
return true
end
function s.desfilter(c)
return c:IsFusionCode(89631139,23995346) and c:IsOnField()
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