Commit 473b2b12 authored by nanahira's avatar nanahira

further applications

parent cc8b147e
...@@ -3,6 +3,7 @@ function c79229522.initial_effect(c) ...@@ -3,6 +3,7 @@ function c79229522.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,70095154,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,true,true) aux.AddFusionProcCodeFun(c,70095154,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,true,true)
aux.AddContactFusionProcedure(c,c79229522.cfilter,LOCATION_ONFIELD,LOCATION_ONFIELD,c79229522.sprop(c))
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -10,15 +11,6 @@ function c79229522.initial_effect(c) ...@@ -10,15 +11,6 @@ function c79229522.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c79229522.splimit) e1:SetValue(c79229522.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c79229522.sprcon)
e2:SetOperation(c79229522.sprop)
c:RegisterEffect(e2)
--cannot be fusion material --cannot be fusion material
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
...@@ -31,49 +23,18 @@ c79229522.material_setcode=0x1093 ...@@ -31,49 +23,18 @@ c79229522.material_setcode=0x1093
function c79229522.splimit(e,se,sp,st) function c79229522.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end end
function c79229522.cfilter(c,tp) function c79229522.cfilter(c,fc)
return (c:IsFusionCode(70095154) or c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER)) return c:IsAbleToGraveAsCost() and (c:IsControler(fc:GetControler()) or c:IsFaceup())
and c:IsCanBeFusionMaterial() and c:IsAbleToGraveAsCost() and (c:IsControler(tp) or c:IsFaceup()) end
end function c79229522.sprop(c)
function c79229522.fcheck(c,sg) return function(g)
return c:IsFusionCode(70095154) and sg:FilterCount(c79229522.fcheck2,c)+1==sg:GetCount() Duel.SendtoGrave(g,REASON_COST)
end --spsummon condition
function c79229522.fcheck2(c) local e1=Effect.CreateEffect(c)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) e1:SetType(EFFECT_TYPE_SINGLE)
end e1:SetCode(EFFECT_SET_BASE_ATTACK)
function c79229522.fgoal(c,tp,sg) e1:SetReset(RESET_EVENT+0xff0000)
return sg:GetCount()>1 and Duel.GetLocationCountFromEx(tp,tp,sg)>0 and sg:IsExists(c79229522.fcheck,1,nil,sg) e1:SetValue(g:GetCount()*1000)
end c:RegisterEffect(e1)
function c79229522.fselect(c,tp,mg,sg) end
sg:AddCard(c)
local res=c79229522.fgoal(c,tp,sg) or mg:IsExists(c79229522.fselect,1,sg,tp,mg,sg)
sg:RemoveCard(c)
return res
end
function c79229522.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c79229522.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
local sg=Group.CreateGroup()
return mg:IsExists(c79229522.fselect,1,nil,tp,mg,sg)
end
function c79229522.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c79229522.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
local sg=Group.CreateGroup()
while true do
local cg=mg:Filter(c79229522.fselect,sg,tp,mg,sg)
if cg:GetCount()==0
or (c79229522.fgoal(c,tp,sg) and not Duel.SelectYesNo(tp,210)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=cg:Select(tp,1,1,nil)
sg:Merge(g)
end
Duel.SendtoGrave(sg,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetValue(sg:GetCount()*1000)
c:RegisterEffect(e1)
end end
...@@ -3,6 +3,7 @@ function c87116928.initial_effect(c) ...@@ -3,6 +3,7 @@ function c87116928.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),c87116928.matfilter,1,63,true) aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),c87116928.matfilter,1,63,true)
aux.AddContactFusionProcedure(c,c87116928.cfilter,LOCATION_MZONE,LOCATION_MZONE,c87116928.sprop(c))
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -10,15 +11,6 @@ function c87116928.initial_effect(c) ...@@ -10,15 +11,6 @@ function c87116928.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c87116928.splimit) e1:SetValue(c87116928.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c87116928.sprcon)
e2:SetOperation(c87116928.sprop)
c:RegisterEffect(e2)
--cannot be fusion material --cannot be fusion material
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
...@@ -34,49 +26,18 @@ end ...@@ -34,49 +26,18 @@ end
function c87116928.splimit(e,se,sp,st) function c87116928.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end end
function c87116928.cfilter(c,tp) function c87116928.cfilter(c,fc)
return (c:IsFusionSetCard(0x1093) or c:GetSequence()>4) and c:IsType(TYPE_MONSTER) return c:IsAbleToGraveAsCost() and (c:IsControler(fc:GetControler()) or c:IsFaceup())
and c:IsCanBeFusionMaterial() and c:IsAbleToGraveAsCost() and (c:IsControler(tp) or c:IsFaceup()) end
end function c87116928.sprop(c)
function c87116928.fcheck(c,sg) return function(g)
return c:IsFusionSetCard(0x1093) and c:IsType(TYPE_MONSTER) and sg:FilterCount(c87116928.fcheck2,c)+1==sg:GetCount() Duel.SendtoGrave(g,REASON_COST)
end --spsummon condition
function c87116928.fcheck2(c) local e1=Effect.CreateEffect(c)
return c:GetSequence()>4 e1:SetType(EFFECT_TYPE_SINGLE)
end e1:SetCode(EFFECT_SET_BASE_ATTACK)
function c87116928.fgoal(c,tp,sg) e1:SetReset(RESET_EVENT+0xff0000)
return #sg>1 and #sg<=3 and Duel.GetLocationCountFromEx(tp,tp,sg)>0 and sg:IsExists(c87116928.fcheck,1,nil,sg) e1:SetValue(g:GetCount()*1000)
end c:RegisterEffect(e1)
function c87116928.fselect(c,tp,mg,sg) end
sg:AddCard(c)
local res=c87116928.fgoal(c,tp,sg) or mg:IsExists(c87116928.fselect,1,sg,tp,mg,sg)
sg:RemoveCard(c)
return res
end
function c87116928.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c87116928.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
local sg=Group.CreateGroup()
return mg:IsExists(c87116928.fselect,1,nil,tp,mg,sg)
end
function c87116928.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c87116928.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
local sg=Group.CreateGroup()
while true do
local cg=mg:Filter(c87116928.fselect,sg,tp,mg,sg)
if cg:GetCount()==0
or (c87116928.fgoal(c,tp,sg) and not Duel.SelectYesNo(tp,210)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=cg:Select(tp,1,1,nil)
sg:Merge(g)
end
Duel.SendtoGrave(sg,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetValue(sg:GetCount()*1200)
c:RegisterEffect(e1)
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