Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
YGOPRO-520DIY
ygopro
Commits
745272cb
Commit
745272cb
authored
Mar 15, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
a7eb57f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
171 additions
and
0 deletions
+171
-0
script/c70090.lua
script/c70090.lua
+93
-0
script/c70100.lua
script/c70100.lua
+78
-0
No files found.
script/c70090.lua
0 → 100644
View file @
745272cb
--星読みの魔術師(test)
function
c70090
.
initial_effect
(
c
)
--pendulum summon
aux
.
AddPendulumProcedure
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--actlimit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c70090
.
actcon
)
e2
:
SetOperation
(
c70090
.
actop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e3
)
--scale
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_CHANGE_LSCALE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCondition
(
c70090
.
sccon
)
e4
:
SetValue
(
4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_CHANGE_RSCALE
)
c
:
RegisterEffect
(
e5
)
--
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
70090
,
0
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_TO_HAND
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCondition
(
c70090
.
spcon
)
e6
:
SetTarget
(
c70090
.
sptg
)
e6
:
SetOperation
(
c70090
.
spop
)
c
:
RegisterEffect
(
e6
)
end
function
c70090
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
Duel
.
GetAttackTarget
()
end
return
(
e
:
GetHandler
():
GetSequence
()
==
6
or
e
:
GetHandler
():
GetSequence
()
==
7
)
and
tc
and
tc
:
IsControler
(
tp
)
and
tc
:
IsType
(
TYPE_PENDULUM
)
end
function
c70090
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c70090
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c70090
.
aclimit
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
function
c70090
.
sccon
(
e
)
local
seq
=
e
:
GetHandler
():
GetSequence
()
if
seq
~=
6
and
seq
~=
7
then
return
false
end
local
tc
=
Duel
.
GetFieldCard
(
e
:
GetHandlerPlayer
(),
LOCATION_SZONE
,
13
-
seq
)
return
not
tc
or
(
not
tc
:
IsSetCard
(
0x98
)
and
not
tc
:
IsSetCard
(
0x99
))
end
function
c70090
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
e
:
SetLabel
(
tc
:
GetCode
())
return
eg
:
GetCount
()
==
1
and
rp
~=
tp
and
tc
:
IsReason
(
REASON_EFFECT
)
and
tc
:
GetPreviousControler
()
==
tp
and
tc
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
tc
:
IsType
(
TYPE_PENDULUM
)
and
tc
:
IsControler
(
tp
)
end
function
c70090
.
filter
(
c
,
e
,
tp
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c70090
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c70090
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
e
:
GetLabel
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c70090
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c70090
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
e
:
GetLabel
())
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
script/c70100.lua
0 → 100644
View file @
745272cb
--時読みの魔術師(test)
function
c70100
.
initial_effect
(
c
)
--pendulum summon
aux
.
AddPendulumProcedure
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c70100
.
condition
)
c
:
RegisterEffect
(
e1
)
--actlimit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c70100
.
actcon
)
e2
:
SetOperation
(
c70100
.
actop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e3
)
--scale
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_CHANGE_LSCALE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCondition
(
c70100
.
slcon
)
e4
:
SetValue
(
4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_CHANGE_RSCALE
)
c
:
RegisterEffect
(
e5
)
--
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e6
:
SetTarget
(
c70100
.
indtg
)
e6
:
SetCountLimit
(
1
)
e6
:
SetValue
(
c70100
.
valcon
)
c
:
RegisterEffect
(
e6
)
end
function
c70100
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
end
function
c70100
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
Duel
.
GetAttackTarget
()
end
return
(
e
:
GetHandler
():
GetSequence
()
==
6
or
e
:
GetHandler
():
GetSequence
()
==
7
)
and
tc
and
tc
:
IsControler
(
tp
)
and
tc
:
IsType
(
TYPE_PENDULUM
)
end
function
c70100
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c70100
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c70100
.
aclimit
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_TRAP
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
function
c70100
.
slcon
(
e
)
local
seq
=
e
:
GetHandler
():
GetSequence
()
if
seq
~=
6
and
seq
~=
7
then
return
false
end
local
tc
=
Duel
.
GetFieldCard
(
e
:
GetHandlerPlayer
(),
LOCATION_SZONE
,
13
-
seq
)
return
not
tc
or
(
not
tc
:
IsSetCard
(
0x98
)
and
not
tc
:
IsSetCard
(
0x99
))
end
function
c70100
.
indtg
(
e
,
c
)
return
c
:
GetSequence
()
==
6
or
c
:
GetSequence
()
==
7
end
function
c70100
.
valcon
(
e
,
re
,
r
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
and
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
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