Commit d7650427 authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent 092a51a3
...@@ -586,7 +586,6 @@ function VgD.CardTriggerOperation(chkop,f) ...@@ -586,7 +586,6 @@ function VgD.CardTriggerOperation(chkop,f)
local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DAMAGE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DAMAGE,0,1,1,nil):GetFirst()
if tc then if tc then
Duel.SendtoGrave(tc,REASON_TRIGGER) Duel.SendtoGrave(tc,REASON_TRIGGER)
Duel.Recover(tp,1,REASON_RULE)
end end
end end
elseif c:IsRace(TRRIGGER_ADVANCE) then elseif c:IsRace(TRRIGGER_ADVANCE) then
...@@ -603,7 +602,6 @@ function VgD.CardTriggerOperation(chkop,f) ...@@ -603,7 +602,6 @@ function VgD.CardTriggerOperation(chkop,f)
Duel.Exile(c,REASON_TRIGGER) Duel.Exile(c,REASON_TRIGGER)
else else
Duel.Sendto(c,tp,LOCATION_DAMAGE,POS_FACEUP_ATTACK,REASON_EFFECT) Duel.Sendto(c,tp,LOCATION_DAMAGE,POS_FACEUP_ATTACK,REASON_EFFECT)
Duel.Damage(tp,1,REASON_TRIGGER)
end end
local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst() local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
local bc=rc:GetBattleTarget() local bc=rc:GetBattleTarget()
...@@ -723,7 +721,11 @@ function VgD.EventRideStart(e,tp,eg,ep,ev,re,r,rp) ...@@ -723,7 +721,11 @@ function VgD.EventRideStart(e,tp,eg,ep,ev,re,r,rp)
end end
function VgD.RuleWin(e,tp,eg,ep,ev,re,r,rp) function VgD.RuleWin(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()>0 then return end if Duel.GetCurrentChain()>0 then return end
for WinReason=0x1, 0xff, 1 do for WinReason=0x1, 0x2, 1 do
if WinReason==0x1 then
local lp=Duel.GetLP(tp)-Duel.GetFieldGroupCount(tp,LOCATION_ORDER,0)
Duel.SetLP(tp,lp)
end
if WinReason==0x2 then if WinReason==0x2 then
local g1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local g1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local g2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) local g2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
...@@ -1045,4 +1047,17 @@ function VgD.TriggerCountUpOperation(num) ...@@ -1045,4 +1047,17 @@ function VgD.TriggerCountUpOperation(num)
c:ResetFlagEffect(AttackTriggerFlag) c:ResetFlagEffect(AttackTriggerFlag)
c:RegisterFlagEffect(AttackTriggerFlag,RESET_EVENT+RESETS_STANDARD,0,1,label) c:RegisterFlagEffect(AttackTriggerFlag,RESET_EVENT+RESETS_STANDARD,0,1,label)
end end
end
function VgD.GlobalCheckEffect(c,m,typ,code,con,op)
if not typ then typ=EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS end
local cm=_G["c"..m]
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(typ)
ge1:SetCode(code)
if VgF.GetValueType(con)=="function" then ge1:SetCondition(con) end
ge1:SetOperation(op)
Duel.RegisterEffect(ge1,0)
end
end end
\ No newline at end of file
This diff is collapsed.
...@@ -3,11 +3,11 @@ local cm,m,o=GetID() ...@@ -3,11 +3,11 @@ local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.OverDress(c,10101009) vgd.OverDress(c,10101009)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation2,nil,cm.condition2) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,nil,cm.condition)
end end
function cm.operation2(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()
VgF.AtkUp(c,c,10000,nil) VgF.AtkUp(c,c,10000,nil,nil,EFFECT_TYPE_SINGLE,EVENT_BATTLED)
if Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)>=2 and Duel.SelectEffectYesNo(tp,vgf.stringid(VgID,10)) then if Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)>=2 and Duel.SelectEffectYesNo(tp,vgf.stringid(VgID,10)) then
local cg=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,2,2,nil) local cg=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,2,2,nil)
if Duel.SendtoGrave(cg,REASON_COST)==2 then if Duel.SendtoGrave(cg,REASON_COST)==2 then
...@@ -20,7 +20,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return vgf.RMonsterCondition(e) and c:GetFlagEffectLabel(ConditionFlag)==201 and vgf.VMonsterFilter(Duel.GetAttackTarget()) return vgf.RMonsterCondition(e) and c:GetFlagEffectLabel(ConditionFlag)==201 and vgf.VMonsterFilter(Duel.GetAttackTarget())
end end
\ No newline at end of file
...@@ -36,10 +36,10 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,10 +36,10 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
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 eg:IsExists(cm.filter,1,nil) and eg:Count()==1 return eg:IsExists(cm.filter,1,nil,e) and eg:Count()==1
end end
function cm.filter(c) function cm.filter(c,e)
return c:IsSummonType(SUMMON_VALUE_CALL) return c:IsSummonType(SUMMON_VALUE_CALL) and c:GetControler()~=e:GetHandler():GetControler()
end end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local zone=vgf.GetAvailableLocation(tp) local zone=vgf.GetAvailableLocation(tp)
...@@ -47,11 +47,15 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,11 +47,15 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if ct>e:GetLabel() then ct=e:GetLabel() end if ct>e:GetLabel() then ct=e:GetLabel() end
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_CALL) Duel.Hint(HINT_MESSAGE,tp,HINTMSG_CALL)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,0,LOCATION_ORDER,ct,ct,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,0,LOCATION_ORDER,ct,ct,nil,e,tp)
if #g>0 then Duel.HintSelection(g)
Duel.HintSelection(g) for tc in vgf.Next(g) do
vgf.Call(g,0,tp) if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then
vgf.Call(tc,0,tp)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end end
end end
function cm.filter1(c,e,tp) function cm.filter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,tp) or c:IsType(TYPE_SPELL) return c:GetFlagEffect(ImprisonFlag)>0
end end
\ No newline at end of file
...@@ -6,15 +6,7 @@ function cm.initial_effect(c) ...@@ -6,15 +6,7 @@ function cm.initial_effect(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_BATTLED,cm.operation,nil,cm.condition) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_BATTLED,cm.operation,nil,cm.condition)
--【永】【R】:这个回合中曾有你的等级3以上的先导者登场过的话,这个单位的力量+5000。 --【永】【R】:这个回合中曾有你的等级3以上的先导者登场过的话,这个单位的力量+5000。
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,cm.con) vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,cm.con)
if not cm.global_check then VgD.GlobalCheckEffect(c,m,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS,EVENT_SPSUMMON_SUCCESS,cm.checkcon,cm.checkop)
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetCondition(cm.checkcon)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
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 Duel.GetFlagEffect(tp,m)>0 return Duel.GetFlagEffect(tp,m)>0
......
...@@ -3,15 +3,7 @@ function cm.initial_effect(c) ...@@ -3,15 +3,7 @@ function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.OverlayCost(1),cm.condition) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.OverlayCost(1),cm.condition)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_BATTLED,cm.operation1,nil,cm.condition1) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_BATTLED,cm.operation1,nil,cm.condition1)
if not cm.global_check then vgd.GlobalCheckEffect(c,m,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS,EVENT_SPSUMMON_SUCCESS,cm.checkcon,cm.checkop)
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetCondition(cm.checkcon)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
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)
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,cm.cost,vgf.VMonsterCondition)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op1,vgf.OverlayCost(5),cm.con,nil,nil,nil,2)
vgd.GlobalCheckEffect(c,m,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS,EVENT_TO_GRAVE,cm.checkcon,cm.checkop)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,2,2,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENCE)
end
function cm.filter(c)
return c:IsCanChangePosition() and c:IsPosition(POS_FACEUP_ATTACK) and vgf.RMonsterFilter(c)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LEAVEONFIELD)
local g=Duel.SelectTarget(tp,vgf.VMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end
vgf.AtkUp(c,c,10000)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local ct=6-Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if ct<=0 then return end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.ConfirmCards(g)
local ct1=vgf.GetAvailableLocation(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local sg=g:FilterSelect(tp,Card.IsCanBeSpecialSummoned,0,ct1,nil)
if sg:GetCount()>0 then
vgf.Call(sg,0,tp)
for tc in vgf.Next(sg) do g:RemoveCard(tc) end
end
if g:GetCount()>0 then
local tc=vgf.GetVMonster(tp)
Duel.Overlay(tc,g)
end
end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(1-tp)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,vgf.DamageCost(1),vgf.VMonsterCondition)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
if ct>=5 then Duel.Draw(tp,1,REASON_EFFECT) end
if ct>=10 then
vgf.AtkUp(c,c,10000,nil,nil,EFFECT_TYPE_SINGLE,EVENT_BATTLED)
vgf.StarUp(c,c,1,nil,nil,EFFECT_TYPE_SINGLE,EVENT_BATTLED)
end
if ct>=15 then
local g1=Duel.GetMatchingGroup(vgf.RMonsterFilter,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(vgf.RMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc1=vgf.GetVMonster(tp)
local tc2=vgf.GetVMonster(1-tp)
for tc in vgf.Next(g1) do
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.Overlay(tc1,og)
end
end
for tc in vgf.Next(g2) do
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.Overlay(tc2,og)
end
end
Duel.Overlay(tc1,g1)
Duel.Overlay(tc2,g2)
if vgf.GetAvailableLocation(tp)>0 then
local g=tc1:GetOverlayGroup():FilterSelect(tp,Card.IsCanBeSpecialSummoned,tp,0,2,nil,e,0,tp,false,false,POS_FACEUP_ATTACK)
vgf.Call(g,0,tp)
end
end
end
\ No newline at end of file
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.GlobalCheckEffect(c,m,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS,EVENT_CHANGE_POS,cm.checkcon,cm.checkop)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,cm.con)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,1,cm.con1,nil,nil,EFFECT_UPDATE_LSCALE)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,1,cm.con1,nil,nil,EFFECT_UPDATE_RSCALE)
vgd.EffectTypeTriggerWhenHitting(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,cm.op,vgf.DamageCost(1))
end end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffectLabel(tp,ConditionFlag)==10102001
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0 and cm.con(e,tp,eg,ep,ev,re,r,rp)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LEAVEONFIELD)
local g=Duel.SelectTarget(tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
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