Commit 5a68f8af authored by mercury233's avatar mercury233 Committed by GitHub

fix 輝光竜セイファート

parent d7599c39
...@@ -27,21 +27,21 @@ function c15381421.cfilter(c) ...@@ -27,21 +27,21 @@ function c15381421.cfilter(c)
return c:IsRace(RACE_DRAGON) and c:GetOriginalLevel()>0 and c:IsAbleToGraveAsCost() return c:IsRace(RACE_DRAGON) and c:GetOriginalLevel()>0 and c:IsAbleToGraveAsCost()
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end end
function c15381421.filter(c,e,tp) function c15381421.filter(c,e,tp,rg)
local rg=Duel.GetMatchingGroup(c15381421.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local lv=c:GetLevel() local lv=c:GetLevel()
return lv>0 and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() and rg:CheckWithSumEqual(Card.GetLevel,lv,1,99) return lv>0 and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() and rg:CheckWithSumEqual(Card.GetOriginalLevel,lv,1,99)
end end
function c15381421.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c15381421.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return true end if chk==0 then return true end
end end
function c15381421.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c15381421.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(c15381421.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c15381421.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end return Duel.IsExistingMatchingCard(c15381421.filter,tp,LOCATION_DECK,0,1,nil,e,tp,rg) end
local g=Duel.GetMatchingGroup(c15381421.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c15381421.filter,tp,LOCATION_DECK,0,nil,e,tp,rg)
local lvt={} local lvt={}
local pc=1 local pc=1
for i=1,12 do for i=1,12 do
...@@ -51,7 +51,7 @@ function c15381421.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +51,7 @@ function c15381421.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
local rg=Duel.GetMatchingGroup(c15381421.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) local rg=Duel.GetMatchingGroup(c15381421.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=rg:SelectWithSumEqual(tp,Card.GetLevel,lv,1,99) local sg=rg:SelectWithSumEqual(tp,Card.GetOriginalLevel,lv,1,99)
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
e:SetLabel(lv) e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
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