Commit 91fa82a5 authored by GuGu's avatar GuGu

Update c999206.lua

parent 712d0175
Pipeline #33480 passed with stage
in 16 seconds
......@@ -10,10 +10,11 @@ function M.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCountLimit(1,Mid)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,Mid+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(M.sprcon)
e1:SetTarget(M.sprtg)
e1:SetOperation(M.sprop)
e1:SetValue(SUMMON_TYPE_FUSION)
c:RegisterEffect(e1)
......@@ -43,55 +44,49 @@ M.hana_mat={
aux.FilterBoolFunction(Card.IsFusionCode,999203),
aux.FilterBoolFunction(Card.IsFusionSetCard,0xaa1),
}
function M.spfilter1(c, tp, fc)
local flag = Duel.GetLocationCount(tp, LOCATION_MZONE) < 1
return c:IsCode(999203) and c:IsAbleToDeckAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.IsExistingMatchingCard(M.spfilter2, tp, LOCATION_MZONE+LOCATION_EXTRA, 0, 1, c, fc, flag)
--
function M.fselect(g,tp,sc)
return g:GetCount()==2 and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
and aux.gffcheck(g,Card.IsCode,999203,Card.IsSetCard,0xaa1)
end
function M.spfilter2(c, fc, flag)
if flag and Duel.GetLocationCount(tp, LOCATION_MZONE) < 1 then return false end
return c:IsSetCard(0xaa1) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToDeckAsCost()
function M.spfilter(c,fc)
return c:IsAbleToDeckAsCost() and c:IsCanBeFusionMaterial(fc) and c:IsFaceup()
end
function M.sprcon(e, c)
if c == nil then return true end
local tp = c:GetControler()
return Duel.IsExistingMatchingCard(M.spfilter1, tp, LOCATION_MZONE+LOCATION_EXTRA, 0, 1, nil, tp, c)
function M.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(M.spfilter,tp,LOCATION_MZONE+LOCATION_EXTRA,0,nil)
return rg:CheckSubGroup(M.fselect,2,2,tp,c)
end
function M.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(M.spfilter,tp,LOCATION_MZONE+LOCATION_EXTRA,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=rg:SelectSubGroup(tp,M.fselect,true,2,2,tp,c)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function M.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
local g1 = Duel.SelectMatchingCard(tp, M.spfilter1, tp, LOCATION_MZONE+LOCATION_EXTRA, 0, 1, 1, nil, tp, c)
local flag = Duel.GetLocationCount(tp, LOCATION_MZONE) < 1
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
local g2 = Duel.SelectMatchingCard(tp, M.spfilter2, tp, LOCATION_MZONE+LOCATION_EXTRA, 0, 1, 1, g1:GetFirst(), c, flag)
g1:Merge(g2)
local tc = g1:GetFirst()
while tc do
if not tc:IsFaceup() then Duel.ConfirmCards(1-tp, tc) end
tc = g1:GetNext()
end
Duel.SendtoDeck(g1, nil, 2 ,REASON_COST)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_SPSUMMON)
g:DeleteGroup()
end
--
function M.drcon(e,tp,eg,ep,ev,re,r,rp)
local sumtype = e:GetHandler():GetSummonType()
return sumtype == SUMMON_TYPE_FUSION
end
-- function M.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
-- if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
-- Duel.SetTargetPlayer(tp)
-- Duel.SetTargetParam(1)
-- Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
-- if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
-- Duel.SetTargetPlayer(tp)
-- Duel.SetTargetParam(1)
-- Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
-- end
-- function M.drop(e,tp,eg,ep,ev,re,r,rp)
-- local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
-- Duel.Draw(p,d,REASON_EFFECT)
-- local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
-- Duel.Draw(p,d,REASON_EFFECT)
-- end
function M.indes(e,c)
return c:IsFaceup() and c:IsSetCard(0xaa1)
......
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