Commit 9150d818 authored by Vury Leo's avatar Vury Leo

Add インフェルノイド・ティエラ

parent 786ef25f
......@@ -66,6 +66,7 @@ end
--- @type FUSION_FGCHECK_FUNCTION
function s.fcheck(tp,mg,fc,mg_all)
Debug.Message(string.format("fcheck %d, fc %d",#mg,fc:GetCode()))
--- At most 6 monsters from deck
if mg:FilterCount(function(c) return c:IsLocation(LOCATION_DECK) end,nil)>6 then
return false
......
--インフェルノイド・ティエラ
function c82734805.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2FunRep(c,14799437,23440231,aux.FilterBoolFunction(Card.IsFusionSetCard,0xbb),1,127,true,true)
-- aux.AddFusionProcCode2FunRep(c,14799437,23440231,aux.FilterBoolFunction(Card.IsFusionSetCard,0xbb),1,127,true,true)
Fusion.AddFusionProcedure(c,{
slots={
Fusion.Slot.Code(14799437),
Fusion.Slot.Code(23440231),
Fusion.Slot.Group({
filter=function(mc) return mc:IsFusionSetCard(0xbb) end,
})
}
})
--spsummon success
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(82734805,0))
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c82734805.con)
e2:SetTarget(c82734805.tg)
e2:SetOperation(c82734805.op)
e2:SetCondition(s.con)
e2:SetTarget(s.tg)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
--material check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c82734805.valcheck)
e3:SetValue(s.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c82734805.valcheck(e,c)
function s.valcheck(e,c)
local ct=e:GetHandler():GetMaterial():GetClassCount(Card.GetCode)
e:GetLabelObject():SetLabel(ct)
end
function c82734805.con(e,tp,eg,ep,ev,re,r,rp)
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c82734805.tg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
local con3,con5,con8,con10=nil,nil,nil,nil
if ct>=3 then
......@@ -51,7 +61,7 @@ function c82734805.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if ct>=10 then cat=cat+CATEGORY_HANDES end
e:SetCategory(cat)
end
function c82734805.op(e,tp,eg,ep,ev,re,r,rp)
function s.op(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
if ct>=3 then
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,nil)
......
......@@ -3592,16 +3592,30 @@ function Fusion.FusionCondition(tc,slots,mat_filter,fgoalcheck,allow_extras,sele
end
end
end
if fgoalcheck then
--- merge selected card if provided
local mg=g:Clone()
if selected then
mg:Merge(selected)
-- build mg
local mg=selected and selected:Clone() or Group.CreateGroup()
-- merge in the DFS‐used cards
for idx,flag in pairs(used) do
if flag then
mg:AddCard(cards[idx])
end
end
if fgoalcheck then
if not fgoalcheck(mg) then
return false
end
end
if aux.FCheckAdditional then
if not aux.FCheckAdditional(tc:GetOwner(),mg,tc) then
return false
end
end
if aux.FGoalCheckAdditional then
if not aux.FGoalCheckAdditional(tc:GetOwner(),mg,tc) then
return false
end
end
return true
end
......@@ -4085,7 +4099,7 @@ function Fusion.CanCompleteFromMappings(e,sel,eg,slots,mat_filter,fgoalcheck,tc,
-- if nothing remains, we already succeed, check fgoal
if #rem_slots==0 then
if fgoalcheck==nil or fgoalcheck(sel)==true then
if (fgoalcheck==nil or fgoalcheck(sel)==true) and (aux.FGoalCheckAdditional==nil or aux.FGoalCheckAdditional(tc:GetOwner(),sel,tc)) then
return true
else
return false
......
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