Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
c3c0118f
Commit
c3c0118f
authored
Sep 28, 2023
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
00b58a9c
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1180 additions
and
1355 deletions
+1180
-1355
expansions/script/c11410000.lua
expansions/script/c11410000.lua
+3
-2
expansions/script/c11450000.lua
expansions/script/c11450000.lua
+9
-10
expansions/script/c130006100.lua
expansions/script/c130006100.lua
+106
-1
expansions/script/c130006101.lua
expansions/script/c130006101.lua
+106
-1
expansions/script/c130006102.lua
expansions/script/c130006102.lua
+106
-1
expansions/script/c130006103.lua
expansions/script/c130006103.lua
+106
-1
expansions/script/c130006104.lua
expansions/script/c130006104.lua
+106
-1
expansions/script/c130006105.lua
expansions/script/c130006105.lua
+106
-1
expansions/script/c130006106.lua
expansions/script/c130006106.lua
+106
-1
expansions/script/c130006107.lua
expansions/script/c130006107.lua
+106
-1
expansions/script/c130006108.lua
expansions/script/c130006108.lua
+106
-1
expansions/script/c130006109.lua
expansions/script/c130006109.lua
+106
-1
expansions/script/c130006110.lua
expansions/script/c130006110.lua
+106
-1
expansions/script/c53702500.lua
expansions/script/c53702500.lua
+0
-1331
expansions/script/c71401013.lua
expansions/script/c71401013.lua
+1
-1
expansions/script/c71401016.lua
expansions/script/c71401016.lua
+1
-0
No files found.
expansions/script/c11410000.lua
View file @
c3c0118f
...
...
@@ -66,7 +66,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
end
end
if
not
require
and
Duel
.
LoadScript
then
if
not
require
and
dofile
then
function
require
(
str
)
return
dofile
(
str
..
".lua"
)
end
end
--[[if not require and Duel.LoadScript then
function require(str)
local name=str
for word in string.gmatch(str,"%w+") do
...
...
@@ -75,4 +76,4 @@ if not require and Duel.LoadScript then
Duel.LoadScript(name..".lua")
return true
end
end
\ No newline at end of file
end--]]
\ No newline at end of file
expansions/script/c11450000.lua
View file @
c3c0118f
...
...
@@ -33,19 +33,18 @@ function cm.initial_effect(c)
local
e1
=
_Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e1
)
end
function
read111
(
tab
)
for
k
,
v
in
pairs
(
tab
)
do
Debug
.
Message
(
k
)
local
sel
=
Duel
.
SelectOption
(
0
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
if
sel
==
0
and
aux
.
GetValueType
(
v
)
==
"table"
then
read111
(
v
)
end
if
sel
==
2
then
return
end
function
readtab
(
tab
)
for
k
,
v
in
pairs
(
tab
)
do
Debug
.
Message
(
k
)
local
sel
=
Duel
.
SelectOption
(
0
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
if
sel
==
0
and
aux
.
GetValueType
(
v
)
==
"table"
then
readtab
(
v
)
end
if
sel
==
2
then
return
end
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
read111
(
package.loaded
)
--readtab(package.loaded)
_Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
_Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
m
,
1
))
local
ct0
=
_Duel
.
GetMatchingGroupCount
(
_Card
.
IsCode
,
0
,
0xff
,
0
,
nil
,
m
)
...
...
expansions/script/c130006100.lua
View file @
c3c0118f
--他人格 ~怠惰~
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
cm
.
AlterEgo
=
true
function
cm
.
initial_effect
(
c
)
ae
.
initial
(
c
)
...
...
expansions/script/c130006101.lua
View file @
c3c0118f
--他人格 ~贪食~
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
cm
.
AlterEgo
=
true
function
cm
.
initial_effect
(
c
)
ae
.
initial
(
c
)
...
...
expansions/script/c130006102.lua
View file @
c3c0118f
--他人格 ~色欲~
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
cm
.
AlterEgo
=
true
function
cm
.
initial_effect
(
c
)
ae
.
initial
(
c
)
...
...
expansions/script/c130006103.lua
View file @
c3c0118f
--他人格 ~愤怒~
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
cm
.
AlterEgo
=
true
function
cm
.
initial_effect
(
c
)
ae
.
initial
(
c
)
...
...
expansions/script/c130006104.lua
View file @
c3c0118f
--他人格 ~嫉妒~
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
cm
.
AlterEgo
=
true
function
cm
.
initial_effect
(
c
)
ae
.
initial
(
c
)
...
...
expansions/script/c130006105.lua
View file @
c3c0118f
--他人格 ~物欲~
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
cm
.
AlterEgo
=
true
function
cm
.
initial_effect
(
c
)
ae
.
initial
(
c
)
...
...
expansions/script/c130006106.lua
View file @
c3c0118f
--他人格 ~高慢~
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
cm
.
AlterEgo
=
true
function
cm
.
initial_effect
(
c
)
ae
.
initial
(
c
)
...
...
expansions/script/c130006107.lua
View file @
c3c0118f
--罪恶的根源
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
function
cm
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
...
...
expansions/script/c130006108.lua
View file @
c3c0118f
--埃瓦格里乌斯之教示
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
function
cm
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c130006109.lua
View file @
c3c0118f
--宾斯费尔德之遗作
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
function
cm
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c130006110.lua
View file @
c3c0118f
--阿利吉耶里之七冠
local
cm
,
m
=
GetID
()
if
not
pcall
(
function
()
require
(
"expansions/script/c130006111"
)
end
)
then
require
(
"script/c130006111"
)
end
--lib
AlterEgo
=
AlterEgo
or
{}
ae
=
AlterEgo
function
ae
.
initial
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--atk&def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetValue
(
ae
.
value
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
ae
.
recon
)
e3
:
SetValue
(
LOCATION_DECKBOT
)
c
:
RegisterEffect
(
e3
)
--replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
ae
.
repcon
)
e4
:
SetOperation
(
ae
.
repop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetCountLimit
(
1
,
c
:
GetOriginalCode
()
+
1000
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
ae
.
sptg
)
e5
:
SetOperation
(
ae
.
spop
)
c
:
RegisterEffect
(
e5
)
--ptos
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_PZONE
)
e6
:
SetCondition
(
ae
.
ptoscon
)
e6
:
SetOperation
(
ae
.
ptosop
)
c
:
RegisterEffect
(
e6
)
end
function
ae
.
value
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
ae
.
filter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
nil
)
*
1000
end
function
ae
.
filter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
and
c
:
IsFaceup
()
end
function
ae
.
cfilter
(
c
)
local
com
=
_G
[
"c"
..
c
:
GetCode
()]
return
com
and
com
.
AlterEgo
end
function
ae
.
recon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_PZONE
)
end
function
ae
.
repcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_MZONE
end
function
ae
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetPreviousControler
()
local
num
=
0
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
num
=
num
+
1
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
num
=
num
+
1
end
if
(
num
==
0
or
not
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
))
and
not
(
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
c
:
GetOwner
()))
then
Duel
.
SendtoDeck
(
c
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
ae
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
ae
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
ae
.
ptoscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
ae
.
ptosop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
130006111
,
1
))
end
end
--
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c53702500.lua
View file @
c3c0118f
This diff is collapsed.
Click to expand it.
expansions/script/c71401013.lua
View file @
c3c0118f
...
...
@@ -62,7 +62,7 @@ function c71401013.op2(e,tp,eg,ep,ev,re,r,rp)
end
local
dg
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
if
Duel
.
IsExistingMatchingCard
(
c71401013
.
filter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
dg
:
FilterCount
(
Card
.
IsAbleToRemove
,
nil
,
tp
,
POS_FACEDOWN
)
==
5
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
71401013
,
1
))
then
Duel
.
Remove
(
dg
,
POS_FACE
DOWN
,
REASON_EFFECT
)
Duel
.
Remove
(
dg
,
POS_FACE
UP
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c71401016.lua
View file @
c3c0118f
...
...
@@ -109,6 +109,7 @@ function c71401016.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
IsExistingMatchingCard
(
c71401016
.
filter3
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
tp
,
POS_FACEDOWN
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
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