Commit 3519f3d5 authored by Nemo Ma's avatar Nemo Ma

fix

parent 60c3c971
......@@ -49,7 +49,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local f=tama.cosmicFighters_equipGetFormation(c)
if chk==0 then return f and f:GetCount()<c:GetFlagEffect(m) end
if chk==0 then return f and f:GetCount()>c:GetFlagEffect(m) end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.econ(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -38,6 +38,6 @@ end
function cm.efilter1(e,te)
local ec=e:GetHandler():GetEquipTarget()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not (g==nil and {g:IsContains(ec)})[1]
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not(g==nil or {g:IsContains(e:GetHandler():GetEquipTarget())})[1]
--return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
......@@ -44,6 +44,6 @@ end
function cm.efilter1(e,te)
local ec=e:GetHandler():GetEquipTarget()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not te:GetOwnerPlayer()~=e:GetHandlerPlayer() and (g==nil and {g:IsContains(ec)})[1]
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and (g and g:IsContains(ec))
--return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
......@@ -35,7 +35,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local f=tama.cosmicFighters_equipGetFormation(c)
if chk==0 then return f and f:GetCount()<c:GetFlagEffect(m) end
if chk==0 then return f and f:GetCount()>c:GetFlagEffect(m) end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.desfilter(c)
......
......@@ -44,7 +44,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local f=tama.cosmicFighters_equipGetFormation(c)
if chk==0 then return f and f:GetCount()<c:GetFlagEffect(m) end
if chk==0 then return f and f:GetCount()>c:GetFlagEffect(m) end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -37,7 +37,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local f=tama.cosmicFighters_equipGetFormation(c)
if chk==0 then return f and f:GetCount()<c:GetFlagEffect(m) end
if chk==0 then return f and f:GetCount()>c:GetFlagEffect(m) end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,25 +8,23 @@ function c6160006.initial_effect(c)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,6160006)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c6160006.condition)
e1:SetTarget(c6160006.thtg)
e1:SetOperation(c6160006.thop)
c:RegisterEffect(e1)
end
function c6160006.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c6160006.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c6160006.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
end
function c6160006.thfilter(c,e,tp)
return c:IsSetCard(0x616) and c:IsType(TYPE_MONSTER) and not c:IsCode(6160006)
end
function c6160006.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c6160006.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c6160006.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c6160006.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c6160006.thop(e,tp,eg,ep,ev,te,r,rp)
if not Duel.IsExistingMatchingCard(c6160006.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c6160006.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
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