Commit 8495aec3 authored by salix5's avatar salix5

Merge pull request #269 from destdev/patch-2

fix Beckoning Light
parents 29a9a1b3 26b7a5af
...@@ -25,12 +25,12 @@ function c16255442.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,12 +25,12 @@ function c16255442.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c16255442.operation(e,tp,eg,ep,ev,re,r,rp) function c16255442.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local sct=sg:GetCount()
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetCount()
local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil) local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil)
if tg:GetCount()>=sct then if og>0 and tg:GetCount()>=og then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sel=tg:Select(tp,sct,sct,nil) local sel=tg:Select(tp,og,og,nil)
Duel.SendtoHand(sel,nil,REASON_EFFECT) Duel.SendtoHand(sel,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sel) Duel.ConfirmCards(1-tp,sel)
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