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
537e611a
Commit
537e611a
authored
Nov 13, 2016
by
nekrozar
Committed by
DailyShana
Nov 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Dark Artist (#676)
parent
4dd5a59f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
c72520073.lua
c72520073.lua
+9
-16
No files found.
c72520073.lua
View file @
537e611a
...
...
@@ -2,26 +2,19 @@
function
c72520073
.
initial_effect
(
c
)
--defdown
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
72520073
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c72520073
.
defcon
)
e1
:
Set
Operation
(
c72520073
.
defop
)
e1
:
Set
Value
(
c72520073
.
defval
)
c
:
RegisterEffect
(
e1
)
end
function
c72520073
.
defcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c72520073
.
defcon
(
e
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
==
Duel
.
GetAttackTarget
()
and
bc
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_DAMAGE_CAL
and
c
==
Duel
.
GetAttackTarget
()
and
bc
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
c72520073
.
defop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_DEFENSE
)
e1
:
SetValue
(
c
:
GetDefense
()
/
2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_DAMAGE
)
c
:
RegisterEffect
(
e1
)
end
function
c72520073
.
defval
(
e
,
c
)
return
math.ceil
(
e
:
GetHandler
():
GetDefense
()
/
2
)
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