Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-THC-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
GuGu
ygopro-THC-cards
Commits
f92f7054
Commit
f92f7054
authored
Dec 11, 2021
by
Grajade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update c22200005.lua
parent
c46ee783
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
81 deletions
+81
-81
script/c22200005.lua
script/c22200005.lua
+81
-81
No files found.
script/c22200005.lua
View file @
f92f7054
--瞳中所示之物
function
c22200005
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22200005
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
+
CATEGORY_DAMAGE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c22200005
.
condition
)
e1
:
SetCost
(
c22200005
.
cost
)
e1
:
SetTarget
(
c22200005
.
target
)
e1
:
SetOperation
(
c22200005
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c22200005
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
GetControler
()
~=
tp
end
function
c22200005
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
c22200005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c22200005
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
22200999
)
if
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
>
0
then
local
a
=
Duel
.
GetAttacker
()
if
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
token
)
Duel
.
BreakEffect
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCondition
(
c22200005
.
spcon
)
e1
:
SetOperation
(
c22200005
.
spop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetOperation
(
c22200005
.
desop
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
function
c22200005
.
cfilter
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c22200005
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22200005
.
cfilter
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
end
function
c22200005
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
then
return
end
Duel
.
Hint
(
HINT_CARD
,
tp
,
22200005
)
local
token
=
Duel
.
CreateToken
(
tp
,
22200999
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c22200005
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
tp
,
22200005
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
):
Filter
(
Card
.
IsFaceup
,
nil
):
Filter
(
Card
.
IsType
,
nil
,
TYPE_TOKEN
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
>
0
then
local
dm
=
Duel
.
GetOperatedGroup
():
GetCount
()
*
500
Duel
.
Damage
(
tp
,
dm
,
REASON_EFFECT
)
end
e
:
Reset
()
--瞳中所示之物
function
c22200005
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22200005
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
+
CATEGORY_DAMAGE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c22200005
.
condition
)
e1
:
SetCost
(
c22200005
.
cost
)
e1
:
SetTarget
(
c22200005
.
target
)
e1
:
SetOperation
(
c22200005
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c22200005
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
GetControler
()
~=
tp
end
function
c22200005
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
c22200005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
,
POS_FACEUP_DEFENSE
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c22200005
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
,
POS_FACEUP_DEFENSE
)
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
22200999
)
if
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
>
0
then
local
a
=
Duel
.
GetAttacker
()
if
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
token
)
Duel
.
BreakEffect
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCondition
(
c22200005
.
spcon
)
e1
:
SetOperation
(
c22200005
.
spop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetOperation
(
c22200005
.
desop
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
function
c22200005
.
cfilter
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c22200005
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22200005
.
cfilter
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
,
POS_FACEUP_DEFENSE
)
end
function
c22200005
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
22200999
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
,
POS_FACEUP_DEFENSE
)
then
return
end
Duel
.
Hint
(
HINT_CARD
,
tp
,
22200005
)
local
token
=
Duel
.
CreateToken
(
tp
,
22200999
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c22200005
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
tp
,
22200005
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
):
Filter
(
Card
.
IsFaceup
,
nil
):
Filter
(
Card
.
IsType
,
nil
,
TYPE_TOKEN
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
>
0
then
local
dm
=
Duel
.
GetOperatedGroup
():
GetCount
()
*
500
Duel
.
Damage
(
tp
,
dm
,
REASON_EFFECT
)
end
e
:
Reset
()
end
\ No newline at end of file
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