Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
8151b1b8
Commit
8151b1b8
authored
Aug 08, 2023
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 折々の紙神
parent
e9805675
Pipeline
#22994
passed with stages
in 28 minutes and 57 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
19 deletions
+79
-19
expansions/script/c101202027.lua
expansions/script/c101202027.lua
+79
-19
No files found.
expansions/script/c101202027.lua
View file @
8151b1b8
--
coded by Lyris
--
折々の紙神
--Oriori no Kamigami
--Scripted by Larry126, salix5
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--
toss coin
--
Toss a coin and draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
s
.
coin
tg
)
e1
:
SetOperation
(
s
.
coin
op
)
e1
:
SetTarget
(
s
.
dr
tg
)
e1
:
SetOperation
(
s
.
dr
op
)
c
:
RegisterEffect
(
e1
)
--double atk
--Double ATK for each head
--code changed into id+2*o to avoid bugs
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_
TOSS_COIN
)
e2
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_
CUSTOM
+
id
+
2
*
o
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
s
.
datkop
)
e2
:
SetTarget
(
s
.
atktg
)
e2
:
SetOperation
(
s
.
atkop
)
c
:
RegisterEffect
(
e2
)
--Raise a custom event when coin tossing is detected
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_TOSS_COIN
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
s
.
coinop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
s
.
countcon
)
e4
:
SetOperation
(
s
.
countop
)
c
:
RegisterEffect
(
e4
)
end
function
s
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
s
.
toss_coin
=
true
function
s
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
0
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
s
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
0
while
Duel
.
TossCoin
(
tp
,
1
)
>
0
do
ct
=
ct
+
1
end
if
ct
>
1
then
Duel
.
Draw
(
tp
,
ct
//
2
,
REASON_EFFECT
)
end
function
s
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
heads
=
0
while
Duel
.
TossCoin
(
tp
,
1
)
==
1
do
heads
=
heads
+
1
end
if
heads
>=
2
then
Duel
.
Draw
(
tp
,
heads
//
2
,
REASON_EFFECT
)
end
end
function
s
.
datkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
s
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ev
==
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
for
i
,
res
in
ipairs
{
Duel
.
GetCoinResult
()}
do
if
res
==
1
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
atk
=
c
:
GetAttack
()
--prevent overflow
for
i
=
1
,
ev
do
if
atk
<<
1
<=
0x7fffffff
then
atk
=
atk
<<
1
else
break
end
end
--Double this card's ATK for each heads
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
c
:
GetAttack
()
*
2
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
end
function
s
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
res
=
{
Duel
.
GetCoinResult
()}
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
for
_
,
coin
in
ipairs
(
res
)
do
if
coin
==
1
then
c
:
RegisterFlagEffect
(
id
+
o
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
function
s
.
countcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
id
)
>
0
end
function
s
.
countop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
heads_ct
=
c
:
GetFlagEffect
(
id
+
o
)
c
:
ResetFlagEffect
(
id
)
c
:
ResetFlagEffect
(
id
+
o
)
Duel
.
RaiseSingleEvent
(
c
,
EVENT_CUSTOM
+
id
+
2
*
o
,
re
,
r
,
rp
,
ep
,
heads_ct
)
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