Commit 9f985647 authored by GuGu's avatar GuGu

Update c60151321.lua 装备卡检测

parent f60bcb4d
Pipeline #22540 passed with stage
in 1 minute and 22 seconds
......@@ -44,22 +44,14 @@ function c60151321.setcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(c60151321.cfilter,1,nil)
end
function c60151321.ccfilter(c)
return c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(Card.IsReleasable,1,nil)
return (c:IsType(TYPE_EQUIP) or c:IsLocation(LOCATION_PZONE) and c:GetEquipTarget()) and c:IsReleasable()
end
function c60151321.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c60151321.ccfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local g=Duel.GetMatchingGroup(c60151321.ccfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local lg=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
local sg=tc:GetEquipGroup()
lg:Merge(sg)
tc=g:GetNext()
end
local fg=lg:Filter(Card.IsReleasable,nil)
local fg=Duel.GetMatchingGroup(c60151321.ccfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Release(fg,REASON_COST)
fg:KeepAlive()
e:SetLabelObject(fg)
......
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