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
22d10dd9
Commit
22d10dd9
authored
Oct 01, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:purerosefallen/specials
parents
83503a1e
23e511b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
139 additions
and
11 deletions
+139
-11
TimeTwister4/special.lua
TimeTwister4/special.lua
+82
-0
cup-a/special.lua
cup-a/special.lua
+33
-11
viewdeck/special.lua
viewdeck/special.lua
+24
-0
No files found.
TimeTwister4/special.lua
0 → 100644
View file @
22d10dd9
--所有起动效果变为2速。
--游戏开始时,后攻者抽2张卡。
--每个回合开始时,非回合玩家将【灰流丽】【效果遮蒙者】【原始生命态尼比鲁】【增殖的G】【幽鬼兔】中的随机1张加入手卡。回合结束时,那张卡里侧表示除外。
CUNGUI
=
{}
OrigRegister
=
Card
.
RegisterEffect
Card
.
RegisterEffect
=
function
(
c
,
e
,
forced
)
local
typ
=
e
:
GetType
()
if
typ
and
(
typ
&
EFFECT_TYPE_IGNITION
)
>
0
then
e
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e
:
SetCode
(
EVENT_FREE_CHAIN
)
local
cat
=
e
:
GetCategory
()
if
cat
and
(
cat
&
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
+
CATEGORY_NEGATE
))
>
0
then
local
prop
=
e
:
GetProperty
()
if
not
prop
then
prop
=
0
end
prop
=
prop
|
(
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DAMAGE_STEP
)
e
:
SetProperty
(
prop
)
end
end
return
OrigRegister
(
c
,
e
,
forced
)
end
function
Auxiliary
.
PreloadUds
()
-- 1 more draw
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetOperation
(
function
(
e
)
Duel
.
Draw
(
1
,
1
,
REASON_RULE
)
e
:
Reset
()
end
)
Duel
.
RegisterEffect
(
e1
,
0
)
Auxiliary
.
PreloadUds2
()
end
function
Auxiliary
.
PreloadUds2
()
--adjust
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
CUNGUI
.
AdjustOperation
)
Duel
.
RegisterEffect
(
e1
,
0
)
end
function
CUNGUI
.
GetRandomNumber
()
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
0
,
LOCATION_DECK
+
LOCATION_EXTRA
,
LOCATION_DECK
+
LOCATION_EXTRA
,
nil
)
local
offset
=
Duel
.
TossDice
(
0
,
1
)
while
offset
==
6
do
offset
=
Duel
.
TossDice
(
0
,
1
)
end
if
not
g
or
#
g
==
0
then
return
offset
end
return
((
g
:
RandomSelect
(
0
,
1
):
GetFirst
():
GetCode
()
+
offset
)
%
5
)
+
1
end
function
CUNGUI
.
AdjustOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
tp
=
1
-
Duel
.
GetTurnPlayer
()
local
g
=
Group
.
CreateGroup
()
local
cards
=
{
23434538
,
27204311
,
14558127
,
59438930
,
97268402
}
local
add
=
Duel
.
CreateToken
(
tp
,
cards
[
CUNGUI
.
GetRandomNumber
()])
if
Duel
.
SendtoHand
(
add
,
nil
,
REASON_RULE
)
<
1
then
return
end
local
e1
=
Effect
.
CreateEffect
(
add
)
e1
:
SetDescription
(
aux
.
Stringid
(
51196805
,
1
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabelObject
(
add
)
e1
:
SetOperation
(
CUNGUI
.
rmop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
add
:
RegisterFlagEffect
(
23456789
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
function
CUNGUI
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffect
(
23456789
)
>
0
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
e
:
Reset
()
end
end
cup-a/special.lua
View file @
22d10dd9
CupA
=
{}
function
Auxiliary
.
PreloadUds
()
--adjust
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
function
(
e
)
Duel
.
Hint
(
HINT_CARD
,
0
,
37812118
)
local
tp
=
Duel
.
GetTurnPlayer
()
local
res1
=
Duel
.
TossCoin
(
tp
,
1
)
local
drawCounts
=
{[
0
]
=
0
,[
1
]
=
0
}
if
res1
==
1
then
drawCounts
[
tp
]
=
drawCounts
[
tp
]
+
2
else
drawCounts
[
1
-
tp
]
=
drawCounts
[
1
-
tp
]
+
2
end
if
drawCounts
[
tp
]
>
0
then
Duel
.
Draw
(
tp
,
drawCounts
[
tp
],
REASON_EFFECT
)
end
if
drawCounts
[
1
-
tp
]
>
0
then
Duel
.
Draw
(
1
-
tp
,
drawCounts
[
1
-
tp
],
REASON_EFFECT
)
end
end
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetOperation
(
CupA
.
AdjustOperation
)
Duel
.
RegisterEffect
(
e1
,
0
)
end
function
CupA
.
AdjustOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Debug
.
Message
(
"!"
)
if
not
CupA
.
Card
then
CupA
.
Card
=
Duel
.
CreateToken
(
0
,
37812118
)
Duel
.
Remove
(
CupA
.
Card
,
POS_FACEUP
,
REASON_RULE
)
Debug
.
Message
(
"!!!"
)
local
e1
=
Effect
.
CreateEffect
(
CupA
.
Card
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetRange
(
LOCATION_REMOVED
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
function
(
ee
)
Debug
.
Message
(
"!!"
)
Duel
.
Hint
(
HINT_CARD
,
0
,
37812118
)
local
tp
=
Duel
.
GetTurnPlayer
()
local
res1
=
Duel
.
TossCoin
(
tp
,
1
)
local
drawCounts
=
{[
0
]
=
0
,[
1
]
=
0
}
if
res1
==
1
then
drawCounts
[
tp
]
=
drawCounts
[
tp
]
+
2
else
drawCounts
[
1
-
tp
]
=
drawCounts
[
1
-
tp
]
+
2
end
if
drawCounts
[
tp
]
>
0
then
Duel
.
Draw
(
tp
,
drawCounts
[
tp
],
REASON_EFFECT
)
end
if
drawCounts
[
1
-
tp
]
>
0
then
Duel
.
Draw
(
1
-
tp
,
drawCounts
[
1
-
tp
],
REASON_EFFECT
)
end
end
)
CupA
.
Card
:
RegisterEffect
(
e1
)
end
if
not
CupA
.
Card
:
IsLocation
(
LOCATION_REMOVED
)
then
Duel
.
Remove
(
CupA
.
Card
,
POS_FACEUP
,
REASON_RULE
)
end
end
\ No newline at end of file
viewdeck/special.lua
0 → 100644
View file @
22d10dd9
function
inititialize
()
--Duel.Draw(1,1,REASON_RULE)
Duel
.
ConfirmCards
(
0
,
Duel
.
GetFieldGroup
(
0
,
0
,
LOCATION_EXTRA
))
Duel
.
ConfirmCards
(
1
,
Duel
.
GetFieldGroup
(
1
,
0
,
LOCATION_EXTRA
))
Duel
.
ConfirmCards
(
0
,
Duel
.
GetFieldGroup
(
0
,
0
,
LOCATION_DECK
))
Duel
.
ConfirmCards
(
1
,
Duel
.
GetFieldGroup
(
1
,
0
,
LOCATION_DECK
))
Duel
.
ShuffleDeck
(
0
)
Duel
.
ShuffleDeck
(
1
)
Duel
.
ShuffleExtra
(
0
)
Duel
.
ShuffleExtra
(
1
)
end
function
Auxiliary
.
PreloadUds
()
-- one more draw
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetOperation
(
function
(
e
)
inititialize
()
e
:
Reset
()
end
)
Duel
.
RegisterEffect
(
e1
,
0
)
end
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