Commit b7a62c6f authored by VanillaSalt's avatar VanillaSalt

update

parent 4d73203d
......@@ -6,25 +6,38 @@ function c54813225.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,54813225)
e1:SetCost(c54813225.spcost)
e1:SetTarget(c54813225.sptg)
e1:SetOperation(c54813225.spop)
c:RegisterEffect(e1)
end
function c54813225.relrec(c,tp,sg,mg)
sg:AddCard(c)
local res=c54813225.relgoal(tp,sg) or mg:IsExists(c54813225.relrec,1,sg,tp,sg,mg)
sg:RemoveCard(c)
return res
end
function c54813225.relgoal(tp,sg)
Duel.SetSelectedCard(sg)
if sg:CheckWithSumGreater(Card.GetLevel,3) and Duel.GetMZoneCount(tp,sg)>0 then
Duel.SetSelectedCard(sg)
return Duel.CheckReleaseGroup(tp,nil,0,nil)
else return false end
end
function c54813225.relfilter(c,g)
return g:IsContains(c)
end
function c54813225.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
if ct<=0 then ct=1 end
if chk==0 then
if Duel.GetFlagEffect(tp,54813225)~=0 then return false end
local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_TOKEN)
return rg:CheckWithSumGreater(Card.GetLevel,3,ct,99)
end
local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_TOKEN)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rm=rg:SelectWithSumGreater(tp,Card.GetLevel,3,ct,99)
Duel.Release(rm,REASON_COST)
Duel.RegisterFlagEffect(tp,54813225,RESET_PHASE+PHASE_END,0,1)
local mg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_TOKEN)
local sg=Group.CreateGroup()
if chk==0 then return mg:IsExists(c54813225.relrec,1,nil,tp,sg,mg) end
repeat
local cg=mg:Filter(c54813225.relrec,sg,tp,sg,mg)
local g=Duel.SelectReleaseGroup(tp,c54813225.relfilter,1,1,nil,cg)
sg:Merge(g)
until c54813225.relgoal(tp,sg)
Duel.Release(sg,REASON_COST)
end
function c54813225.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) 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