Commit dddf99d3 authored by Ken7787's avatar Ken7787 Committed by GitHub

Merge branch 'vgdpro:main' into main

parents a81bcbba 56e031b5
......@@ -32,7 +32,6 @@ function VgD.DisCardRideUpFilter(c,e,lv,code,rc)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(VgD.RideUpFilter1,tp,LOCATION_HAND+LOCATION_RIDE,0,1,c,e,lv,code,rc)
end
function VgD.RideUpFilter2(c,e,lv,code,rc)
if rc:IsSummonType(SUMMON_TYPE_SELFRIDE) then return end
local tp=e:GetHandlerPlayer()
return c:IsLevel(lv) and c:IsType(TYPE_MONSTER) and c:IsCode(code) and rc:IsAttribute(SKILL_SELF_RIDE) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SELFRIDE,tp,false,false,POS_FACEUP_ATTACK)
end
......@@ -410,7 +409,7 @@ end
function VgD.SupportOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
Duel.GetAttacker():RegisterFlagEffect(SupportFlag,RESET_EVENT+RESETS_STANDARD+EVENT_DAMAGE_STEP_END,0,1)
c:RegisterFlagEffect(SupportFlag,RESET_EVENT+EVENT_BATTLED,0,1)
end
function VgD.SupportValue(e)
local tp=e:GetHandlerPlayer()
......@@ -482,8 +481,9 @@ function VgD.MonsterAttackCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:GetFlagEffect(CountTriggerFlag)==0 end
c:RegisterFlagEffect(CountTriggerFlag,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function VgD.MonsterCannotBeDestoryCondition(e,c)
return VgF.VMonsterFilter(e:GetHandler()) or Duel.GetAttacker()==e:GetHandler()
function VgD.MonsterCannotBeDestoryCondition(e)
local c=e:GetHandler()
return VgF.VMonsterFilter(c)
end
function VgD.MonsterCannotBeAttackedCondition(e,c)
return VgF.IsSequence(e:GetHandler(),1,2,3)
......@@ -567,7 +567,7 @@ function VgD.CardTriggerOperation(chkop,f)
end
elseif c:IsRace(TRRIGGER_ADVANCE) then
local g=Duel.GetMatchingGroup(VgF.IsSequence,tp,LOCATION_MZONE,0,nil,0,4,5)
VgF.AtkUp(c,tc,10000,nil)
VgF.AtkUp(c,g,10000,nil)
end
if chkop==0 then
if c:IsRace(TRRIGGER_SUPER) then
......@@ -632,6 +632,12 @@ function VgD.Rule(c)
e1:SetCondition(VgD.RuelDrawCondition)
e1:SetOperation(VgD.RuelDrawOperation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLED)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(VgD.ResetOperation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
......@@ -718,6 +724,10 @@ function VgD.RuelDrawOperation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_PHASEDRAW)
end
end
function VgD.ResetOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(SupportFlag)>0 then c:ResetFlagEffect(SupportFlag) end
end
--指令卡
function VgD.SpellActivate(c,m,op,con,cost)
......
......@@ -241,7 +241,7 @@ function VgF.LvConditionFilter(c,lv)
return VgF.VMonsterFilter(c) and c:IsLevelAbove(lv)
end
function VgF.AtkUp(c,g,val,reset)
if not c or not g then return end
if not c then return end
if not reset then reset=RESET_PHASE+PHASE_END end
if not val or val==0 then return end
if VgF.GetValueType(g)=="Group" and g:GetCount()>0 then
......@@ -254,14 +254,15 @@ function VgF.AtkUp(c,g,val,reset)
tc:RegisterEffect(e1)
end
return
elseif VgF.GetValueType(g)=="Card" then
local tc=VgF.ReturnCard(g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+reset)
tc:RegisterEffect(e1)
end
local tc=VgF.ReturnCard(g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+reset)
tc:RegisterEffect(e1)
end
function VgF.StarUp(c,g,val,reset)
if not c or not g then return end
......@@ -298,7 +299,7 @@ function VgF.StarUp(c,g,val,reset)
end
function VgF.IsAbleToGZone(c)
if c:IsLocation(LOCATION_MZONE) then
return c:IsAttribute(SKILL_BLOCK)
return c:IsAttribute(SKILL_BLOCK) and VgF.IsSequence(c,0,4)
end
return c:IsLocation(LOCATION_HAND)
end
......@@ -331,7 +332,7 @@ function VgF.EnegyCost(num)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,10800730)
end
local sg=Duel.GetMatchingGroup(tp,Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
local sg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
local g=VgF.GetCardsFromGroup(sg,num)
Duel.Sendto(g,tp,0,POS_FACEUP,REASON_COST)
end
......@@ -385,7 +386,7 @@ function VgF.DamageCost(num)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DAMAGE)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,num,nil)
Duel.ChangePosition(g,POS_FACEDOWN)
Duel.ChangePosition(g,POS_FACEDOWN_ATTACK)
end
end
function VgF.SearchCard(loc,f)
......
......@@ -8,7 +8,7 @@ end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
VgF.AtkUp(c,c,10000,nil)
if Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)>=2 and Duel.SelectYesNo(vgf.Stringid(m,3)) then
if Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)>=2 and Duel.SelectYesNo(tp,vgf.Stringid(m,3)) then
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LEAVEONFIELD)
......
......@@ -2,7 +2,7 @@
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.SpellActivate(c,m,cm.operation)
vgd.SpellActivate(c,m,cm.operation,vgf.DamageCost(1))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -21,5 +21,7 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false,POS_FACEUP_ATTACK,0x4)
vgf.Call(g,0,tp,0x4)
end
\ No newline at end of file
if vgf.Call(g,0,tp,0x4)>0 then
vgf.OverlayFillCostOrOperation(1)
end
end
......@@ -26,7 +26,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKUP)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
if g then
if g:GetCount()>0 then
vgf.AtkUp(c,g,5000)
end
end
......
......@@ -3,7 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
--【自】【V】:这个单位攻击的战斗结束时,通过【费用】[计数爆发1],选择你的1张后防者,这个回合中,那个单位可以从后列攻击,力量+5000。这个回合中你进行了人格RIDE的话,不选择1张,而是选择3张。
vgd.EffectTypeTrigger(c,m,cm,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_DAMAGE_STEP_END,cm.operation,vgf.DamageCost(1),vgf.VMonsterCondition)
vgd.EffectTypeTrigger(c,m,cm,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_CUSTOM+EVENT_DAMAGE_TRIGGER,cm.operation,vgf.DamageCost(1),vgf.VMonsterCondition)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -20,7 +20,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=vgf.ReturnCard(g)
Duel.DisableShuffleCheck()
if tc:IsType(TYPE_MONSTER and vgf.IsLevel(tc,0,1,2)) then
if tc:IsType(TYPE_MONSTER) and vgf.IsLevel(tc,0,1,2) then
vgf.Call(g,0,tp)
elseif tc:IsCanOverlay() then
Duel.Overlay(c,g)
......
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
VgD.SpellActivate(c,m,op,con,cm.cost)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc,mg)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,mg,TYPE_MONSTER)
if chkc then return g end
if chk==0 then return g:GetCount()>0 end
g:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
\ No newline at end of file
......@@ -44,8 +44,13 @@ end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)>=10 then return end
local token=Duel.CreateToken(tp,10800730)
Duel.Sendto(token,tp,LOCATION_EMBLEM,POS_FACEUP_ATTACK,REASON_EFFECT)
local ct=10-Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
local token1=Duel.CreateToken(tp,10800730)
local token2=Duel.CreateToken(tp,10800730)
local token3=Duel.CreateToken(tp,10800730)
local sg=Group.FromCards(token1,token2,token3)
local g=VgF.GetCardsFromGroup(sg,ct)
Duel.Sendto(g,tp,LOCATION_EMBLEM,POS_FACEUP_ATTACK,REASON_EFFECT)
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
......
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