Commit e996dd55 authored by wyykak's avatar wyykak

Merge branch 'patch-5' into 'master'

Update c74563610.lua

See merge request hiiragiguardians/ygopro-thc-cards!19
parents 25fc71bd 5d48b99d
...@@ -41,7 +41,7 @@ function c74563610.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,7 +41,7 @@ function c74563610.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local sel=0 local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3666) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end if Duel.CheckLPCost(tp,3666) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel) e:SetLabel(sel)
return sel~=0 return sel~=0
...@@ -73,22 +73,14 @@ function c74563610.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,22 +73,14 @@ function c74563610.target(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local count=sg:GetCount() local count=sg:GetCount()
local count1=0 local count1=0
if count%3~=0 then count1=math.ceil(count/3*2)
count1=(count//3+1)*2
else
count1=count//3*2
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,count1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,count1,0,0)
end end
function c74563610.activate(e,tp,eg,ep,ev,re,r,rp) function c74563610.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local count=sg:GetCount() local count=sg:GetCount()
local count1=0 local count1=0
if count%3~=0 then count1=math.ceil(count/3*2)
count1=(count//3+1)*2
else
count1=count//3*2
end
local sg1=sg:RandomSelect(1-tp,count1) local sg1=sg:RandomSelect(1-tp,count1)
Duel.Destroy(sg1,REASON_EFFECT) Duel.Destroy(sg1,REASON_EFFECT)
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