Commit 31652a77 authored by whenmo's avatar whenmo

fix TriggerCountUp

parent 205c732e
...@@ -3,7 +3,7 @@ function cm.initial_effect(c) ...@@ -3,7 +3,7 @@ function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op1,vgf.DamageCost(1),nil,nil,1) vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op1,vgf.DamageCost(1),nil,nil,1)
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,10000,cm.con) vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,10000,cm.con)
vgd.TriggerCountUp(c,m,1) vgd.TriggerCountUp(c,m,1,cm.con2)
end end
function cm.con(e,c) function cm.con(e,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
...@@ -16,4 +16,8 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,4 +16,8 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if not vgf.CheckPrison(tp) then return end if not vgf.CheckPrison(tp) then return end
local g1=vgf.SelectMatchingCard(HINTMSG_IMPRISON,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,2,2,nil) local g1=vgf.SelectMatchingCard(HINTMSG_IMPRISON,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,2,2,nil)
vgf.SendtoPrison(g1,tp) vgf.SendtoPrison(g1,tp)
end
function cm.con2(e,c)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp and vgf.VMonsterCondition(e) and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,3,nil)
end end
\ No newline at end of file
...@@ -18,7 +18,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_CALL,e,tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=vgf.SelectMatchingCard(HINTMSG_CALL,e,tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if vgf.Sendto(LOCATION_MZONE,g,SUMMON_VALUE_REVOLT,tp,0x20)>0 then if vgf.Sendto(LOCATION_MZONE,g,SUMMON_VALUE_REVOLT,tp,0x20)>0 then
local mg=Duel.GetOperatedGroup() local mg=Duel.GetOperatedGroup()
vgd.TriggerCountUp(c,m,-2,RESET_PHASE+PHASE_END,mg) vgd.TriggerCountUp(c,m,-2,nil,RESET_PHASE+PHASE_END,mg)
end end
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -32,5 +32,5 @@ function cm.checkfilter(c) ...@@ -32,5 +32,5 @@ function cm.checkfilter(c)
return vgf.IsSummonTypeV(c) and c:IsLevelAbove(3) return vgf.IsSummonTypeV(c) and c:IsLevelAbove(3)
end end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp) function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.checkfilter,1,nil) return eg:IsExists(cm.checkfilter,1,nil)
end end
\ No newline at end of file
...@@ -17,7 +17,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf.AtkUp(c,g,10000) vgf.AtkUp(c,g,10000)
end end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp) function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_SELFRIDE) return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_SELFRIDE)
end end
function cm.con1(e,tp,eg,ep,ev,re,r,rp) function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0 and vgf.VMonsterCondition(e) return Duel.GetFlagEffect(tp,m)>0 and vgf.VMonsterCondition(e)
...@@ -36,5 +36,5 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,5 +36,5 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
vgf.Sendto(LOCATION_DECK,g,tp,SEQ_DECKTOP,REASON_EFFECT) vgf.Sendto(LOCATION_DECK,g,tp,SEQ_DECKTOP,REASON_EFFECT)
end end
vgd.TriggerCountUp(c,m,1,RESET_PHASE+PHASE_END) vgd.TriggerCountUp(c,m,1,nil,RESET_PHASE+PHASE_END)
end end
\ No newline at end of file
...@@ -18,10 +18,10 @@ function cm.initial_effect(c) ...@@ -18,10 +18,10 @@ function cm.initial_effect(c)
vgd.EffectTypeTriggerWhenHitting(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,cm.op,cm.cost,nil,nil,1) vgd.EffectTypeTriggerWhenHitting(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,cm.op,cm.cost,nil,nil,1)
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()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.ChangePosition(c,POS_FACEUP_ATTACK) Duel.ChangePosition(c,POS_FACEUP_ATTACK)
vgd.TriggerCountUp(c,m,-1,RESET_PHASE+PHASE_END) vgd.TriggerCountUp(c,m,-1,nil,RESET_PHASE+PHASE_END)
end end
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)
......
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