Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
88724276
Commit
88724276
authored
Sep 15, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spell_link'
parents
d8ca56be
693e6e06
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
3 deletions
+33
-3
card.cpp
card.cpp
+22
-3
effect.h
effect.h
+1
-0
field.cpp
field.cpp
+8
-0
interpreter.cpp
interpreter.cpp
+2
-0
No files found.
card.cpp
View file @
88724276
...
...
@@ -1225,11 +1225,20 @@ uint32 card::get_rscale() {
return
rscale
;
}
uint32
card
::
get_link_marker
()
{
if
(
!
(
data
.
type
&
TYPE_LINK
))
return
0
;
effect_set
effects
;
effect_set
effects2
;
uint32
link_marker
=
data
.
link_marker
;
if
(
!
(
data
.
type
&
TYPE_LINK
))
{
effect_set
effects3
;
filter_effect
(
EFFECT_LINK_SPELL_KOISHI
,
&
effects3
);
if
(
!
effects3
.
size
())
return
0
;
for
(
int32
i
=
0
;
i
<
effects3
.
size
();
++
i
)
{
card
*
ocard
=
effects3
[
i
]
->
get_handler
();
if
(
!
(
effects3
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
get_status
(
STATUS_TO_LEAVE_FROMEX
)))
link_marker
=
effects3
[
i
]
->
get_value
(
this
);
}
}
filter_effect
(
EFFECT_ADD_LINK_MARKER_KOISHI
,
&
effects
,
FALSE
);
filter_effect
(
EFFECT_REMOVE_LINK_MARKER_KOISHI
,
&
effects
);
filter_effect
(
EFFECT_CHANGE_LINK_MARKER_KOISHI
,
&
effects2
);
...
...
@@ -1251,10 +1260,20 @@ int32 card::is_link_marker(uint32 dir) {
return
(
int32
)(
get_link_marker
()
&
dir
);
}
uint32
card
::
get_linked_zone
()
{
if
(
!
(
data
.
type
&
TYPE_LINK
)
||
current
.
location
!=
LOCATION_MZONE
)
if
(
(
!
(
data
.
type
&
TYPE_LINK
)
||
current
.
location
!=
LOCATION_MZONE
)
&&
(
!
is_affected_by_effect
(
EFFECT_LINK_SPELL_KOISHI
)
||
current
.
location
!=
LOCATION_SZONE
)
)
return
0
;
int32
zones
=
0
;
int32
s
=
current
.
sequence
;
if
(
current
.
location
==
LOCATION_SZONE
)
{
if
(
s
>
4
)
return
0
;
if
(
is_link_marker
(
LINK_MARKER_TOP_LEFT
)
&&
s
!=
0
)
zones
|=
1u
<<
(
s
-
1
);
if
(
is_link_marker
(
LINK_MARKER_TOP
)
&&
s
!=
0
)
zones
|=
1u
<<
s
;
if
(
is_link_marker
(
LINK_MARKER_TOP_RIGHT
)
&&
s
!=
4
)
zones
|=
1u
<<
(
s
+
1
);
}
if
(
s
>
0
&&
s
<=
4
&&
is_link_marker
(
LINK_MARKER_LEFT
))
zones
|=
1u
<<
(
s
-
1
);
if
(
s
<=
3
&&
is_link_marker
(
LINK_MARKER_RIGHT
))
...
...
effect.h
View file @
88724276
...
...
@@ -123,6 +123,7 @@ public:
#define EFFECT_REMOVE_SUMMON_TYPE_KOISHI 37564159
#define EFFECT_CHANGE_SUMMON_TYPE_KOISHI 37564160
#define EFFECT_CHANGE_SUMMON_LOCATION_KOISHI 37564161
#define EFFECT_LINK_SPELL_KOISHI 37564162
//status
#define EFFECT_STATUS_AVAILABLE 0x0001
...
...
field.cpp
View file @
88724276
...
...
@@ -801,6 +801,14 @@ uint32 field::get_linked_zone(int32 playerid) {
zones
|=
1u
<<
(
2
-
i
*
2
);
}
}
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
if
(
i
>
0
&&
player
[
playerid
].
list_szone
[
i
]
&&
player
[
playerid
].
list_szone
[
i
]
->
is_link_marker
(
LINK_MARKER_TOP_LEFT
))
zones
|=
1u
<<
(
i
-
1
);
if
(
player
[
playerid
].
list_szone
[
i
]
&&
player
[
playerid
].
list_szone
[
i
]
->
is_link_marker
(
LINK_MARKER_TOP
))
zones
|=
1u
<<
i
;
if
(
i
<
4
&&
player
[
playerid
].
list_szone
[
i
]
&&
player
[
playerid
].
list_szone
[
i
]
->
is_link_marker
(
LINK_MARKER_TOP_RIGHT
))
zones
|=
1u
<<
(
i
+
1
);
}
return
zones
;
}
void
field
::
get_linked_cards
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
cset
)
{
...
...
interpreter.cpp
View file @
88724276
...
...
@@ -722,6 +722,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal
(
lua_state
,
"EFFECT_CHANGE_SUMMON_TYPE_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_CHANGE_SUMMON_LOCATION_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_CHANGE_SUMMON_LOCATION_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_LINK_SPELL_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_LINK_SPELL_KOISHI"
);
//music hints
lua_pushinteger
(
lua_state
,
HINT_MUSIC
);
lua_setglobal
(
lua_state
,
"HINT_MUSIC"
);
...
...
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