Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
Ai
ygopro-222DIY-cards
Commits
27c62858
Commit
27c62858
authored
Jan 01, 2021
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物语纪录fix.v2
parent
8215d5e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
123 additions
and
123 deletions
+123
-123
expansions/script/1009022.lua
expansions/script/1009022.lua
+0
-0
expansions/script/c1009029.lua
expansions/script/c1009029.lua
+123
-123
No files found.
expansions/script/1009022.lua
deleted
100644 → 0
View file @
8215d5e5
expansions/script/c1009029.lua
View file @
27c62858
--物语纪录·不死之忍
function
c1009029
.
initial_effect
(
c
)
--xyzlimit
c
:
EnableReviveLimit
()
aux
.
EnablePendulumAttribute
(
c
,
false
)
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x20c
),
7
,
2
)
--pendulum set
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c1009029
.
pctg
)
e1
:
SetOperation
(
c1009029
.
pcop
)
c
:
RegisterEffect
(
e1
)
--negate attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c1009029
.
condition
)
e2
:
SetCost
(
c1009029
.
cost
)
e2
:
SetOperation
(
c1009029
.
operation
)
c
:
RegisterEffect
(
e2
)
--summon success
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCondition
(
c1009029
.
regcon
)
e2
:
SetOperation
(
c1009029
.
regop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e3
:
SetValue
(
c1009029
.
valcheck
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
--extra attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e4
:
SetValue
(
2
)
e4
:
SetCondition
(
c1009029
.
effcon
)
c
:
RegisterEffect
(
e4
)
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
1009029
,
1
))
e5
:
SetCategory
(
CATEGORY_TODECK
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCondition
(
c1009029
.
effcon
)
e5
:
SetCost
(
c1009029
.
remcost
)
e5
:
SetTarget
(
c1009029
.
remtg
)
e5
:
SetOperation
(
c1009029
.
remop
)
c
:
RegisterEffect
(
e5
)
--pendulum
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
c1009029
.
pencon
)
e4
:
SetTarget
(
c1009029
.
pentg
)
e4
:
SetOperation
(
c1009029
.
penop
)
c
:
RegisterEffect
(
e4
)
--xyzlimit
c
:
EnableReviveLimit
()
aux
.
EnablePendulumAttribute
(
c
,
false
)
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x20c
),
7
,
2
)
--pendulum set
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c1009029
.
pctg
)
e1
:
SetOperation
(
c1009029
.
pcop
)
c
:
RegisterEffect
(
e1
)
--negate attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c1009029
.
condition
)
e2
:
SetCost
(
c1009029
.
cost
)
e2
:
SetOperation
(
c1009029
.
operation
)
c
:
RegisterEffect
(
e2
)
--summon success
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCondition
(
c1009029
.
regcon
)
e2
:
SetOperation
(
c1009029
.
regop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e3
:
SetValue
(
c1009029
.
valcheck
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
--extra attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e4
:
SetValue
(
2
)
e4
:
SetCondition
(
c1009029
.
effcon
)
c
:
RegisterEffect
(
e4
)
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
1009029
,
1
))
e5
:
SetCategory
(
CATEGORY_TODECK
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCondition
(
c1009029
.
effcon
)
e5
:
SetCost
(
c1009029
.
remcost
)
e5
:
SetTarget
(
c1009029
.
remtg
)
e5
:
SetOperation
(
c1009029
.
remop
)
c
:
RegisterEffect
(
e5
)
--pendulum
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
c1009029
.
pencon
)
e4
:
SetTarget
(
c1009029
.
pentg
)
e4
:
SetOperation
(
c1009029
.
penop
)
c
:
RegisterEffect
(
e4
)
end
c1009029
.
pendulum_level
=
7
function
c1009029
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c1009029
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsSetCard
,
1
,
nil
,
0x520c
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x520c
)
Duel
.
Release
(
g
,
REASON_COST
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsSetCard
,
1
,
nil
,
0x520c
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x520c
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c1009029
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE_STEP
,
1
)
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE_STEP
,
1
)
end
end
function
c1009029
.
pcfilter
(
c
)
return
c
:
IsSetCard
(
0x520c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
return
c
:
IsSetCard
(
0x520c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
end
function
c1009029
.
pctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
and
Duel
.
IsExistingMatchingCard
(
c1009029
.
pcfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
and
Duel
.
IsExistingMatchingCard
(
c1009029
.
pcfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
c1009029
.
pcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1009029
.
pcfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
MoveToField
(
g
:
GetFirst
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1009029
.
pcfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
MoveToField
(
g
:
GetFirst
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c1009029
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
and
e
:
GetLabel
()
==
1
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
and
e
:
GetLabel
()
==
1
end
function
c1009029
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
c
:
RegisterFlagEffect
(
1009029
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
c
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
1009029
,
3
))
local
c
=
e
:
GetHandler
()
c
:
RegisterFlagEffect
(
1009029
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
c
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
1009029
,
3
))
end
function
c1009029
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_ADVANCE
)
then
e
:
GetLabelObject
():
SetLabel
(
1
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_ADVANCE
)
then
e
:
GetLabelObject
():
SetLabel
(
1
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
function
c1009029
.
effcon
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
1009029
)
>
0
return
e
:
GetHandler
():
GetFlagEffect
(
1009029
)
>
0
end
function
c1009029
.
remcost
(
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
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c1009029
.
th1filter
(
c
,
p
)
return
c
:
GetOwner
()
==
p
and
c
:
IsAbleToRemove
()
return
c
:
GetOwner
()
==
p
and
c
:
IsAbleToRemove
()
end
function
c1009029
.
remtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
0x1c
)
local
dc
=
g
:
FilterCount
(
c1009029
.
th1filter
,
nil
,
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
0x18
)
local
dc
=
g
:
FilterCount
(
c1009029
.
th1filter
,
nil
,
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c1009029
.
sgfilter
(
c
,
p
)
return
c
:
IsLocation
(
LOCATION_REMOVED
)
and
c
:
IsControler
(
p
)
return
c
:
IsLocation
(
LOCATION_REMOVED
)
and
c
:
IsControler
(
p
)
end
function
c1009029
.
remop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
0x1c
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
local
og
=
Duel
.
GetOperatedGroup
()
local
ct
=
og
:
FilterCount
(
c1009029
.
sgfilter
,
nil
,
1
-
tp
)
if
ct
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
ct
*
200
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
0x18
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
local
og
=
Duel
.
GetOperatedGroup
()
local
ct
=
og
:
FilterCount
(
c1009029
.
sgfilter
,
nil
,
1
-
tp
)
if
ct
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
ct
*
200
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
c1009029
.
pencon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
local
c
=
e
:
GetHandler
()
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
end
function
c1009029
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
)
>
0
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
)
>
0
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c1009029
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
e
:
GetHandler
(),
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
e
:
GetHandler
(),
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
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