Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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
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
Commits
a08ffa99
You need to sign in or sign up before continuing.
Commit
a08ffa99
authored
Mar 19, 2019
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winning effect
parent
297649de
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
37 deletions
+13
-37
c60162470.lua
c60162470.lua
+5
-19
c69553552.lua
c69553552.lua
+8
-18
No files found.
c60162470.lua
View file @
a08ffa99
...
...
@@ -3,26 +3,18 @@ function c60162470.initial_effect(c)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c60162470
.
target
)
e1
:
SetOperation
(
c60162470
.
tgop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetCondition
(
c60162470
.
tgcon
)
e2
:
SetOperation
(
c60162470
.
tgop
)
c
:
RegisterEffect
(
e2
)
--atkup
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTarget
(
c60162470
.
atktg1
)
e3
:
SetTarget
(
aux
.
ctg
)
e3
:
SetValue
(
c60162470
.
atkval1
)
c
:
RegisterEffect
(
e3
)
--atkup
...
...
@@ -72,19 +64,13 @@ function c60162470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c60162470
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tg
)
end
function
c60162470
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
==
e
:
GetLabelObject
()
end
function
c60162470
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
Get
ChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
):
GetFirs
t
()
if
c
:
IsRelateToEffect
(
re
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
r
e
)
then
local
tc
=
Duel
.
Get
FirstTarge
t
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
c
:
SetCardTarget
(
tc
)
end
end
function
c60162470
.
atktg1
(
e
,
c
)
return
e
:
GetHandler
():
IsHasCardTarget
(
c
)
end
function
c60162470
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
end
...
...
c69553552.lua
View file @
a08ffa99
...
...
@@ -25,14 +25,6 @@ function c69553552.initial_effect(c)
e3
:
SetTarget
(
c69553552
.
rmtg
)
e3
:
SetOperation
(
c69553552
.
rmop
)
c
:
RegisterEffect
(
e3
)
--win
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_REMOVE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetOperation
(
c69553552
.
winop
)
c
:
RegisterEffect
(
e4
)
end
function
c69553552
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
...
...
@@ -57,19 +49,17 @@ function c69553552.rmop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
(
)
if
tc
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
tc
:
IsSetCard
(
0x107
)
and
tc
:
IsType
(
TYPE_FIELD
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
tc
:
IsSetCard
(
0x107
)
and
tc
:
IsType
(
TYPE_FIELD
)
then
tc
:
RegisterFlagEffect
(
69553552
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
local
wg
=
Duel
.
GetMatchingGroup
(
c69553552
.
winfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
if
wg
:
GetClassCount
(
Card
.
GetCode
)
==
3
then
local
WIN_REASON_FA_WINNERS
=
0x1d
Duel
.
Win
(
tp
,
WIN_REASON_FA_WINNERS
)
end
end
end
function
c69553552
.
winfilter
(
c
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetFlagEffect
(
69553552
)
~=
0
end
function
c69553552
.
winop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
WIN_REASON_FA_WINNERS
=
0x1d
local
g
=
Duel
.
GetMatchingGroup
(
c69553552
.
winfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
==
3
then
Duel
.
Win
(
tp
,
WIN_REASON_FA_WINNERS
)
end
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