Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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
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
MyCard
ygopro-scripts
Commits
b4f2969f
Commit
b4f2969f
authored
May 03, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update change attack target
parent
99a62414
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
83 additions
and
42 deletions
+83
-42
c11508758.lua
c11508758.lua
+5
-2
c21558682.lua
c21558682.lua
+14
-8
c37053871.lua
c37053871.lua
+2
-2
c42256406.lua
c42256406.lua
+6
-0
c43509019.lua
c43509019.lua
+17
-12
c54912977.lua
c54912977.lua
+4
-2
c56132807.lua
c56132807.lua
+1
-2
c59965151.lua
c59965151.lua
+4
-0
c69937550.lua
c69937550.lua
+8
-4
c7198399.lua
c7198399.lua
+1
-2
c79473793.lua
c79473793.lua
+4
-0
c79997591.lua
c79997591.lua
+4
-0
c81983656.lua
c81983656.lua
+6
-5
c8687195.lua
c8687195.lua
+7
-3
No files found.
c11508758.lua
View file @
b4f2969f
...
@@ -33,8 +33,11 @@ function c11508758.ctlop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -33,8 +33,11 @@ function c11508758.ctlop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
else
else
if
tc
:
IsAttackPos
()
then
if
tc
:
IsAttackable
()
and
not
tc
:
IsImmuneToEffect
(
e
)
then
Duel
.
ChangeAttacker
(
tc
)
local
ats
=
tc
:
GetAttackableTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
11508758
,
1
))
local
g
=
ats
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
CalculateDamage
(
tc
,
g
:
GetFirst
())
end
end
end
end
end
end
...
...
c21558682.lua
View file @
b4f2969f
...
@@ -23,28 +23,34 @@ end
...
@@ -23,28 +23,34 @@ end
function
c21558682
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c21558682
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
and
Duel
.
GetAttackTarget
()
~=
nil
return
tp
~=
Duel
.
GetTurnPlayer
()
and
Duel
.
GetAttackTarget
()
~=
nil
end
end
function
c21558682
.
filter
(
c
)
function
c21558682
.
filter
(
c
,
atg
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
31709826
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
31709826
)
and
atg
:
IsContains
(
c
)
end
end
function
c21558682
.
atktg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c21558682
.
atktg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c21558682
.
filter
(
chkc
)
end
if
chkc
then
local
atg
=
Duel
.
GetAttacker
():
GetAttackableTarget
()
local
at
=
Duel
.
GetAttackTarget
()
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
~=
at
and
c21558682
.
filter
(
chkc
,
atg
)
end
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
e
:
SetProperty
(
0
)
e
:
SetProperty
(
0
)
if
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
and
tp
~=
Duel
.
GetTurnPlayer
()
then
if
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
and
tp
~=
Duel
.
GetTurnPlayer
()
then
local
at
=
Duel
.
GetAttackTarget
()
local
at
=
Duel
.
GetAttackTarget
()
if
at
and
Duel
.
IsExistingTarget
(
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
at
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
21558682
,
1
))
then
local
atg
=
Duel
.
GetAttacker
():
GetAttackableTarget
()
if
at
and
Duel
.
IsExistingTarget
(
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
at
,
atg
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
21558682
,
1
))
then
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
at
)
Duel
.
SelectTarget
(
tp
,
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
at
,
atg
)
end
end
end
end
end
end
function
c21558682
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c21558682
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c21558682
.
filter
(
chkc
)
end
local
atg
=
Duel
.
GetAttacker
():
GetAttackableTarget
()
local
at
=
Duel
.
GetAttackTarget
()
local
at
=
Duel
.
GetAttackTarget
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
at
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
~=
at
and
c21558682
.
filter
(
chkc
,
atg
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
at
,
atg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
at
)
Duel
.
SelectTarget
(
tp
,
c21558682
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
at
,
atg
)
end
end
function
c21558682
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c21558682
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
...
...
c37053871.lua
View file @
b4f2969f
...
@@ -26,12 +26,12 @@ function c37053871.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -26,12 +26,12 @@ function c37053871.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
if
Duel
.
CheckEvent
(
EVENT_BE_BATTLE_TARGET
)
and
Duel
.
GetAttackTarget
():
IsControler
(
tp
)
if
Duel
.
CheckEvent
(
EVENT_BE_BATTLE_TARGET
)
and
Duel
.
GetAttackTarget
():
IsControler
(
tp
)
and
Duel
.
GetAttackTarget
(
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
37053871
,
0
))
then
and
not
Duel
.
GetAttacker
():
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
37053871
,
0
))
then
e
:
SetLabel
(
1
)
e
:
SetLabel
(
1
)
end
end
end
end
function
c37053871
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c37053871
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
not
Duel
.
GetAttacker
():
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
end
e
:
SetLabel
(
1
)
e
:
SetLabel
(
1
)
end
end
function
c37053871
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c37053871
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c42256406.lua
View file @
b4f2969f
...
@@ -22,10 +22,13 @@ function c42256406.initial_effect(c)
...
@@ -22,10 +22,13 @@ function c42256406.initial_effect(c)
e4
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e4
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c42256406
.
cbcon
)
e4
:
SetCondition
(
c42256406
.
cbcon
)
e4
:
SetTarget
(
c42256406
.
cbtg
)
e4
:
SetOperation
(
c42256406
.
cbop
)
e4
:
SetOperation
(
c42256406
.
cbop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--def
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
42256406
,
2
))
e5
:
SetDescription
(
aux
.
Stringid
(
42256406
,
2
))
e5
:
SetCategory
(
CATEGORY_DEFCHANGE
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e5
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e5
:
SetCost
(
c42256406
.
defcost
)
e5
:
SetCost
(
c42256406
.
defcost
)
...
@@ -47,6 +50,9 @@ function c42256406.cbcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -47,6 +50,9 @@ function c42256406.cbcon(e,tp,eg,ep,ev,re,r,rp)
local
bt
=
eg
:
GetFirst
()
local
bt
=
eg
:
GetFirst
()
return
r
~=
REASON_REPLACE
and
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
return
r
~=
REASON_REPLACE
and
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
end
end
function
c42256406
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetAttacker
():
GetAttackableTarget
():
IsContains
(
e
:
GetHandler
())
end
end
function
c42256406
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c42256406
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
...
...
c43509019.lua
View file @
b4f2969f
--トゥーン・ディフェンス
--トゥーン・ディフェンス
function
c43509019
.
initial_effect
(
c
)
function
c43509019
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetTarget
(
c43509019
.
cbtg
)
e1
:
SetOperation
(
c43509019
.
cbop
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c43509019
.
target
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--change battle target
--change battle target
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
...
@@ -12,25 +12,30 @@ function c43509019.initial_effect(c)
...
@@ -12,25 +12,30 @@ function c43509019.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetLabel
(
1
)
e2
:
SetCondition
(
c43509019
.
cbcon
)
e2
:
SetCondition
(
c43509019
.
cbcon
)
e2
:
SetTarget
(
c43509019
.
cbtg
)
e2
:
SetOperation
(
c43509019
.
cbop
)
e2
:
SetOperation
(
c43509019
.
cbop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c43509019
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c43509019
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
local
bt
=
Duel
.
GetAttackTarget
()
local
res
,
teg
,
tep
,
tev
,
tre
,
tr
,
trp
=
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
if
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
and
bt
and
bt
:
IsFaceup
()
and
bt
:
IsLevelBelow
(
4
)
and
bt
:
IsType
(
TYPE_TOON
)
if
res
and
c43509019
.
cbcon
(
e
,
tp
,
teg
,
tep
,
tev
,
tre
,
tr
,
trp
)
and
bt
:
GetControler
()
==
e
:
GetHandlerPlayer
()
and
Duel
.
SelectYesNo
(
tp
,
94
)
then
and
c43509019
.
cbtg
(
e
,
tp
,
teg
,
tep
,
tev
,
tre
,
tr
,
trp
,
0
)
e
:
SetLabel
(
1
)
and
Duel
.
SelectYesNo
(
tp
,
94
)
then
else
e
:
SetLabel
(
0
)
end
e
:
SetOperation
(
c43509019
.
cbop
)
else
e
:
SetOperation
(
nil
)
end
end
end
function
c43509019
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c43509019
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bt
=
Duel
.
GetAttackTarget
()
local
bt
=
Duel
.
GetAttackTarget
()
return
bt
and
bt
:
IsFaceup
()
and
bt
:
IsLevelBelow
(
4
)
and
bt
:
IsType
(
TYPE_TOON
)
and
bt
:
GetControler
()
==
e
:
GetHandlerPlayer
()
return
bt
and
bt
:
IsFaceup
()
and
bt
:
IsLevelBelow
(
4
)
and
bt
:
IsType
(
TYPE_TOON
)
and
bt
:
GetControler
()
==
e
:
GetHandlerPlayer
()
end
end
function
c43509019
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
GetAttacker
():
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
end
end
function
c43509019
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c43509019
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
ChangeAttackTarget
(
nil
)
Duel
.
ChangeAttackTarget
(
nil
)
end
end
end
c54912977.lua
View file @
b4f2969f
...
@@ -32,8 +32,10 @@ function c54912977.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -32,8 +32,10 @@ function c54912977.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c54912977
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c54912977
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
local
a
=
Duel
.
GetAttacker
()
Duel
.
ChangeAttackTarget
(
tc
)
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
tc
)
end
end
end
end
function
c54912977
.
spfilter
(
c
,
e
,
tp
)
function
c54912977
.
spfilter
(
c
,
e
,
tp
)
...
...
c56132807.lua
View file @
b4f2969f
...
@@ -35,9 +35,8 @@ function c56132807.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -35,9 +35,8 @@ function c56132807.spop(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c56132807
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c56132807
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
a
=
Duel
.
GetAttacker
()
local
a
=
Duel
.
GetAttacker
()
if
a
and
a
:
IsAttackable
()
and
a
:
IsFaceup
()
and
not
a
:
IsImmuneToEffect
(
e
)
and
not
a
:
IsStatus
(
STATUS_ATTACK_CANCELED
)
then
if
a
and
not
a
:
IsImmuneToEffect
(
e
)
and
Duel
.
ChangeAttackTarget
(
g
:
GetFirst
()
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
ChangeAttackTarget
(
g
:
GetFirst
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
...
c59965151.lua
View file @
b4f2969f
...
@@ -7,6 +7,7 @@ function c59965151.initial_effect(c)
...
@@ -7,6 +7,7 @@ function c59965151.initial_effect(c)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c59965151
.
cbcon
)
e1
:
SetCondition
(
c59965151
.
cbcon
)
e1
:
SetTarget
(
c59965151
.
cbtg
)
e1
:
SetOperation
(
c59965151
.
cbop
)
e1
:
SetOperation
(
c59965151
.
cbop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--atkdown
--atkdown
...
@@ -25,6 +26,9 @@ function c59965151.cbcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -25,6 +26,9 @@ function c59965151.cbcon(e,tp,eg,ep,ev,re,r,rp)
local
bt
=
eg
:
GetFirst
()
local
bt
=
eg
:
GetFirst
()
return
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
return
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
end
end
function
c59965151
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetAttacker
():
GetAttackableTarget
():
IsContains
(
e
:
GetHandler
())
end
end
function
c59965151
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c59965151
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
...
...
c69937550.lua
View file @
b4f2969f
...
@@ -14,8 +14,9 @@ function c69937550.initial_effect(c)
...
@@ -14,8 +14,9 @@ function c69937550.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c69937550
.
cbcondition
)
e2
:
SetCondition
(
c69937550
.
cbcon
)
e2
:
SetOperation
(
c69937550
.
cboperation
)
e2
:
SetTarget
(
c69937550
.
cbtg
)
e2
:
SetOperation
(
c69937550
.
cbop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c69937550
.
repcon
(
e
)
function
c69937550
.
repcon
(
e
)
...
@@ -33,12 +34,15 @@ function c69937550.repop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -33,12 +34,15 @@ function c69937550.repop(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
EVENT_CUSTOM
+
47408488
,
e
,
0
,
tp
,
0
,
0
)
Duel
.
RaiseEvent
(
c
,
EVENT_CUSTOM
+
47408488
,
e
,
0
,
tp
,
0
,
0
)
end
end
function
c69937550
.
cbcon
dition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c69937550
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bt
=
eg
:
GetFirst
()
local
bt
=
eg
:
GetFirst
()
return
r
~=
REASON_REPLACE
and
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
IsSetCard
(
0x1034
)
and
bt
:
GetControler
()
==
c
:
GetControler
()
return
r
~=
REASON_REPLACE
and
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
IsSetCard
(
0x1034
)
and
bt
:
GetControler
()
==
c
:
GetControler
()
end
end
function
c69937550
.
cboperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c69937550
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetAttacker
():
GetAttackableTarget
():
IsContains
(
e
:
GetHandler
())
end
end
function
c69937550
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
Duel
.
ChangeAttackTarget
(
c
)
Duel
.
ChangeAttackTarget
(
c
)
...
...
c7198399.lua
View file @
b4f2969f
...
@@ -55,9 +55,8 @@ function c7198399.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -55,9 +55,8 @@ function c7198399.spop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
a
=
Duel
.
GetAttacker
()
local
a
=
Duel
.
GetAttacker
()
if
a
and
a
:
IsAttackable
()
and
a
:
IsFaceup
()
and
not
a
:
IsImmuneToEffect
(
e
)
and
not
a
:
IsStatus
(
STATUS_ATTACK_CANCELED
)
then
if
a
and
not
a
:
IsImmuneToEffect
(
e
)
and
Duel
.
ChangeAttackTarget
(
tc
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
ChangeAttackTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
...
c79473793.lua
View file @
b4f2969f
...
@@ -20,6 +20,7 @@ function c79473793.initial_effect(c)
...
@@ -20,6 +20,7 @@ function c79473793.initial_effect(c)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c79473793
.
cbcon
)
e2
:
SetCondition
(
c79473793
.
cbcon
)
e2
:
SetCost
(
c79473793
.
cbcost
)
e2
:
SetCost
(
c79473793
.
cbcost
)
e2
:
SetTarget
(
c79473793
.
cbtg
)
e2
:
SetOperation
(
c79473793
.
cbop
)
e2
:
SetOperation
(
c79473793
.
cbop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
...
@@ -56,6 +57,9 @@ function c79473793.cbcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -56,6 +57,9 @@ function c79473793.cbcost(e,tp,eg,ep,ev,re,r,rp,chk)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c79473793
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c79473793
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c79473793
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetAttacker
():
GetAttackableTarget
():
IsContains
(
e
:
GetHandler
())
end
end
function
c79473793
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c79473793
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
then
...
...
c79997591.lua
View file @
b4f2969f
...
@@ -6,6 +6,7 @@ function c79997591.initial_effect(c)
...
@@ -6,6 +6,7 @@ function c79997591.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCondition
(
c79997591
.
cbcon
)
e1
:
SetCondition
(
c79997591
.
cbcon
)
e1
:
SetTarget
(
c79997591
.
cbtg
)
e1
:
SetOperation
(
c79997591
.
cbop
)
e1
:
SetOperation
(
c79997591
.
cbop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
...
@@ -13,6 +14,9 @@ function c79997591.cbcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -13,6 +14,9 @@ function c79997591.cbcon(e,tp,eg,ep,ev,re,r,rp)
local
bt
=
Duel
.
GetAttackTarget
()
local
bt
=
Duel
.
GetAttackTarget
()
return
bt
and
bt
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
bt
:
IsControler
(
tp
)
return
bt
and
bt
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
bt
:
IsControler
(
tp
)
end
end
function
c79997591
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
GetAttacker
():
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
end
end
function
c79997591
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c79997591
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttacker
()
local
bt
=
Duel
.
GetAttackTarget
()
local
bt
=
Duel
.
GetAttackTarget
()
...
...
c81983656.lua
View file @
b4f2969f
...
@@ -57,14 +57,15 @@ end
...
@@ -57,14 +57,15 @@ end
function
c81983656
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c81983656
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
~=
REASON_REPLACE
return
r
~=
REASON_REPLACE
end
end
function
c81983656
.
cbfilter
(
c
)
function
c81983656
.
cbfilter
(
c
,
at
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x33
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x33
)
and
at
:
IsContains
(
c
)
end
end
function
c81983656
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c81983656
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c81983656
.
cbfilter
(
chkc
)
end
local
at
=
Duel
.
GetAttacker
():
GetAttackableTarget
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c81983656
.
cbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c81983656
.
cbfilter
(
chkc
,
at
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c81983656
.
cbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
(),
at
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c81983656
.
cbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SelectTarget
(
tp
,
c81983656
.
cbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
()
,
at
)
end
end
function
c81983656
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c81983656
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
...
...
c8687195.lua
View file @
b4f2969f
...
@@ -14,11 +14,15 @@ end
...
@@ -14,11 +14,15 @@ end
function
c8687195
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c8687195
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
~=
REASON_REPLACE
and
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
return
r
~=
REASON_REPLACE
and
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
end
function
c8687195
.
filter
(
c
,
at
)
return
at
:
IsContains
(
c
)
end
function
c8687195
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c8687195
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
local
at
=
Duel
.
GetAttacker
():
GetAttackableTarget
()
if
chk
==
0
then
return
true
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
at
:
IsContains
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c8687195
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
(),
at
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
()
)
Duel
.
SelectTarget
(
tp
,
c8687195
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
(),
at
)
end
end
function
c8687195
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c8687195
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
...
...
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