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
18d7c0ab
Commit
18d7c0ab
authored
Jul 30, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_FLAG2_SPOSITCH
parent
6639d091
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
0 deletions
+20
-0
effect.cpp
effect.cpp
+3
-0
effect.h
effect.h
+1
-0
interpreter.cpp
interpreter.cpp
+3
-0
libeffect.cpp
libeffect.cpp
+8
-0
processor.cpp
processor.cpp
+5
-0
No files found.
effect.cpp
View file @
18d7c0ab
...
@@ -224,6 +224,9 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -224,6 +224,9 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
else
else
return
FALSE
;
return
FALSE
;
}
}
else
if
((
handler
->
data
.
type
&
TYPE_PENDULUM
)
&&
pduel
->
game_field
->
infos
.
turn_player
!=
playerid
&&
is_flag
(
EFFECT_FLAG2_SPOSITCH
))
{
ecode
=
EFFECT_QP_ACT_IN_NTPHAND
;
}
}
else
if
(
handler
->
current
.
location
==
LOCATION_SZONE
)
{
}
else
if
(
handler
->
current
.
location
==
LOCATION_SZONE
)
{
if
((
handler
->
data
.
type
&
TYPE_TRAP
)
&&
handler
->
get_status
(
STATUS_SET_TURN
))
if
((
handler
->
data
.
type
&
TYPE_TRAP
)
&&
handler
->
get_status
(
STATUS_SET_TURN
))
ecode
=
EFFECT_TRAP_ACT_IN_SET_TURN
;
ecode
=
EFFECT_TRAP_ACT_IN_SET_TURN
;
...
...
effect.h
View file @
18d7c0ab
...
@@ -207,6 +207,7 @@ enum effect_flag : uint32 {
...
@@ -207,6 +207,7 @@ enum effect_flag : uint32 {
enum
effect_flag2
:
uint32
{
enum
effect_flag2
:
uint32
{
// EFFECT_FLAG2_NAGA = 0x0001,
// EFFECT_FLAG2_NAGA = 0x0001,
EFFECT_FLAG2_COF
=
0x0002
,
EFFECT_FLAG2_COF
=
0x0002
,
EFFECT_FLAG2_SPOSITCH
=
0x0100
,
// flag2 from 0x0100 are koishipro use
};
};
inline
effect_flag
operator
|
(
effect_flag
flag1
,
effect_flag
flag2
)
inline
effect_flag
operator
|
(
effect_flag
flag1
,
effect_flag
flag2
)
{
{
...
...
interpreter.cpp
View file @
18d7c0ab
...
@@ -693,6 +693,9 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -693,6 +693,9 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal
(
lua_state
,
"CARDDATA_RSCALE"
);
lua_setglobal
(
lua_state
,
"CARDDATA_RSCALE"
);
lua_pushinteger
(
lua_state
,
CARDDATA_LINK_MARKER
);
lua_pushinteger
(
lua_state
,
CARDDATA_LINK_MARKER
);
lua_setglobal
(
lua_state
,
"CARDDATA_LINK_MARKER"
);
lua_setglobal
(
lua_state
,
"CARDDATA_LINK_MARKER"
);
//effect flag2s
lua_pushinteger
(
lua_state
,
EFFECT_FLAG2_SPOSITCH
);
lua_setglobal
(
lua_state
,
"EFFECT_FLAG2_SPOSITCH"
);
//effects
//effects
lua_pushinteger
(
lua_state
,
EFFECT_CHANGE_LINK_MARKER_KOISHI
);
lua_pushinteger
(
lua_state
,
EFFECT_CHANGE_LINK_MARKER_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_CHANGE_LINK_MARKER_KOISHI"
);
lua_setglobal
(
lua_state
,
"EFFECT_CHANGE_LINK_MARKER_KOISHI"
);
...
...
libeffect.cpp
View file @
18d7c0ab
...
@@ -472,7 +472,11 @@ int32 scriptlib::effect_get_active_type(lua_State *L) {
...
@@ -472,7 +472,11 @@ int32 scriptlib::effect_get_active_type(lua_State *L) {
if
(
peffect
->
active_type
)
if
(
peffect
->
active_type
)
atype
=
peffect
->
active_type
;
atype
=
peffect
->
active_type
;
else
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
peffect
->
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
else
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
peffect
->
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
{
atype
=
TYPE_PENDULUM
+
TYPE_SPELL
;
atype
=
TYPE_PENDULUM
+
TYPE_SPELL
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG2_SPOSITCH
))
atype
|=
TYPE_QUICKPLAY
;
}
else
else
atype
=
peffect
->
get_handler
()
->
get_type
();
atype
=
peffect
->
get_handler
()
->
get_type
();
}
else
}
else
...
@@ -490,7 +494,11 @@ int32 scriptlib::effect_is_active_type(lua_State *L) {
...
@@ -490,7 +494,11 @@ int32 scriptlib::effect_is_active_type(lua_State *L) {
if
(
peffect
->
active_type
)
if
(
peffect
->
active_type
)
atype
=
peffect
->
active_type
;
atype
=
peffect
->
active_type
;
else
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
peffect
->
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
else
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
peffect
->
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
{
atype
=
TYPE_PENDULUM
+
TYPE_SPELL
;
atype
=
TYPE_PENDULUM
+
TYPE_SPELL
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG2_SPOSITCH
))
atype
|=
TYPE_QUICKPLAY
;
}
else
else
atype
=
peffect
->
get_handler
()
->
get_type
();
atype
=
peffect
->
get_handler
()
->
get_type
();
}
else
}
else
...
...
processor.cpp
View file @
18d7c0ab
...
@@ -4278,6 +4278,9 @@ int32 field::add_chain(uint16 step) {
...
@@ -4278,6 +4278,9 @@ int32 field::add_chain(uint16 step) {
else
if
((
phandler
->
data
.
type
&
TYPE_SPELL
)
&&
(
phandler
->
data
.
type
&
TYPE_QUICKPLAY
)
else
if
((
phandler
->
data
.
type
&
TYPE_SPELL
)
&&
(
phandler
->
data
.
type
&
TYPE_QUICKPLAY
)
&&
infos
.
turn_player
!=
phandler
->
current
.
controler
)
&&
infos
.
turn_player
!=
phandler
->
current
.
controler
)
ecode
=
EFFECT_QP_ACT_IN_NTPHAND
;
ecode
=
EFFECT_QP_ACT_IN_NTPHAND
;
else
if
((
phandler
->
data
.
type
&
TYPE_PENDULUM
)
&&
peffect
->
is_flag
(
EFFECT_FLAG2_SPOSITCH
)
&&
infos
.
turn_player
!=
phandler
->
current
.
controler
)
ecode
=
EFFECT_QP_ACT_IN_NTPHAND
;
}
else
if
(
phandler
->
current
.
location
==
LOCATION_SZONE
)
{
}
else
if
(
phandler
->
current
.
location
==
LOCATION_SZONE
)
{
if
((
phandler
->
data
.
type
&
TYPE_TRAP
)
&&
phandler
->
get_status
(
STATUS_SET_TURN
))
if
((
phandler
->
data
.
type
&
TYPE_TRAP
)
&&
phandler
->
get_status
(
STATUS_SET_TURN
))
ecode
=
EFFECT_TRAP_ACT_IN_SET_TURN
;
ecode
=
EFFECT_TRAP_ACT_IN_SET_TURN
;
...
@@ -4337,6 +4340,8 @@ int32 field::add_chain(uint16 step) {
...
@@ -4337,6 +4340,8 @@ int32 field::add_chain(uint16 step) {
if
((
peffect
->
card_type
&
0x5
)
==
0x5
)
if
((
peffect
->
card_type
&
0x5
)
==
0x5
)
peffect
->
card_type
-=
TYPE_TRAP
;
peffect
->
card_type
-=
TYPE_TRAP
;
peffect
->
active_type
=
peffect
->
card_type
;
peffect
->
active_type
=
peffect
->
card_type
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG2_SPOSITCH
))
peffect
->
active_type
|=
TYPE_QUICKPLAY
;
peffect
->
active_handler
=
peffect
->
handler
->
overlay_target
;
peffect
->
active_handler
=
peffect
->
handler
->
overlay_target
;
clit
.
chain_count
=
core
.
current_chain
.
size
()
+
1
;
clit
.
chain_count
=
core
.
current_chain
.
size
()
+
1
;
clit
.
target_cards
=
0
;
clit
.
target_cards
=
0
;
...
...
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