Commit e91473e9 authored by Grajade's avatar Grajade

Update c74563025.lua

parent 1329ea4c
......@@ -23,9 +23,6 @@ function c74563025.initial_effect(c)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
end
function c74563025.filter(c)
return aux.TRUE
end
function c74563025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
......@@ -41,24 +38,16 @@ end
function c74563025.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ph=Duel.GetCurrentPhase()
local dg=Duel.GetMatchingGroup(c74563025.filter,tp,0,LOCATION_ONFIELD,nil)
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
local ct=0
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then
ct=1
else
ct=2
end
if chk==0 then
if (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) then
return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) and dg:GetCount()>0 and e:GetHandler():IsReleasable() and Duel.GetTurnPlayer()==tp
else
return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,e:GetHandler()) and dg:GetCount()>0 and e:GetHandler():IsReleasable() and Duel.GetTurnPlayer()==tp
end
if e:GetLabel()~=100 then return false end
return e:GetHandler():IsReleasable() and Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0
and ((ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or Duel.IsExistingMatchingCard(c74563025.rlfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()))
end
Debug.Message(ct)
e:SetLabel(0)
local ct=1
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then ct=0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local cg=Duel.SelectMatchingCard(tp,c74563025.rlfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,ct,2,e:GetHandler(),tp)
local cg=Duel.SelectMatchingCard(tp,c74563025.rlfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,ct,1,e:GetHandler(),tp)
cg:AddCard(e:GetHandler())
local tc=cg:GetFirst()
local ctype=0
......@@ -70,7 +59,6 @@ function c74563025.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
tc=cg:GetNext()
end
e:SetLabel(0,cg:GetCount())
Duel.Release(cg,REASON_COST)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c74563025.chlimit(ctype))
......
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