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
62f397c7
Commit
62f397c7
authored
Apr 08, 2024
by
jwyxym
Committed by
GitHub
Apr 08, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
0f432776
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
236 additions
and
83 deletions
+236
-83
VgD.Lua
VgD.Lua
+141
-21
VgDefinition.Lua
VgDefinition.Lua
+2
-2
VgFuncLib.lua
VgFuncLib.lua
+19
-2
c10101001.lua
c10101001.lua
+7
-1
c10101004.lua
c10101004.lua
+1
-1
c10101006.lua
c10101006.lua
+7
-37
c10101008.lua
c10101008.lua
+1
-8
c10400855.lua
c10400855.lua
+2
-7
c10800730.lua
c10800730.lua
+4
-4
c10800855.lua
c10800855.lua
+52
-0
No files found.
VgD.Lua
View file @
62f397c7
...
...
@@ -13,7 +13,7 @@ function VgD.RideUp(c)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
_START
+
PHASE_STANDBY
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_ALL
)
e2
:
SetCountLimit
(
1
,
VgID
+
1
)
e2
:
SetCondition
(
VgD
.
RideUpCondition
)
...
...
@@ -83,7 +83,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
VgF
.
Call
(
sc
,
SUMMON_TYPE_RIDE
,
tp
,
0x20
)
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_RIDE
,
0
,
1
,
nil
,
TYPE_EMBLEM
)
then
local
tc
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_RIDE
,
0
,
nil
,
TYPE_EMBLEM
):
GetFirst
()
Duel
.
Sendto
(
tc
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Sendto
(
tc
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP
_DEFENSE
,
REASON_EFFECT
)
end
elseif
sel
==
0
or
(
sel
==
1
and
a
and
b
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
...
...
@@ -136,6 +136,81 @@ function VgD.CallToR(c)
e1
:
SetCondition
(
VgD
.
CallCondition
)
e1
:
SetOperation
(
VgD
.
CallOperation
)
c
:
RegisterEffect
(
e1
)
if
c
:
IsSetCard
(
0x201
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
VgF
.
Stringid
(
VgID
,
9
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e2
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e2
:
SetCondition
(
VgD
.
OverArmCondition
)
e2
:
SetOperation
(
VgD
.
OverArmOperation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
VgD
.
OverArmSum
)
c
:
RegisterEffect
(
e3
)
end
end
function
VgD
.
OverArmCondition
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
e
:
GetHandlerPlayer
()
return
VgF
.
LvCondition
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
and
Duel
.
IsExistingMatchingCard
(
VgD
.
OverArmFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
function
VgD
.
OverArmFilter
(
c
,
mc
,
zone
)
local
seq
if
zone
and
zone
>
0
then
if
zone
==
0x1
then
seq
=
0
end
if
zone
==
0x2
then
seq
=
1
end
if
zone
==
0x4
then
seq
=
2
end
if
zone
==
0x8
then
seq
=
3
end
if
zone
==
0x10
then
seq
=
4
end
if
not
VgF
.
IsSequence
(
c
,
seq
)
then
return
false
end
end
return
VgF
.
IsCodeListed
(
mc
,
c
:
GetOriginalCode
())
end
function
VgD
.
OverArmOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
VgD
.
OverArmFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
code
)
local
szone
if
Duel
.
GetTurnPlayer
()
==
tp
and
tp
==
1
then
local
zone
=
0xff
for
tc
in
VgF
.
Next
(
g
)
do
if
VgF
.
IsSequence
(
tc
,
0
)
then
zone
=
zone
-
0x1
end
if
VgF
.
IsSequence
(
tc
,
1
)
then
zone
=
zone
-
0x2
end
if
VgF
.
IsSequence
(
tc
,
2
)
then
zone
=
zone
-
0x4
end
if
VgF
.
IsSequence
(
tc
,
3
)
then
zone
=
zone
-
0x8
end
if
VgF
.
IsSequence
(
tc
,
4
)
then
zone
=
zone
-
0x10
end
end
if
zone
==
0xff
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CallZONE
)
szone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
zone
)
elseif
Duel
.
GetTurnPlayer
()
==
tp
and
tp
==
0
then
local
zone
=
0x00
for
tc
in
VgF
.
Next
(
g
)
do
zone
=
bit
.
bor
(
zone
,
VgF
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
()))
end
if
zone
==
0x00
then
return
end
zone
=
bit
.
bnot
(
zone
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CallZONE
)
szone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
zone
)
end
e
:
SetValue
(
function
()
return
0
,
szone
end
)
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
OverArmFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
szone
):
GetFirst
()
if
not
tc
then
return
end
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg
)
end
c
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
function
VgD
.
OverArmSum
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
c
:
RegisterFlagEffect
(
ConditionFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
201
)
end
function
VgD
.
CallCondition
(
e
,
c
)
if
c
==
nil
then
return
true
end
...
...
@@ -148,9 +223,9 @@ end
function
VgD
.
CallOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CallZONE
)
local
zone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
nil
,
0x0000
e0
)
local
zone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
0x
e0
)
if
Duel
.
IsExistingMatchingCard
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
,
zone
)
then
local
tc
=
Duel
.
GetMatchingGroup
(
tp
,
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
,
zone
):
GetFirst
()
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
,
zone
):
GetFirst
()
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
e
:
SetValue
(
function
()
return
0
,
zone
end
)
...
...
@@ -248,7 +323,7 @@ function VgD.MonsterBattle(c)
e14
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e14
:
SetRange
(
LOCATION_MZONE
)
e14
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e14
:
SetCondition
(
Vg
F
.
VMonster
Condition
)
e14
:
SetCondition
(
Vg
D
.
MonsterCannotBeDestory
Condition
)
e14
:
SetValue
(
1
)
c
:
RegisterEffect
(
e14
)
local
e15
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -324,7 +399,7 @@ function VgD.SupportOperation(e,tp,eg,ep,ev,re,r,rp)
end
function
VgD
.
SendToGCost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsPublic
()
and
(
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SendtoG
)
or
Duel
.
IsExistingMatchingCard
(
VgF
.
Not
(
Card
.
IsPublic
),
tp
,
LOCATION_HAND
,
0
,
1
,
c
))
end
if
chk
==
0
then
return
not
c
:
IsPublic
()
and
(
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SendtoG
)
or
Duel
.
IsExistingMatchingCard
(
VgF
.
Not
(
Card
.
IsPublic
),
tp
,
LOCATION_HAND
,
0
,
1
,
c
))
end
local
g
=
Group
.
FromCards
(
c
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SendtoG
)
and
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsPublic
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
)
then
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
VgF
.
Not
(
Card
.
IsPublic
),
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
...
...
@@ -353,7 +428,7 @@ function VgD.SendToGOperation(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
e
:
GetLabelObject
()
local
g
=
Group
.
FromCards
(
c
)
if
tc
then
tc
=
vgf
.
ReturnCard
(
tc
)
tc
=
VgF
.
ReturnCard
(
tc
)
g
:
AddCard
(
tc
)
if
tc
:
GetDefense
()
>
0
then
def
=
def
+
tc
:
GetDefense
()
>
0
...
...
@@ -381,10 +456,36 @@ function VgD.MonsterAttackCost(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
c
:
GetFlagEffect
(
CountTriggerFlag
)
==
0
end
c
:
RegisterFlagEffect
(
CountTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
end
function
VgD
.
MonsterCannotBeDestoryCondition
(
e
,
c
)
return
VgF
.
VMonsterFilter
(
e
:
GetHandler
())
or
Duel
.
GetTurnPlayer
()
==
e
:
GetHandlerPlayer
()
end
function
VgD
.
MonsterCannotBeAttackedCondition
(
e
,
c
)
return
VgF
.
IsSequence
(
e
:
GetHandler
(),
1
,
2
,
3
)
end
--送去g区
function
VgD
.
CardToG
(
c
,
cost
)
local
type
=
EFFECT_TYPE_TRIGGER_F
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
type
=
EFFECT_TYPE_TRIGGER_O
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
VgF
.
Stringid
(
VgID
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
type
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
e1
:
SetCondition
(
VgD
.
CardToGCondition
)
e1
:
SetOperation
(
VgD
.
CardToGOperation
)
c
:
RegisterEffect
(
e1
)
end
function
VgD
.
CardToGCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsLocation
(
LOCATION_GZONE
)
and
Duel
.
GetAttackTarget
()
end
function
VgD
.
CardToGOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
DefenseEntirelyFlag
,
RESET_EVENT
+
EVENT_DAMAGE_STEP_END
,
0
,
1
)
end
--判定
function
VgD
.
CardTrigger
(
c
,
f
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -688,8 +789,8 @@ function VgD.SpellCostOp(e,tp,eg,ep,ev,re,r,rp,chk,c,mc,num1,num2,num3,num4,num5
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
if
num2
>
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
num2
,
num2
,
nil
,
20401001
)
Duel
.
Sendto
Grave
(
g
,
REASON_COST
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
num2
,
num2
,
nil
,
10800730
)
Duel
.
Sendto
(
g
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP
,
REASON_COST
)
end
if
num3
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
num3
,
num3
,
mg
)
...
...
@@ -717,27 +818,46 @@ function VgD.SpellOperation(op)
if
op2
then
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
true
)
end
end
end
function
VgD
.
BeRidedByCard
(
c
,
m
,
code
,
op
,
cost
,
con
,
tg
,
property
)
local
type2
=
EFFECT_TYPE_TRIGGER_F
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
type2
=
EFFECT_TYPE_TRIGGER_O
end
function
VgD
.
BeRidedByCard
(
c
,
m
,
code
,
op
,
cost
,
con
,
tg
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
Set
Description
(
VgF
.
Stringid
(
m
,
0
)
)
e1
:
Set
Type
(
EFFECT_TYPE_XMATERIAL
+
type2
)
e1
:
Set
Code
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
Set
Type
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
Set
Code
(
EVENT_BE_MATERIAL
)
e1
:
Set
Property
(
EFFECT_FLAG_EVENT_PLAYER
)
e1
:
SetCondition
(
VgD
.
BeRidedByCardCondition
(
code
,
con
))
if
property
then
e1
:
SetProperty
(
property
)
end
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
if
VgF
.
GetValueType
(
tg
)
==
"function"
then
e1
:
SetTarget
(
tg
)
end
if
VgF
.
GetValueType
(
op
)
==
"function"
then
e1
:
SetOperation
(
op
)
end
e1
:
SetOperation
(
VgD
.
BeRidedByCardOperation
(
m
,
op
,
cost
,
tg
))
c
:
RegisterEffect
(
e1
)
end
function
VgD
.
BeRidedByCardCondition
(
code
,
f
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
code
and
code
>
0
and
not
c
:
IsCode
(
code
)
then
return
false
end
return
VgF
.
GetValueType
(
f
)
==
"nil"
or
f
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
code
and
code
>
0
and
not
c
:
GetReasonCard
():
IsCode
(
code
)
then
return
false
end
return
r
==
REASON_RIDEUP
and
(
VgF
.
GetValueType
(
f
)
==
"nil"
or
f
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
)
end
end
function
VgD
.
BeRidedByCardOperation
(
m
,
op
,
cost
,
tg
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
type
=
EFFECT_TYPE_TRIGGER_F
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
type
=
EFFECT_TYPE_TRIGGER_O
end
local
e1
=
Effect
.
CreateEffect
(
rc
)
e1
:
SetDescription
(
VgF
.
Stringid
(
m
,
2
))
e1
:
SetType
(
type
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
VgD
.
BeRidedByCardOpCondtion
)
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
if
VgF
.
GetValueType
(
tg
)
==
"function"
then
e1
:
SetTarget
(
tg
)
end
if
VgF
.
GetValueType
(
op
)
==
"function"
then
e1
:
SetOperation
(
op
)
end
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
end
end
function
VgD
.
BeRidedByCardOpCondtion
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
()
==
e
:
GetHandler
()
end
function
VgD
.
EffectTypeTrigger
(
c
,
m
,
loc
,
type
,
code
,
op
,
cost
,
con
,
tg
,
count
,
property
)
local
type2
=
EFFECT_TYPE_TRIGGER_F
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
type2
=
EFFECT_TYPE_TRIGGER_O
end
...
...
VgDefinition.Lua
View file @
62f397c7
VgDefinition
=
{}
VgID
=
10101001
vgid
=
VgID
VgID
=
10000001
--min/max value
MIN_ID
=
1000
--4 digits, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
...
...
@@ -126,6 +125,7 @@ REASON_LINK =0x10000000 --用于连接召唤
REASON_LOST_OVERLAY
=
0x20000000
--超量素材随着超量怪兽离场
REASON_MAINTENANCE
=
0x40000000
--维持代价
REASON_ACTION
=
0x80000000
--攻击宣言之际等
REASON_RIDEUP
=
REASON_XYZ
--用於骑升
REASON_PHASEDRAW
=
REASON_RULE
--抽卡
REASON_TRIGGER
=
REASON_EFFECT
--判定
--Location Reason
...
...
VgFuncLib.lua
View file @
62f397c7
...
...
@@ -39,6 +39,23 @@ function VgF.SequenceToGlobal(p,loc,seq)
return
0
end
end
function
VgF
.
AddCodeList
(
c
,
...
)
if
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
end
if
c
.
card_code_list
==
nil
then
local
mt
=
getmetatable
(
c
)
mt
.
card_code_list
=
{}
for
_
,
code
in
ipairs
{
...
}
do
mt
.
card_code_list
[
code
]
=
true
end
else
for
_
,
code
in
ipairs
{
...
}
do
c
.
card_code_list
[
code
]
=
true
end
end
end
function
VgF
.
IsCodeListed
(
c
,
code
)
return
c
.
card_code_list
and
c
.
card_code_list
[
code
]
end
function
VgF
.
True
()
return
true
end
...
...
@@ -174,7 +191,7 @@ function VgF.tgoval(e,re,rp)
return
rp
==
1
-
e
:
GetHandlerPlayer
()
end
function
VgF
.
Call
(
g
,
sumtype
,
sp
,
zone
)
if
not
zone
then
zone
=
0x
7
f
end
if
not
zone
then
zone
=
0x
3
f
end
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
sp
,
sp
,
true
,
true
,
POS_FACEUP_ATTACK
,
zone
)
end
function
VgF
.
LvCondition
(
e
)
...
...
@@ -237,7 +254,7 @@ function VgF.EnegyCost(num)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
num
,
nil
,
10800730
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
1
,
1
,
nil
,
10800730
)
Duel
.
Sendto
Grave
(
g
,
REASON_COST
)
Duel
.
Sendto
(
g
,
tp
,
0
,
POS_FACEUP
,
REASON_COST
)
end
end
function
VgF
.
OverlayCost
(
num
)
...
...
c10101001.lua
View file @
62f397c7
...
...
@@ -11,9 +11,15 @@ end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Group
.
FromCards
(
c
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x
3210
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x
201
)
if
sg
then
g
:
Merge
(
sg
)
end
for
tc
in
VgF
.
Next
(
g
)
do
VgF
.
AtkUp
(
c
,
tc
,
10000
,
nil
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_DAMAGE
,
0
,
nil
)
for
tc
in
VgF
.
Next
(
g
)
do
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN
)
end
end
\ No newline at end of file
c10101004.lua
View file @
62f397c7
...
...
@@ -8,5 +8,5 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandlerPlayer
()
==
1
return
tp
==
1
and
Duel
.
GetTurnPlayer
()
==
tp
end
\ No newline at end of file
c10101006.lua
View file @
62f397c7
...
...
@@ -2,42 +2,9 @@
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
vgf
.
Stringid
(
vgid
,
9
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation2
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_CUSTOM
+
m
,
cm
.
operation3
,
vgf
.
OverlayCost
(
2
))
end
function
cm
.
condition
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
e
:
GetHandlerPlayer
()
return
vgf
.
LvCondition
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
filter
(
c
)
return
vgf
.
RMonsterFilter
(
c
)
and
c
:
IsCode
(
10101009
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OVERLAY
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
tc
=
vgf
.
ReturnCard
(
tc
)
local
zone
=
vgf
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
e
:
SetValue
(
function
()
return
0
,
zone
end
)
c
:
SetMaterial
(
Group
.
FromCards
(
tc
))
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg
)
end
c
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
c
:
RegisterFlagEffect
(
ConditionFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
201
)
vgf
.
AddCodeList
(
c
,
10101009
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation2
,
nil
,
vgf
.
RMonsterCondition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_CUSTOM
+
m
,
cm
.
operation3
,
vgf
.
OverlayCost
(
2
),
cm
.
condition3
)
end
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -51,4 +18,7 @@ function cm.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel
.
HintSelection
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
end
function
cm
.
condition3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
()
==
e
:
GetHandler
()
end
c10101008.lua
View file @
62f397c7
...
...
@@ -2,12 +2,5 @@
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_MOVE
,
cm
.
operation
,
vgf
.
DisCardCost
(
1
),
cm
.
condition
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsLocation
(
LOCATION_GZONE
)
and
Duel
.
GetAttackTarget
()
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
DefenseEntirelyFlag
,
RESET_EVENT
+
EVENT_DAMAGE_STEP_END
,
0
,
1
)
vgd
.
CardToG
(
c
,
vgf
.
DisCardCost
(
1
))
end
\ No newline at end of file
c10400855.lua
View file @
62f397c7
--能量发生器
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgd
.
Rule
(
c
)
VgD
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
...
@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_EMBLEM
)
e3
:
SetCountLimit
(
1
)
--e3:SetCost(cm.cost3
)
e3
:
SetCost
(
VgF
.
EnegyCost
(
7
)
)
e3
:
SetOperation
(
cm
.
op3
)
c
:
RegisterEffect
(
e3
)
end
...
...
@@ -47,11 +47,6 @@ function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local
token
=
Duel
.
CreateToken
(
tp
,
20401001
)
Duel
.
Sendto
(
token
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP
,
REASON_EFFECT
)
end
function
cm
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
1
,
nil
,
20401001
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
1
,
1
,
nil
,
20401001
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
cm
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
\ No newline at end of file
c10800730.lua
View file @
62f397c7
local
cm
,
m
,
o
=
GetID
()
function
c
m
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
end
--能量
function
c
10800730
.
initial_effect
(
c
)
end
c10800855.lua
0 → 100644
View file @
62f397c7
--能量发生器
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
VgD
.
Rule
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCondition
(
cm
.
con1
)
e1
:
SetOperation
(
cm
.
op1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_EMBLEM
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
cm
.
con2
)
e2
:
SetOperation
(
cm
.
op2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_EMBLEM
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
VgF
.
EnegyCost
(
7
))
e3
:
SetOperation
(
cm
.
op3
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsLocation
(
LOCATION_EMBLEM
)
and
tp
==
1
and
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
token1
=
Duel
.
CreateToken
(
tp
,
10800730
)
local
token2
=
Duel
.
CreateToken
(
tp
,
10800730
)
local
token3
=
Duel
.
CreateToken
(
tp
,
10800730
)
local
g
=
Group
.
FromCards
(
token1
,
token2
,
token3
)
Duel
.
Sendto
(
g
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
end
function
cm
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
nil
,
10800730
)
<
10
end
function
cm
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
nil
,
10800730
)
>=
10
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
10800730
)
Duel
.
Sendto
(
token
,
tp
,
LOCATION_EMBLEM
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
end
function
cm
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
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