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
f1e5fedd
Commit
f1e5fedd
authored
May 17, 2016
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change attack target
parent
13bb48af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
c37053871.lua
c37053871.lua
+7
-3
c56132807.lua
c56132807.lua
+5
-2
c7198399.lua
c7198399.lua
+3
-1
No files found.
c37053871.lua
View file @
f1e5fedd
...
...
@@ -12,7 +12,7 @@ function c37053871.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
37053871
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_
BE_BATTLE_TARGET
)
e2
:
SetCode
(
EVENT_
ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c37053871
.
atkcon
)
e2
:
SetTarget
(
c37053871
.
atktg2
)
...
...
@@ -20,12 +20,16 @@ function c37053871.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
c37053871
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
():
IsControler
(
tp
)
local
a
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttackTarget
()
return
a
:
IsControler
(
1
-
tp
)
and
at
and
at
:
IsControler
(
tp
)
end
function
c37053871
.
atktg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
a
=
Duel
.
GetAttacker
local
at
=
Duel
.
GetAttackTarget
()
e
:
SetLabel
(
0
)
if
Duel
.
CheckEvent
(
EVENT_
BE_BATTLE_TARGET
)
and
Duel
.
GetAttackTarget
():
IsControler
(
tp
)
if
Duel
.
CheckEvent
(
EVENT_
ATTACK_ANNOUNCE
)
and
c37053871
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
not
Duel
.
GetAttacker
():
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
37053871
,
0
))
then
e
:
SetLabel
(
1
)
end
...
...
c56132807.lua
View file @
f1e5fedd
...
...
@@ -33,10 +33,13 @@ function c56132807.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
,
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
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
a
=
Duel
.
GetAttacker
()
if
a
and
not
a
:
IsImmuneToEffect
(
e
)
and
Duel
.
ChangeAttackTarget
(
g
:
GetFirst
())
then
local
ag
=
a
:
GetAttackableTarget
()
if
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
and
ag
:
IsContains
(
tc
)
then
Duel
.
BreakEffect
()
Duel
.
ChangeAttackTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
...
c7198399.lua
View file @
f1e5fedd
...
...
@@ -55,8 +55,10 @@ function c7198399.spop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
a
=
Duel
.
GetAttacker
()
if
a
and
not
a
:
IsImmuneToEffect
(
e
)
and
Duel
.
ChangeAttackTarget
(
tc
)
then
local
ag
=
a
:
GetAttackableTarget
()
if
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
and
ag
:
IsContains
(
tc
)
then
Duel
.
BreakEffect
()
Duel
.
ChangeAttackTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
...
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