Commit c662c829 authored by Nemo Ma's avatar Nemo Ma

GearGal Bugfix

parent 9cbf42c5
...@@ -10,7 +10,6 @@ function cm.initial_effect(c) ...@@ -10,7 +10,6 @@ function cm.initial_effect(c)
e1:SetCondition(cm.actcon) e1:SetCondition(cm.actcon)
e1:SetRange(LOCATION_ONFIELD) e1:SetRange(LOCATION_ONFIELD)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetCondition(cm.con)
e1:SetValue(cm.aclimit) e1:SetValue(cm.aclimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Destroy --Destroy
...@@ -36,7 +35,7 @@ function cm.con(e) ...@@ -36,7 +35,7 @@ function cm.con(e)
end end
function cm.actcon(e) function cm.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and cm.con(e)
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x1449) or c:IsSetCard(0x3449)) return c:IsFaceup() and (c:IsSetCard(0x1449) or c:IsSetCard(0x3449))
......
...@@ -62,14 +62,14 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,14 +62,14 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetHandler():IsLocation(LOCATION_MZONE) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetHandler():IsLocation(LOCATION_MZONE)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,0,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,0,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,c) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,c)
local zone={} local zone={}
zone[0]=c:GetLinkedZone(0) zone[0]=c:GetLinkedZone(0)
zone[1]=c:GetLinkedZone(1) zone[1]=c:GetLinkedZone(1)
......
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