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
be2f6a8e
Commit
be2f6a8e
authored
Sep 18, 2024
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
22d40fb3
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
224 additions
and
31 deletions
+224
-31
VgD.Lua
VgD.Lua
+5
-2
VgDefinition.Lua
VgDefinition.Lua
+3
-3
VgFuncLib.lua
VgFuncLib.lua
+36
-26
c10402011.lua
c10402011.lua
+17
-0
c10402012.lua
c10402012.lua
+10
-0
c10402013.lua
c10402013.lua
+24
-0
c10402014.lua
c10402014.lua
+15
-0
c10402015.lua
c10402015.lua
+13
-0
c10402016.lua
c10402016.lua
+29
-0
c10402017.lua
c10402017.lua
+31
-0
c10402018.lua
c10402018.lua
+29
-0
c10402019.lua
c10402019.lua
+12
-0
No files found.
VgD.Lua
View file @
be2f6a8e
...
...
@@ -438,7 +438,9 @@ function VgD.MonsterBattleDamageCondition(e,tp,eg,ep,ev,re,r,rp)
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
false
end
local
atk
=
bc
:
GetAttack
()
local
def
=
c
:
GetAttack
()
return
VgF
.
VMonsterFilter
(
c
)
and
c
==
Duel
.
GetAttackTarget
()
and
atk
>=
def
and
bc
:
GetLeftScale
()
>
0
and
Duel
.
GetAttackTarget
():
GetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
==
0
if
Duel
.
GetAttackTarget
():
GetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
>
0
and
Duel
.
GetAttackTarget
():
GetFlagEffectLabel
(
FLAG_DEFENSE_ENTIRELY
)
==
10402017
and
bc
:
IsLevelBelow
(
2
)
then
return
false
end
if
Duel
.
GetAttackTarget
():
GetFlagEffect
(
FLAG_DEFENSE_ENTIRELY
)
>
0
and
Duel
.
GetAttackTarget
():
GetFlagEffectLabel
(
FLAG_DEFENSE_ENTIRELY
)
==
0
then
return
false
end
return
VgF
.
VMonsterFilter
(
c
)
and
c
==
Duel
.
GetAttackTarget
()
and
atk
>=
def
and
bc
:
GetLeftScale
()
>
0
end
function
VgD
.
MonsterBattleDamageOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -522,7 +524,7 @@ function VgD.MonsterCannotBeAttackedCondition(e,c)
end
--送去g区
function
vgd
.
CardToG
(
c
,
m
,
cost
,
op
)
function
vgd
.
CardToG
(
c
,
m
,
cost
,
op
,
con
)
local
cm
=
_G
[
"c"
..
m
]
if
not
cm
.
is_has_trigger
then
cm
.
is_has_trigger
=
true
end
local
type
=
EFFECT_TYPE_TRIGGER_F
...
...
@@ -532,6 +534,7 @@ function vgd.CardToG(c,m,cost,op)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
type
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_MOVE
)
if
VgF
.
GetValueType
(
con
)
==
"function"
then
e1
:
SetCondition
(
con
)
end
if
VgF
.
GetValueType
(
cost
)
==
"function"
then
e1
:
SetCost
(
cost
)
end
e1
:
SetCondition
(
VgD
.
CardToGCondition
)
if
VgF
.
GetValueType
(
op
)
~=
"function"
then
e1
:
SetOperation
(
VgD
.
CardToGOperation
)
else
e1
:
SetOperation
(
op
)
end
...
...
VgDefinition.Lua
View file @
be2f6a8e
...
...
@@ -85,8 +85,8 @@ SKILL_ALL =0x7f --All
SKILL_NONE
=
0x01
--无
SKILL_SUPPORT
=
0x02
--支援
SKILL_BLOCK
=
0x04
--截击
SKILL_T
HRICE_TRIGGER
=
0x08
--双判
SKILL_T
WICE_TRIGGER
=
0x10
--三判
SKILL_T
WICE_TRIGGER
=
0x08
--双判
SKILL_T
HRICE_TRIGGER
=
0x10
--三判
SKILL_SELF_RIDE
=
0x20
--人格骑升
SKILL_DEBRIS
=
0x40
--结晶碎片
--触发类型 --种族
...
...
@@ -449,7 +449,7 @@ EFFECT_REMOVE_RACE =121 --删除种族
EFFECT_CHANGE_RACE
=
122
--改变种族
EFFECT_ADD_SKILL
=
125
--增加技能
EFFECT_REMOVE_SKILL
=
126
--删除技能
EFFECT_CHANGE_
ATTRIBUTE
=
127
--改变属性
EFFECT_CHANGE_
SKILL
=
127
--改变技能
EFFECT_UPDATE_LEVEL
=
130
--改变等级
EFFECT_CHANGE_LEVEL
=
131
--设置等级
EFFECT_UPDATE_RANK
=
132
--改变阶级
...
...
VgFuncLib.lua
View file @
be2f6a8e
...
...
@@ -262,40 +262,40 @@ function VgF.GetColumnGroup(c)
local
tp
=
c
:
GetControler
()
local
g
=
Group
.
CreateGroup
()
if
c
:
GetSequence
()
==
0
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
1
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
local
sg1
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
1
)
local
sg2
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
if
sg1
:
GetCount
()
>
0
then
g
:
Merge
(
sg1
)
end
if
sg2
:
GetCount
()
>
0
then
g
:
Merge
(
sg2
)
end
end
if
c
:
GetSequence
()
==
1
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
local
sg1
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
0
)
local
sg2
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
3
,
4
)
if
sg1
:
GetCount
()
>
0
then
g
:
Merge
(
sg1
)
end
if
sg2
:
GetCount
()
>
0
then
g
:
Merge
(
sg2
)
end
end
if
c
:
GetSequence
()
==
2
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
5
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
local
sg1
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
5
)
local
sg2
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
if
sg1
:
GetCount
()
>
0
then
g
:
Merge
(
sg1
)
end
if
sg2
:
GetCount
()
>
0
then
g
:
Merge
(
sg2
)
end
end
if
c
:
GetSequence
()
==
3
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
4
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
local
sg1
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
4
)
local
sg2
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
if
sg1
:
GetCount
()
>
0
then
g
:
Merge
(
sg1
)
end
if
sg2
:
GetCount
()
>
0
then
g
:
Merge
(
sg2
)
end
end
if
c
:
GetSequence
()
==
4
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
3
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
local
sg1
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
3
)
local
sg2
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
0
,
1
)
if
sg1
:
GetCount
()
>
0
then
g
:
Merge
(
sg1
)
end
if
sg2
:
GetCount
()
>
0
then
g
:
Merge
(
sg2
)
end
end
if
c
:
GetSequence
()
==
5
then
local
sg1
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
2
)
local
sg2
=
Duel
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
if
sg1
then
g
:
Merge
(
sg1
)
end
if
sg2
then
g
:
Merge
(
sg2
)
end
local
sg1
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
2
)
local
sg2
=
VgF
.
GetMatchingGroup
(
VgF
.
IsSequence
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
2
,
5
)
if
sg1
:
GetCount
()
>
0
then
g
:
Merge
(
sg1
)
end
if
sg2
:
GetCount
()
>
0
then
g
:
Merge
(
sg2
)
end
end
return
g
end
...
...
@@ -577,7 +577,7 @@ function VgF.DisCardCost(val)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_HAND
,
0
,
val
,
val
,
nil
)
return
VgF
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_COST
+
REASON_DISCARD
)
return
VgF
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_COST
)
end
end
---用于效果的Cost。它返回一个执行“【费用】[能量爆发val]”的函数。
...
...
@@ -1119,7 +1119,17 @@ function VgF.Sendto(loc,sg,...)
end
if
loc
==
LOCATION_DROP
then
AddOverlayGroup
(
g
,
LOCATION_DROP
)
return
Duel
.
SendtoGrave
(
g
,
...
)
local
return_val
=
0
if
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_HAND
)
then
local
g2
=
g
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
reason
=
ext_params
[
1
]
if
VgF
.
GetValueType
(
reason
)
~=
"number"
then
reason
=
0
end
if
bit
.
band
(
reason
,
REASON_DISCARD
)
==
0
then
reason
=
reason
+
REASON_DISCARD
end
return_val
=
return_val
+
Duel
.
SendtoGrave
(
g2
,
reason
)
g
:
Sub
(
g2
)
end
return_val
=
return_val
+
Duel
.
SendtoGrave
(
g
,
...
)
return
return_val
elseif
loc
==
LOCATION_DECK
then
return
Duel
.
SendtoDeck
(
g
,
...
)
elseif
loc
==
LOCATION_HAND
then
...
...
c10402011.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTriggerWhenHitting
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
cm
.
op
,
cm
.
cost
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
vgf
.
SelectMatchingCard
(
HINTMSG_LEAVEFIELD
,
e
,
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
vgf
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
if
vgf
.
GetVMonster
(
tp
):
IsCode
(
10101001
)
then
vgf
.
SearchCard
(
LOCATION_MZONE
,
LOCATION_GRAVE
,
Card
.
IsLevel
,
1
,
0
,
0
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
cm
.
filter
(
c
)
return
vgf
.
FrontFilter
(
c
)
and
vgf
.
RMonsterFilter
(
c
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
vgf
.
DamageCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
vgf
.
OverlayCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
vgf
.
DamageCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
vgf
.
OverlayCost
(
1
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
\ No newline at end of file
c10402012.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
nil
,
EFFECT_TYPE_SINGLE
,
EVENT_DISCARD
,
cm
.
op
,
vgf
.
True
,
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
vgf
.
Sendto
(
LOCATION_OVERLAY
,
c
)
end
end
\ No newline at end of file
c10402013.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeIgnition
(
c
,
m
,
LOCATION_MZONE
,
cm
.
op
,
vgf
.
DamageCost
(
1
),
cm
.
con
)
vgd
.
GlobalCheckEffect
(
c
,
m
,
EVENT_TO_GRAVE
,
cm
.
checkcon
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
vgf
.
RMonsterCondition
(
e
)
and
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
SelectOption
(
tp
,
vgf
.
Stringid
(
m
,
0
),
vgf
.
Stringid
(
m
,
1
))
==
0
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
vgf
.
AtkUp
(
c
,
c
,
10000
)
end
else
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
vgf
.
Sendto
(
LOCATION_OVERLAY
,
c
)
end
local
g
=
vgf
.
SelectMatchingCard
(
HINTMSG_LEAVEFIELD
,
e
,
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
vgf
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_EFFECT
)
end
end
function
cm
.
checkfilter
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousControler
(
1
-
tp
)
and
c
:
IsControler
(
1
-
tp
)
end
function
cm
.
checkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
checkfilter
,
1
,
nil
,
tp
)
end
function
cm
.
filter
(
c
)
return
vgf
.
RMonsterFilter
(
c
)
and
c
:
IsLevelAbove
(
2
)
end
\ No newline at end of file
c10402014.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
op
,
vgf
.
DisCardCost
(
1
),
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
vgf
.
GetVMonster
(
tp
):
IsCode
(
10401003
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
vgf
.
AtkUp
(
c
,
c
,
5000
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
end
if
vgf
.
GetVMonster
(
tp
):
GetOverlayCount
()
>=
10
then
Duel
.
BreakEffect
()
vgf
.
OverlayFill
(
1
)
end
end
\ No newline at end of file
c10402015.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_SINGLE
,
EVENT_ATTACK_ANNOUNCE
,
cm
.
op
,
vgf
.
DamageCost
(
1
),
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
vgf
.
GetVMonster
(
tp
):
IsLevel
(
3
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
val
=
5000
if
vgf
.
IsExistingMatchingCard
(
vgf
.
RMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
3
,
c
)
then
val
=
10000
end
local
e1
=
vgf
.
AtkUp
(
c
,
c
,
val
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
end
end
\ No newline at end of file
c10402016.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_CUSTOM
+
EVENT_SUPPORT
,
cm
.
op
,
vgf
.
DamageCost
(
1
),
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
Duel
.
GetFlagEffectLabel
(
tp
,
FLAG_CONDITION
)
if
VgF
.
GetValueType
(
ct
)
~=
"number"
or
ct
~=
10102001
then
return
false
end
return
eg
:
GetFirst
()
==
c
and
Duel
.
GetAttacker
()
==
vgf
.
GetVMonster
(
tp
)
and
vgf
.
RMonsterCondition
(
e
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
vgf
.
SelectMatchingCard
(
HINTMSG_VMONSTER
,
e
,
tp
,
vgf
.
VMonsterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
:
IsAttribute
(
SKILL_TWICE_TRIGGER
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_REMOVE_SKILL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
SKILL_TWICE_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_ADD_SKILL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
SKILL_THRICE_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
\ No newline at end of file
c10402017.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
CardToG
(
c
,
m
,
vgf
.
OverlayCost
(
1
),
cm
.
op
,
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
vgf
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_ORDER
,
0
,
1
,
nil
)
end
function
cm
.
filter
(
c
)
return
c
:
GetFlagEffect
(
FLAG_IMPRISON
)
>
0
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetAttackTarget
()
if
vgf
.
RMonsterFilter
(
tc
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCondition
(
cm
.
con1
)
e1
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e1
)
vgf
.
EffectReset
(
c
,
e1
,
EVENT_BATTLED
)
elseif
vgf
.
VMonsterFilter
(
tc
)
then
tc
:
RegisterFlagEffect
(
FLAG_DEFENSE_ENTIRELY
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
m
)
end
end
function
cm
.
con1
(
e
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
if
not
bc
or
not
bc
:
IsRelateToBattle
()
then
return
false
end
return
bc
:
IsLevelBelow
(
2
)
end
\ No newline at end of file
c10402018.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeTrigger
(
c
,
m
,
LOCATION_MZONE
,
EFFECT_TYPE_FIELD
,
EVENT_CUSTOM
+
EVENT_SUPPORT
,
cm
.
op
,
vgf
.
True
,
cm
.
con
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
eg
:
GetFirst
()
==
c
and
Duel
.
GetAttacker
():
IsCode
(
10000001
)
and
vgf
.
RMonsterCondition
(
e
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
vgf
.
AtkUp
(
c
,
c
,
15000
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
cm
.
op2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
e
:
Reset
()
return
end
local
g
=
vgf
.
GetColumnGroup
(
c
):
Filter
(
cm
.
filter
,
nil
,
tp
)
vgf
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
e
:
Reset
()
end
function
cm
.
filter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
vgf
.
RMonsterFilter
(
c
)
end
\ No newline at end of file
c10402019.lua
View file @
be2f6a8e
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
vgf
.
VgCard
(
c
)
vgd
.
EffectTypeIgnition
(
c
,
m
,
LOCATION_MZONE
,
vgf
.
DamageFill
(
1
),
cm
.
cost
,
vgf
.
RMonsterCondition
,
nil
,
1
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
VgF
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
VgF
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
return
VgF
.
Sendto
(
LOCATION_DROP
,
g
,
REASON_COST
)
end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsType
(
TYPE_SPELL
)
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