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
d7650427
Commit
d7650427
authored
May 20, 2024
by
jwyxym
Committed by
GitHub
May 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
092a51a3
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
326 additions
and
120 deletions
+326
-120
VgD.Lua
VgD.Lua
+18
-3
VgFuncLib.lua
VgFuncLib.lua
+184
-88
c10101006.lua
c10101006.lua
+4
-4
c10105015.lua
c10105015.lua
+11
-7
c10203001.lua
c10203001.lua
+1
-9
c10301001.lua
c10301001.lua
+1
-9
c10401002.lua
c10401002.lua
+48
-0
c10401003.lua
c10401003.lua
+34
-0
c10401004.lua
c10401004.lua
+25
-0
No files found.
VgD.Lua
View file @
d7650427
...
@@ -586,7 +586,6 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -586,7 +586,6 @@ function VgD.CardTriggerOperation(chkop,f)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DAMAGE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DAMAGE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
then
if
tc
then
Duel
.
SendtoGrave
(
tc
,
REASON_TRIGGER
)
Duel
.
SendtoGrave
(
tc
,
REASON_TRIGGER
)
Duel
.
Recover
(
tp
,
1
,
REASON_RULE
)
end
end
end
end
elseif
c
:
IsRace
(
TRRIGGER_ADVANCE
)
then
elseif
c
:
IsRace
(
TRRIGGER_ADVANCE
)
then
...
@@ -603,7 +602,6 @@ function VgD.CardTriggerOperation(chkop,f)
...
@@ -603,7 +602,6 @@ function VgD.CardTriggerOperation(chkop,f)
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
Duel
.
Exile
(
c
,
REASON_TRIGGER
)
else
else
Duel
.
Sendto
(
c
,
tp
,
LOCATION_DAMAGE
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
Duel
.
Sendto
(
c
,
tp
,
LOCATION_DAMAGE
,
POS_FACEUP_ATTACK
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
1
,
REASON_TRIGGER
)
end
end
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
bc
=
rc
:
GetBattleTarget
()
local
bc
=
rc
:
GetBattleTarget
()
...
@@ -723,7 +721,11 @@ function VgD.EventRideStart(e,tp,eg,ep,ev,re,r,rp)
...
@@ -723,7 +721,11 @@ function VgD.EventRideStart(e,tp,eg,ep,ev,re,r,rp)
end
end
function
VgD
.
RuleWin
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
RuleWin
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetCurrentChain
()
>
0
then
return
end
if
Duel
.
GetCurrentChain
()
>
0
then
return
end
for
WinReason
=
0x1
,
0xff
,
1
do
for
WinReason
=
0x1
,
0x2
,
1
do
if
WinReason
==
0x1
then
local
lp
=
Duel
.
GetLP
(
tp
)
-
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ORDER
,
0
)
Duel
.
SetLP
(
tp
,
lp
)
end
if
WinReason
==
0x2
then
if
WinReason
==
0x2
then
local
g1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
g1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
g2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
local
g2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
...
@@ -1046,3 +1048,16 @@ function VgD.TriggerCountUpOperation(num)
...
@@ -1046,3 +1048,16 @@ function VgD.TriggerCountUpOperation(num)
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
label
)
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
label
)
end
end
end
end
function
VgD
.
GlobalCheckEffect
(
c
,
m
,
typ
,
code
,
con
,
op
)
if
not
typ
then
typ
=
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
end
local
cm
=
_G
[
"c"
..
m
]
if
not
cm
.
global_check
then
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
typ
)
ge1
:
SetCode
(
code
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
ge1
:
SetCondition
(
con
)
end
ge1
:
SetOperation
(
op
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
\ No newline at end of file
VgFuncLib.lua
View file @
d7650427
...
@@ -35,6 +35,7 @@ function VgF.DefineArguments()
...
@@ -35,6 +35,7 @@ function VgF.DefineArguments()
if
not
code
then
code
=
nil
end
if
not
code
then
code
=
nil
end
if
not
loc
then
loc
=
nil
end
if
not
loc
then
loc
=
nil
end
if
not
typ
then
typ
=
nil
end
if
not
typ
then
typ
=
nil
end
if
not
typ2
then
typ2
=
nil
end
if
not
count
then
count
=
nil
end
if
not
count
then
count
=
nil
end
if
not
property
then
property
=
nil
end
if
not
property
then
property
=
nil
end
if
not
reset
then
reset
=
nil
end
if
not
reset
then
reset
=
nil
end
...
@@ -379,31 +380,53 @@ end
...
@@ -379,31 +380,53 @@ end
---@param g Card|Group 要被上升攻击力的卡
---@param g Card|Group 要被上升攻击力的卡
---@param val integer 要上升的攻击力(可以为负)
---@param val integer 要上升的攻击力(可以为负)
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
function
VgF
.
AtkUp
(
c
,
g
,
val
,
reset
)
function
VgF
.
AtkUp
(
c
,
g
,
val
,
reset
,
resetcount
,
resettype
,
resetcode
)
if
not
c
then
return
end
if
not
c
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
resetcount
then
resetcount
=
1
end
if
not
resettype
then
resettype
=
EFFECT_TYPE_FIELD
end
if
not
val
or
val
==
0
then
return
end
if
not
val
or
val
==
0
then
return
end
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
local
e
=
{}
for
tc
in
VgF
.
Next
(
g
)
do
for
tc
in
VgF
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_
FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
table.insert
(
e
,
e1
)
if
resetcode
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
end
end
return
e
,
#
e
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
local
tc
=
VgF
.
ReturnCard
(
g
)
local
tc
=
VgF
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
return
e1
,
1
if
resetcode
>
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
end
end
end
end
---以c的名义,使g(中的每一张卡)的盾值上升val,并在reset时重置。
---以c的名义,使g(中的每一张卡)的盾值上升val,并在reset时重置。
...
@@ -411,31 +434,53 @@ end
...
@@ -411,31 +434,53 @@ end
---@param g Card|Group 要被上升盾值的卡
---@param g Card|Group 要被上升盾值的卡
---@param val integer 要上升的盾值(可以为负)
---@param val integer 要上升的盾值(可以为负)
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
function
VgF
.
DefUp
(
c
,
g
,
val
,
reset
)
function
VgF
.
DefUp
(
c
,
g
,
val
,
reset
,
resetcount
,
resettype
,
resetcode
)
if
not
c
then
return
end
if
not
c
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
resetcount
then
resetcount
=
1
end
if
not
resettype
then
resettype
=
EFFECT_TYPE_FIELD
end
if
not
val
or
val
==
0
then
return
end
if
not
val
or
val
==
0
then
return
end
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
local
e
=
{}
for
tc
in
VgF
.
Next
(
g
)
do
for
tc
in
VgF
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
table.insert
(
e
,
e1
)
if
resetcode
>
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
end
end
return
e
,
#
e
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
local
tc
=
VgF
.
ReturnCard
(
g
)
local
tc
=
VgF
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
return
e1
,
1
if
resetcode
>
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
resetcode
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e2
)
end
end
end
end
end
---以c的名义,使g(中的每一张卡)的☆上升val,并在reset时重置。
---以c的名义,使g(中的每一张卡)的☆上升val,并在reset时重置。
...
@@ -443,13 +488,13 @@ end
...
@@ -443,13 +488,13 @@ end
---@param g Card|Group 要被上升☆的卡
---@param g Card|Group 要被上升☆的卡
---@param val integer 要上升的☆(可以为负)
---@param val integer 要上升的☆(可以为负)
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
---@param reset integer|nil 指示重置的时点,默认为“回合结束时”。无论如何,都会在离场时重置。
function
VgF
.
StarUp
(
c
,
g
,
val
,
reset
)
function
VgF
.
StarUp
(
c
,
g
,
val
,
reset
,
resetcount
,
resettype
,
resetcode
)
if
not
c
or
not
g
then
return
end
if
not
c
or
not
g
then
return
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
reset
then
reset
=
RESET_PHASE
+
PHASE_END
end
if
not
resetcount
then
resetcount
=
1
end
if
not
resettype
then
resettype
=
EFFECT_TYPE_FIELD
end
if
not
val
or
val
==
0
then
return
end
if
not
val
or
val
==
0
then
return
end
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
if
VgF
.
GetValueType
(
g
)
==
"Group"
and
g
:
GetCount
()
>
0
then
local
el
=
{}
local
er
=
{}
for
tc
in
VgF
.
Next
(
g
)
do
for
tc
in
VgF
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -457,15 +502,30 @@ function VgF.StarUp(c,g,val,reset)
...
@@ -457,15 +502,30 @@ function VgF.StarUp(c,g,val,reset)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
table.insert
(
el
,
e1
)
if
resetcode
>
0
then
table.insert
(
er
,
er
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
resetcode
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetOperation
(
function
(
te
)
e2
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e4
)
end
end
end
return
el
,
er
,
#
el
,
#
er
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
elseif
VgF
.
GetValueType
(
g
)
==
"Card"
then
local
tc
=
VgF
.
ReturnCard
(
g
)
local
tc
=
VgF
.
ReturnCard
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -474,12 +534,29 @@ function VgF.StarUp(c,g,val,reset)
...
@@ -474,12 +534,29 @@ function VgF.StarUp(c,g,val,reset)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
reset
,
resetcount
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
e2
:
SetCode
(
EFFECT_UPDATE_RSCALE
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
return
e1
,
e2
,
1
,
1
if
resetcode
>
0
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
resettype
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
resetcode
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetOperation
(
function
(
te
)
e1
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetOperation
(
function
(
te
)
e2
:
Reset
()
te
:
Reset
()
end
)
tc
:
RegisterEffect
(
e4
)
end
end
end
end
end
---判断c是否可以以规则的手段到G区域。
---判断c是否可以以规则的手段到G区域。
...
@@ -495,6 +572,10 @@ end
...
@@ -495,6 +572,10 @@ end
---@return function 效果的Cost函数
---@return function 效果的Cost函数
function
VgF
.
DisCardCost
(
num
)
function
VgF
.
DisCardCost
(
num
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
VgF
.
DisCardCostOp
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
end
function
VgF
.
DisCardCostOp
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
...
@@ -508,13 +589,17 @@ function VgF.DisCardCost(num)
...
@@ -508,13 +589,17 @@ function VgF.DisCardCost(num)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num
,
num
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
num
,
num
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
return
Duel
.
GetOperatedGroup
():
GetCount
()
end
end
---用于效果的Cost。它返回一个执行“【费用】[能量爆发num]”的函数。
---用于效果的Cost。它返回一个执行“【费用】[能量爆发num]”的函数。
---@param num integer 能量爆发的数量
---@param num integer 能量爆发的数量
---@return function 效果的Cost函数
---@return function 效果的Cost函数
function
VgF
.
EnergyCost
(
num
)
function
VgF
.
EnergyCost
(
num
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
VgF
.
EnergyCostOp
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
end
function
VgF
.
EnergyCostOp
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
...
@@ -528,13 +613,19 @@ function VgF.EnergyCost(num)
...
@@ -528,13 +613,19 @@ function VgF.EnergyCost(num)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
nil
,
10800730
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_EMBLEM
,
0
,
nil
,
10800730
)
local
g
=
VgF
.
GetCardsFromGroup
(
sg
,
num
)
local
g
=
VgF
.
GetCardsFromGroup
(
sg
,
num
)
Duel
.
Sendto
(
g
,
tp
,
0
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Sendto
(
g
,
tp
,
0
,
POS_FACEUP
,
REASON_COST
)
end
return
Duel
.
GetOperatedGroup
():
GetCount
()
end
end
---用于效果的Cost。它返回一个执行“【费用】[灵魂爆发num]”的函数。
---用于效果的Cost。它返回一个执行“【费用】[灵魂爆发num]”的函数。
---@param num integer 灵魂爆发的数量
---@param num integer 灵魂爆发的数量
---@return function 效果的Cost函数
---@return function 效果的Cost函数
function
VgF
.
OverlayCost
(
num
)
function
VgF
.
OverlayCost
(
num
)
function
VgF
.
EnergyCost
(
num
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
VgF
.
OverlayCostOp
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
end
end
function
VgF
.
OverlayCostOp
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
...
@@ -548,13 +639,17 @@ function VgF.OverlayCost(num)
...
@@ -548,13 +639,17 @@ function VgF.OverlayCost(num)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVEXYZ
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVEXYZ
)
local
g
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
num
,
num
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
num
,
num
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
return
Duel
.
GetOperatedGroup
():
GetCount
()
end
end
---用于效果的Cost或Operation。它返回一个执行“【费用】[灵魂填充num]”的函数。
---用于效果的Cost或Operation。它返回一个执行“【费用】[灵魂填充num]”的函数。
---@param num integer 灵魂填充的数量
---@param num integer 灵魂填充的数量
---@return function 效果的Cost或Operation函数
---@return function 效果的Cost或Operation函数
function
VgF
.
OverlayFill
(
num
)
function
VgF
.
OverlayFill
(
num
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
VgF
.
OverlayFillOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
end
function
VgF
.
OverlayFillOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
...
@@ -565,20 +660,21 @@ function VgF.OverlayFill(num)
...
@@ -565,20 +660,21 @@ function VgF.OverlayFill(num)
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
num
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
num
end
end
VgF
.
OverlayFillOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
VgF
.
OverlayFillOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
num
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
num
)
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
Duel
.
Overlay
(
rc
,
g
)
Duel
.
Overlay
(
rc
,
g
)
return
Duel
.
GetOperatedGroup
():
GetCount
()
end
end
---用于效果的Cost。它返回一个执行“【费用】[计数爆发num]”的函数。
---用于效果的Cost。它返回一个执行“【费用】[计数爆发num]”的函数。
---@param num integer 计数爆发的数量
---@param num integer 计数爆发的数量
---@return function 效果的Cost函数
---@return function 效果的Cost函数
function
VgF
.
DamageCost
(
num
)
function
VgF
.
DamageCost
(
num
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
VgF
.
DamageCostOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
end
function
VgF
.
DamageCostOP
(
num
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
m
=
c
:
GetOriginalCode
()
local
m
=
c
:
GetOriginalCode
()
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
...
@@ -592,7 +688,7 @@ function VgF.DamageCost(num)
...
@@ -592,7 +688,7 @@ function VgF.DamageCost(num)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DAMAGE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DAMAGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num
,
num
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_DAMAGE
,
0
,
num
,
num
,
nil
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN_ATTACK
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN_ATTACK
)
end
return
Duel
.
GetOperatedGroup
():
GetCount
()
end
end
---用于效果的Operation。执行“从loc中选取1张满足f的卡,返回手牌。”。
---用于效果的Operation。执行“从loc中选取1张满足f的卡,返回手牌。”。
---@param loc integer 要选取的区域。不填则返回nil,而不是效果的Operation函数。
---@param loc integer 要选取的区域。不填则返回nil,而不是效果的Operation函数。
...
...
c10101006.lua
View file @
d7650427
...
@@ -3,11 +3,11 @@ local cm,m,o=GetID()
...
@@ -3,11 +3,11 @@ local cm,m,o=GetID()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
OverDress
(
c
,
10101009
)
vgd
.
OverDress
(
c
,
10101009
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
2
,
nil
,
cm
.
condition2
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
nil
,
cm
.
condition
)
end
end
function
cm
.
operation
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
VgF
.
AtkUp
(
c
,
c
,
10000
,
nil
)
VgF
.
AtkUp
(
c
,
c
,
10000
,
nil
,
nil
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
)
if
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
Card
.
IsAbleToGraveAsCost
,
nil
)
>=
2
and
Duel
.
SelectEffectYesNo
(
tp
,
vgf
.
stringid
(
VgID
,
10
))
then
if
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterCount
(
Card
.
IsAbleToGraveAsCost
,
nil
)
>=
2
and
Duel
.
SelectEffectYesNo
(
tp
,
vgf
.
stringid
(
VgID
,
10
))
then
local
cg
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
2
,
2
,
nil
)
local
cg
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
():
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsAbleToGraveAsCost
,
2
,
2
,
nil
)
if
Duel
.
SendtoGrave
(
cg
,
REASON_COST
)
==
2
then
if
Duel
.
SendtoGrave
(
cg
,
REASON_COST
)
==
2
then
...
@@ -20,7 +20,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -20,7 +20,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
cm
.
condition
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
vgf
.
RMonsterCondition
(
e
)
and
c
:
GetFlagEffectLabel
(
ConditionFlag
)
==
201
and
vgf
.
VMonsterFilter
(
Duel
.
GetAttackTarget
())
return
vgf
.
RMonsterCondition
(
e
)
and
c
:
GetFlagEffectLabel
(
ConditionFlag
)
==
201
and
vgf
.
VMonsterFilter
(
Duel
.
GetAttackTarget
())
end
end
\ No newline at end of file
c10105015.lua
View file @
d7650427
...
@@ -36,10 +36,10 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -36,10 +36,10 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
end
end
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
filter
,
1
,
nil
)
and
eg
:
Count
()
==
1
return
eg
:
IsExists
(
cm
.
filter
,
1
,
nil
,
e
)
and
eg
:
Count
()
==
1
end
end
function
cm
.
filter
(
c
)
function
cm
.
filter
(
c
,
e
)
return
c
:
IsSummonType
(
SUMMON_VALUE_CALL
)
return
c
:
IsSummonType
(
SUMMON_VALUE_CALL
)
and
c
:
GetControler
()
~=
e
:
GetHandler
():
GetControler
()
end
end
function
cm
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
vgf
.
GetAvailableLocation
(
tp
)
local
zone
=
vgf
.
GetAvailableLocation
(
tp
)
...
@@ -47,11 +47,15 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -47,11 +47,15 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if
ct
>
e
:
GetLabel
()
then
ct
=
e
:
GetLabel
()
end
if
ct
>
e
:
GetLabel
()
then
ct
=
e
:
GetLabel
()
end
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_CALL
)
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_CALL
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
0
,
LOCATION_ORDER
,
ct
,
ct
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
0
,
LOCATION_ORDER
,
ct
,
ct
,
nil
,
e
,
tp
)
if
#
g
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
vgf
.
Call
(
g
,
0
,
tp
)
for
tc
in
vgf
.
Next
(
g
)
do
if
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
then
vgf
.
Call
(
tc
,
0
,
tp
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
end
end
function
cm
.
filter1
(
c
,
e
,
tp
)
function
cm
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
,
tp
)
or
c
:
IsType
(
TYPE_SPELL
)
return
c
:
GetFlagEffect
(
ImprisonFlag
)
>
0
end
end
\ No newline at end of file
c10203001.lua
View file @
d7650427
...
@@ -6,15 +6,7 @@ function cm.initial_effect(c)
...
@@ -6,15 +6,7 @@ function cm.initial_effect(c)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
,
cm
.
operation
,
nil
,
cm
.
condition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
,
cm
.
operation
,
nil
,
cm
.
condition
)
--【永】【R】:这个回合中曾有你的等级3以上的先导者登场过的话,这个单位的力量+5000。
--【永】【R】:这个回合中曾有你的等级3以上的先导者登场过的话,这个单位的力量+5000。
vgd
.
EffectTypeContinuousChangeAttack
(
c
,
EFFECT_TYPE_SINGLE
,
5000
,
cm
.
con
)
vgd
.
EffectTypeContinuousChangeAttack
(
c
,
EFFECT_TYPE_SINGLE
,
5000
,
cm
.
con
)
if
not
cm
.
global_check
then
VgD
.
GlobalCheckEffect
(
c
,
m
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
,
EVENT_SPSUMMON_SUCCESS
,
cm
.
checkcon
,
cm
.
checkop
)
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetCondition
(
cm
.
checkcon
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
...
...
c10301001.lua
View file @
d7650427
...
@@ -3,15 +3,7 @@ function cm.initial_effect(c)
...
@@ -3,15 +3,7 @@ function cm.initial_effect(c)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
vgf
.
OverlayCost
(
1
),
cm
.
condition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
operation
,
vgf
.
OverlayCost
(
1
),
cm
.
condition
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
,
cm
.
operation1
,
nil
,
cm
.
condition1
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
,
cm
.
operation1
,
nil
,
cm
.
condition1
)
if
not
cm
.
global_check
then
vgd
.
GlobalCheckEffect
(
c
,
m
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
,
EVENT_SPSUMMON_SUCCESS
,
cm
.
checkcon
,
cm
.
checkop
)
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetCondition
(
cm
.
checkcon
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_SELFRIDE
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_SELFRIDE
)
...
...
c10401002.lua
View file @
d7650427
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeIgnition
(
c
,
m
,
LOCATION_MZONE
,
cm
.
op
,
cm
.
cost
,
vgf
.
VMonsterCondition
)
vgd
.
EffectTypeIgnition
(
c
,
m
,
LOCATION_MZONE
,
cm
.
op1
,
vgf
.
OverlayCost
(
5
),
cm
.
con
,
nil
,
nil
,
nil
,
2
)
vgd
.
GlobalCheckEffect
(
c
,
m
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
,
EVENT_TO_GRAVE
,
cm
.
checkcon
,
cm
.
checkop
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
2
,
nil
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENCE
)
end
function
cm
.
filter
(
c
)
return
c
:
IsCanChangePosition
()
and
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
vgf
.
RMonsterFilter
(
c
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LEAVEONFIELD
)
local
g
=
Duel
.
SelectTarget
(
tp
,
vgf
.
VMonsterFilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
vgf
.
AtkUp
(
c
,
c
,
10000
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
end
function
cm
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
6
-
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
if
ct
<=
0
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
ct
)
Duel
.
ConfirmCards
(
g
)
local
ct1
=
vgf
.
GetAvailableLocation
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CALL
)
local
sg
=
g
:
FilterSelect
(
tp
,
Card
.
IsCanBeSpecialSummoned
,
0
,
ct1
,
nil
)
if
sg
:
GetCount
()
>
0
then
vgf
.
Call
(
sg
,
0
,
tp
)
for
tc
in
vgf
.
Next
(
sg
)
do
g
:
RemoveCard
(
tc
)
end
end
if
g
:
GetCount
()
>
0
then
local
tc
=
vgf
.
GetVMonster
(
tp
)
Duel
.
Overlay
(
tc
,
g
)
end
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
,
tp
)
end
function
cm
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousControler
(
1
-
tp
)
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
\ No newline at end of file
c10401003.lua
View file @
d7650427
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
op
,
vgf
.
DamageCost
(
1
),
vgf
.
VMonsterCondition
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
c
:
GetOverlayCount
()
if
ct
>=
5
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
if
ct
>=
10
then
vgf
.
AtkUp
(
c
,
c
,
10000
,
nil
,
nil
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
)
vgf
.
StarUp
(
c
,
c
,
1
,
nil
,
nil
,
EFFECT_TYPE_SINGLE
,
EVENT_BATTLED
)
end
if
ct
>=
15
then
local
g1
=
Duel
.
GetMatchingGroup
(
vgf
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
vgf
.
RMonsterFilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc1
=
vgf
.
GetVMonster
(
tp
)
local
tc2
=
vgf
.
GetVMonster
(
1
-
tp
)
for
tc
in
vgf
.
Next
(
g1
)
do
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
Overlay
(
tc1
,
og
)
end
end
for
tc
in
vgf
.
Next
(
g2
)
do
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
Overlay
(
tc2
,
og
)
end
end
Duel
.
Overlay
(
tc1
,
g1
)
Duel
.
Overlay
(
tc2
,
g2
)
if
vgf
.
GetAvailableLocation
(
tp
)
>
0
then
local
g
=
tc1
:
GetOverlayGroup
():
FilterSelect
(
tp
,
Card
.
IsCanBeSpecialSummoned
,
tp
,
0
,
2
,
nil
,
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
vgf
.
Call
(
g
,
0
,
tp
)
end
end
end
end
\ No newline at end of file
c10401004.lua
View file @
d7650427
local
cm
,
m
,
o
=
GetID
()
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
GlobalCheckEffect
(
c
,
m
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
,
EVENT_CHANGE_POS
,
cm
.
checkcon
,
cm
.
checkop
)
vgd
.
EffectTypeContinuousChangeAttack
(
c
,
EFFECT_TYPE_SINGLE
,
5000
,
cm
.
con
)
vgd
.
EffectTypeContinuousChangeAttack
(
c
,
EFFECT_TYPE_SINGLE
,
1
,
cm
.
con1
,
nil
,
nil
,
EFFECT_UPDATE_LSCALE
)
vgd
.
EffectTypeContinuousChangeAttack
(
c
,
EFFECT_TYPE_SINGLE
,
1
,
cm
.
con1
,
nil
,
nil
,
EFFECT_UPDATE_RSCALE
)
vgd
.
EffectTypeTriggerWhenHitting
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
cm
.
op
,
vgf
.
DamageCost
(
1
))
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsContains
(
e
:
GetHandler
())
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffectLabel
(
tp
,
ConditionFlag
)
==
10102001
end
function
cm
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
and
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LEAVEONFIELD
)
local
g
=
Duel
.
SelectTarget
(
tp
,
vgf
.
RMonsterFilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
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