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
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
八宫一月
ygopro-scripts
Commits
9859dc77
Commit
9859dc77
authored
Apr 27, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix effects relate to token destroyed
parent
643ed6d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
67 deletions
+26
-67
c30069398.lua
c30069398.lua
+8
-16
c42956963.lua
c42956963.lua
+9
-34
c82994509.lua
c82994509.lua
+9
-17
No files found.
c30069398.lua
View file @
9859dc77
...
...
@@ -20,25 +20,17 @@ function c30069398.operation(e,tp,eg,ep,ev,re,r,rp)
local
token
=
Duel
.
CreateToken
(
tp
,
30069399
)
if
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_DEFENCE
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetLabelObject
(
token
)
e1
:
SetCondition
(
c30069398
.
damcon
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_LEAVE_FIELD
)
e1
:
SetOperation
(
c30069398
.
damop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
token
:
RegisterEffect
(
e1
,
true
)
end
Duel
.
SpecialSummonComplete
()
end
function
c30069398
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tok
=
e
:
GetLabelObject
()
if
eg
:
IsContains
(
tok
)
then
return
true
else
if
not
tok
:
IsLocation
(
LOCATION_MZONE
)
then
e
:
Reset
()
end
return
false
end
end
function
c30069398
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tok
=
e
:
GetLabelObject
()
Duel
.
Damage
(
tok
:
GetPreviousControler
(),
300
,
REASON_EFFECT
)
local
c
=
e
:
GetHandler
()
if
c
:
IsReason
(
REASON_DESTROY
)
then
Duel
.
Damage
(
c
:
GetPreviousControler
(),
300
,
REASON_EFFECT
)
end
e
:
Reset
()
end
c42956963.lua
View file @
9859dc77
...
...
@@ -26,46 +26,21 @@ function c42956963.activate(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
if
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
<
3
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
42956964
,
0x45
,
0x4011
,
2000
,
2000
,
6
,
RACE_FIEND
,
ATTRIBUTE_DARK
,
POS_FACEUP_ATTACK
,
1
-
tp
)
then
return
end
local
g
=
Group
.
CreateGroup
()
for
i
=
1
,
3
do
local
token
=
Duel
.
CreateToken
(
tp
,
42956964
)
if
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
then
g
:
AddCard
(
token
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_LEAVE_FIELD
)
e1
:
SetOperation
(
c42956963
.
damop
)
token
:
RegisterEffect
(
e1
,
true
)
end
end
g
:
KeepAlive
()
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetLabelObject
(
g
)
e2
:
SetCondition
(
c42956963
.
damcon
)
e2
:
SetOperation
(
c42956963
.
damop
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
SpecialSummonComplete
()
end
function
c42956963
.
dfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
end
function
c42956963
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
if
eg
:
IsExists
(
c42956963
.
dfilter
,
1
,
nil
,
g
)
then
return
true
else
if
not
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_MZONE
)
then
g
:
DeleteGroup
()
e
:
Reset
()
end
return
false
end
end
function
c42956963
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
g
:
IsContains
(
tc
)
then
Duel
.
Damage
(
tc
:
GetPreviousControler
(),
800
,
REASON_EFFECT
)
g
:
RemoveCard
(
tc
)
end
tc
=
eg
:
GetNext
()
local
c
=
e
:
GetHandler
()
if
c
:
IsReason
(
REASON_DESTROY
)
then
Duel
.
Damage
(
c
:
GetPreviousControler
(),
800
,
REASON_EFFECT
)
end
e
:
Reset
()
end
c82994509.lua
View file @
9859dc77
...
...
@@ -25,26 +25,18 @@ function c82994509.operation(e,tp,eg,ep,ev,re,r,rp)
local
token
=
Duel
.
CreateToken
(
tp
,
82994510
)
if
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_DEFENCE
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetLabelObject
(
token
)
e1
:
SetCondition
(
c82994509
.
handcon
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_LEAVE_FIELD
)
e1
:
SetOperation
(
c82994509
.
handop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
token
:
RegisterEffect
(
e1
,
true
)
end
Duel
.
SpecialSummonComplete
()
end
function
c82994509
.
handcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tok
=
e
:
GetLabelObject
()
if
eg
:
IsContains
(
tok
)
and
tok
:
GetReasonCard
():
IsRace
(
RACE_PLANT
)
then
return
true
else
if
not
tok
:
IsLocation
(
LOCATION_MZONE
)
then
e
:
Reset
()
end
return
false
end
end
function
c82994509
.
handop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tok
=
e
:
GetLabelObject
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
DiscardHand
(
tok
:
GetPreviousControler
(),
nil
,
1
,
1
,
REASON_EFFECT
)
local
c
=
e
:
GetHandler
()
if
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
GetBattleTarget
():
IsRace
(
RACE_PLANT
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
DiscardHand
(
c
:
GetPreviousControler
(),
nil
,
1
,
1
,
REASON_EFFECT
)
end
e
:
Reset
()
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