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
1a505e69
Commit
1a505e69
authored
Apr 28, 2024
by
jwyxym
Committed by
GitHub
Apr 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
e1cd4328
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
45 deletions
+77
-45
VgD.Lua
VgD.Lua
+43
-25
VgDefinition.Lua
VgDefinition.Lua
+1
-0
VgFuncLib.lua
VgFuncLib.lua
+33
-20
No files found.
VgD.Lua
View file @
1a505e69
...
@@ -309,10 +309,9 @@ function VgD.MonsterBattle(c)
...
@@ -309,10 +309,9 @@ function VgD.MonsterBattle(c)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
local
e9
=
Effect
.
CreateEffect
(
c
)
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e9
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e9
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e9
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e9
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e9
:
SetValue
(
VgD
.
SupportValue
)
e9
:
SetValue
(
VgD
.
SupportValue
)
c
:
RegisterEffect
(
e9
)
c
:
RegisterEffect
(
e9
)
--防御
--防御
...
@@ -328,9 +327,8 @@ function VgD.MonsterBattle(c)
...
@@ -328,9 +327,8 @@ function VgD.MonsterBattle(c)
c
:
RegisterEffect
(
e7
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e8
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e8
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e8
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CANNOT_DISABLE
)
e8
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e8
:
SetRange
(
LOCATION_GZONE
)
e8
:
SetRange
(
LOCATION_GZONE
)
e8
:
SetOperation
(
VgD
.
GToGraveOperation
)
e8
:
SetOperation
(
VgD
.
GToGraveOperation
)
c
:
RegisterEffect
(
e8
)
c
:
RegisterEffect
(
e8
)
...
@@ -375,9 +373,8 @@ function VgD.MonsterBattle(c)
...
@@ -375,9 +373,8 @@ function VgD.MonsterBattle(c)
local
e16
=
e15
:
Clone
()
local
e16
=
e15
:
Clone
()
e16
:
SetType
(
EFFECT_TYPE_SINGLE
)
e16
:
SetType
(
EFFECT_TYPE_SINGLE
)
e16
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e16
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e16
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e16
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetCondition
(
VgD
.
MonsterCannotBeAttackedCondition
)
e16
:
SetCondition
(
VgD
.
MonsterCannotBeAttackedCondition
)
e16
:
SetValue
(
VgF
.
True
)
e16
:
SetValue
(
VgF
.
True
)
c
:
RegisterEffect
(
e16
)
c
:
RegisterEffect
(
e16
)
...
@@ -399,9 +396,11 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -399,9 +396,11 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
c
:
RegisterFlagEffect
(
AttackTriggerFlag
,
RESET_EVENT
+
RESETS_STANDARD
+
EVENT_PRE_BATTLE_DAMAGE
,
0
,
1
,
label
)
end
end
function
VgD
.
MonsterPosAttackOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
MonsterPosAttackOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEUP_DEFENSE
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEUP_DEFENSE
)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
if
g
:
GetCount
()
>
0
and
Duel
.
GetTurnPlayer
()
==
tp
then
Duel
.
Hint
(
HINT_LINES
,
tp
,
VgF
.
Stringid
(
VgID
,
8
))
Duel
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
Duel
.
Hint
(
HINT_LINES
,
tp
,
VgF
.
Stringid
(
VgID
,
8
))
end
end
end
function
VgD
.
MonsterBattleDamageCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
VgD
.
MonsterBattleDamageCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -516,9 +515,8 @@ function VgD.CardToG(c,cost)
...
@@ -516,9 +515,8 @@ function VgD.CardToG(c,cost)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
VgF
.
Stringid
(
VgID
,
2
))
e1
:
SetDescription
(
VgF
.
Stringid
(
VgID
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
type
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
type
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
e1
:
SetCondition
(
VgD
.
CardToGCondition
)
e1
:
SetCondition
(
VgD
.
CardToGCondition
)
e1
:
SetOperation
(
VgD
.
CardToGOperation
)
e1
:
SetOperation
(
VgD
.
CardToGOperation
)
...
@@ -536,9 +534,8 @@ end
...
@@ -536,9 +534,8 @@ end
function
VgD
.
CardTrigger
(
c
,
f
)
function
VgD
.
CardTrigger
(
c
,
f
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_CANNOT_DISABLE
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
0
))
e1
:
SetCondition
(
VgD
.
CardTriggerCondtion
(
0
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
0
,
f
))
e1
:
SetOperation
(
VgD
.
CardTriggerOperation
(
0
,
f
))
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -672,8 +669,7 @@ function VgD.Rule(c)
...
@@ -672,8 +669,7 @@ function VgD.Rule(c)
local
e10
=
Effect
.
CreateEffect
(
c
)
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetType
(
EFFECT_TYPE_FIELD
)
e10
:
SetType
(
EFFECT_TYPE_FIELD
)
e10
:
SetCode
(
EFFECT_HAND_LIMIT
)
e10
:
SetCode
(
EFFECT_HAND_LIMIT
)
e10
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e10
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e10
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e10
:
SetRange
(
LOCATION_ALL
)
e10
:
SetRange
(
LOCATION_ALL
)
e10
:
SetTargetRange
(
1
,
0
)
e10
:
SetTargetRange
(
1
,
0
)
e10
:
SetValue
(
100
)
e10
:
SetValue
(
100
)
...
@@ -689,10 +685,9 @@ function VgD.Rule(c)
...
@@ -689,10 +685,9 @@ function VgD.Rule(c)
c
:
RegisterEffect
(
e11
)
c
:
RegisterEffect
(
e11
)
local
e12
=
Effect
.
CreateEffect
(
c
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e12
:
SetCode
(
EFFECT_SKIP_M2
)
e12
:
SetCode
(
EFFECT_SKIP_M2
)
e12
:
SetRange
(
LOCATION_ALL
)
e12
:
SetRange
(
LOCATION_ALL
)
e12
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e12
:
SetProperty
(
EFFECT_FLAG_
PLAYER_TARGET
+
EFFECT_FLAG_
CANNOT_DISABLE
)
e12
:
SetTargetRange
(
1
,
0
)
e12
:
SetTargetRange
(
1
,
0
)
c
:
RegisterEffect
(
e12
)
c
:
RegisterEffect
(
e12
)
local
e13
=
e12
:
Clone
()
local
e13
=
e12
:
Clone
()
...
@@ -708,8 +703,8 @@ function VgD.Rule(c)
...
@@ -708,8 +703,8 @@ function VgD.Rule(c)
e16
:
SetType
(
EFFECT_TYPE_FIELD
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
)
e16
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e16
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e16
:
SetRange
(
LOCATION_ALL
)
e16
:
SetRange
(
LOCATION_ALL
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetCondition
(
VgF
.
RuleCardCondtion
)
e16
:
SetCondition
(
VgF
.
RuleCardCondtion
)
e16
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e16
:
SetTargetRange
(
LOCATION_HAND
,
0
)
c
:
RegisterEffect
(
e16
)
c
:
RegisterEffect
(
e16
)
end
end
...
@@ -902,7 +897,7 @@ function VgD.EffectTypeTrigger(c,m,loc,typ,code,op,cost,con,tg,count,property,st
...
@@ -902,7 +897,7 @@ function VgD.EffectTypeTrigger(c,m,loc,typ,code,op,cost,con,tg,count,property,st
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
VgF
.
Stringid
(
m
,
stringid
))
e1
:
SetDescription
(
VgF
.
Stringid
(
m
,
stringid
))
e1
:
SetType
(
typ
+
type2
)
e1
:
SetType
(
typ
+
type2
)
if
code
~=
EVENT_SPSUMMON_SUCCESS
then
e1
:
SetRange
(
loc
)
end
if
VgF
.
GetValueType
(
loc
)
==
"number"
then
e1
:
SetRange
(
loc
)
end
e1
:
SetCode
(
code
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
property
+
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
property
+
EFFECT_FLAG_DELAY
)
if
count
and
count
>
0
then
e1
:
SetCountLimit
(
count
)
end
if
count
and
count
>
0
then
e1
:
SetCountLimit
(
count
)
end
...
@@ -958,20 +953,43 @@ function VgD.QuickSpell(c,code,op,cost,con,tg)
...
@@ -958,20 +953,43 @@ function VgD.QuickSpell(c,code,op,cost,con,tg)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
code
)
e1
:
SetCode
(
code
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
e1
:
SetCondition
(
VgD
.
LvCondition
(
con
))
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
if
VgF
.
GetValueType
(
tg
)
==
"function"
then
e1
:
SetTarget
(
tg
)
end
if
VgF
.
GetValueType
(
tg
)
==
"function"
then
e1
:
SetTarget
(
tg
)
end
if
VgF
.
GetValueType
(
op
)
==
"function"
then
e1
:
SetOperation
(
op
)
end
if
VgF
.
GetValueType
(
op
)
==
"function"
then
e1
:
SetOperation
(
op
)
end
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
VgD
.
EffectTypeContinuousChangeAttack
(
c
,
typ
,
val
,
con
)
function
VgD
.
LvCondition
(
con
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
VgF
.
GetValueType
(
con
)
==
"function"
and
not
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
return
false
end
return
VgF
.
LvCondition
(
e
)
end
end
function
VgD
.
ContinuousSpell
(
c
,
cost
,
con
,
tg
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
VgD
.
LvCondition
(
con
))
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
if
VgF
.
GetValueType
(
tg
)
==
"function"
then
e1
:
SetTarget
(
tg
)
end
e1
:
SetOperation
(
VgD
.
ContinuousSpellOperation
)
c
:
RegisterEffect
(
e1
)
end
function
VgD
.
ContinuousSpellOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Sendto
(
c
,
tp
,
LOCATION_ORDER
,
POS_FACEUP_ATTACK
,
REASON_RULE
)
end
function
VgD
.
EffectTypeContinuousChangeAttack
(
c
,
typ
,
val
,
con
,
tg
,
mc
,
code
,
reset
)
if
VgF
.
GetValueType
(
mc
)
~=
"Card"
then
mc
=
c
end
if
not
typ
then
typ
=
EFFECT_TYPE_SINGLE
end
if
not
typ
then
typ
=
EFFECT_TYPE_SINGLE
end
if
not
code
then
code
=
EFFECT_UPDATE_ATTACK
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
typ
)
e1
:
SetProperty
(
type
)
e1
:
SetCode
(
code
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
if
reset
>
0
then
e1
:
SetReset
(
reset
)
end
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
tg
)
==
"function"
then
e1
:
SetTarget
(
tg
)
end
e1
:
SetValue
(
val
)
e1
:
SetValue
(
val
)
c
:
RegisterEffect
(
e1
)
m
c
:
RegisterEffect
(
e1
)
end
end
\ No newline at end of file
VgDefinition.Lua
View file @
1a505e69
...
@@ -781,6 +781,7 @@ HINTMSG_CALL =HINTMSG_SUMMON --请选择要Call到圆阵的卡
...
@@ -781,6 +781,7 @@ HINTMSG_CALL =HINTMSG_SUMMON --请选择要Call到圆阵的卡
HINTMSG_DAMAGE
=
HINTMSG_SET
--请选择要消耗的费用
HINTMSG_DAMAGE
=
HINTMSG_SET
--请选择要消耗的费用
HINTMSG_ATKUP
=
HINTMSG_FMATERIAL
--请选择力量上升的卡
HINTMSG_ATKUP
=
HINTMSG_FMATERIAL
--请选择力量上升的卡
HINTMSG_CRITICAL_STRIKE
=
HINTMSG_SMATERIAL
--请选择☆值上升的卡
HINTMSG_CRITICAL_STRIKE
=
HINTMSG_SMATERIAL
--请选择☆值上升的卡
HINTMSG_VMONSTER
=
HINTMSG_FACEUPATTACK
--请选择先导者
--Select --请选择
--Select --请选择
SELECT_HEADS
=
60
--正面
SELECT_HEADS
=
60
--正面
SELECT_TAILS
=
61
--反面
SELECT_TAILS
=
61
--反面
...
...
VgFuncLib.lua
View file @
1a505e69
...
@@ -32,6 +32,7 @@ function VgF.Stringid(code,id)
...
@@ -32,6 +32,7 @@ function VgF.Stringid(code,id)
return
code
*
16
+
id
return
code
*
16
+
id
end
end
function
VgF
.
DefineArguments
()
function
VgF
.
DefineArguments
()
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
count
then
count
=
nil
end
if
not
count
then
count
=
nil
end
...
@@ -121,6 +122,13 @@ function VgF.GetCardsFromGroup(g,num)
...
@@ -121,6 +122,13 @@ function VgF.GetCardsFromGroup(g,num)
end
end
end
end
bit
=
{}
bit
=
{}
function
bit
.
ReturnCount
(
n
)
if
n
==
0
then
return
0
end
return
1
+
bit
.
ReturnCount
(
n
&
(
n
-
1
))
end
---返回对a和b进行按位与运算的结果。
---返回对a和b进行按位与运算的结果。
---@param a integer 操作数1
---@param a integer 操作数1
---@param b integer 操作数2
---@param b integer 操作数2
...
@@ -283,54 +291,59 @@ end
...
@@ -283,54 +291,59 @@ end
function
VgF
.
tgoval
(
e
,
re
,
rp
)
function
VgF
.
tgoval
(
e
,
re
,
rp
)
return
rp
==
1
-
e
:
GetHandlerPlayer
()
return
rp
==
1
-
e
:
GetHandlerPlayer
()
end
end
function
VgF
.
GetAvailableLocation
(
tp
)
local
z
=
0xe0
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEDOWN_ATTACK
)
for
tc
in
VgF
.
Next
(
rg
)
do
local
szone
=
VgF
.
SequenceToGlobal
(
tp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
z
=
bit
.
bor
(
z
,
szone
)
end
return
z
end
---将g(中的每一张卡)Call到单位区。返回Call成功的数量。
---将g(中的每一张卡)Call到单位区。返回Call成功的数量。
---@param g Card|Group 要Call的卡(片组)
---@param g Card|Group 要Call的卡(片组)
---@param sumtype integer Call的方式,默认填0
---@param sumtype integer Call的方式,默认填0
---@param sp integer 表示形式
---@param sp integer 表示形式
---@param zone integer 指示要Call到的格子。<br>前列的R:17; 后列的R:14; 全部的R:31; V:32
---@param zone integer 指示要Call到的格子。<br>前列的R:17; 后列的R:14; 全部的R:31; V:32
---@return integer Call成功的数量
---@return integer Call成功的数量
function
VgF
.
Call
(
g
,
sumtype
,
sp
,
zone
)
function
VgF
.
Call
(
g
,
sumtype
,
tp
,
zone
,
pos
)
if
VgF
.
GetValueType
(
pos
)
~=
"number"
then
pos
=
POS_FACEUP_ATTACK
end
if
zone
then
if
zone
then
if
Duel
.
IsExistingMatchingCard
(
VgD
.
CallFilter
,
sp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
s
p
,
zone
)
then
if
Duel
.
IsExistingMatchingCard
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
t
p
,
zone
)
then
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
CallFilter
,
sp
,
LOCATION_MZONE
,
0
,
nil
,
s
p
,
zone
):
GetFirst
()
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
t
p
,
zone
):
GetFirst
()
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
sp
,
sp
,
false
,
false
,
POS_FACEUP_ATTACK
,
zone
)
return
Duel
.
SpecialSummon
(
g
,
sumtype
,
tp
,
tp
,
false
,
false
,
pos
,
zone
)
end
end
local
sg
local
sg
local
z
=
0xe0
local
z
=
VgF
.
GetAvailableLocation
(
tp
)
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsPosition
,
sp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEDOWN_ATTACK
)
for
tc
in
VgF
.
Next
(
rg
)
do
local
szone
=
VgF
.
SequenceToGlobal
(
sp
,
tc
:
GetLocation
(),
tc
:
GetSequence
())
z
=
bit
.
bor
(
z
,
szone
)
end
if
VgF
.
GetValueType
(
g
)
==
"Card"
then
sg
=
Group
.
FromCards
(
g
)
else
sg
=
Group
.
Clone
(
g
)
end
if
VgF
.
GetValueType
(
g
)
==
"Card"
then
sg
=
Group
.
FromCards
(
g
)
else
sg
=
Group
.
Clone
(
g
)
end
for
sc
in
VgF
.
Next
(
sg
)
do
for
sc
in
VgF
.
Next
(
sg
)
do
if
sc
:
IsLocation
(
LOCATION_EXTRA
)
then
if
sc
:
IsLocation
(
LOCATION_EXTRA
)
then
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
s
p
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
rc
=
Duel
.
GetMatchingGroup
(
VgF
.
VMonsterFilter
,
t
p
,
LOCATION_MZONE
,
0
,
nil
):
GetFirst
()
local
mg
=
rc
:
GetOverlayGroup
()
local
mg
=
rc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
sc
,
mg
)
Duel
.
Overlay
(
sc
,
mg
)
end
end
sc
:
SetMaterial
(
Group
.
FromCards
(
rc
))
sc
:
SetMaterial
(
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
rc
))
Duel
.
SpecialSummonStep
(
sc
,
sumtype
,
sp
,
sp
,
false
,
false
,
POS_FACEUP_ATTACK
,
0x20
)
Duel
.
SpecialSummonStep
(
sc
,
sumtype
,
tp
,
tp
,
false
,
false
,
pos
,
0x20
)
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
s
p
,
HINTMSG_CallZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
t
p
,
HINTMSG_CallZONE
)
local
szone
=
Duel
.
SelectField
(
s
p
,
1
,
LOCATION_MZONE
,
0
,
z
)
local
szone
=
Duel
.
SelectField
(
t
p
,
1
,
LOCATION_MZONE
,
0
,
z
)
if
Duel
.
IsExistingMatchingCard
(
VgD
.
CallFilter
,
sp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
s
p
,
szone
)
then
if
Duel
.
IsExistingMatchingCard
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
t
p
,
szone
)
then
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
CallFilter
,
sp
,
LOCATION_MZONE
,
0
,
nil
,
s
p
,
szone
):
GetFirst
()
local
tc
=
Duel
.
GetMatchingGroup
(
VgD
.
CallFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
t
p
,
szone
):
GetFirst
()
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
Duel
.
SpecialSummonStep
(
sc
,
sumtype
,
sp
,
sp
,
false
,
false
,
POS_FACEUP_ATTACK
,
szone
)
Duel
.
SpecialSummonStep
(
sc
,
sumtype
,
tp
,
tp
,
false
,
false
,
pos
,
szone
)
z
=
bit
.
bor
(
z
,
szone
)
z
=
bit
.
bor
(
z
,
szone
)
end
end
end
end
return
Duel
.
SpecialSummonComplete
()
return
Duel
.
SpecialSummonComplete
()
end
end
function
VgF
.
LvCondition
(
e_or_c
)
function
VgF
.
LvCondition
(
e_or_c
)
local
c
=
VgF
.
GetValueType
(
e_or_c
)
==
"Effect"
and
e_or_c
:
GetHandler
()
or
e_or_c
local
c
=
VgF
.
GetValueType
(
e_or_c
)
==
"Effect"
and
e_or_c
:
GetHandler
()
or
e_or_c
local
tp
,
lv
=
c
:
GetControler
(),
c
:
GetLevel
()
local
tp
,
lv
=
c
:
GetControler
(),
c
:
GetLevel
()
return
Duel
.
IsExistingMatchingCard
(
VgF
.
LvConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
lv
)
return
Duel
.
IsExistingMatchingCard
(
VgF
.
LvConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
lv
)
end
end
function
VgF
.
LvConditionFilter
(
c
,
lv
)
function
VgF
.
LvConditionFilter
(
c
,
lv
)
...
@@ -408,7 +421,7 @@ end
...
@@ -408,7 +421,7 @@ end
---@return boolean 指示c能否去到G区域。
---@return boolean 指示c能否去到G区域。
function
VgF
.
IsAbleToGZone
(
c
)
function
VgF
.
IsAbleToGZone
(
c
)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
c
:
IsLocation
(
LOCATION_MZONE
)
then
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
then
return
c
:
IsAttribute
(
SKILL_BLOCK
)
and
VgF
.
IsSequence
(
c
,
0
,
4
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SENDTOG_MZONE
)
return
c
:
IsAttribute
(
SKILL_BLOCK
)
and
VgF
.
IsSequence
(
c
,
0
,
4
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
AFFECT_CODE_SENDTOG_MZONE
)
end
end
return
c
:
IsLocation
(
LOCATION_HAND
)
return
c
:
IsLocation
(
LOCATION_HAND
)
...
...
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