Commit 15d4a4bb authored by REIKAI's avatar REIKAI 💬

update lua

parent 7dedce69
Pipeline #20000 passed with stages
in 27 minutes and 50 seconds
No preview for this file type
...@@ -13,7 +13,9 @@ function cm.desfilter(c) ...@@ -13,7 +13,9 @@ function cm.desfilter(c)
return c:IsRace(RACE_DINOSAUR) and (c:IsFaceup() or not c:IsOnField()) return c:IsRace(RACE_DINOSAUR) and (c:IsFaceup() or not c:IsOnField())
end end
function cm.desop(e,tp) function cm.desop(e,tp)
if rsop.SelectDestroy(tp,cm.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 and Duel.Destroy(sg,REASON_EFFECT)>0 then
local c=rscf.GetFaceUpSelf(e) local c=rscf.GetFaceUpSelf(e)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local op=rsop.SelectOption(tp,true,{m,2},#g>0,{m,3},c and true or false,{m,4}) local op=rsop.SelectOption(tp,true,{m,2},#g>0,{m,3},c and true or false,{m,4})
...@@ -38,4 +40,5 @@ function cm.desop(e,tp) ...@@ -38,4 +40,5 @@ function cm.desop(e,tp)
ce:SetValue(ct) ce:SetValue(ct)
c:SetHint(CHINT_NUMBER,ct) c:SetHint(CHINT_NUMBER,ct)
end end
end
end 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