Commit 40e512e5 authored by wyykak's avatar wyykak

fix 74563027

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 8b42a03f
......@@ -3,7 +3,7 @@ function c74563027.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,c74563027.matfilter1,c74563027.matfilter,1,7777776,true)
aux.AddContactFusionProcedure(c,c74563027.cfilter,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,LOCATION_GRAVE,c74563027.sprop(c))
--aux.AddContactFusionProcedure(c,c74563027.cfilter,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,LOCATION_GRAVE,c74563027.sprop(c))
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -11,6 +11,15 @@ function c74563027.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c74563027.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c74563027.hspcon)
e2:SetOperation(c74563027.hspop)
c:RegisterEffect(e2)
--destroy
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_DESTROY)
......@@ -41,7 +50,7 @@ end
function c74563027.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c74563027.cfilter(c,fc)
--[[function c74563027.cfilter(c,fc)
return c:IsAbleToRemove() and ((c:IsControler(fc:GetControler()) and c:IsSetCard(0x371)) or (c:IsRace(RACE_PLANT)))
end
function c74563027.sprop(c)
......@@ -58,4 +67,37 @@ function c74563027.sprop(c)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
end
end]]
function c74563027.hspfilter1(c,tp,sc)
return c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and c:IsFusionSetCard(0x371) and c:IsControler(tp)
end
function c74563027.hspfilter2(c,tp,sc)
return c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and c:IsRace(RACE_PLANT) and (c:IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) and c:IsControler(tp)) or (c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-tp))
end
function c74563027.hspcon(e,c)
if c==nil then return true end
local mg1=Duel.GetMatchingGroup(c74563027.hspfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp,c)
local mg2=Duel.GetMatchingGroup(c74563027.hspfilter2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,LOCATION_GRAVE,nil,tp,c)
if mg1:GetCount()==0 or mg2:GetCount()==0 then return nil end
mg1:Merge(mg2)
return mg1:GetCount()>=2
end
function c74563027.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectMatchingCard(tp,c74563027.hspfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp,c)
local max=Duel.GetMatchingGroupCount(c74563027.hspfilter2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,LOCATION_GRAVE,g1,tp,c)
local g2=Duel.SelectMatchingCard(tp,c74563027.hspfilter2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,LOCATION_GRAVE,1,max,g1,tp,c)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,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(g1:GetCount()*700)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
end
\ No newline at end of file
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