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
759fd220
Commit
759fd220
authored
Feb 27, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7b894e5f
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
533 additions
and
477 deletions
+533
-477
c10000113.lua
c10000113.lua
+1
-1
c10202001.lua
c10202001.lua
+1
-1
c10202003.lua
c10202003.lua
+1
-1
c10202005.lua
c10202005.lua
+1
-1
c10203005.lua
c10203005.lua
+1
-1
c10400855.lua
c10400855.lua
+2
-2
c10401022.lua
c10401022.lua
+1
-1
c10401031.lua
c10401031.lua
+1
-1
c10401036.lua
c10401036.lua
+1
-1
c10401042.lua
c10401042.lua
+1
-1
c10401049.lua
c10401049.lua
+1
-1
c10401052.lua
c10401052.lua
+1
-1
c10402017.lua
c10402017.lua
+1
-1
c10402018.lua
c10402018.lua
+1
-1
c10501047.lua
c10501047.lua
+1
-1
c10501048.lua
c10501048.lua
+1
-1
c10501049.lua
c10501049.lua
+1
-1
c10501050.lua
c10501050.lua
+1
-1
c10501051.lua
c10501051.lua
+1
-1
c10501118.lua
c10501118.lua
+1
-1
c10800855.lua
c10800855.lua
+2
-2
vgd.lua
vgd.lua
+477
-429
vgdefinition.lua
vgdefinition.lua
+6
-6
vgfuncLib.lua
vgfuncLib.lua
+27
-19
No files found.
c10000113.lua
View file @
759fd220
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10202001.lua
View file @
759fd220
...
@@ -12,7 +12,7 @@ function cm.initial_effect(c)
...
@@ -12,7 +12,7 @@ function cm.initial_effect(c)
if
not
cm
.
global_check
then
if
not
cm
.
global_check
then
cm
.
global_check
=
true
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
ge1
:
SetCode
(
EVENT_MOVE
)
ge1
:
SetCode
(
EVENT_MOVE
)
ge1
:
SetCondition
(
cm
.
checkcon
)
ge1
:
SetCondition
(
cm
.
checkcon
)
ge1
:
SetOperation
(
cm
.
checkop
)
ge1
:
SetOperation
(
cm
.
checkop
)
...
...
c10202003.lua
View file @
759fd220
...
@@ -21,7 +21,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,7 +21,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local
e2
=
vgf
.
AtkUp
(
c
,
c
,
5000
)
local
e2
=
vgf
.
AtkUp
(
c
,
c
,
5000
)
vgf
.
effect
.
Reset
(
c
,
e2
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e2
,
EVENT_BATTLED
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetRange
(
LOCATION_CIRCLE
)
e1
:
SetRange
(
LOCATION_CIRCLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
...
...
c10202005.lua
View file @
759fd220
...
@@ -11,7 +11,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -11,7 +11,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local
e2
=
vgf
.
AtkUp
(
c
,
c
,
10000
)
local
e2
=
vgf
.
AtkUp
(
c
,
c
,
10000
)
vgf
.
effect
.
Reset
(
c
,
e2
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e2
,
EVENT_BATTLED
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetRange
(
LOCATION_CIRCLE
)
e1
:
SetRange
(
LOCATION_CIRCLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
...
...
c10203005.lua
View file @
759fd220
...
@@ -6,7 +6,7 @@ function cm.initial_effect(c)
...
@@ -6,7 +6,7 @@ function cm.initial_effect(c)
if
not
cm
.
global_check
then
if
not
cm
.
global_check
then
cm
.
global_check
=
true
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetCondition
(
cm
.
checkcon
)
ge1
:
SetCondition
(
cm
.
checkcon
)
ge1
:
SetOperation
(
cm
.
checkop
)
ge1
:
SetOperation
(
cm
.
checkop
)
...
...
c10400855.lua
View file @
759fd220
...
@@ -3,14 +3,14 @@ local cm,m,o=GetID()
...
@@ -3,14 +3,14 @@ local cm,m,o=GetID()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgd
.
Rule
(
c
)
vgd
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCondition
(
cm
.
con1
)
e1
:
SetCondition
(
cm
.
con1
)
e1
:
SetOperation
(
cm
.
op
)
e1
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_CREST
)
e2
:
SetRange
(
LOCATION_CREST
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
...
...
c10401022.lua
View file @
759fd220
...
@@ -6,7 +6,7 @@ end
...
@@ -6,7 +6,7 @@ end
function
cm
.
operation
(
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
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetOperation
(
cm
.
op
)
e1
:
SetOperation
(
cm
.
op
)
...
...
c10401031.lua
View file @
759fd220
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10401036.lua
View file @
759fd220
...
@@ -19,7 +19,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -19,7 +19,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10401042.lua
View file @
759fd220
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10401049.lua
View file @
759fd220
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10401052.lua
View file @
759fd220
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -20,7 +20,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10402017.lua
View file @
759fd220
...
@@ -24,7 +24,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -24,7 +24,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
m
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
m
)
end
end
end
end
function
cm
.
con1
(
e
)
function
cm
.
con1
(
e
)
...
...
c10402018.lua
View file @
759fd220
...
@@ -13,7 +13,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -13,7 +13,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf
.
AtkUp
(
c
,
c
,
15000
)
vgf
.
AtkUp
(
c
,
c
,
15000
)
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
cm
.
op2
)
e1
:
SetOperation
(
cm
.
op2
)
...
...
c10501047.lua
View file @
759fd220
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10501048.lua
View file @
759fd220
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10501049.lua
View file @
759fd220
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10501050.lua
View file @
759fd220
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10501051.lua
View file @
759fd220
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,7 +21,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
filter
.
IsV
(
tc
)
then
elseif
vgf
.
filter
.
IsV
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_
DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tc
:
RegisterFlagEffect
(
FLAG_
SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
...
...
c10501118.lua
View file @
759fd220
...
@@ -24,7 +24,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -24,7 +24,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
c
,
e1
,
EVENT_BATTLED
)
end
end
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e4
:
SetCode
(
EFFECT_SEND_REPLACE
)
e4
:
SetCode
(
EFFECT_SEND_REPLACE
)
e4
:
SetTarget
(
cm
.
reptg
)
e4
:
SetTarget
(
cm
.
reptg
)
e4
:
SetValue
(
cm
.
repval
)
e4
:
SetValue
(
cm
.
repval
)
...
...
c10800855.lua
View file @
759fd220
...
@@ -3,14 +3,14 @@ local cm,m,o=GetID()
...
@@ -3,14 +3,14 @@ local cm,m,o=GetID()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgd
.
Rule
(
c
)
vgd
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCondition
(
cm
.
con1
)
e1
:
SetCondition
(
cm
.
con1
)
e1
:
SetOperation
(
cm
.
op1
)
e1
:
SetOperation
(
cm
.
op1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_CREST
)
e2
:
SetRange
(
LOCATION_CREST
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
...
...
vgd.lua
View file @
759fd220
--VgD库
--VgD库
VgD
=
{}
VgD
=
{}
vgd
,
vgf
=
VgD
,
VgF
vgd
=
VgD
--
VgD
.
Register
=
{}
---初始化卡片,使卡片具有基本的功能。
---@param c Card 要初始化的卡
function
VgD
.
PreloadUds
()
function
vgd
.
VgCard
(
c
)
VgD
.
Register
.
VgCard
()
VgD
.
Rule
(
c
)
VgD
.
Ride
(
c
)
VgD
.
CardTrigger
(
c
)
if
c
:
IsType
(
TYPE_UNIT
)
then
VgD
.
CallToR
(
c
)
VgD
.
MonsterBattle
(
c
)
end
end
end
---使卡片遵守VG的规则,已包含在 vgd.VgCard(c) 内
VgD
.
Register
.
CardList
=
{}
---@param c Card 要注册规则的卡
---初始化卡片,使卡片具有基本的功能。
function
VgD
.
Rule
(
c
)
function
VgD
.
Register
.
VgCard
()
local
e1
=
Effect
.
CreateEffect
(
c
)
VgD
.
Register
.
Rule
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
VgD
.
Register
.
Ride
()
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_DRAW
)
VgD
.
Register
.
MonsterBattle
()
e1
:
SetRange
(
LOCATION_ALL
)
local
e
=
Effect
.
GlobalEffect
()
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCountLimit
(
1
,
VgID
+
2
)
e
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
SetCode
(
EVENT_ADJUST
)
return
VgF
.
Condition
.
FirstTurn
(
e
)
and
VgF
.
Condition
.
FirstCard
(
e
)
e
:
SetOperation
(
function
()
end
)
for
c
in
VgF
.
Next
(
Duel
.
GetFieldGroup
(
0
,
LOCATION_ALL
,
LOCATION_ALL
))
do
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
table
.
indexOf
(
VgD
.
Register
.
CardList
,
c
)
>
0
then
goto
continue
end
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
VgD
.
Register
.
CardTrigger
(
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
VgD
.
Register
.
MonsterBattle
(
c
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
):
Select
(
tp
,
0
,
ct
,
nil
)
if
c
:
IsType
(
TYPE_UNIT
)
then
if
g
:
GetCount
()
>
0
then
VgD
.
Register
.
CallToR
(
c
)
ct
=
Duel
.
SendtoDeck
(
g
,
tp
,
1
,
REASON_PHASEDRAW
)
end
Duel
.
Draw
(
tp
,
ct
,
REASON_PHASEDRAW
)
table.insert
(
VgD
.
Register
.
CardList
,
c
)
Duel
.
ShuffleDeck
(
tp
)
::
continue
::
end
if
Duel
.
GetTurnPlayer
()
==
tp
then
Duel
.
Draw
(
tp
,
1
,
REASON_PHASEDRAW
)
end
end
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
e2
:
SetCode
(
EVENT_BATTLED
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetRange
(
LOCATION_ALL
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
if
tc
:
GetFlagEffect
(
FLAG_SUPPORT
)
>
0
then
tc
:
ResetFlagEffect
(
FLAG_SUPPORT
)
end
if
tc
:
GetFlagEffect
(
FLAG_SUPPORTED
)
>
0
then
tc
:
ResetFlagEffect
(
FLAG_SUPPORTED
)
end
if
tc
:
GetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
>
0
then
tc
:
ResetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
end
if
tc
:
GetFlagEffect
(
FLAG_ATTACK_TRIGGER
)
>
0
then
tc
:
ResetFlagEffect
(
FLAG_ATTACK_TRIGGER
)
end
if
tc
:
GetFlagEffect
(
FLAG_DAMAGE_TRIGGER
)
>
0
then
tc
:
ResetFlagEffect
(
FLAG_DAMAGE_TRIGGER
)
end
end
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
e3
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetRange
(
LOCATION_ALL
)
e3
:
SetCountLimit
(
1
,
VgID
+
3
)
e3
:
SetCondition
(
VgF
.
Condition
.
FirstCard
)
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
if
Duel
.
GetTurnPlayer
()
==
tp
then
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
EVENT_RIDE_START
,
e
,
0
,
tp
,
tp
,
0
)
end
end
end
)
end
)
c
:
RegisterEffect
(
e3
)
Duel
.
RegisterEffect
(
e
,
0
)
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetType
(
EFFECT_TYPE_FIELD
)
e10
:
SetCode
(
EFFECT_HAND_LIMIT
)
e10
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e10
:
SetRange
(
LOCATION_ALL
)
e10
:
SetTargetRange
(
1
,
0
)
e10
:
SetValue
(
100
)
e10
:
SetCondition
(
VgF
.
Condition
.
FirstCard
)
c
:
RegisterEffect
(
e10
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
e11
:
SetCode
(
EVENT_ADJUST
)
e11
:
SetRange
(
LOCATION_ALL
)
e11
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e11
:
SetCondition
(
VgF
.
Condition
.
FirstCard
)
e11
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetCurrentChain
()
>
0
then
return
end
local
g1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
g2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
if
g1
==
0
and
g2
==
0
then
Duel
.
Win
(
PLAYER_NONE
,
0x2
)
elseif
g1
==
0
then
Duel
.
Win
(
1
-
tp
,
0x2
)
elseif
g2
==
0
then
Duel
.
Win
(
tp
,
0x2
)
end
end
)
c
:
RegisterEffect
(
e11
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetCode
(
EFFECT_SKIP_M2
)
e12
:
SetRange
(
LOCATION_ALL
)
e12
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e12
:
SetTargetRange
(
1
,
0
)
c
:
RegisterEffect
(
e12
)
local
e13
=
e12
:
Clone
()
e13
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
c
:
RegisterEffect
(
e13
)
local
e14
=
e12
:
Clone
()
e14
:
SetCode
(
EFFECT_CANNOT_MSET
)
c
:
RegisterEffect
(
e14
)
local
e15
=
e12
:
Clone
()
e15
:
SetCode
(
EFFECT_CANNOT_SSET
)
c
:
RegisterEffect
(
e15
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
)
e16
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e16
:
SetRange
(
LOCATION_ALL
)
e16
:
SetCondition
(
VgF
.
Condition
.
FirstCard
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e16
)
end
end
---使卡片具有骑升的功能,已包含在 vgd.VgCard(c) 内
---使卡片遵守VG的规则,已包含在 vgd.VgCard 内
---@param c Card 要注册骑升功能的卡
function
VgD
.
Register
.
Rule
()
function
VgD
.
Ride
(
c
)
--回合开始时选择把卡放回卡组并重新抽卡
local
e1
=
Effect
.
CreateEffect
(
c
)
if
true
then
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
local
e
=
Effect
.
GlobalEffect
()
e1
:
SetCode
(
EVENT_PREDRAW
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCountLimit
(
1
,
VgID
)
e
:
SetCode
(
EVENT_PHASE
+
PHASE_DRAW
)
e1
:
SetRange
(
LOCATION_ALL
)
e
:
SetCountLimit
(
1
,
VgID
+
2
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e
:
SetCondition
(
VgF
.
Condition
.
FirstTurn
)
e1
:
SetCondition
(
VgD
.
RideCondition_lv0
)
e
:
SetOperation
(
function
()
e1
:
SetOperation
(
VgD
.
RideOperation_lv0
)
for
tp
=
0
,
1
do
c
:
RegisterEffect
(
e1
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
local
e2
=
Effect
.
CreateEffect
(
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
):
Select
(
tp
,
0
,
ct
,
nil
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
if
g
:
GetCount
()
>
0
then
e2
:
SetRange
(
LOCATION_ALL
)
ct
=
Duel
.
SendtoDeck
(
g
,
tp
,
SEQ_DECKBOTTOM
,
REASON_PHASEDRAW
)
e2
:
SetCountLimit
(
1
,
VgID
+
1
)
if
Duel
.
GetTurnPlayer
()
==
tp
then
ct
=
ct
+
1
end
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
Duel
.
Draw
(
tp
,
ct
,
REASON_PHASEDRAW
)
e2
:
SetCondition
(
VgD
.
RideCondition
)
Duel
.
ShuffleDeck
(
tp
)
e2
:
SetOperation
(
VgD
.
RideOperation
)
end
c
:
RegisterEffect
(
e2
)
end
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
--触发骑升时点
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e
:
SetCountLimit
(
1
,
VgID
+
3
)
e
:
SetOperation
(
function
()
local
tp
=
Duel
.
GetTurnPlayer
()
Duel
.
RaiseEvent
(
VgF
.
GetVMonster
(
tp
),
EVENT_CUSTOM
+
EVENT_RIDE_START
,
e
,
0
,
tp
,
tp
,
0
)
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
--设置不会弃牌
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_HAND_LIMIT
)
e
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
:
SetTargetRange
(
1
,
1
)
e
:
SetValue
(
MAX_ID
)
Duel
.
RegisterEffect
(
e
,
0
)
end
--vg胜利规则
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e
:
SetCode
(
EVENT_ADJUST
)
e
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e
:
SetOperation
(
function
()
local
tp
=
0
if
Duel
.
GetCurrentChain
()
>
0
then
return
end
local
g1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
g2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
if
g1
==
0
and
g2
==
0
then
Duel
.
Win
(
PLAYER_NONE
,
0x2
)
elseif
g1
==
0
then
Duel
.
Win
(
1
-
tp
,
0x2
)
elseif
g2
==
0
then
Duel
.
Win
(
tp
,
0x2
)
end
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
--跳过主二
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_SKIP_M2
)
e
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
:
SetTargetRange
(
1
,
1
)
Duel
.
RegisterEffect
(
e
,
0
)
end
--不能通常召唤、盖放
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
:
SetTargetRange
(
1
,
1
)
Duel
.
RegisterEffect
(
e
,
0
)
local
e1
=
e
:
Clone
()
e1
:
SetCode
(
EFFECT_CANNOT_MSET
)
Duel
.
RegisterEffect
(
e1
,
0
)
local
e2
=
e
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
Duel
.
RegisterEffect
(
e2
,
0
)
end
--闪现指令的发动
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e
:
SetTargetRange
(
LOCATION_HAND
,
LOCATION_HAND
)
Duel
.
RegisterEffect
(
e
,
0
)
end
end
---使卡片具有骑升的功能,已包含在 vgd.VgCard 内
function
VgD
.
Register
.
Ride
()
--游戏开始时从ride卡组将等级0的卡放到场上
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e
:
SetCode
(
EVENT_PREDRAW
)
e
:
SetCountLimit
(
1
,
VgID
)
e
:
SetCondition
(
VgF
.
Condition
.
FirstTurn
)
e
:
SetOperation
(
function
()
for
tp
=
0
,
1
do
if
VgF
.
GetVMonster
(
tp
)
then
goto
continue
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsLevel
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
0
)
if
g
:
GetCount
()
>
0
then
VgF
.
Sendto
(
LOCATION_CIRCLE
,
g
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
end
::
continue
::
end
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e
:
SetCountLimit
(
1
,
VgID
+
1
)
e
:
SetCondition
(
VgD
.
RideCondition
)
e
:
SetOperation
(
VgD
.
RideOperation
)
Duel
.
RegisterEffect
(
e
,
0
)
end
end
end
function
VgD
.
RideMaterialCheck
(
c
,
rc
)
function
VgD
.
RideMaterialCheck
(
c
,
rc
)
if
VgF
.
GetValueType
(
c
.
ride_material_code_chk
)
==
"nil"
and
VgF
.
GetValueType
(
c
.
ride_material_setcard_chk
)
==
"nil"
then
return
true
end
if
VgF
.
GetValueType
(
c
.
ride_material_code_chk
)
==
"nil"
and
VgF
.
GetValueType
(
c
.
ride_material_setcard_chk
)
==
"nil"
then
return
true
end
...
@@ -202,19 +229,18 @@ end
...
@@ -202,19 +229,18 @@ end
function
VgD
.
RideFilter2
(
c
,
lv
,
code
,
rc
)
function
VgD
.
RideFilter2
(
c
,
lv
,
code
,
rc
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_UNIT
)
and
c
:
IsCode
(
code
)
and
rc
:
IsSkill
(
SKILL_PERSONA_RIDE
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsType
(
TYPE_UNIT
)
and
c
:
IsCode
(
code
)
and
rc
:
IsSkill
(
SKILL_PERSONA_RIDE
)
end
end
function
VgD
.
RideCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
RideCondition
()
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
filter
.
IsV
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
):
GetFirst
()
local
tp
=
Duel
.
GetTurnPlayer
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
Filter
.
IsV
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
):
GetFirst
()
if
not
rc
then
return
false
end
if
not
rc
then
return
false
end
local
lv
=
rc
:
GetLevel
()
local
lv
=
rc
:
GetLevel
()
local
code
=
rc
:
GetCode
()
local
code
=
rc
:
GetCode
()
local
rg1
=
Duel
.
GetMatchingGroup
(
VgD
.
RideFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
lv
,
code
,
rc
)
local
rg1
=
Duel
.
GetMatchingGroup
(
VgD
.
RideFilter1
,
tp
,
LOCATION_HAND
+
LOCATION_RIDE
,
0
,
nil
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
lv
,
code
,
rc
)
local
rg2
=
Duel
.
GetMatchingGroup
(
VgD
.
RideFilter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
lv
,
code
,
rc
)
local
a
=
rg1
:
GetCount
()
>
0
return
rg1
:
GetCount
()
>
0
or
rg2
:
GetCount
()
>
0
local
b
=
rg2
:
GetCount
()
>
0
return
Duel
.
GetTurnPlayer
()
==
tp
and
VgF
.
Condition
.
FirstCard
(
e
)
and
(
a
or
b
)
end
end
function
VgD
.
RideOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
RideOperation
()
local
c
=
e
:
GetHandl
er
()
local
tp
=
Duel
.
GetTurnPlay
er
()
local
rc
=
VgF
.
GetVMonster
(
tp
)
local
rc
=
VgF
.
GetVMonster
(
tp
)
if
not
rc
then
return
end
if
not
rc
then
return
end
local
lv
=
rc
:
GetLevel
()
local
lv
=
rc
:
GetLevel
()
...
@@ -241,7 +267,8 @@ function VgD.RideOperation(e, tp, eg, ep, ev, re, r, rp)
...
@@ -241,7 +267,8 @@ function VgD.RideOperation(e, tp, eg, ep, ev, re, r, rp)
local
sc
=
sg
:
GetFirst
()
local
sc
=
sg
:
GetFirst
()
if
sc
:
IsLocation
(
LOCATION_RIDE
)
then
if
sc
:
IsLocation
(
LOCATION_RIDE
)
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_OVERLAY_INSTEAD_WHEN_RIDE
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
14
))
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_OVERLAY_INSTEAD_WHEN_RIDE
)
and
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
14
))
then
vgf
.
cost
.
SoulBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
local
e
,
eg
,
ep
,
ev
,
re
,
r
,
rp
VgF
.
Cost
.
SoulBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
DisCardRideFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
lv
,
code
,
rc
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
VgD
.
DisCardRideFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
lv
,
code
,
rc
)
...
@@ -271,41 +298,24 @@ function VgD.RideOperation(e, tp, eg, ep, ev, re, r, rp)
...
@@ -271,41 +298,24 @@ function VgD.RideOperation(e, tp, eg, ep, ev, re, r, rp)
VgF
.
Sendto
(
LOCATION_SOUL
,
Group
.
FromCards
(
rc
),
sc
)
VgF
.
Sendto
(
LOCATION_SOUL
,
Group
.
FromCards
(
rc
),
sc
)
VgF
.
Sendto
(
LOCATION_CIRCLE
,
sc
,
SUMMON_TYPE_SELFRIDE
,
tp
,
0x20
)
VgF
.
Sendto
(
LOCATION_CIRCLE
,
sc
,
SUMMON_TYPE_SELFRIDE
,
tp
,
0x20
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
s
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetTargetRange
(
LOCATION_CIRCLE
,
0
)
e1
:
SetTargetRange
(
LOCATION_CIRCLE
,
0
)
e1
:
SetValue
(
10000
)
e1
:
SetValue
(
10000
)
e1
:
SetTarget
(
function
(
te
,
tc
)
e1
:
SetTarget
(
function
(
te
,
tc
)
return
vgf
.
f
ilter
.
Front
(
tc
)
return
VgF
.
F
ilter
.
Front
(
tc
)
end
)
end
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
VgD
.
RideCondition_lv0
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
Register
.
CardTrigger
(
c
)
local
rc
=
Duel
.
GetMatchingGroup
(
vgf
.
filter
.
IsV
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
):
GetFirst
()
if
rc
then
return
false
end
local
ct
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsLevel
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
0
)
return
VgF
.
Condition
.
FirstTurn
(
e
)
and
ct
>
0
and
VgF
.
Condition
.
FirstCard
(
e
)
end
function
VgD
.
RideOperation_lv0
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsLevel
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
0
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
end
VgF
.
Sendto
(
LOCATION_CIRCLE
,
g
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
end
---使卡片具有触发卡的功能,已包含在 vgd.VgCard(c) 内
---@param c Card 要注册触发功能的卡
function
VgD
.
CardTrigger
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_CANNOT_DISABLE
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
'Damage'
))
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
'Damage'
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
'Damage'
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
'Damage'
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -334,6 +344,8 @@ end
...
@@ -334,6 +344,8 @@ end
function
VgD
.
CardTriggerOperation
(
chkop
)
function
VgD
.
CardTriggerOperation
(
chkop
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
_
,
m
=
c
:
GetOriginalCode
()
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
if
c
:
IsTrigger
(
TRIGGER_CRITICAL_STRIKE
)
then
if
c
:
IsTrigger
(
TRIGGER_CRITICAL_STRIKE
)
then
local
g1
=
VgF
.
SelectMatchingCard
(
HINTMSG_CRITICAL_STRIKE
,
e
,
tp
,
nil
,
tp
,
LOCATION_CIRCLE
,
0
,
1
,
1
,
nil
)
local
g1
=
VgF
.
SelectMatchingCard
(
HINTMSG_CRITICAL_STRIKE
,
e
,
tp
,
nil
,
tp
,
LOCATION_CIRCLE
,
0
,
1
,
1
,
nil
)
local
star_up
=
c
.
trigger_star_up
or
1
local
star_up
=
c
.
trigger_star_up
or
1
...
@@ -390,7 +402,7 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -390,7 +402,7 @@ function VgD.CardTriggerOperation(chkop)
if
c
:
IsTrigger
(
TRIGGER_SUPER
)
then
if
c
:
IsTrigger
(
TRIGGER_SUPER
)
then
local
ops
=
{}
local
ops
=
{}
local
sel
=
{}
local
sel
=
{}
if
c
:
Is
RelateToEffect
(
e
)
then
if
c
:
Is
Location
(
LOCATION_TRIGGER
)
then
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
3
))
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
3
))
table.insert
(
sel
,
function
()
table.insert
(
sel
,
function
()
VgF
.
Sendto
(
LOCATION_REMOVED
,
c
,
REASON_TRIGGER
)
VgF
.
Sendto
(
LOCATION_REMOVED
,
c
,
REASON_TRIGGER
)
...
@@ -417,10 +429,10 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -417,10 +429,10 @@ function VgD.CardTriggerOperation(chkop)
VgF
.
AtkUp
(
c
,
g
,
atk_up
,
nil
)
VgF
.
AtkUp
(
c
,
g
,
atk_up
,
nil
)
end
)
end
)
end
end
if
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
if
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
5
))
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
5
))
table.insert
(
sel
,
function
()
table.insert
(
sel
,
function
()
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
)
end
)
end
end
while
#
ops
>
0
do
while
#
ops
>
0
do
...
@@ -430,8 +442,8 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -430,8 +442,8 @@ function VgD.CardTriggerOperation(chkop)
table.remove
(
sel
,
i
)
table.remove
(
sel
,
i
)
end
end
else
else
if
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
if
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
if
c
:
Is
RelateToEffect
(
e
)
then
if
c
:
Is
Location
(
LOCATION_TRIGGER
)
then
VgF
.
Sendto
(
LOCATION_DAMAGE
,
c
,
tp
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
VgF
.
Sendto
(
LOCATION_DAMAGE
,
c
,
tp
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
end
end
...
@@ -452,7 +464,7 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -452,7 +464,7 @@ function VgD.CardTriggerOperation(chkop)
if
c
:
IsTrigger
(
TRIGGER_SUPER
)
then
if
c
:
IsTrigger
(
TRIGGER_SUPER
)
then
local
ops
=
{}
local
ops
=
{}
local
sel
=
{}
local
sel
=
{}
if
c
:
Is
RelateToEffect
(
e
)
then
if
c
:
Is
Location
(
LOCATION_TRIGGER
)
then
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
3
))
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
3
))
table.insert
(
sel
,
function
()
table.insert
(
sel
,
function
()
VgF
.
Sendto
(
LOCATION_REMOVED
,
c
,
REASON_TRIGGER
)
VgF
.
Sendto
(
LOCATION_REMOVED
,
c
,
REASON_TRIGGER
)
...
@@ -479,10 +491,10 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -479,10 +491,10 @@ function VgD.CardTriggerOperation(chkop)
VgF
.
AtkUp
(
c
,
g
,
atk_up
,
nil
)
VgF
.
AtkUp
(
c
,
g
,
atk_up
,
nil
)
end
)
end
)
end
end
if
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
if
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
6
))
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
6
))
table.insert
(
sel
,
function
()
table.insert
(
sel
,
function
()
return
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
return
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
)
end
)
end
end
while
#
ops
>
0
do
while
#
ops
>
0
do
...
@@ -492,8 +504,8 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -492,8 +504,8 @@ function VgD.CardTriggerOperation(chkop)
table.remove
(
sel
,
i
)
table.remove
(
sel
,
i
)
end
end
else
else
if
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
if
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
if
c
:
Is
RelateToEffect
(
e
)
then
VgF
.
Sendto
(
LOCATION_HAND
,
c
,
nil
,
REASON_TRIGGER
)
end
if
c
:
Is
Location
(
LOCATION_TRIGGER
)
then
VgF
.
Sendto
(
LOCATION_HAND
,
c
,
nil
,
REASON_TRIGGER
)
end
end
end
local
bc
=
Duel
.
GetAttacker
()
local
bc
=
Duel
.
GetAttacker
()
local
label
=
bc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
local
label
=
bc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
...
@@ -510,7 +522,7 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -510,7 +522,7 @@ function VgD.CardTriggerOperation(chkop)
if
c
:
IsTrigger
(
TRIGGER_SUPER
)
then
if
c
:
IsTrigger
(
TRIGGER_SUPER
)
then
local
ops
=
{}
local
ops
=
{}
local
sel
=
{}
local
sel
=
{}
if
c
:
Is
RelateToEffect
(
e
)
then
if
c
:
Is
Location
(
LOCATION_TRIGGER
)
then
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
3
))
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
3
))
table.insert
(
sel
,
function
()
table.insert
(
sel
,
function
()
VgF
.
Sendto
(
LOCATION_REMOVED
,
c
,
REASON_TRIGGER
)
VgF
.
Sendto
(
LOCATION_REMOVED
,
c
,
REASON_TRIGGER
)
...
@@ -537,10 +549,10 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -537,10 +549,10 @@ function VgD.CardTriggerOperation(chkop)
VgF
.
AtkUp
(
c
,
g
,
atk_up
,
nil
)
VgF
.
AtkUp
(
c
,
g
,
atk_up
,
nil
)
end
)
end
)
end
end
if
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
if
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
5
))
table.insert
(
ops
,
VgF
.
Stringid
(
VgID
+
5
,
5
))
table.insert
(
sel
,
function
()
table.insert
(
sel
,
function
()
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
)
end
)
end
end
while
#
ops
>
0
do
while
#
ops
>
0
do
...
@@ -550,8 +562,8 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -550,8 +562,8 @@ function VgD.CardTriggerOperation(chkop)
table.remove
(
sel
,
i
)
table.remove
(
sel
,
i
)
end
end
else
else
if
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
if
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
0
)
then
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
1
)
end
if
c
:
Is
RelateToEffect
(
e
)
then
if
c
:
Is
Location
(
LOCATION_TRIGGER
)
then
VgF
.
Sendto
(
LOCATION_DAMAGE
,
c
,
tp
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
VgF
.
Sendto
(
LOCATION_DAMAGE
,
c
,
tp
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
1
,
REASON_EFFECT
)
end
end
...
@@ -574,7 +586,7 @@ function VgD.CardTriggerOperation(chkop)
...
@@ -574,7 +586,7 @@ function VgD.CardTriggerOperation(chkop)
end
end
end
end
function
VgD
.
OperationWhenCardTrigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
chk
)
function
VgD
.
ActiviteAdditionalEffect
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
chk
)
local
additional_effect
=
c
.
additional_effect
local
additional_effect
=
c
.
additional_effect
if
not
additional_effect
or
#
additional_effect
==
0
then
return
end
if
not
additional_effect
or
#
additional_effect
==
0
then
return
end
if
VgF
.
GetValueType
(
additional_effect
[
'chk'
])
==
"boolean"
then
if
VgF
.
GetValueType
(
additional_effect
[
'chk'
])
==
"boolean"
then
...
@@ -592,9 +604,6 @@ function VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, chk)
...
@@ -592,9 +604,6 @@ function VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, chk)
local
activate_chk
=
true
local
activate_chk
=
true
if
type
(
additional_effect
[
'cost'
])
==
"function"
then
activate_chk
=
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
15
))
end
if
type
(
additional_effect
[
'cost'
])
==
"function"
then
activate_chk
=
Duel
.
SelectYesNo
(
tp
,
VgF
.
Stringid
(
VgID
,
15
))
end
if
activate_chk
then
if
activate_chk
then
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
local
_
,
m
=
c
:
GetOriginalCode
()
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
if
type
(
additional_effect
[
'cost'
])
==
"function"
then
additional_effect
[
'cost'
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
type
(
additional_effect
[
'cost'
])
==
"function"
then
additional_effect
[
'cost'
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
type
(
additional_effect
[
'tg'
])
==
"function"
then
additional_effect
[
'tg'
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
type
(
additional_effect
[
'tg'
])
==
"function"
then
additional_effect
[
'tg'
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
additional_effect
[
'op'
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
additional_effect
[
'op'
](
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
@@ -603,19 +612,19 @@ function VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, chk)
...
@@ -603,19 +612,19 @@ function VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, chk)
return
false
return
false
end
end
---使卡片具有Call到R位的功能,已包含在 vgd.VgCard
(c)
内
---使卡片具有Call到R位的功能,已包含在 vgd.VgCard 内
---@param c Card 要注册Call到R位功能的卡
---@param c Card 要注册Call到R位功能的卡
function
VgD
.
CallToR
(
c
)
function
VgD
.
Register
.
CallToR
(
c
)
local
e
1
=
Effect
.
CreateEffect
(
c
)
local
e
=
Effect
.
CreateEffect
(
c
)
e
1
:
SetDescription
(
1152
)
e
:
SetDescription
(
1152
)
e
1
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e
1
:
SetRange
(
LOCATION_HAND
)
e
:
SetRange
(
LOCATION_HAND
)
e
1
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e
1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e
1
:
SetCondition
(
VgD
.
CallCondition
)
e
:
SetCondition
(
VgD
.
CallCondition
)
e
1
:
SetOperation
(
VgD
.
CallOperation
)
e
:
SetOperation
(
VgD
.
CallOperation
)
c
:
RegisterEffect
(
e
1
)
c
:
RegisterEffect
(
e
)
end
end
function
VgD
.
CallCondition
(
e
,
c
)
function
VgD
.
CallCondition
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
...
@@ -624,7 +633,7 @@ function VgD.CallCondition(e, c)
...
@@ -624,7 +633,7 @@ function VgD.CallCondition(e, c)
return
VgF
.
Condition
.
Level
(
e
)
return
VgF
.
Condition
.
Level
(
e
)
end
end
function
VgD
.
CallFilter
(
c
,
tp
,
zone
)
function
VgD
.
CallFilter
(
c
,
tp
,
zone
)
return
vgf
.
f
ilter
.
IsR
(
c
)
and
zone
==
VgF
.
SequenceToGlobal
(
tp
,
c
:
GetLocation
(),
c
:
GetSequence
())
return
VgF
.
F
ilter
.
IsR
(
c
)
and
zone
==
VgF
.
SequenceToGlobal
(
tp
,
c
:
GetLocation
(),
c
:
GetSequence
())
end
end
function
VgD
.
CallOperation
(
e
)
function
VgD
.
CallOperation
(
e
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -644,230 +653,269 @@ function VgD.CallOperation(e)
...
@@ -644,230 +653,269 @@ function VgD.CallOperation(e)
e
:
SetValue
(
function
()
return
SUMMON_VALUE_CALL
,
zone
end
)
e
:
SetValue
(
function
()
return
SUMMON_VALUE_CALL
,
zone
end
)
end
end
---使卡片遵守VG的战斗规则,已包含在 vgd.VgCard(c) 内
---使卡片遵守VG的战斗规则,已包含在 vgd.VgCard 内
---@param c Card 要注册战斗规则的卡
function
VgD
.
Register
.
MonsterBattle
(
c
)
function
VgD
.
MonsterBattle
(
c
)
if
not
c
then
--攻击转守备
--横置攻击
local
e1
=
Effect
.
CreateEffect
(
c
)
if
true
then
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_SET
)
if
true
then
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
local
e
=
Effect
.
GlobalEffect
()
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
local
tc
=
e
:
GetHandler
()
e
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
)
e
:
SetOperation
(
function
()
local
label
=
1
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsSkill
(
SKILL_TWINDRIVE
)
then
local
tp
=
tc
:
GetControler
()
label
=
label
+
1
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
)
elseif
tc
:
IsSkill
(
SKILL_TRIPLEDRIVE
)
then
local
e1
=
Effect
.
CreateEffect
(
tc
)
label
=
label
+
2
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_CIRCLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCondition
(
VgF
.
Condition
.
IsV
)
Duel
.
GetAttackTarget
():
RegisterEffect
(
e2
)
vgf
.
effect
.
Reset
(
tc
,{
e1
,
e2
},
EVENT_BATTLED
)
local
label
=
1
if
tc
:
IsSkill
(
SKILL_TWINDRIVE
)
then
label
=
label
+
1
elseif
tc
:
IsSkill
(
SKILL_TRIPLEDRIVE
)
then
label
=
label
+
2
end
tc
:
RegisterFlagEffect
(
FLAG_ATTACK_TRIGGER
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
label
)
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
EVENT_TRIGGER_COUNT_UP
,
e
,
0
,
tp
,
tp
,
0
)
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_DEFENSE_ATTACK
)
e
:
SetTargetRange
(
LOCATION_CIRCLE
,
LOCATION_CIRCLE
)
e
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e
:
SetTargetRange
(
LOCATION_CIRCLE
,
LOCATION_CIRCLE
)
e
:
SetTarget
(
function
(
_
,
c
)
return
c
:
IsPosition
(
POS_DEFENSE
)
or
(
VgF
.
Filter
.
Back
(
c
)
and
c
:
GetFlagEffect
(
FLAG_ATTACK_AT_REAR
)
==
0
)
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e
:
SetTargetRange
(
LOCATION_CIRCLE
,
LOCATION_CIRCLE
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e
:
SetTargetRange
(
LOCATION_CIRCLE
,
LOCATION_CIRCLE
)
e
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e
:
SetTargetRange
(
LOCATION_CIRCLE
,
LOCATION_CIRCLE
)
e
:
SetValue
(
MAX_ID
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e
:
SetTargetRange
(
LOCATION_CIRCLE
,
LOCATION_CIRCLE
)
e
:
SetTarget
(
function
(
_
,
c
)
return
VgF
.
Filter
.
Back
(
c
)
end
)
e
:
SetValue
(
VgF
.
True
)
Duel
.
RegisterEffect
(
e
,
0
)
end
end
end
tc
:
RegisterFlagEffect
(
FLAG_ATTACK_TRIGGER
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
label
)
--回合开始转攻
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
EVENT_TRIGGERCOUNTUP
,
e
,
0
,
tp
,
tp
,
0
)
if
true
then
end
)
local
e
=
Effect
.
GlobalEffect
()
c
:
RegisterEffect
(
e1
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
--回合开始转攻
e
:
SetCode
(
EVENT_PREDRAW
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e
:
SetCountLimit
(
1
,
VgID
+
4
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
e
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetCode
(
EVENT_PREDRAW
)
e
:
SetOperation
(
function
()
e2
:
SetRange
(
LOCATION_ALL
)
local
tp
=
Duel
.
GetTurnPlayer
()
e2
:
SetCountLimit
(
1
,
VgID
+
4
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
,
POS_FACEUP_DEFENSE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
if
g
:
GetCount
()
>
0
then
e2
:
SetCondition
(
VgF
.
Condition
.
FirstCard
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_LINES
,
tp
,
VgF
.
Stringid
(
VgID
,
8
))
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
,
POS_FACEUP_DEFENSE
)
end
if
g
:
GetCount
()
>
0
and
Duel
.
GetTurnPlayer
()
==
tp
then
end
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
Duel
.
RegisterEffect
(
e
,
0
)
Duel
.
Hint
(
HINT_LINES
,
tp
,
VgF
.
Stringid
(
VgID
,
8
))
end
end
end
)
--判定
c
:
RegisterEffect
(
e2
)
if
true
then
--扣血
if
true
then
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e
=
Effect
.
GlobalEffect
()
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BATTLED
)
e
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetRange
(
LOCATION_CIRCLE
)
e
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e
:
SetOperation
(
function
()
e3
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
tc
=
e
:
GetHandler
()
local
atk
=
tc
:
GetAttack
()
local
bc
=
tc
:
GetBattleTarget
()
for
bc
in
VgF
.
Next
(
VgF
.
GetValueType
(
Duel
.
GetAttackTarget
())
==
"Group"
and
Duel
.
GetAttackTarget
()
or
Group
.
FromCards
(
Duel
.
GetAttackTarget
()))
do
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
false
end
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
goto
continue
end
local
atk
=
bc
:
GetAttack
()
local
flag_sentinel_label
=
Duel
.
GetAttackTarget
():
GetFlagEffectLabel
(
FLAG_SENTINEL
)
local
def
=
tc
:
GetAttack
()
if
flag_sentinel_label
and
(
flag_sentinel_label
==
0
or
(
flag_sentinel_label
==
10402017
and
bc
:
IsLevelBelow
(
2
)))
then
goto
continue
end
if
Duel
.
GetAttackTarget
():
GetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
>
0
and
Duel
.
GetAttackTarget
():
GetFlagEffectLabel
(
FLAG_DEFENSE_ENTIRELY
)
==
10402017
and
bc
:
IsLevelBelow
(
2
)
then
return
false
end
local
def
=
tc
:
GetAttack
()
if
Duel
.
GetAttackTarget
():
GetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
>
0
and
Duel
.
GetAttackTarget
():
GetFlagEffectLabel
(
FLAG_DEFENSE_ENTIRELY
)
==
0
then
return
false
end
if
not
VgF
.
Filter
.
IsV
(
tc
)
or
atk
<
def
or
tc
:
GetLeftScale
()
==
0
then
goto
continue
end
return
vgf
.
filter
.
IsV
(
tc
)
and
tc
==
Duel
.
GetAttackTarget
()
and
atk
>=
def
and
bc
:
GetLeftScale
()
>
0
tc
:
RegisterFlagEffect
(
FLAG_DAMAGE_TRIGGER
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
tc
:
GetLeftScale
()
-
1
)
end
)
VgD
.
Trigger
(
bc
:
GetControler
())
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
::
continue
::
local
bc
=
Duel
.
GetAttacker
()
end
local
label
=
bc
:
GetLeftScale
()
-
1
end
)
bc
:
RegisterFlagEffect
(
FLAG_DAMAGE_TRIGGER
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
label
)
Duel
.
RegisterEffect
(
e
,
0
)
VgD
.
Trigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
)
c
:
RegisterEffect
(
e3
)
--攻击判定
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_F
)
e4
:
SetRange
(
LOCATION_CIRCLE
)
e4
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
if
not
vgf
.
filter
.
IsV
(
tc
)
and
tc
:
GetFlagEffect
(
FLAG_ALSO_CAN_TRIGGER
)
==
0
then
return
false
end
return
tc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
and
tc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
>
0
and
Duel
.
GetAttacker
()
==
tc
end
)
e4
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
e
:
GetHandler
()
if
chk
==
0
then
return
tc
:
GetFlagEffect
(
FLAG_COUNT_TRIGGER
)
==
0
end
tc
:
RegisterFlagEffect
(
FLAG_COUNT_TRIGGER
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
end
)
e4
:
SetOperation
(
VgD
.
Trigger
)
c
:
RegisterEffect
(
e4
)
--多次判定
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGER
)
e5
:
SetRange
(
LOCATION_CIRCLE
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
VgF
.
ReturnCard
(
eg
):
GetControler
()
==
tp
and
vgf
.
filter
.
IsV
(
e
:
GetHandler
())
and
Duel
.
GetFlagEffect
(
tp
,
FLAG_EFFECT_DAMAGE
)
==
0
end
)
e5
:
SetOperation
(
VgD
.
Trigger
)
c
:
RegisterEffect
(
e5
)
--支援
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetRange
(
LOCATION_CIRCLE
)
e6
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e6
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
if
not
tc
:
IsSkill
(
SKILL_BOOST
)
or
Duel
.
GetTurnPlayer
()
~=
tp
or
not
VgF
.
GetColumnGroup
(
Duel
.
GetAttacker
()):
IsContains
(
tc
)
then
return
false
end
return
true
end
)
e6
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsPosition
(
POS_FACEUP_ATTACK
)
end
end
)
e6
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
)
tc
:
RegisterFlagEffect
(
FLAG_SUPPORT
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
Duel
.
GetAttacker
():
RegisterFlagEffect
(
FLAG_SUPPORTED
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
EVENT_SUPPORT
,
e
,
0
,
tp
,
tp
,
0
)
end
)
c
:
RegisterEffect
(
e6
)
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e9
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e9
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e9
:
SetRange
(
LOCATION_CIRCLE
)
e9
:
SetValue
(
function
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
local
atk
=
0
if
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
then
local
g
=
Duel
.
GetMatchingGroup
(
function
(
tc
)
return
tc
:
GetFlagEffect
(
FLAG_SUPPORT
)
>
0
end
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
)
for
tc
in
VgF
.
Next
(
g
)
do
atk
=
atk
+
tc
:
GetAttack
()
end
end
return
atk
elseif
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
then
if
true
then
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_G_CIRCLE
,
0
,
nil
)
local
e
=
Effect
.
GlobalEffect
()
for
tc
in
VgF
.
Next
(
g
)
do
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
local
def
=
tc
:
GetDefense
()
e
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
if
def
<
0
then
def
=
0
end
e
:
SetCost
(
function
(
_
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
atk
=
atk
+
def
local
tc
=
Duel
.
GetAttacker
()
if
chk
==
0
then
return
tc
:
GetFlagEffect
(
FLAG_COUNT_TRIGGER
)
==
0
end
tc
:
RegisterFlagEffect
(
FLAG_COUNT_TRIGGER
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
end
)
e
:
SetOperation
(
function
()
local
tc
=
Duel
.
GetAttacker
()
local
tp
=
tc
:
GetControler
()
if
not
tc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
or
tc
:
GetFlagEffectLabel
(
FLAG_ATTACK_TRIGGER
)
==
0
or
(
VgF
.
Filter
.
IsR
(
tc
)
and
tc
:
GetFlagEffect
(
FLAG_ALSO_CAN_TRIGGER
)
==
0
)
then
return
end
VgD
.
Trigger
(
tp
)
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
if
true
then
local
e
=
Effect
.
GlobalEffect
()
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGER
)
e
:
SetOperation
(
function
(
_
,
_
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
VgF
.
ReturnCard
(
eg
)
local
tp
=
tc
:
GetControler
()
VgD
.
Trigger
(
tp
)
end
)
Duel
.
RegisterEffect
(
e
,
0
)
end
end
return
atk
else
return
0
end
end
end
)
c
:
RegisterEffect
(
e9
)
if
true
then
--防御
local
e1
=
Effect
.
GlobalEffect
()
local
e7
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetCategory
(
CATEGORY_DEFENDER
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetTargetRange
(
LOCATION_CIRCLE
,
LOCATION_CIRCLE
)
e7
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetTarget
(
function
(
_
,
tc
)
e7
:
SetRange
(
LOCATION_CIRCLE
+
LOCATION_HAND
)
return
Duel
.
GetAttacker
()
==
tc
e7
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
end
)
e7
:
SetCountLimit
(
1
)
e1
:
SetValue
(
function
()
e7
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
Duel
.
GetAttacker
():
GetControler
()
local
bc
=
Duel
.
GetAttackTarget
()
local
atk
=
0
return
bc
and
bc
:
IsControler
(
tp
)
and
bc
~=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
function
(
tc
)
end
)
return
tc
:
GetFlagEffect
(
FLAG_SUPPORT
)
>
0
e7
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
)
if
chk
==
0
then
return
VgF
.
IsAbleToGCircle
(
e
:
GetHandler
())
end
for
tc
in
VgF
.
Next
(
g
)
do
end
)
atk
=
atk
+
tc
:
GetAttack
()
e7
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
VgF
.
Sendto
(
LOCATION_G_CIRCLE
,
e
:
GetHandler
(),
tp
,
POS_FACEUP
,
REASON_EFFECT
)
return
atk
end
)
end
)
c
:
RegisterEffect
(
e7
)
Duel
.
RegisterEffect
(
e1
,
0
)
local
e8
=
Effect
.
CreateEffect
(
c
)
local
e2
=
e1
:
Clone
()
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_SET
)
e2
:
SetTarget
(
function
(
_
,
tc
)
e8
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
return
Duel
.
GetAttackTarget
()
==
tc
e8
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
end
)
e8
:
SetRange
(
LOCATION_ALL
)
e2
:
SetValue
(
function
()
e8
:
SetCondition
(
VgF
.
Condition
.
FirstCard
)
local
tp
=
Duel
.
GetAttackTarget
():
GetControler
()
e8
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
atk
=
0
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_G_CIRCLE
,
0
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_G_CIRCLE
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
VgF
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_RULE
)
end
for
tc
in
VgF
.
Next
(
g
)
do
end
)
local
def
=
tc
:
GetDefense
()
c
:
RegisterEffect
(
e8
)
if
def
<
0
then
def
=
0
end
--其他永续
atk
=
atk
+
def
local
e10
=
Effect
.
CreateEffect
(
c
)
end
e10
:
SetType
(
EFFECT_TYPE_SINGLE
)
return
atk
e10
:
SetCode
(
EFFECT_DEFENSE_ATTACK
)
end
)
e10
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
Duel
.
RegisterEffect
(
e2
,
0
)
e10
:
SetValue
(
1
)
end
c
:
RegisterEffect
(
e10
)
local
e11
=
Effect
.
CreateEffect
(
c
)
if
true
then
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e
=
Effect
.
GlobalEffect
()
e11
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e11
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e11
:
SetCondition
(
function
(
e
)
e
:
SetOperation
(
function
()
return
e
:
GetHandler
():
IsPosition
(
POS_DEFENSE
)
or
(
vgf
.
filter
.
Back
(
e
:
GetHandler
())
and
e
:
GetHandler
():
GetFlagEffect
(
FLAG_ATTACK_AT_REAR
)
==
0
)
local
g
=
Duel
.
GetFieldGroup
(
0
,
LOCATION_G_CIRCLE
,
LOCATION_G_CIRCLE
)
end
)
if
g
:
GetCount
()
>
0
then
VgF
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_RULE
)
end
c
:
RegisterEffect
(
e11
)
end
)
local
e12
=
Effect
.
CreateEffect
(
c
)
Duel
.
RegisterEffect
(
e
,
0
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e12
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
else
e12
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
--支援
c
:
RegisterEffect
(
e12
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e13
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e13
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetRange
(
LOCATION_CIRCLE
)
e13
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e13
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e13
:
SetValue
(
1
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c
:
RegisterEffect
(
e13
)
local
tc
=
e
:
GetHandler
()
local
e14
=
Effect
.
CreateEffect
(
c
)
if
not
tc
:
IsSkill
(
SKILL_BOOST
)
or
Duel
.
GetTurnPlayer
()
~=
tp
or
not
VgF
.
GetColumnGroup
(
Duel
.
GetAttacker
()):
IsContains
(
tc
)
then
return
false
end
e14
:
SetType
(
EFFECT_TYPE_SINGLE
)
return
true
e14
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
end
)
e14
:
SetRange
(
LOCATION_CIRCLE
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e14
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsPosition
(
POS_FACEUP_ATTACK
)
end
e14
:
SetCondition
(
function
(
e
)
end
)
return
vgf
.
filter
.
IsV
(
e
:
GetHandler
())
or
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
)
local
tc
=
e
:
GetHandler
()
e14
:
SetValue
(
1
)
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
)
c
:
RegisterEffect
(
e14
)
VgF
.
Effect
.
Reset
(
tc
,
{
local
e15
=
Effect
.
CreateEffect
(
c
)
tc
:
RegisterFlagEffect
(
FLAG_SUPPORT
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
),
e15
:
SetType
(
EFFECT_TYPE_SINGLE
)
Duel
.
GetAttacker
():
RegisterFlagEffect
(
FLAG_SUPPORTED
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
e15
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
},
EVENT_BATTLED
)
e15
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
EVENT_SUPPORT
,
e
,
0
,
tp
,
tp
,
0
)
e15
:
SetValue
(
100
)
end
)
c
:
RegisterEffect
(
e15
)
c
:
RegisterEffect
(
e1
)
local
e16
=
Effect
.
CreateEffect
(
c
)
--防御/截击
e16
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e16
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e2
:
SetCategory
(
CATEGORY_DEFENDER
)
e16
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e16
:
SetRange
(
LOCATION_CIRCLE
)
e2
:
SetCode
(
EVENT_BATTLE_START
)
e16
:
SetCondition
(
function
(
e
)
e2
:
SetRange
(
LOCATION_CIRCLE
+
LOCATION_HAND
)
return
vgf
.
filter
.
Back
(
e
:
GetHandler
())
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
end
)
e2
:
SetCountLimit
(
1
)
e16
:
SetValue
(
VgF
.
True
)
e2
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c
:
RegisterEffect
(
e16
)
local
bc
=
Duel
.
GetAttackTarget
()
return
bc
and
bc
:
IsControler
(
tp
)
and
bc
~=
e
:
GetHandler
()
end
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
VgF
.
IsAbleToGCircle
(
e
:
GetHandler
())
end
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
VgF
.
Sendto
(
LOCATION_G_CIRCLE
,
e
:
GetHandler
(),
tp
,
POS_FACEUP
,
REASON_EFFECT
)
end
)
c
:
RegisterEffect
(
e2
)
end
end
end
function
VgD
.
Trigger
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
r
p
)
function
VgD
.
Trigger
(
t
p
)
local
tg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
VgF
.
Sendto
(
LOCATION_TRIGGER
,
tg
:
GetFirst
())
VgF
.
Sendto
(
LOCATION_TRIGGER
,
tg
:
GetFirst
())
...
@@ -898,7 +946,7 @@ function VgD.OverDress(c, filter)
...
@@ -898,7 +946,7 @@ function VgD.OverDress(c, filter)
e1
:
SetOperation
(
VgD
.
OverDressOperation
(
filter
))
e1
:
SetOperation
(
VgD
.
OverDressOperation
(
filter
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
SET
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
@@ -1406,7 +1454,7 @@ function VgD.AbilityAuto(c, m, loc, typ, code, op, cost, con, tg, count, propert
...
@@ -1406,7 +1454,7 @@ function VgD.AbilityAuto(c, m, loc, typ, code, op, cost, con, tg, count, propert
elseif
code
==
EVENT_TO_G_CIRCLE
then
elseif
code
==
EVENT_TO_G_CIRCLE
then
typ
=
typ
or
(
cost
and
EFFECT_TYPE_TRIGGER_O
or
EFFECT_TYPE_TRIGGER_F
)
typ
=
typ
or
(
cost
and
EFFECT_TYPE_TRIGGER_O
or
EFFECT_TYPE_TRIGGER_F
)
op
=
op
or
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
op
=
op
or
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
vgf
.
f
ilter
.
IsR
(
Duel
.
GetAttackTarget
())
then
if
VgF
.
F
ilter
.
IsR
(
Duel
.
GetAttackTarget
())
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
...
@@ -1416,8 +1464,8 @@ function VgD.AbilityAuto(c, m, loc, typ, code, op, cost, con, tg, count, propert
...
@@ -1416,8 +1464,8 @@ function VgD.AbilityAuto(c, m, loc, typ, code, op, cost, con, tg, count, propert
e1
:
SetValue
(
1
)
e1
:
SetValue
(
1
)
Duel
.
GetAttackTarget
():
RegisterEffect
(
e1
)
Duel
.
GetAttackTarget
():
RegisterEffect
(
e1
)
vgf
.
effect
.
Reset
(
e
:
GetHandler
(),
e1
,
EVENT_BATTLED
)
vgf
.
effect
.
Reset
(
e
:
GetHandler
(),
e1
,
EVENT_BATTLED
)
elseif
vgf
.
f
ilter
.
IsV
(
Duel
.
GetAttackTarget
())
then
elseif
VgF
.
F
ilter
.
IsV
(
Duel
.
GetAttackTarget
())
then
Duel
.
GetAttackTarget
():
RegisterFlagEffect
(
FLAG_DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
VgF
.
Effect
.
Reset
(
Duel
.
GetAttackTarget
(),
Duel
.
GetAttackTarget
():
RegisterFlagEffect
(
FLAG_SENTINEL
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
),
EVENT_BATTLED
)
end
end
end
end
-- set effect
-- set effect
...
@@ -1473,7 +1521,7 @@ function VgD.BeRidedByCard(c, m, filter, op, cost, con, tg, id)
...
@@ -1473,7 +1521,7 @@ function VgD.BeRidedByCard(c, m, filter, op, cost, con, tg, id)
local
desc
=
VgF
.
Stringid
(
m
,
id
or
2
)
local
desc
=
VgF
.
Stringid
(
m
,
id
or
2
)
-- set effect
-- set effect
local
e
=
Effect
.
CreateEffect
(
c
)
local
e
=
Effect
.
CreateEffect
(
c
)
e
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
SET
)
e
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
CONTINUOUS
)
e
:
SetCode
(
EVENT_BE_MATERIAL
)
e
:
SetCode
(
EVENT_BE_MATERIAL
)
e
:
SetProperty
(
EFFECT_FLAG_EVENT_PLAYER
)
e
:
SetProperty
(
EFFECT_FLAG_EVENT_PLAYER
)
e
:
SetCondition
(
VgD
.
BeRidedByCardCondition
(
con
,
filter
))
e
:
SetCondition
(
VgD
.
BeRidedByCardCondition
(
con
,
filter
))
...
@@ -1630,9 +1678,9 @@ function VgD.TriggerCountUp(c, m, num, con, reset, hc)
...
@@ -1630,9 +1678,9 @@ function VgD.TriggerCountUp(c, m, num, con, reset, hc)
hc
=
hc
and
VgF
.
ReturnCard
(
hc
)
or
c
hc
=
hc
and
VgF
.
ReturnCard
(
hc
)
or
c
-- set effect
-- set effect
local
e
=
Effect
.
CreateEffect
(
c
)
local
e
=
Effect
.
CreateEffect
(
c
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e
:
SetRange
(
LOCATION_CIRCLE
)
e
:
SetRange
(
LOCATION_CIRCLE
)
e
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGER
COUNT
UP
)
e
:
SetCode
(
EVENT_CUSTOM
+
EVENT_TRIGGER
_COUNT_
UP
)
e
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e
:
SetCondition
(
condition
)
e
:
SetCondition
(
condition
)
if
reset
then
e
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
end
if
reset
then
e
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
end
...
@@ -1835,16 +1883,16 @@ function VgD.CallInPrisonCondition(val)
...
@@ -1835,16 +1883,16 @@ function VgD.CallInPrisonCondition(val)
local
eg
,
ep
,
ev
,
re
,
r
,
rp
local
eg
,
ep
,
ev
,
re
,
r
,
rp
if
Duel
.
GetTurnPlayer
()
==
e
:
GetHandlerPlayer
()
then
return
false
end
if
Duel
.
GetTurnPlayer
()
==
e
:
GetHandlerPlayer
()
then
return
false
end
if
val
==
1
then
if
val
==
1
then
return
(
vgf
.
c
ost
.
SoulBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
VgF
.
IsExistingMatchingCard
(
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
))
return
(
VgF
.
C
ost
.
SoulBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
VgF
.
IsExistingMatchingCard
(
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
))
elseif
val
==
2
then
elseif
val
==
2
then
return
(
vgf
.
c
ost
.
CounterBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
VgF
.
IsExistingMatchingCard
(
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
,
e
,
tp
))
return
(
VgF
.
C
ost
.
CounterBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
VgF
.
IsExistingMatchingCard
(
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
,
e
,
tp
))
end
end
end
end
end
end
function
VgD
.
CallInPrisonOperation
(
val
)
function
VgD
.
CallInPrisonOperation
(
val
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
if
val
==
1
then
if
val
==
1
then
vgf
.
c
ost
.
SoulBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
VgF
.
C
ost
.
SoulBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
local
g
=
VgF
.
SelectMatchingCard
(
HINTMSG_CALL
,
e
,
tp
,
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_ORDER
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
VgF
.
SelectMatchingCard
(
HINTMSG_CALL
,
e
,
tp
,
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_ORDER
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetFirst
():
IsType
(
TYPE_UNIT
)
then
if
g
:
GetFirst
():
IsType
(
TYPE_UNIT
)
then
VgF
.
Sendto
(
LOCATION_CIRCLE
,
g
,
0
,
tp
)
VgF
.
Sendto
(
LOCATION_CIRCLE
,
g
,
0
,
tp
)
...
@@ -1852,7 +1900,7 @@ function VgD.CallInPrisonOperation(val)
...
@@ -1852,7 +1900,7 @@ function VgD.CallInPrisonOperation(val)
VgF
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_EFFECT
)
VgF
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_EFFECT
)
end
end
elseif
val
==
2
then
elseif
val
==
2
then
vgf
.
c
ost
.
CounterBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
VgF
.
C
ost
.
CounterBlast
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
local
tg
=
VgF
.
SelectMatchingCard
(
HINTMSG_CALL
,
e
,
tp
,
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_ORDER
,
0
,
2
,
2
,
nil
,
e
,
tp
)
local
tg
=
VgF
.
SelectMatchingCard
(
HINTMSG_CALL
,
e
,
tp
,
VgD
.
CallInPrisonFilter
,
tp
,
LOCATION_ORDER
,
0
,
2
,
2
,
nil
,
e
,
tp
)
local
g
=
tg
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_UNIT
)
local
g
=
tg
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_UNIT
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
...
@@ -1902,7 +1950,7 @@ function VgD.GlobalCheckEffect(c, m, code, con, op)
...
@@ -1902,7 +1950,7 @@ function VgD.GlobalCheckEffect(c, m, code, con, op)
end
end
-- set effect
-- set effect
local
ge
=
Effect
.
CreateEffect
(
c
)
local
ge
=
Effect
.
CreateEffect
(
c
)
ge
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
ge
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
ge
:
SetCode
(
code
)
ge
:
SetCode
(
code
)
if
con
then
ge
:
SetCondition
(
con
)
end
if
con
then
ge
:
SetCondition
(
con
)
end
ge
:
SetOperation
(
op
)
ge
:
SetOperation
(
op
)
...
...
vgdefinition.lua
View file @
759fd220
...
@@ -277,7 +277,7 @@ EFFECT_TYPE_TRIGGER_O = 0x0080 --诱发选发效果
...
@@ -277,7 +277,7 @@ EFFECT_TYPE_TRIGGER_O = 0x0080 --诱发选发效果
EFFECT_TYPE_QUICK_O
=
0x0100
--诱发即时效果
EFFECT_TYPE_QUICK_O
=
0x0100
--诱发即时效果
EFFECT_TYPE_TRIGGER_F
=
0x0200
--诱发必发效果
EFFECT_TYPE_TRIGGER_F
=
0x0200
--诱发必发效果
EFFECT_TYPE_QUICK_F
=
0x0400
--诱发即时必发效果(熊猫龙等)
EFFECT_TYPE_QUICK_F
=
0x0400
--诱发即时必发效果(熊猫龙等)
EFFECT_TYPE_
SET
=
0x0800
--由事件觸發的輔助用效果/永續效果
EFFECT_TYPE_
CONTINUOUS
=
0x0800
--由事件觸發的輔助用效果/永續效果
EFFECT_TYPE_XMATERIAL
=
0x1000
--作为超量素材时超量怪兽获得的效果(十二兽)
EFFECT_TYPE_XMATERIAL
=
0x1000
--作为超量素材时超量怪兽获得的效果(十二兽)
EFFECT_TYPE_GRANT
=
0x2000
--使其他卡片获得效果(天气模样)
EFFECT_TYPE_GRANT
=
0x2000
--使其他卡片获得效果(天气模样)
EFFECT_TYPE_TARGET
=
0x4000
--影响持续取的对象的效果(基本只用于魔陷)
EFFECT_TYPE_TARGET
=
0x4000
--影响持续取的对象的效果(基本只用于魔陷)
...
@@ -298,7 +298,7 @@ EFFECT_FLAG_BOTH_SIDE = 0x1000 --双方都能使用(部分场地,弹压)
...
@@ -298,7 +298,7 @@ EFFECT_FLAG_BOTH_SIDE = 0x1000 --双方都能使用(部分场地,弹压)
EFFECT_FLAG_COPY_INHERIT
=
0x2000
--若由复制的效果產生則继承其Reset属性
EFFECT_FLAG_COPY_INHERIT
=
0x2000
--若由复制的效果產生則继承其Reset属性
EFFECT_FLAG_DAMAGE_STEP
=
0x4000
--可以在伤害步骤发动
EFFECT_FLAG_DAMAGE_STEP
=
0x4000
--可以在伤害步骤发动
EFFECT_FLAG_DAMAGE_CAL
=
0x8000
--可以在伤害计算时发动
EFFECT_FLAG_DAMAGE_CAL
=
0x8000
--可以在伤害计算时发动
EFFECT_FLAG_DELAY
=
0x10000
--場合型誘發效果、用於永續效果的EFFECT_TYPE_
SET
EFFECT_FLAG_DELAY
=
0x10000
--場合型誘發效果、用於永續效果的EFFECT_TYPE_
CONTINUOUS
EFFECT_FLAG_SINGLE_RANGE
=
0x20000
--只对自己有效
EFFECT_FLAG_SINGLE_RANGE
=
0x20000
--只对自己有效
EFFECT_FLAG_UNCOPYABLE
=
0x40000
--不能复制的原始效果(效果外文本)
EFFECT_FLAG_UNCOPYABLE
=
0x40000
--不能复制的原始效果(效果外文本)
EFFECT_FLAG_OATH
=
0x80000
--誓约效果
EFFECT_FLAG_OATH
=
0x80000
--誓约效果
...
@@ -636,7 +636,7 @@ EVENT_PREDRAW = 1113 --抽卡阶段通常抽卡前
...
@@ -636,7 +636,7 @@ EVENT_PREDRAW = 1113 --抽卡阶段通常抽卡前
EVENT_SUMMON_NEGATED
=
1114
--召唤被无效时
EVENT_SUMMON_NEGATED
=
1114
--召唤被无效时
EVENT_FLIP_SUMMON_NEGATED
=
1115
--反转召唤被无效时
EVENT_FLIP_SUMMON_NEGATED
=
1115
--反转召唤被无效时
EVENT_SPSUMMON_NEGATED
=
1116
--特殊召唤被无效时
EVENT_SPSUMMON_NEGATED
=
1116
--特殊召唤被无效时
EVENT_SPSUMMON_SUCCESS_G_P
=
1117
--EFFECT_SPSUMMON_PROC_G特殊召唤成功前(只能使用EFFECT_TYPE_
SET
)
EVENT_SPSUMMON_SUCCESS_G_P
=
1117
--EFFECT_SPSUMMON_PROC_G特殊召唤成功前(只能使用EFFECT_TYPE_
CONTINUOUS
)
EVENT_CONTROL_CHANGED
=
1120
--控制权变更
EVENT_CONTROL_CHANGED
=
1120
--控制权变更
EVENT_EQUIP
=
1121
--装备卡装备时
EVENT_EQUIP
=
1121
--装备卡装备时
EVENT_ATTACK_ANNOUNCE
=
1130
--攻击宣言时
EVENT_ATTACK_ANNOUNCE
=
1130
--攻击宣言时
...
@@ -645,7 +645,7 @@ EVENT_BATTLE_START = 1132 --伤害步骤开始时(反转前)
...
@@ -645,7 +645,7 @@ EVENT_BATTLE_START = 1132 --伤害步骤开始时(反转前)
EVENT_BATTLE_CONFIRM
=
1133
--伤害计算前(反转後)
EVENT_BATTLE_CONFIRM
=
1133
--伤害计算前(反转後)
EVENT_PRE_DAMAGE_CALCULATE
=
1134
--伤害计算时(羽斬)
EVENT_PRE_DAMAGE_CALCULATE
=
1134
--伤害计算时(羽斬)
EVENT_DAMAGE_CALCULATING
=
1135
--N/A
EVENT_DAMAGE_CALCULATING
=
1135
--N/A
EVENT_PRE_BATTLE_DAMAGE
=
1136
--即将产生战斗伤害(只能使用EFFECT_TYPE_
SET
)
EVENT_PRE_BATTLE_DAMAGE
=
1136
--即将产生战斗伤害(只能使用EFFECT_TYPE_
CONTINUOUS
)
EVENT_BATTLE_END
=
1137
--N/A
EVENT_BATTLE_END
=
1137
--N/A
EVENT_BATTLED
=
1138
--伤害计算后(异女、同反转效果时点)
EVENT_BATTLED
=
1138
--伤害计算后(异女、同反转效果时点)
EVENT_BATTLE_DESTROYING
=
1139
--以战斗破坏怪兽送去墓地时(BF- 苍炎之修罗)
EVENT_BATTLE_DESTROYING
=
1139
--以战斗破坏怪兽送去墓地时(BF- 苍炎之修罗)
...
@@ -676,7 +676,7 @@ EVENT_CRITICAL_STRIKE = VgID + 1 --暴击值结算时点
...
@@ -676,7 +676,7 @@ EVENT_CRITICAL_STRIKE = VgID + 1 --暴击值结算时点
EVENT_DAMAGE_TRIGGER
=
VgID
+
2
--受伤判定完毕时点
EVENT_DAMAGE_TRIGGER
=
VgID
+
2
--受伤判定完毕时点
EVENT_RIDE_START
=
VgID
+
3
--骑升时点
EVENT_RIDE_START
=
VgID
+
3
--骑升时点
EVENT_SUPPORT
=
VgID
+
4
--支援时点
EVENT_SUPPORT
=
VgID
+
4
--支援时点
EVENT_TRIGGER
COUNT
UP
=
VgID
+
5
--驱动追加
EVENT_TRIGGER
_COUNT_
UP
=
VgID
+
5
--驱动追加
EVENT_SING
=
VgID
+
6
--演唱时
EVENT_SING
=
VgID
+
6
--演唱时
EVENT_OVERLAY_FILL
=
VgID
+
7
--灵魂填充时
EVENT_OVERLAY_FILL
=
VgID
+
7
--灵魂填充时
...
@@ -857,7 +857,7 @@ FLAG_ID_NO_NORMAL_DRAW = 3
...
@@ -857,7 +857,7 @@ FLAG_ID_NO_NORMAL_DRAW = 3
FLAG_COUNT_TRIGGER
=
VgID
--计数标识
FLAG_COUNT_TRIGGER
=
VgID
--计数标识
FLAG_ATTACK_TRIGGER
=
VgID
+
1
--多次攻击判定标识
FLAG_ATTACK_TRIGGER
=
VgID
+
1
--多次攻击判定标识
FLAG_DAMAGE_TRIGGER
=
VgID
+
2
--多次伤害判定标识
FLAG_DAMAGE_TRIGGER
=
VgID
+
2
--多次伤害判定标识
FLAG_
DEFENSE_ENTIRELY
=
VgID
+
3
--完全防御标识
FLAG_
SENTINEL
=
VgID
+
3
--完全防御标识
FLAG_CONDITION
=
VgID
+
4
--处于XX状态标识
FLAG_CONDITION
=
VgID
+
4
--处于XX状态标识
FLAG_SUPPORT
=
VgID
+
5
--支援状态标识
FLAG_SUPPORT
=
VgID
+
5
--支援状态标识
FLAG_SUPPORTED
=
VgID
+
6
--被支援
FLAG_SUPPORTED
=
VgID
+
6
--被支援
...
...
vgfuncLib.lua
View file @
759fd220
...
@@ -126,6 +126,15 @@ function table.copy(copy, original)
...
@@ -126,6 +126,15 @@ function table.copy(copy, original)
end
end
end
end
function
table
.
indexOf
(
table
,
element
)
for
i
,
value
in
ipairs
(
table
)
do
if
value
==
element
then
return
i
end
end
return
-
1
end
function
bit
.
ReturnCount
(
n
)
function
bit
.
ReturnCount
(
n
)
if
n
==
0
then
if
n
==
0
then
return
0
return
0
...
@@ -176,7 +185,7 @@ function bit.bnot(a)
...
@@ -176,7 +185,7 @@ function bit.bnot(a)
end
end
---返回函数,该函数与f的结果总是相反的。
---返回函数,该函数与f的结果总是相反的。
---@param f function
<boolean>
要操作的bool函数
---@param f function 要操作的bool函数
---@return function 经过操作的函数
---@return function 经过操作的函数
function
VgF
.
Not
(
f
)
function
VgF
.
Not
(
f
)
return
function
(
...
)
return
function
(
...
)
...
@@ -433,7 +442,7 @@ VgF.Effect.Damage = nil
...
@@ -433,7 +442,7 @@ VgF.Effect.Damage = nil
function
VgF
.
Effect
.
Reset
(
c
,
e
,
code
,
con
)
function
VgF
.
Effect
.
Reset
(
c
,
e
,
code
,
con
)
if
VgF
.
GetValueType
(
e
)
==
"Effect"
then
if
VgF
.
GetValueType
(
e
)
==
"Effect"
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetCode
(
code
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetRange
(
LOCATION_ALL
)
...
@@ -444,7 +453,7 @@ function VgF.Effect.Reset(c, e, code, con)
...
@@ -444,7 +453,7 @@ function VgF.Effect.Reset(c, e, code, con)
elseif
VgF
.
GetValueType
(
e
)
==
"table"
then
elseif
VgF
.
GetValueType
(
e
)
==
"table"
then
for
i
,
v
in
ipairs
(
e
)
do
for
i
,
v
in
ipairs
(
e
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
SET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_
CONTINUOUS
)
e1
:
SetCode
(
code
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_ALL
)
e1
:
SetRange
(
LOCATION_ALL
)
...
@@ -506,10 +515,9 @@ function VgF.Condition.FirstCard(e)
...
@@ -506,10 +515,9 @@ function VgF.Condition.FirstCard(e)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ALL
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ALL
,
0
,
nil
)
return
e
:
GetHandler
()
==
g
:
GetFirst
()
return
e
:
GetHandler
()
==
g
:
GetFirst
()
end
end
function
VgF
.
Condition
.
FirstTurn
(
e
)
function
VgF
.
Condition
.
FirstTurn
()
local
tp
=
e
:
GetHandlerPlayer
()
local
a
=
Duel
.
GetTurnCount
(
0
)
local
a
=
Duel
.
GetTurnCount
(
tp
)
local
b
=
Duel
.
GetTurnCount
(
1
)
local
b
=
Duel
.
GetTurnCount
(
1
-
tp
)
return
a
+
b
==
1
return
a
+
b
==
1
end
end
...
@@ -579,10 +587,10 @@ end
...
@@ -579,10 +587,10 @@ end
function
VgF
.
Cost
.
Discard
(
val
)
function
VgF
.
Cost
.
Discard
(
val
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
if
chk
==
0
then
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
VgF
.
AddAlchemagic
(
m
,
"LOCATION_HAND"
,
"LOCATION_DROP"
,
val
,
val
)
VgF
.
AddAlchemagic
(
m
,
"LOCATION_HAND"
,
"LOCATION_DROP"
,
val
,
val
)
end
end
return
VgF
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_HAND
,
0
,
val
,
nil
)
return
VgF
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_HAND
,
0
,
val
,
nil
)
...
@@ -598,11 +606,11 @@ end
...
@@ -598,11 +606,11 @@ end
function
VgF
.
Cost
.
EnergyBlast
(
val
)
function
VgF
.
Cost
.
EnergyBlast
(
val
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
if
chk
==
0
then
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
VgF
.
AddAlchemagic
(
m
,
"LOCATION_CREST"
,
"0"
,
val
,
val
,
function
(
tc
)
tc
:
IsCode
(
CARD_ENERGY
)
end
)
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
VgF
.
AddAlchemagic
(
m
,
"LOCATION_CREST"
,
"0"
,
val
,
val
,
function
(
tc
)
return
tc
:
IsCode
(
CARD_ENERGY
)
end
)
end
end
return
VgF
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_CREST
,
0
,
val
,
nil
,
CARD_ENERGY
)
return
VgF
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_CREST
,
0
,
val
,
nil
,
CARD_ENERGY
)
end
end
...
@@ -617,10 +625,10 @@ end
...
@@ -617,10 +625,10 @@ end
function
VgF
.
Cost
.
SoulBlast
(
val
)
function
VgF
.
Cost
.
SoulBlast
(
val
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
if
chk
==
0
then
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
VgF
.
AddAlchemagic
(
m
,
"LOCATION_SOUL"
,
"LOCATION_DROP"
,
val
,
val
)
VgF
.
AddAlchemagic
(
m
,
"LOCATION_SOUL"
,
"LOCATION_DROP"
,
val
,
val
)
end
end
return
Duel
.
GetMatchingGroup
(
VgF
.
Filter
.
IsV
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
,
nil
):
GetFirst
():
GetOverlayCount
()
>=
val
return
Duel
.
GetMatchingGroup
(
VgF
.
Filter
.
IsV
,
tp
,
LOCATION_CIRCLE
,
0
,
nil
,
nil
):
GetFirst
():
GetOverlayCount
()
>=
val
...
@@ -637,10 +645,10 @@ end
...
@@ -637,10 +645,10 @@ end
function
VgF
.
Cost
.
CounterBlast
(
val
)
function
VgF
.
Cost
.
CounterBlast
(
val
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
if
chk
==
0
then
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
VgF
.
AddAlchemagic
(
m
,
"LOCATION_DAMAGE"
,
"POSCHANGE"
,
val
,
val
,
Card
.
IsFaceup
)
VgF
.
AddAlchemagic
(
m
,
"LOCATION_DAMAGE"
,
"POSCHANGE"
,
val
,
val
,
Card
.
IsFaceup
)
end
end
return
VgF
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
val
,
nil
)
return
VgF
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
val
,
nil
)
...
@@ -756,10 +764,10 @@ end
...
@@ -756,10 +764,10 @@ end
function
VgF
.
Operation
.
SoulCharge
(
val
)
function
VgF
.
Operation
.
SoulCharge
(
val
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
if
VgF
.
GetValueType
(
val
)
~=
"number"
then
return
0
end
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
if
chk
==
0
then
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
VgF
.
AddAlchemagic
(
m
,
"LOCATION_DECK"
,
"LOCATION_SOUL"
,
val
,
val
)
VgF
.
AddAlchemagic
(
m
,
"LOCATION_DECK"
,
"LOCATION_SOUL"
,
val
,
val
)
end
end
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
val
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
val
...
@@ -1501,7 +1509,7 @@ end
...
@@ -1501,7 +1509,7 @@ end
---@param to table|string|number 费用的卡送去哪个区域
---@param to table|string|number 费用的卡送去哪个区域
---@param min table|number|nil 费用的卡的最少数量
---@param min table|number|nil 费用的卡的最少数量
---@param max table|number|nil 费用的卡的最多数量
---@param max table|number|nil 费用的卡的最多数量
---@param filter table
<function<boolean>>|function<boolean>
|nil 费用的卡的过滤函数
---@param filter table
|function
|nil 费用的卡的过滤函数
function
VgF
.
AddAlchemagic
(
m
,
from
,
to
,
min
,
max
,
filter
)
function
VgF
.
AddAlchemagic
(
m
,
from
,
to
,
min
,
max
,
filter
)
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
if
#
from
~=
#
to
then
return
end
if
#
from
~=
#
to
then
return
end
...
...
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