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
fc9d56a2
Commit
fc9d56a2
authored
Jun 18, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add YO05
parent
46b1ecbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
+90
-0
c26988374.lua
c26988374.lua
+90
-0
No files found.
c26988374.lua
0 → 100644
View file @
fc9d56a2
--魔鍵憑神-アシュタルトゥ
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
8
,
2
)
c
:
EnableReviveLimit
()
--damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
damcon
)
e1
:
SetCost
(
s
.
damcost
)
e1
:
SetTarget
(
s
.
damtg
)
e1
:
SetOperation
(
s
.
damop
)
c
:
RegisterEffect
(
e1
)
--banish
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
s
.
condition
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
eg
:
GetFirst
()
local
bc
=
ec
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
return
bc
and
bc
:
GetBaseAttack
()
>
0
and
ec
:
IsControler
(
tp
)
and
(
ec
:
IsType
(
TYPE_NORMAL
)
or
ec
:
IsSetCard
(
0x165
))
and
ec
:
IsRelateToBattle
()
and
ec
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
s
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
s
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
bc
=
e
:
GetLabelObject
()
Duel
.
SetTargetCard
(
bc
)
local
dam
=
bc
:
GetBaseAttack
()
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
end
function
s
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
dam
=
tc
:
GetBaseAttack
()
if
dam
<
0
then
dam
=
0
end
Duel
.
Damage
(
p
,
dam
,
REASON_EFFECT
)
end
end
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
end
function
s
.
gfilter
(
c
,
att
)
return
c
:
IsAttribute
(
att
)
and
(
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
IsSetCard
(
0x165
))
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
end
function
s
.
filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToRemove
()
and
Duel
.
IsExistingMatchingCard
(
s
.
gfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
c
:
GetAttribute
())
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
and
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
>
0
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
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