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
8e2dcc53
Commit
8e2dcc53
authored
Apr 23, 2016
by
nekrozar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
5854ab7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
c71525232.lua
c71525232.lua
+59
-0
No files found.
c71525232.lua
0 → 100644
View file @
8e2dcc53
--破滅竜ガンドラX
function
c71525232
.
initial_effect
(
c
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
71525232
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCondition
(
c71525232
.
condition
)
e1
:
SetTarget
(
c71525232
.
target
)
e1
:
SetOperation
(
c71525232
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--halve LP
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
71525232
,
1
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c71525232
.
hvcon
)
e3
:
SetOperation
(
c71525232
.
hvop
)
c
:
RegisterEffect
(
e3
)
end
function
c71525232
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
)
end
function
c71525232
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDestructable
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsDestructable
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
local
atk
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
atk
)
end
function
c71525232
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsDestructable
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
c
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
local
og
=
Duel
.
GetOperatedGroup
()
local
mg
,
atk
=
g
:
GetMaxGroup
(
Card
.
GetPreviousAttackOnField
)
local
ct
=
Duel
.
Damage
(
1
-
tp
,
atk
,
REASON_EFFECT
)
if
ct
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
ct
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
end
end
function
c71525232
.
hvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c71525232
.
hvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetLP
(
tp
,
math.ceil
(
Duel
.
GetLP
(
tp
)
/
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