Commit ce312228 authored by xiaoye's avatar xiaoye

update card.islevel

parent 7122a4e1
...@@ -397,6 +397,6 @@ function cm.initial_effect(c) ...@@ -397,6 +397,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.VMonsterCondition(e) and vgf.IsExistingMatchingCard(vgf.IsLevel,tp,LOCATION_MZONE,0,3,nil,3) return vgf.VMonsterCondition(e) and vgf.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_MZONE,0,3,nil,3)
end end
``` ```
...@@ -123,11 +123,11 @@ end ...@@ -123,11 +123,11 @@ end
function VgD.RideZeroCondition(e,tp,eg,ep,ev,re,r,rp) function VgD.RideZeroCondition(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst() local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
if rc then return false end if rc then return false end
local ct=Duel.GetMatchingGroupCount(VgF.IsLevel,tp,LOCATION_RIDE,0,nil,0) local ct=Duel.GetMatchingGroupCount(Card.IsLevel,tp,LOCATION_RIDE,0,nil,0)
return VgF.RuleTurnCondtion(e) and ct>0 and VgF.RuleCardCondtion(e) return VgF.RuleTurnCondtion(e) and ct>0 and VgF.RuleCardCondtion(e)
end end
function VgD.RideZeroOperation(e,tp,eg,ep,ev,re,r,rp) function VgD.RideZeroOperation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(VgF.IsLevel,tp,LOCATION_RIDE,0,nil,0) local g=Duel.GetMatchingGroup(Card.IsLevel,tp,LOCATION_RIDE,0,nil,0)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
g=g:Select(tp,1,1,nil) g=g:Select(tp,1,1,nil)
......
...@@ -24,12 +24,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,12 +24,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.IsExistingMatchingCard(vgf.IsLevel,tp,LOCATION_HAND,0,3,nil,3) end if chk==0 then return vgf.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_HAND,0,3,nil,3) end
local g=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,vgf.IsLevel,tp,LOCATION_HAND,0,3,3,nil,3) local g=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,Card.IsLevel,tp,LOCATION_HAND,0,3,3,nil,3)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function cm.condition(e,c) function cm.condition(e,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return vgf.RMonsterCondition(e) and vgf.IsExistingMatchingCard(vgf.IsLevel,tp,LOCATION_MZONE,0,3,nil,3) return vgf.RMonsterCondition(e) and vgf.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_MZONE,0,3,nil,3)
end end
\ No newline at end of file
...@@ -6,8 +6,8 @@ function cm.initial_effect(c) ...@@ -6,8 +6,8 @@ function cm.initial_effect(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.operation2,vgf.DamageCost(1),vgf.RMonsterCondition,nil,1) vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.operation2,vgf.DamageCost(1),vgf.RMonsterCondition,nil,1)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.IsExistingMatchingCard(vgf.IsLevel,tp,LOCATION_HAND,0,2,nil,3) end if chk==0 then return vgf.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_HAND,0,2,nil,3) end
local g=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,vgf.IsLevel,tp,LOCATION_HAND,0,2,2,nil,3) local g=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,Card.IsLevel,tp,LOCATION_HAND,0,2,2,nil,3)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=vgf.GetMatchingGroup(vgf.IsLevel,tp,LOCATION_MZONE,0,nil,3) local g=vgf.GetMatchingGroup(Card.IsLevel,tp,LOCATION_MZONE,0,nil,3)
for tc in vgf.Next(g) do for tc in vgf.Next(g) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -18,5 +18,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,5 +18,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.IsExistingMatchingCard(vgf.IsLevel,tp,LOCATION_MZONE,0,2,nil,3) and vgf.RMonsterCondition(e) return vgf.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_MZONE,0,2,nil,3) and vgf.RMonsterCondition(e)
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