Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
V
Vgdpro Scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoye
Vgdpro Scripts
Commits
f29ed288
Commit
f29ed288
authored
Mar 30, 2024
by
jwyxym
Committed by
GitHub
Mar 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
3834ecaa
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
44 deletions
+71
-44
VgD.Lua
VgD.Lua
+47
-35
VgDefinition.Lua
VgDefinition.Lua
+8
-7
c10101015.lua
c10101015.lua
+5
-2
c10102015.lua
c10102015.lua
+11
-0
No files found.
VgD.Lua
View file @
f29ed288
...
@@ -5,7 +5,7 @@ function VgD.RideUp(c)
...
@@ -5,7 +5,7 @@ function VgD.RideUp(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PREDRAW
)
e1
:
SetCode
(
EVENT_PREDRAW
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
,
VgID
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetCondition
(
VgD
.
RideZeroCondition
)
e1
:
SetCondition
(
VgD
.
RideZeroCondition
)
e1
:
SetOperation
(
VgD
.
RideZeroOperation
)
e1
:
SetOperation
(
VgD
.
RideZeroOperation
)
...
@@ -14,7 +14,7 @@ function VgD.RideUp(c)
...
@@ -14,7 +14,7 @@ function VgD.RideUp(c)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_ALL
)
e2
:
SetRange
(
LOCATION_ALL
)
e2
:
SetCountLimit
(
1
,
VgID
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
VgD
.
RideUpCondition
)
e2
:
SetCondition
(
VgD
.
RideUpCondition
)
e2
:
SetOperation
(
VgD
.
RideUpOperation
)
e2
:
SetOperation
(
VgD
.
RideUpOperation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
...
@@ -28,7 +28,7 @@ function VgD.RideUpFilter1(c,lv,code,rc)
...
@@ -28,7 +28,7 @@ function VgD.RideUpFilter1(c,lv,code,rc)
end
end
function
VgD
.
DisCardRideUpFilter
(
c
,
lv
,
code
,
rc
)
function
VgD
.
DisCardRideUpFilter
(
c
,
lv
,
code
,
rc
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
return
c
:
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
,
lv
,
code
,
rc
)
return
c
:
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
VgD
.
RideUpFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
1
,
c
,
lv
,
code
,
rc
)
end
end
function
VgD
.
RideUpFilter2
(
c
,
lv
,
code
,
rc
)
function
VgD
.
RideUpFilter2
(
c
,
lv
,
code
,
rc
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCode
(
code
)
and
rc
:
IsAttribute
(
SKILL_SELF_RIDE
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCode
(
code
)
and
rc
:
IsAttribute
(
SKILL_SELF_RIDE
)
...
@@ -69,8 +69,9 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -69,8 +69,9 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
if
sel
==
0
and
a
then
if
sel
==
0
and
a
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
DisCardRideUpFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
lv
,
code
,
rc
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
DisCardRideUpFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
lv
,
code
,
rc
)
--Duel.Sendto(g,REASON_TRIGGER,LOCATION_DAMAGE,POS_FACEUP)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
RIDEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
CALL
)
local
sg
=
rg1
:
FilterSelect
(
tp
,
Card
.
IsLocation
,
1
,
1
,
nil
,
LOCATION_HAND
+
LOCATION_RIDE
)
local
sg
=
rg1
:
FilterSelect
(
tp
,
Card
.
IsLocation
,
1
,
1
,
nil
,
LOCATION_HAND
+
LOCATION_RIDE
)
local
sc
=
sg
:
GetFirst
()
local
sc
=
sg
:
GetFirst
()
local
mg
=
rc
:
GetOverlayGroup
()
local
mg
=
rc
:
GetOverlayGroup
()
...
@@ -81,7 +82,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -81,7 +82,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
VgF
.
Call
(
sc
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
VgF
.
Call
(
sc
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
elseif
sel
==
0
or
(
sel
==
1
and
a
and
b
)
then
elseif
sel
==
0
or
(
sel
==
1
and
a
and
b
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
RIDEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
CALL
)
local
sg
=
rg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
rg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sc
=
sg
:
GetFirst
()
local
sc
=
sg
:
GetFirst
()
local
mg
=
rc
:
GetOverlayGroup
()
local
mg
=
rc
:
GetOverlayGroup
()
...
@@ -117,7 +118,7 @@ end
...
@@ -117,7 +118,7 @@ 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
(
VgD
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
+
LOCATION_DECK
,
0
,
nil
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
VgD
.
RideZeroFilter
,
tp
,
LOCATION_RIDE
+
LOCATION_DECK
,
0
,
nil
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
RIDEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
CALL
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
end
end
VgF
.
Call
(
g
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
VgF
.
Call
(
g
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
...
@@ -168,14 +169,12 @@ end
...
@@ -168,14 +169,12 @@ end
function
VgD
.
MonsterBattle
(
c
)
function
VgD
.
MonsterBattle
(
c
)
--攻击转守备
--攻击转守备
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_POSITION
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetOperation
(
VgD
.
MonsterPosDefenseOperation
)
e1
:
SetOperation
(
VgD
.
MonsterPosDefenseOperation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--回合开始转攻
--回合开始转攻
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_POSITION
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PREDRAW
)
e2
:
SetCode
(
EVENT_PREDRAW
)
e2
:
SetRange
(
LOCATION_ONFIELD
)
e2
:
SetRange
(
LOCATION_ONFIELD
)
...
@@ -202,7 +201,7 @@ function VgD.MonsterBattle(c)
...
@@ -202,7 +201,7 @@ function VgD.MonsterBattle(c)
--多次判定
--多次判定
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetCode
(
EVENT_CUSTOM
+
Trigger
)
e5
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGER
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
VgD
.
MonsterNextTrigger
)
e5
:
SetCondition
(
VgD
.
MonsterNextTrigger
)
e5
:
SetOperation
(
VgD
.
TriggerCard
)
e5
:
SetOperation
(
VgD
.
TriggerCard
)
...
@@ -264,7 +263,7 @@ end
...
@@ -264,7 +263,7 @@ end
function
VgD
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
Duel
.
MoveToField
(
tg
:
GetFirst
(),
tp
,
tp
,
LOCATION_TRIGGER
,
POS_FACEUP
,
true
)
Duel
.
Sendto
(
tg
:
GetFirst
(),
REASON_TRIGGER
,
LOCATION_TRIGGER
,
POS_FACEUP
)
end
end
function
VgD
.
MonsterPosDefenseOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
MonsterPosDefenseOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -290,15 +289,16 @@ function VgD.MonsterBattleDamageCondition(e,tp,eg,ep,ev,re,r,rp)
...
@@ -290,15 +289,16 @@ function VgD.MonsterBattleDamageCondition(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
false
end
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
false
end
return
c
:
GetSequence
()
==
2
and
c
==
Duel
.
GetAttackTarget
()
and
VgF
.
VMonsterFilter
(
c
)
local
atk
=
bc
:
GetAttack
()
local
def
=
c
:
GetAttack
()
return
VgF
.
VMonsterFilter
(
c
)
and
c
==
Duel
.
GetAttackTarget
()
and
atk
>=
def
and
bc
:
GetLeftScale
()
>
0
end
end
function
VgD
.
MonsterBattleDamageOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
MonsterBattleDamageOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
end
local
label
=
bc
:
GetLeftScale
()
-
1
local
atk
=
bc
:
GetAttack
()
bc
:
RegisterFlagEffect
(
DamageTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
local
def
=
c
:
GetAttack
()
VgD
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
atk
>=
def
then
VgD
.
TriggerCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
function
VgD
.
MonsterNextTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
MonsterNextTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -341,12 +341,10 @@ end
...
@@ -341,12 +341,10 @@ end
--判定
--判定
function
VgD
.
CardTrigger
(
c
,
f
)
function
VgD
.
CardTrigger
(
c
,
f
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
--e1:SetCode()
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetRange
(
LOCATION_TRIGGER
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_
)
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
0
))
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
0
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
0
,
f
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
0
,
f
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -360,7 +358,7 @@ function VgD.CardTriggerCondtion(chkcon)
...
@@ -360,7 +358,7 @@ function VgD.CardTriggerCondtion(chkcon)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
cp
=
tp
local
cp
=
tp
if
chkcon
==
0
then
cp
=
1
-
tp
end
if
chkcon
==
0
then
cp
=
1
-
tp
end
return
Duel
.
GetTurnPlayer
()
==
cp
return
Duel
.
GetTurnPlayer
()
==
cp
and
c
:
IsLocation
(
LOCATION_TRIGGER
)
end
end
end
end
function
VgD
.
CardTriggerOperation
(
chkop
,
f
)
function
VgD
.
CardTriggerOperation
(
chkop
,
f
)
...
@@ -406,16 +404,16 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -406,16 +404,16 @@ function VgD.CardTriggerOperation(chkop,f)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
100000000
)
VgF
.
AtkUp
(
c
,
g
,
100000000
)
else
else
Duel
.
Sendto
Damage
(
c
)
Duel
.
Sendto
(
c
,
REASON_TRIGGER
,
LOCATION_DAMAGE
,
POS_FACEUP
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
end
end
local
rc
=
re
:
GetHandler
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
bc
=
rc
:
GetBattleTarget
()
local
bc
=
rc
:
GetBattleTarget
()
local
label
=
bc
:
GetFlagEffectLabel
(
DamageTriggerFlag
)
local
label
=
bc
:
GetFlagEffectLabel
(
DamageTriggerFlag
)
if
not
label
then
return
end
if
not
label
then
return
end
if
label
>
0
then
if
label
>
0
then
label
=
label
-
1
label
=
label
-
1
Duel
.
RaiseEvent
(
c
,
EVENT_CUSTOM
+
Trigger
,
e
,
0
,
tp
,
tp
,
0
)
Duel
.
RaiseEvent
(
c
,
EVENT_CUSTOM
+
EVENT_TRIGGER
,
e
,
0
,
tp
,
tp
,
0
)
bc
:
ResetFlagEffect
(
DamageTriggerFlag
)
bc
:
ResetFlagEffect
(
DamageTriggerFlag
)
bc
:
RegisterFlagEffect
(
DamageTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_DAMAGE_STEP_END
,
0
,
1
,
label
)
bc
:
RegisterFlagEffect
(
DamageTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_DAMAGE_STEP_END
,
0
,
1
,
label
)
elseif
label
==
0
then
elseif
label
==
0
then
...
@@ -423,23 +421,23 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -423,23 +421,23 @@ function VgD.CardTriggerOperation(chkop,f)
end
end
else
else
if
c
:
IsRace
(
TRRIGGER_SUPER
)
then
if
c
:
IsRace
(
TRRIGGER_SUPER
)
then
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Draw
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATKUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
VgF
.
AtkUp
(
c
,
g
,
100000000
)
VgF
.
AtkUp
(
c
,
g
,
100000000
)
if
f
then
f
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
f
then
f
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
else
else
Duel
.
SendtoHand
(
c
,
nil
,
REASON_TRIGGER
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_TRIGGER
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
local
rc
=
re
:
GetHandler
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
label
=
rc
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
local
label
=
rc
:
GetFlagEffectLabel
(
AttackTriggerFlag
)
if
not
label
then
return
end
if
not
label
then
return
end
if
label
>
0
then
if
label
>
0
then
label
=
label
-
1
label
=
label
-
1
Duel
.
RaiseEvent
(
c
,
EVENT_CUSTOM
+
Trigger
,
e
,
0
,
tp
,
tp
,
0
)
Duel
.
RaiseEvent
(
c
,
EVENT_CUSTOM
+
EVENT_TRIGGER
,
e
,
0
,
tp
,
tp
,
0
)
rc
:
ResetFlagEffect
(
AttackTriggerFlag
)
rc
:
ResetFlagEffect
(
AttackTriggerFlag
)
rc
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
rc
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
elseif
label
==
0
then
elseif
label
==
0
then
...
@@ -453,14 +451,14 @@ end
...
@@ -453,14 +451,14 @@ end
function
VgD
.
Rule
(
c
)
function
VgD
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCode
(
EVENT_PHASE
_START
+
PHASE_STANDBY
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
VgD
.
RuelGCondition
)
e1
:
SetCondition
(
VgD
.
RuelGCondition
)
e1
:
SetOperation
(
VgD
.
RuleGOperation
)
e1
:
SetOperation
(
VgD
.
RuleGOperation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_P
RE
DRAW
)
e2
:
SetCode
(
EVENT_P
HASE
+
PHASE_
DRAW
)
e2
:
SetCondition
(
VgD
.
RuelDrawCondition
)
e2
:
SetCondition
(
VgD
.
RuelDrawCondition
)
e2
:
SetOperation
(
VgD
.
RuelDrawOperation
)
e2
:
SetOperation
(
VgD
.
RuelDrawOperation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
...
@@ -575,7 +573,7 @@ function VgD.RuelDrawOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -575,7 +573,7 @@ function VgD.RuelDrawOperation(e,tp,eg,ep,ev,re,r,rp)
end
end
--指令卡cost
--指令卡cost
function
VgD
.
SpellActivate
(
c
,
m
,
con
,
op
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
function
VgD
.
SpellActivate
(
c
,
m
,
op
,
con
,
specialchk
,
num1
,
num2
,
num3
,
num4
,
num5
)
if
not
specialchk
then
specialchk
=
0
end
if
not
specialchk
then
specialchk
=
0
end
if
not
num1
then
num1
=
0
end
if
not
num1
then
num1
=
0
end
if
not
num2
then
num2
=
0
end
if
not
num2
then
num2
=
0
end
...
@@ -586,9 +584,10 @@ function VgD.SpellActivate(c,m,con,op,specialchk,num1,num2,num3,num4,num5)
...
@@ -586,9 +584,10 @@ function VgD.SpellActivate(c,m,con,op,specialchk,num1,num2,num3,num4,num5)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
VgID
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
))
e1
:
SetCost
(
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
))
if
con
then
e1
:
SetCondition
(
con
)
end
if
con
then
e1
:
SetCondition
(
con
)
end
if
op
then
e1
:
SetOperation
(
op
)
end
e1
:
SetOperation
(
VgD
.
SpellOperation
(
op
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
)
function
VgD
.
SpellCost
(
num1
,
num2
,
num3
,
num4
,
num5
)
...
@@ -613,8 +612,8 @@ function VgD.SpellCost(num1,num2,num3,num4,num5)
...
@@ -613,8 +612,8 @@ function VgD.SpellCost(num1,num2,num3,num4,num5)
end
end
local
rc
=
nil
local
rc
=
nil
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX
)
and
Duel
.
IsExistingMatchingCard
(
VgD
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_MIX
)
and
Duel
.
IsExistingMatchingCard
(
VgD
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
)
and
Duel
.
SelectYesNo
(
VgF
.
Stringid
(
VgID
,
6
))
then
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
6
))
then
rc
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
)
rc
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
SpellMixFilter
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
,
c
,
num1
,
num2
,
num3
,
num4
,
num5
)
:
GetFirst
()
end
end
VgD
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
rc
,
num1
,
num2
,
num3
,
num4
,
num5
)
VgD
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
rc
,
num1
,
num2
,
num3
,
num4
,
num5
)
end
end
...
@@ -633,7 +632,8 @@ function VgD.SpellMixFilter(c,mc,num1,num2,num3,num4,num5)
...
@@ -633,7 +632,8 @@ function VgD.SpellMixFilter(c,mc,num1,num2,num3,num4,num5)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
b1
,
b2
,
b3
,
b4
,
b5
=
true
,
true
,
true
,
true
,
true
local
b1
,
b2
,
b3
,
b4
,
b5
=
true
,
true
,
true
,
true
,
true
local
b6
,
b7
=
false
,
false
local
b6
,
b7
=
false
,
false
local
g1
,
g2
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
if
c
.
Vg_DisCard
>
0
then
num1
=
num1
+
c
.
Vg_DisCard
end
if
c
.
Vg_DisCard
>
0
then
num1
=
num1
+
c
.
Vg_DisCard
end
if
c
.
Vg_Counter
>
0
then
num2
=
num2
+
c
.
Vg_Counter
end
if
c
.
Vg_Counter
>
0
then
num2
=
num2
+
c
.
Vg_Counter
end
if
c
.
Vg_OverLay
>
0
then
num3
=
num3
+
c
.
Vg_OverLay
end
if
c
.
Vg_OverLay
>
0
then
num3
=
num3
+
c
.
Vg_OverLay
end
...
@@ -669,6 +669,8 @@ end
...
@@ -669,6 +669,8 @@ end
function
VgD
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
mc
,
num1
,
num2
,
num3
,
num4
,
num5
)
function
VgD
.
SpellCostOp
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
mc
,
num1
,
num2
,
num3
,
num4
,
num5
)
local
mg
=
Group
.
FromCards
(
c
)
local
mg
=
Group
.
FromCards
(
c
)
if
mc
then
if
mc
then
Duel
.
Remove
(
mc
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabelObject
(
mc
)
mg
:
AddCard
(
mc
)
mg
:
AddCard
(
mc
)
if
mc
.
Vg_DisCard
>
0
then
num1
=
num1
+
mc
.
Vg_DisCard
end
if
mc
.
Vg_DisCard
>
0
then
num1
=
num1
+
mc
.
Vg_DisCard
end
if
mc
.
Vg_Counter
>
0
then
num2
=
num2
+
mc
.
Vg_Counter
end
if
mc
.
Vg_Counter
>
0
then
num2
=
num2
+
mc
.
Vg_Counter
end
...
@@ -684,7 +686,7 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
...
@@ -684,7 +686,7 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
end
end
if
num1
>
0
then
if
num1
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num1
,
num1
,
mg
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num1
,
num1
,
mg
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
end
if
num2
>
0
then
if
num2
>
0
then
...
@@ -702,7 +704,17 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
...
@@ -702,7 +704,17 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
end
end
if
num5
>
0
then
if
num5
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DAMAGE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DAMAGE
)
local
g
=
Duel
.
SelectMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num5
,
num5
,
mg
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num5
,
num5
,
mg
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN
)
end
end
end
end
function
VgD
.
SpellOperation
(
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
bool
)
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
mc
=
e
:
GetLabelObject
()
if
bool
or
not
mc
then
return
end
local
te
=
mc
:
GetActivateEffect
()
local
op2
=
te
:
GetOperation
()
if
op2
then
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
true
)
end
end
end
\ No newline at end of file
VgDefinition.Lua
View file @
f29ed288
...
@@ -15,10 +15,11 @@ LOCATION_REMOVED =0x20 --封锁区
...
@@ -15,10 +15,11 @@ LOCATION_REMOVED =0x20 --封锁区
LOCATION_EXTRA
=
0x40
--额外
LOCATION_EXTRA
=
0x40
--额外
LOCATION_OVERLAY
=
0x80
--灵魂
LOCATION_OVERLAY
=
0x80
--灵魂
LOCATION_ONFIELD
=
0x0c
--场上(LOCATION_MZONE+LOCATION_SZONE)
LOCATION_ONFIELD
=
0x0c
--场上(LOCATION_MZONE+LOCATION_SZONE)
LOCATION_SPARE
=
0x110
--备用格子(用于怪物箱等)
LOCATION_EXILE
=
0x400
--除外区
LOCATION_EXILE
=
0x120
--除外区
LOCATION_DAMAGE
=
0x800
--伤害区
LOCATION_DAMAGE
=
0x140
--伤害区
LOCATION_ORDER
=
0x1000
--指令区
LOCATION_ORDER
=
0x180
--指令区
LOCATION_SPARE
=
0x2000
--备用格子(用于怪物箱等)
LOCATION_GZONE
=
0x4000
--G区域
LOCATION_RIDE
=
LOCATION_EXTRA
LOCATION_RIDE
=
LOCATION_EXTRA
LOCATION_DROP
=
LOCATION_GRAVE
LOCATION_DROP
=
LOCATION_GRAVE
LOCATION_LOCK
=
LOCATION_REMOVED
LOCATION_LOCK
=
LOCATION_REMOVED
...
@@ -795,7 +796,7 @@ HINTMSG_DISABLE =573 --请选择要无效的卡
...
@@ -795,7 +796,7 @@ HINTMSG_DISABLE =573 --请选择要无效的卡
HINTMSG_OPERATECARD
=
574
--请选择要操作的卡
HINTMSG_OPERATECARD
=
574
--请选择要操作的卡
HINTMSG_LEAVEONFIELD
=
HINTMSG_RELEASE
--请选择要退场的卡
HINTMSG_LEAVEONFIELD
=
HINTMSG_RELEASE
--请选择要退场的卡
HINTMSG_TODROP
=
HINTMSG_TOGRAVE
--请选择要置入弃牌区的卡
HINTMSG_TODROP
=
HINTMSG_TOGRAVE
--请选择要置入弃牌区的卡
HINTMSG_
RIDEUP
=
HINTMSG_SUMMON
--请选择要骑升
的卡
HINTMSG_
CALL
=
HINTMSG_SUMMON
--请选择要Call到圆阵
的卡
HINTMSG_DAMAGE
=
HINTMSG_SET
--请选择要消耗的费用
HINTMSG_DAMAGE
=
HINTMSG_SET
--请选择要消耗的费用
HINTMSG_ATKUP
=
HINTMSG_FMATERIAL
--请选择力量上升的卡
HINTMSG_ATKUP
=
HINTMSG_FMATERIAL
--请选择力量上升的卡
HINTMSG_CRITICAL_STRIKE
=
HINTMSG_SMATERIAL
--请选择☆值上升的卡
HINTMSG_CRITICAL_STRIKE
=
HINTMSG_SMATERIAL
--请选择☆值上升的卡
...
@@ -882,5 +883,5 @@ AFFECT_CODE_MIX =VgID --魔合成
...
@@ -882,5 +883,5 @@ AFFECT_CODE_MIX =VgID --魔合成
--Counter
--Counter
COUNTER_ENERGE
=
0x1
--能量爆发
COUNTER_ENERGE
=
0x1
--能量爆发
--自定时点
--自定时点
Trigger
=
VgID
--判定时点
EVENT_TRIGGER
=
VgID
--判定时点
ToTrigger
=
VgID
+
1
--触发时点
EVENT_CRITICAL_STRIKE
=
VgID
+
1
--暴击值结算时点
\ No newline at end of file
\ No newline at end of file
c10101015.lua
View file @
f29ed288
...
@@ -4,10 +4,13 @@ function cm.initial_effect(c)
...
@@ -4,10 +4,13 @@ function cm.initial_effect(c)
VgD
.
Rule
(
c
)
VgD
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
VgD
.
RideUp
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
VgD
.
CardTrigger
(
c
,
nil
)
VgD
.
SpellActivate
(
c
,
m
,
nil
,
cm
.
op
)
VgD
.
SpellActivate
(
c
,
m
,
cm
.
op
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DROP
,
0
,
1
,
1
,
nil
)
if
g
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
if
g
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
end
function
cm
.
filter
(
c
)
return
c
:
IsCode
(
10101006
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
c10102015.lua
0 → 100644
View file @
f29ed288
--
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
VgD
.
RideUp
(
c
)
VgD
.
CardTrigger
(
c
,
nil
)
VgD
.
SpellActivate
(
c
,
m
,
nil
,
cm
.
op
,
0
,
1
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment