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
Nguyễn Anh Kiệt
ygopro-222DIY-cards
Commits
91ca0109
Commit
91ca0109
authored
Jan 01, 2021
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物语纪录fix
parent
5827c413
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
645 additions
and
0 deletions
+645
-0
c1009022.lua
c1009022.lua
+180
-0
c1009029.lua
c1009029.lua
+163
-0
c1009030.lua
c1009030.lua
+107
-0
c1009036.lua
c1009036.lua
+82
-0
c1009037.lua
c1009037.lua
+113
-0
No files found.
c1009022.lua
0 → 100644
View file @
91ca0109
--物语纪录·神原骏河
function
c1009022
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1009022
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
,
1009022
)
e2
:
SetCost
(
c1009022
.
thcost
)
e2
:
SetTarget
(
c1009022
.
thtg
)
e2
:
SetOperation
(
c1009022
.
thop
)
c
:
RegisterEffect
(
e2
)
--todeck
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1009022
,
3
))
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCondition
(
c1009022
.
tdcon
)
e3
:
SetTarget
(
c1009022
.
tdtg
)
e3
:
SetOperation
(
c1009022
.
tdop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e4
:
SetValue
(
c1009022
.
valcheck
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
--summon with s/t
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_ADD_EXTRA_TRIBUTE
)
e1
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e1
:
SetValue
(
POS_FACEUP_ATTACK
)
c
:
RegisterEffect
(
e1
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1160
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_SZONE
)
c
:
RegisterEffect
(
e1
)
--tribute summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1009022
,
2
))
e3
:
SetCategory
(
CATEGORY_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e3
:
SetRange
(
LOCATION_PZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c1009022
.
sumcon
)
e3
:
SetCost
(
c1009022
.
cost
)
e3
:
SetTarget
(
c1009022
.
sumtg
)
e3
:
SetOperation
(
c1009022
.
sumop
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
1009022
,
0
))
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetCountLimit
(
1
,
10090220
)
e4
:
SetCondition
(
c1009022
.
descon
)
e4
:
SetTarget
(
c1009022
.
destg
)
e4
:
SetOperation
(
c1009022
.
desop
)
c
:
RegisterEffect
(
e4
)
end
function
c1009022
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
end
function
c1009022
.
thfilter1
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsSetCard
(
0x520c
)
and
c
:
IsAbleToHand
()
end
function
c1009022
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1009022
.
thfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_EXTRA
)
end
function
c1009022
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1009022
.
thfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
if
g
:
GetCount
()
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
2
,
2
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
function
c1009022
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c1009022
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
if
e
:
GetLabel
()
==
1
and
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
g1
:
GetFirst
())
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1009022
,
4
))
then
e
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g3
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
g1
:
GetFirst
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g3
,
1
,
0
,
0
)
end
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g1
,
2
,
0
,
0
)
end
function
c1009022
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ex
,
g1
=
Duel
.
GetOperationInfo
(
0
,
CATEGORY_TODECK
)
local
ex2
,
g2
=
Duel
.
GetOperationInfo
(
0
,
CATEGORY_TOHAND
)
local
sg1
=
g1
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
sg1
:
GetCount
()
>
0
and
Duel
.
SendtoDeck
(
sg1
,
nil
,
0
,
REASON_EFFECT
)
>
1
then
local
tc1
=
sg1
:
GetFirst
()
local
tc2
=
sg1
:
GetNext
()
if
tc1
:
GetControler
()
==
tc2
:
GetControler
()
and
tc1
:
IsLocation
(
LOCATION_DECK
)
and
tc2
:
IsLocation
(
LOCATION_DECK
)
then
Duel
.
SortDecktop
(
tp
,
tc1
:
GetControler
(),
2
)
end
end
if
e
:
GetLabel
()
==
1
and
g2
then
local
tc
=
g2
:
GetFirst
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
g2
,
nil
,
REASON_EFFECT
)
end
end
end
function
c1009022
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x520c
)
then
e
:
GetLabelObject
():
SetLabel
(
1
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
function
c1009022
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
1009022
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
1009022
,
RESET_CHAIN
,
0
,
1
)
end
function
c1009022
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
end
function
c1009022
.
sumfilter
(
c
)
return
c
:
IsSetCard
(
0x520c
)
and
c
:
IsSummonable
(
true
,
nil
,
1
)
end
function
c1009022
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1009022
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c1009022
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1009022
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
,
1
)
end
end
function
c1009022
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c1009022
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c1009022
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
c1009029.lua
0 → 100644
View file @
91ca0109
--物语纪录·不死之忍
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
)
end
c1009029
.
pendulum_level
=
7
function
c1009029
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
)
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
end
function
c1009029
.
pcfilter
(
c
)
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
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
end
function
c1009029
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
))
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
end
function
c1009029
.
effcon
(
e
)
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
)
end
function
c1009029
.
th1filter
(
c
,
p
)
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
)
end
function
c1009029
.
sgfilter
(
c
,
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
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
()
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
)
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
end
c1009030.lua
0 → 100644
View file @
91ca0109
--物语纪录·北白蛇神社
function
c1009030
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--level
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_HAND
,
LOCATION_HAND
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x520c
))
e2
:
SetValue
(
-
1
)
c
:
RegisterEffect
(
e2
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_SPELLCASTER
))
e2
:
SetValue
(
300
)
c
:
RegisterEffect
(
e2
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e1
:
SetCondition
(
c1009030
.
thcon
)
e1
:
SetTarget
(
c1009030
.
thtg
)
e1
:
SetOperation
(
c1009030
.
thop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
1009030
,
0
))
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
c1009030
.
spcon
)
e4
:
SetTarget
(
c1009030
.
sptg
)
e4
:
SetOperation
(
c1009030
.
spop
)
c
:
RegisterEffect
(
e4
)
end
function
c1009030
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
end
function
c1009030
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x520c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c1009030
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1009030
.
thfilter
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
)
end
function
c1009030
.
sumfilter
(
c
)
return
c
:
IsSetCard
(
0x520c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsSummonable
(
true
,
nil
,
1
)
end
function
c1009030
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1009030
.
thfilter
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
asg
=
Duel
.
SelectMatchingCard
(
tp
,
c1009030
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
astc
=
asg
:
GetFirst
()
if
astc
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1009030
,
0
))
then
Duel
.
Summon
(
tp
,
astc
,
true
,
nil
,
1
)
end
end
function
c1009030
.
spcfilter
(
c
,
tp
,
rp
)
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousSetCard
(
0x520c
)
and
(
c
:
IsReason
(
REASON_BATTLE
)
or
(
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)))
end
function
c1009030
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c1009030
.
spcfilter
,
1
,
nil
,
tp
,
rp
)
end
function
c1009030
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x520c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
(
c
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
>
0
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1009030
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_EXTRA
)
and
chkc
:
IsControler
(
tp
)
and
c1009030
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c1009030
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1009030
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c1009030
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
c1009036.lua
0 → 100644
View file @
91ca0109
--物语纪录·猫
function
c1009036
.
initial_effect
(
c
)
--Activate(effect)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c1009036
.
condition
)
e1
:
SetCost
(
c1009036
.
cost
)
e1
:
SetTarget
(
c1009036
.
target
)
e1
:
SetOperation
(
c1009036
.
activate
)
c
:
RegisterEffect
(
e1
)
--act in hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e2
:
SetCondition
(
c1009036
.
handcon
)
c
:
RegisterEffect
(
e2
)
--equip
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1009036
,
0
))
e3
:
SetCategory
(
CATEGORY_EQUIP
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCost
(
aux
.
bfgcost
)
e3
:
SetTarget
(
c1009036
.
eqtg
)
e3
:
SetOperation
(
c1009036
.
eqop
)
c
:
RegisterEffect
(
e3
)
end
function
c1009036
.
handcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSetCard
,
e
:
GetHandlerPlayer
(),
LOCATION_PZONE
,
0
,
2
,
nil
,
0x20c
)
end
function
c1009036
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20c
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c1009036
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsChainNegatable
(
ev
)
and
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
end
function
c1009036
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1009036
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1009036
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c1009036
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c1009036
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c1009036
.
efilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
Duel
.
IsExistingMatchingCard
(
c1009036
.
eqfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
c
)
end
function
c1009036
.
eqfilter
(
c
,
tc
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
CheckEquipTarget
(
tc
)
end
function
c1009036
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c1009036
.
efilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c1009036
.
efilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c1009036
.
efilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
end
function
c1009036
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c1009036
.
eqfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tc
)
local
eq
=
g
:
GetFirst
()
if
eq
then
Duel
.
Equip
(
tp
,
eq
,
tc
,
true
)
end
end
c1009037.lua
0 → 100644
View file @
91ca0109
--物语纪录·倾
function
c1009037
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c1009037
.
eqtg
)
e1
:
SetOperation
(
c1009037
.
eqop
)
c
:
RegisterEffect
(
e1
)
--Atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
700
)
c
:
RegisterEffect
(
e2
)
--Pierce
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e2
)
--Equip limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
c1009037
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
--direct
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1009037
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
1009037
)
e3
:
SetTarget
(
c1009037
.
dttg
)
e3
:
SetOperation
(
c1009037
.
dtop
)
c
:
RegisterEffect
(
e3
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCondition
(
c1009037
.
damcon
)
e3
:
SetTarget
(
c1009037
.
damtg
)
e3
:
SetOperation
(
c1009037
.
damop
)
c
:
RegisterEffect
(
e3
)
end
function
c1009037
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x20c
)
end
function
c1009037
.
eqfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20c
)
end
function
c1009037
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
c1009037
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1009037
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c1009037
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c1009037
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
function
c1009037
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20c
)
and
c
:
IsAbleToHand
()
end
function
c1009037
.
dttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
tp
)
and
c1009037
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1009037
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1009037
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c1009037
.
dtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
local
ec
=
c
:
GetEquipTarget
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetCondition
(
c1009037
.
dircon
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
ec
:
RegisterEffect
(
e1
)
end
end
function
c1009037
.
dircon
(
e
)
return
e
:
GetHandler
():
GetControler
()
==
e
:
GetOwnerPlayer
()
end
function
c1009037
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ec
=
c
:
GetPreviousEquipTarget
()
return
c
:
IsReason
(
REASON_LOST_TARGET
)
and
ec
and
ec
:
IsReason
(
REASON_DESTROY
)
end
function
c1009037
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
dam
=
e
:
GetHandler
():
GetPreviousEquipTarget
():
GetBaseAttack
()
if
dam
<
0
then
dam
=
0
end
e
:
SetLabel
(
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
end
function
c1009037
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Damage
(
1
-
tp
,
e
:
GetLabel
(),
REASON_EFFECT
,
true
)
Duel
.
RDComplete
()
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