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
46cead35
Commit
46cead35
authored
Mar 15, 2023
by
mercury233
Committed by
GitHub
Mar 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 血の代償 (#2046)
parent
48987a5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
63 deletions
+28
-63
c80604091.lua
c80604091.lua
+28
-63
No files found.
c80604091.lua
View file @
46cead35
...
@@ -2,81 +2,46 @@
...
@@ -2,81 +2,46 @@
function
c80604091
.
initial_effect
(
c
)
function
c80604091
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c80604091
.
cost1
)
e1
:
SetTarget
(
c80604091
.
target1
)
e1
:
SetOperation
(
c80604091
.
activate1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--instant
--summon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
80604091
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
80604091
,
0
))
e3
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCondition
(
c80604091
.
condition2
)
e2
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e3
:
SetCost
(
c80604091
.
cost2
)
e2
:
SetCondition
(
c80604091
.
condition
)
e3
:
SetTarget
(
c80604091
.
target2
)
e2
:
SetCost
(
c80604091
.
cost
)
e3
:
SetOperation
(
c80604091
.
activate2
)
e2
:
SetTarget
(
c80604091
.
target
)
c
:
RegisterEffect
(
e3
)
e2
:
SetOperation
(
c80604091
.
activate
)
end
c
:
RegisterEffect
(
e2
)
function
c80604091
.
filter
(
c
)
end
return
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsMSetable
(
true
,
nil
)
function
c80604091
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
function
c80604091
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
tn
=
Duel
.
GetTurnPlayer
()
local
tn
=
Duel
.
GetTurnPlayer
()
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
if
((
tn
==
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
))
or
(
tn
~=
tp
and
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
return
(
tn
==
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
))
and
Duel
.
CheckLPCost
(
tp
,
500
)
or
(
tn
==
1
-
tp
and
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
and
Duel
.
IsExistingMatchingCard
(
c80604091
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
80604091
,
1
))
then
Duel
.
PayLPCost
(
tp
,
500
)
e
:
SetLabel
(
1
)
end
end
function
c80604091
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetLabel
()
~=
1
then
return
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c80604091
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
~=
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c80604091
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
:
IsSummonable
(
true
,
nil
)
and
(
not
tc
:
IsMSetable
(
true
,
nil
)
or
Duel
.
SelectPosition
(
tp
,
tc
,
POS_FACEUP_ATTACK
+
POS_FACEDOWN_DEFENSE
)
==
POS_FACEUP_ATTACK
)
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
else
Duel
.
MSet
(
tp
,
tc
,
true
,
nil
)
end
end
end
end
function
c80604091
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c80604091
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tn
=
Duel
.
GetTurnPlayer
()
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
local
ph
=
Duel
.
GetCurrentPhase
()
Duel
.
PayLPCost
(
tp
,
500
)
return
(
tn
==
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
))
or
(
tn
~=
tp
and
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
end
end
function
c80604091
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c80604091
.
filter
(
c
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
return
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsMSetable
(
true
,
nil
)
else
Duel
.
PayLPCost
(
tp
,
500
)
end
end
end
function
c80604091
.
target
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c80604091
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
if
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
then
local
ct1
=
Duel
.
GetMatchingGroupCount
(
c80604091
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c80604091
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
)
local
ct2
=
Duel
.
GetFlagEffect
(
tp
,
80604091
)
e
:
SetLabel
(
ct
)
return
ct1
-
ct2
>
0
return
ct
>
0
else
return
e
:
GetLabel
()
>
0
end
end
end
e
:
SetLabel
(
e
:
GetLabel
()
-
1
)
Duel
.
RegisterFlagEffect
(
tp
,
80604091
,
RESET_CHAIN
,
0
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
end
function
c80604091
.
activate
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c80604091
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c80604091
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c80604091
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
...
...
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