Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
specials
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
JoyJ
specials
Commits
e4ca1161
Commit
e4ca1161
authored
Jan 09, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
newskill
parent
50aefc43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
24 deletions
+64
-24
wanning/special.lua
wanning/special.lua
+64
-24
No files found.
wanning/special.lua
View file @
e4ca1161
local
skillLists
=
{}
local
skillLists
=
{}
local
function
addSkill
(
code
,
skill
)
local
function
addSkill
(
code
,
skill
)
skillLists
[
code
]
=
skill
if
not
skillLists
[
code
]
then
skillLists
[
code
]
=
{}
end
table.insert
(
skillLists
[
code
],
skill
)
end
end
local
function
getAllSkillCodes
()
local
function
getAllSkillCodes
()
...
@@ -12,16 +15,22 @@ local function getAllSkillCodes()
...
@@ -12,16 +15,22 @@ local function getAllSkillCodes()
return
skillCodes
return
skillCodes
end
end
local
function
registerSkillForPlayer
(
tp
,
c
)
local
function
registerSkillForPlayer
(
tp
,
code
)
local
skill
=
skillLists
[
c
:
GetOriginalCode
()]
local
skills
=
skillLists
[
code
]
for
_
,
skill
in
ipairs
(
skills
)
do
local
e1
=
Effect
.
GlobalEffect
()
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
skill
(
e1
)
skill
(
e1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
local
function
wrapDeckSkill
(
code
,
effectFactory
)
local
function
wrapDeckSkill
(
code
,
effectFactory
)
addSkill
(
code
,
function
(
e2
)
addSkill
(
code
,
function
(
e2
)
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetRange
(
LOCATION_DECK
)
effectFactory
(
e1
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e2
:
SetTargetRange
(
LOCATION_DECK
,
0
)
e2
:
SetTargetRange
(
LOCATION_DECK
,
0
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
)
...
@@ -31,26 +40,22 @@ local function wrapDeckSkill(code, effectFactory)
...
@@ -31,26 +40,22 @@ local function wrapDeckSkill(code, effectFactory)
local
minc
=
dg
:
GetMinGroup
(
Card
.
GetSequence
):
GetFirst
()
local
minc
=
dg
:
GetMinGroup
(
Card
.
GetSequence
):
GetFirst
()
return
c
==
minc
return
c
==
minc
end
)
end
)
e2
:
SetLabelObject
(
e
ffectFactory
(
code
,
e2
)
)
e2
:
SetLabelObject
(
e
1
)
end
)
end
)
end
end
local
function
phaseSkill
(
code
,
phase
,
op
,
con
)
local
function
phaseSkill
(
code
,
phase
,
op
,
con
,
both
)
wrapDeckSkill
(
code
,
function
()
wrapDeckSkill
(
code
,
function
(
e1
)
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetRange
(
LOCATION_DECK
)
e1
:
SetCode
(
EVENT_PHASE
+
phase
)
e1
:
SetCode
(
EVENT_PHASE
+
phase
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
(
not
con
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
))
return
(
both
or
Duel
.
GetTurnPlayer
()
==
tp
)
and
(
not
con
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
))
end
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
code
)
Duel
.
Hint
(
HINT_CARD
,
0
,
code
)
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
)
end
)
return
e1
end
)
end
)
end
end
...
@@ -66,16 +71,12 @@ local function oneTimeSkill(code, op)
...
@@ -66,16 +71,12 @@ local function oneTimeSkill(code, op)
end
)
end
)
end
end
local
function
drawPhaseSkill
(
code
,
op
,
con
)
local
function
standbyPhaseSkill
(
code
,
op
,
con
,
both
)
phaseSkill
(
code
,
PHASE_DRAW
,
op
,
con
)
phaseSkill
(
code
,
PHASE_STANDBY
,
op
,
con
,
both
)
end
local
function
standbyPhaseSkill
(
code
,
op
,
con
)
phaseSkill
(
code
,
PHASE_STANDBY
,
op
,
con
)
end
end
local
function
endPhaseSkill
(
code
,
op
,
con
)
local
function
endPhaseSkill
(
code
,
op
,
con
,
both
)
phaseSkill
(
code
,
PHASE_END
,
op
,
con
)
phaseSkill
(
code
,
PHASE_END
,
op
,
con
,
both
)
end
end
standbyPhaseSkill
(
48356796
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
standbyPhaseSkill
(
48356796
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
@@ -100,6 +101,45 @@ endPhaseSkill(19523799, function(e,tp,eg,ep,ev,re,r,rp)
...
@@ -100,6 +101,45 @@ endPhaseSkill(19523799, function(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Damage
(
1
-
tp
,
3200
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
3200
,
REASON_EFFECT
)
end
)
end
)
for
event
in
ipairs
({
EVENT_SUMMON_SUCCESS
,
EVENT_FLIP_SUMMON_SUCCESS
,
EVENT_SPSUMMON_SUCCESS
})
do
wrapDeckSkill
(
23434538
,
function
(
e1
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
event
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
count
=
eg
:
FilterCount
(
function
(
c
)
return
c
:
IsControler
(
1
-
tp
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
,
1
,
nil
)
return
ep
~=
tp
and
count
>
0
and
Duel
.
GetMZoneCount
(
tp
)
>=
count
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
23434538
)
local
tg
=
eg
:
Filter
(
function
(
c
)
return
c
:
IsControler
(
1
-
tp
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
,
nil
)
for
tc
in
aux
.
Next
(
tg
)
do
local
cc
=
Duel
.
CreateToken
(
tp
,
tc
:
GetOriginalCode
())
Duel
.
MoveToField
(
cc
,
tp
,
tp
,
LOCATION_MZONE
,
tc
:
GetPosition
(),
true
)
end
end
)
end
)
end
wrapDeckSkill
(
1372887
,
function
(
e1
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
not
re
:
GetHandler
():
IsType
(
TYPE_TOKEN
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1372887
)
local
cc
=
Duel
.
CreateToken
(
tp
,
re
:
GetHandler
():
GetOriginalCode
())
Duel
.
SendtoHand
(
cc
,
nil
,
REASON_RULE
)
if
(
cc
:
IsLocation
(
LOCATION_HAND
))
then
Duel
.
ConfirmCards
(
1
-
tp
,
cc
)
end
Duel
.
ShuffleHand
(
tp
)
end
)
end
)
function
c69015963_filter
(
c
,
e
,
tp
)
function
c69015963_filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
...
@@ -172,7 +212,7 @@ local function initialize()
...
@@ -172,7 +212,7 @@ local function initialize()
g
:
AddCard
(
c
)
g
:
AddCard
(
c
)
end
end
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
skillSelections
[
tp
]
=
tc
skillSelections
[
tp
]
=
tc
:
GetOriginalCode
()
Duel
.
Exile
(
g
,
REASON_RULE
)
Duel
.
Exile
(
g
,
REASON_RULE
)
end
end
for
tp
=
0
,
1
do
for
tp
=
0
,
1
do
...
...
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