Commit e91473e9 authored by Grajade's avatar Grajade

Update c74563025.lua

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