Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
3
Merge Requests
3
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
MyCard
ygopro-scripts-888
Commits
e5433ecb
You need to sign in or sign up before continuing.
Commit
e5433ecb
authored
Mar 26, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into master
parents
38d2df6b
b2bb47f8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
72 additions
and
100 deletions
+72
-100
c1372887.lua
c1372887.lua
+4
-5
c1435851.lua
c1435851.lua
+1
-16
c23434538.lua
c23434538.lua
+2
-2
c242146.lua
c242146.lua
+1
-29
c35199656.lua
c35199656.lua
+2
-21
c47408488.lua
c47408488.lua
+2
-21
c53701259.lua
c53701259.lua
+2
-2
c60643553.lua
c60643553.lua
+2
-2
c66425726.lua
c66425726.lua
+2
-2
utility.lua
utility.lua
+54
-0
No files found.
c1372887.lua
View file @
e5433ecb
...
@@ -38,16 +38,14 @@ function c1372887.cfilter(c,tp)
...
@@ -38,16 +38,14 @@ function c1372887.cfilter(c,tp)
return
c
:
IsControler
(
1
-
tp
)
and
not
c
:
IsReason
(
REASON_DRAW
)
and
c
:
IsPreviousLocation
(
LOCATION_DECK
+
LOCATION_GRAVE
)
return
c
:
IsControler
(
1
-
tp
)
and
not
c
:
IsReason
(
REASON_DRAW
)
and
c
:
IsPreviousLocation
(
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
c1372887
.
drcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1372887
.
drcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c1372887
.
cfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
c1372887
.
cfilter
,
1
,
nil
,
tp
)
and
not
Duel
.
IsChainSolving
()
and
(
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
or
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
))
end
end
function
c1372887
.
drop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1372887
.
drop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1372887
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1372887
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c1372887
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1372887
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c1372887
.
cfilter
,
1
,
nil
,
tp
)
and
Duel
.
GetFlagEffect
(
tp
,
1372887
)
==
0
return
eg
:
IsExists
(
c1372887
.
cfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainSolving
()
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
not
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
end
end
function
c1372887
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1372887
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
1372887
,
RESET_CHAIN
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
1372887
,
RESET_CHAIN
,
0
,
1
)
...
@@ -56,7 +54,8 @@ function c1372887.drcon2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -56,7 +54,8 @@ function c1372887.drcon2(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetFlagEffect
(
tp
,
1372887
)
>
0
return
Duel
.
GetFlagEffect
(
tp
,
1372887
)
>
0
end
end
function
c1372887
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1372887
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetFlagEffect
(
tp
,
1372887
)
Duel
.
ResetFlagEffect
(
tp
,
1372887
)
Duel
.
ResetFlagEffect
(
tp
,
1372887
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1372887
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1372887
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
ct
,
REASON_EFFECT
)
end
end
c1435851.lua
View file @
e5433ecb
--ドラゴンの秘宝
--ドラゴンの秘宝
function
c1435851
.
initial_effect
(
c
)
function
c1435851
.
initial_effect
(
c
)
--Activate
aux
.
AddEquipSpellEffect
(
c
,
true
,
true
,
c1435851
.
filter
,
c1435851
.
eqlimit
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_CONTINUOUS_TARGET
)
e1
:
SetTarget
(
c1435851
.
target
)
e1
:
SetOperation
(
c1435851
.
operation
)
c
:
RegisterEffect
(
e1
)
--atk up
--atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
...
@@ -21,13 +13,6 @@ function c1435851.initial_effect(c)
...
@@ -21,13 +13,6 @@ function c1435851.initial_effect(c)
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetValue
(
300
)
e3
:
SetValue
(
300
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--equip limit
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetValue
(
c1435851
.
eqlimit
)
c
:
RegisterEffect
(
e4
)
end
end
function
c1435851
.
eqlimit
(
e
,
c
)
function
c1435851
.
eqlimit
(
e
,
c
)
return
c
:
IsRace
(
RACE_DRAGON
)
return
c
:
IsRace
(
RACE_DRAGON
)
...
...
c23434538.lua
View file @
e5433ecb
...
@@ -48,14 +48,14 @@ function c23434538.filter(c,sp)
...
@@ -48,14 +48,14 @@ function c23434538.filter(c,sp)
end
end
function
c23434538
.
drcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23434538
.
drcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c23434538
.
filter
,
1
,
nil
,
1
-
tp
)
return
eg
:
IsExists
(
c23434538
.
filter
,
1
,
nil
,
1
-
tp
)
and
(
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
or
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
)
and
not
Duel
.
IsChainSolving
(
)
end
end
function
c23434538
.
drop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23434538
.
drop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c23434538
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23434538
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c23434538
.
filter
,
1
,
nil
,
1
-
tp
)
return
eg
:
IsExists
(
c23434538
.
filter
,
1
,
nil
,
1
-
tp
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
not
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
and
Duel
.
IsChainSolving
(
)
end
end
function
c23434538
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23434538
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
23434538
,
RESET_CHAIN
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
23434538
,
RESET_CHAIN
,
0
,
1
)
...
...
c242146.lua
View file @
e5433ecb
--城壁壊しの大槍
--城壁壊しの大槍
function
c242146
.
initial_effect
(
c
)
function
c242146
.
initial_effect
(
c
)
--Activate
aux
.
AddEquipSpellEffect
(
c
,
true
,
true
,
Card
.
IsFaceup
,
nil
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_CONTINUOUS_TARGET
)
e1
:
SetTarget
(
c242146
.
target
)
e1
:
SetOperation
(
c242146
.
operation
)
c
:
RegisterEffect
(
e1
)
--atk up
--atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
...
@@ -16,26 +8,6 @@ function c242146.initial_effect(c)
...
@@ -16,26 +8,6 @@ function c242146.initial_effect(c)
e2
:
SetCondition
(
c242146
.
atkcon
)
e2
:
SetCondition
(
c242146
.
atkcon
)
e2
:
SetValue
(
1500
)
e2
:
SetValue
(
1500
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Equip limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
end
function
c242146
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c242146
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
end
function
c242146
.
atkcon
(
e
)
function
c242146
.
atkcon
(
e
)
if
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE_CAL
then
return
false
end
if
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE_CAL
then
return
false
end
...
...
c35199656.lua
View file @
e5433ecb
...
@@ -37,19 +37,6 @@ function c35199656.initial_effect(c)
...
@@ -37,19 +37,6 @@ function c35199656.initial_effect(c)
e4
:
SetCondition
(
c35199656
.
damcon2
)
e4
:
SetCondition
(
c35199656
.
damcon2
)
e4
:
SetOperation
(
c35199656
.
damop2
)
e4
:
SetOperation
(
c35199656
.
damop2
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
if
not
c35199656
.
global_check
then
c35199656
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
ge1
:
SetOperation
(
c35199656
.
count
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
ge2
:
SetOperation
(
c35199656
.
reset
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
end
function
c35199656
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c35199656
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -79,14 +66,8 @@ function c35199656.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -79,14 +66,8 @@ function c35199656.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
c35199656
.
count
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c35199656
.
chain_solving
=
true
end
function
c35199656
.
reset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c35199656
.
chain_solving
=
false
end
function
c35199656
.
damcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c35199656
.
damcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
not
c35199656
.
chain_solving
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
not
Duel
.
IsChainSolving
()
end
end
function
c35199656
.
damop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c35199656
.
damop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
35199656
)
Duel
.
Hint
(
HINT_CARD
,
0
,
35199656
)
...
@@ -94,7 +75,7 @@ function c35199656.damop1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -94,7 +75,7 @@ function c35199656.damop1(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Damage
(
1
-
tp
,
ct
*
200
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
ct
*
200
,
REASON_EFFECT
)
end
end
function
c35199656
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c35199656
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
c35199656
.
chain_solving
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
and
Duel
.
IsChainSolving
()
end
end
function
c35199656
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c35199656
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
eg
:
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
local
ct
=
eg
:
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
...
...
c47408488.lua
View file @
e5433ecb
...
@@ -38,25 +38,6 @@ function c47408488.initial_effect(c)
...
@@ -38,25 +38,6 @@ function c47408488.initial_effect(c)
e4
:
SetTarget
(
c47408488
.
pltg
)
e4
:
SetTarget
(
c47408488
.
pltg
)
e4
:
SetOperation
(
c47408488
.
plop
)
e4
:
SetOperation
(
c47408488
.
plop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
if
not
c47408488
.
global_check
then
c47408488
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
ge1
:
SetOperation
(
c47408488
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
ge2
:
SetOperation
(
c47408488
.
reset
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c47408488
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c47408488
.
chain_solving
=
true
end
function
c47408488
.
reset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c47408488
.
chain_solving
=
false
end
end
function
c47408488
.
cfilter
(
c
)
function
c47408488
.
cfilter
(
c
)
local
type
=
c
:
GetOriginalType
()
local
type
=
c
:
GetOriginalType
()
...
@@ -64,13 +45,13 @@ function c47408488.cfilter(c)
...
@@ -64,13 +45,13 @@ function c47408488.cfilter(c)
return
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
and
c
:
IsSetCard
(
0x1034
)
and
bit
.
band
(
type
,
TYPE_MONSTER
)
~=
0
return
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
and
c
:
IsSetCard
(
0x1034
)
and
bit
.
band
(
type
,
TYPE_MONSTER
)
~=
0
end
end
function
c47408488
.
ctcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47408488
.
ctcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c47408488
.
cfilter
,
1
,
nil
)
and
not
c47408488
.
chain_solving
return
eg
:
IsExists
(
c47408488
.
cfilter
,
1
,
nil
)
and
not
Duel
.
IsChainSolving
()
end
end
function
c47408488
.
ctop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47408488
.
ctop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0x6
,
1
)
e
:
GetHandler
():
AddCounter
(
0x6
,
1
)
end
end
function
c47408488
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47408488
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c47408488
.
cfilter
,
1
,
nil
)
and
c47408488
.
chain_solving
return
eg
:
IsExists
(
c47408488
.
cfilter
,
1
,
nil
)
and
Duel
.
IsChainSolving
()
end
end
function
c47408488
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47408488
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
47408488
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
47408488
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
)
...
...
c53701259.lua
View file @
e5433ecb
...
@@ -92,7 +92,7 @@ function c53701259.lpcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -92,7 +92,7 @@ function c53701259.lpcon(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c53701259
.
lpcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c53701259
.
lpcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c53701259
.
lpcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c53701259
.
lpcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
(
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
or
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
)
and
not
Duel
.
IsChainSolving
(
)
end
end
function
c53701259
.
lpop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c53701259
.
lpop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
eg
:
Filter
(
c53701259
.
cfilter
,
nil
,
1
-
tp
)
local
lg
=
eg
:
Filter
(
c53701259
.
cfilter
,
nil
,
1
-
tp
)
...
@@ -101,7 +101,7 @@ function c53701259.lpop1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -101,7 +101,7 @@ function c53701259.lpop1(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c53701259
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c53701259
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c53701259
.
lpcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c53701259
.
lpcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
not
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
and
Duel
.
IsChainSolving
(
)
end
end
function
c53701259
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c53701259
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
eg
:
Filter
(
c53701259
.
cfilter
,
nil
,
1
-
tp
)
local
lg
=
eg
:
Filter
(
c53701259
.
cfilter
,
nil
,
1
-
tp
)
...
...
c60643553.lua
View file @
e5433ecb
...
@@ -63,7 +63,7 @@ function c60643553.lpcon1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -63,7 +63,7 @@ function c60643553.lpcon1(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
eg
:
IsExists
(
c60643553
.
cfilter
,
1
,
nil
,
1
-
tp
)
return
eg
:
IsExists
(
c60643553
.
cfilter
,
1
,
nil
,
1
-
tp
)
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
and
(
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
or
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
)
and
not
Duel
.
IsChainSolving
(
)
end
end
function
c60643553
.
lpop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60643553
.
lpop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
eg
:
Filter
(
c60643553
.
cfilter
,
nil
,
1
-
tp
)
local
lg
=
eg
:
Filter
(
c60643553
.
cfilter
,
nil
,
1
-
tp
)
...
@@ -75,7 +75,7 @@ function c60643553.regcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -75,7 +75,7 @@ function c60643553.regcon(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
eg
:
IsExists
(
c60643553
.
cfilter
,
1
,
nil
,
1
-
tp
)
return
eg
:
IsExists
(
c60643553
.
cfilter
,
1
,
nil
,
1
-
tp
)
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
not
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
and
Duel
.
IsChainSolving
(
)
end
end
function
c60643553
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60643553
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
eg
:
Filter
(
c60643553
.
cfilter
,
nil
,
1
-
tp
)
local
lg
=
eg
:
Filter
(
c60643553
.
cfilter
,
nil
,
1
-
tp
)
...
...
c66425726.lua
View file @
e5433ecb
...
@@ -84,7 +84,7 @@ function c66425726.filter(c,sp)
...
@@ -84,7 +84,7 @@ function c66425726.filter(c,sp)
end
end
function
c66425726
.
damcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66425726
.
damcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c66425726
.
filter
,
1
,
nil
,
1
-
tp
)
return
eg
:
IsExists
(
c66425726
.
filter
,
1
,
nil
,
1
-
tp
)
and
(
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
or
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
)
and
not
Duel
.
IsChainSolving
(
)
end
end
function
c66425726
.
damop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66425726
.
damop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
66425726
)
Duel
.
Hint
(
HINT_CARD
,
0
,
66425726
)
...
@@ -92,7 +92,7 @@ function c66425726.damop1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -92,7 +92,7 @@ function c66425726.damop1(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c66425726
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66425726
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c66425726
.
filter
,
1
,
nil
,
1
-
tp
)
return
eg
:
IsExists
(
c66425726
.
filter
,
1
,
nil
,
1
-
tp
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
not
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
and
Duel
.
IsChainSolving
(
)
end
end
function
c66425726
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66425726
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
66425726
,
RESET_CHAIN
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
66425726
,
RESET_CHAIN
,
0
,
1
)
...
...
utility.lua
View file @
e5433ecb
...
@@ -1524,6 +1524,60 @@ function Auxiliary.GiveUpNormalDraw(e,tp,property)
...
@@ -1524,6 +1524,60 @@ function Auxiliary.GiveUpNormalDraw(e,tp,property)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
FLAG_ID_NO_NORMAL_DRAW
,
RESET_PHASE
+
PHASE_DRAW
,
property
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
FLAG_ID_NO_NORMAL_DRAW
,
RESET_PHASE
+
PHASE_DRAW
,
property
,
1
)
end
end
---Add EFFECT_TYPE_ACTIVATE effect to Equip Spell Cards
---@param c Card
---@param is_self boolean
---@param is_opponent boolean
---@param filter function
---@param eqlimit function|nil
---@param pause? boolean
---@param skip_target? boolean
function
Auxiliary
.
AddEquipSpellEffect
(
c
,
is_self
,
is_opponent
,
filter
,
eqlimit
,
pause
,
skip_target
)
local
value
=
(
type
(
eqlimit
)
==
"function"
)
and
eqlimit
or
1
if
pause
==
nil
then
pause
=
false
end
if
skip_target
==
nil
then
skip_target
=
false
end
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_CONTINUOUS_TARGET
)
if
not
skip_target
then
e1
:
SetTarget
(
Auxiliary
.
EquipSpellTarget
(
is_self
,
is_opponent
,
filter
,
eqlimit
))
end
e1
:
SetOperation
(
Auxiliary
.
EquipSpellOperation
(
eqlimit
))
if
not
pause
then
c
:
RegisterEffect
(
e1
)
end
--Equip limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
value
)
c
:
RegisterEffect
(
e2
)
return
e1
end
function
Auxiliary
.
EquipSpellTarget
(
is_self
,
is_opponent
,
filter
,
eqlimit
)
local
loc1
=
is_self
and
LOCATION_MZONE
or
0
local
loc2
=
is_opponent
and
LOCATION_MZONE
or
0
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
and
(
not
eqlimit
or
eqlimit
(
e
,
chkc
))
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
filter
,
tp
,
loc1
,
loc2
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
filter
,
tp
,
loc1
,
loc2
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
Auxiliary
.
EquipSpellOperation
(
eqlimit
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
(
not
eqlimit
or
eqlimit
(
e
,
tc
))
then
Duel
.
Equip
(
tp
,
c
,
tc
)
end
end
end
---If this face-up card would leave the field, banish it instead.
---If this face-up card would leave the field, banish it instead.
---@param c Card
---@param c Card
---@param condition? function
---@param condition? function
...
...
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