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
11898b44
Commit
11898b44
authored
May 28, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
687a3711
f95d9084
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
36 deletions
+34
-36
effect.h
effect.h
+1
-1
field.h
field.h
+2
-2
libduel.cpp
libduel.cpp
+2
-2
operations.cpp
operations.cpp
+4
-4
processor.cpp
processor.cpp
+25
-27
No files found.
effect.h
View file @
11898b44
...
...
@@ -205,7 +205,7 @@ enum effect_flag : uint32 {
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
// EFFECT_FLAG_CHAIN_UNIQUE = 0x8000000,
EFFECT_FLAG_LIMIT_ZONE
=
0x10000000
,
EFFECT_FLAG_COUNT_SS_ONCE
=
0x20000000
,
// EFFECT_FLAG_COF
= 0x20000000,
// EFFECT_FLAG_CVAL_CHECK = 0x40000000,
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
};
...
...
field.h
View file @
11898b44
...
...
@@ -562,8 +562,8 @@ public:
int32
summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
flip_summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
);
int32
mset
(
uint16
step
,
uint8
setplayer
,
card
*
ptarget
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
ptarget
,
uint32
zone
=
0xff
);
int32
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
,
uint8
confirm
);
int32
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
ptarget
,
effect
*
reason_effect
,
uint32
zone
=
0xff
);
int32
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
,
uint8
confirm
,
effect
*
reason_effect
);
int32
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
uint32
summon_type
);
int32
special_summon_step
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint32
zone
);
int32
special_summon
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint32
zone
);
...
...
libduel.cpp
View file @
11898b44
...
...
@@ -597,9 +597,9 @@ int32 scriptlib::duel_sets(lua_State *L) {
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
if
(
pcard
)
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET
,
0
,
0
,
(
group
*
)
pcard
,
playerid
,
toplayer
,
zone
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET
,
0
,
pduel
->
game_field
->
core
.
reason_effect
,
(
group
*
)
pcard
,
playerid
,
toplayer
,
zone
);
else
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET_G
,
0
,
0
,
pgroup
,
playerid
,
toplayer
,
confirm
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET_G
,
0
,
pduel
->
game_field
->
core
.
reason_effect
,
pgroup
,
playerid
,
toplayer
,
confirm
);
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_create_token
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
11898b44
...
...
@@ -2301,7 +2301,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
}
return
TRUE
;
}
int32
field
::
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
target
,
uint32
zone
)
{
int32
field
::
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
target
,
effect
*
reason_effect
,
uint32
zone
)
{
switch
(
step
)
{
case
0
:
{
if
(
!
(
target
->
data
.
type
&
TYPE_FIELD
)
&&
get_useable_count
(
target
,
toplayer
,
LOCATION_SZONE
,
setplayer
,
LOCATION_REASON_TOFIELD
,
zone
?
zone
:
0xff
)
<=
0
)
...
...
@@ -2347,7 +2347,7 @@ int32 field::sset(uint16 step, uint8 setplayer, uint8 toplayer, card * target, u
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer32
(
target
->
get_info_location
());
adjust_instant
();
raise_event
(
target
,
EVENT_SSET
,
0
,
0
,
setplayer
,
setplayer
,
0
);
raise_event
(
target
,
EVENT_SSET
,
reason_effect
,
0
,
setplayer
,
setplayer
,
0
);
process_instant_event
();
if
(
core
.
current_chain
.
size
()
==
0
)
{
adjust_all
();
...
...
@@ -2358,7 +2358,7 @@ int32 field::sset(uint16 step, uint8 setplayer, uint8 toplayer, card * target, u
}
return
TRUE
;
}
int32
field
::
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
,
uint8
confirm
)
{
int32
field
::
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
,
uint8
confirm
,
effect
*
reason_effect
)
{
switch
(
step
)
{
case
0
:
{
card_set
*
set_cards
=
new
card_set
;
...
...
@@ -2515,7 +2515,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
case
7
:
{
returns
.
ivalue
[
0
]
=
core
.
operated_set
.
size
();
adjust_instant
();
raise_event
(
&
core
.
operated_set
,
EVENT_SSET
,
0
,
0
,
setplayer
,
setplayer
,
0
);
raise_event
(
&
core
.
operated_set
,
EVENT_SSET
,
reason_effect
,
0
,
setplayer
,
setplayer
,
0
);
process_instant_event
();
if
(
core
.
current_chain
.
size
()
==
0
)
{
adjust_all
();
...
...
processor.cpp
View file @
11898b44
...
...
@@ -395,7 +395,7 @@ int32 field::process() {
return
pduel
->
bufferlen
;
}
case
PROCESSOR_SSET
:
{
if
(
sset
(
it
->
step
,
it
->
arg1
,
it
->
arg2
,
(
card
*
)(
it
->
ptarget
),
it
->
arg3
))
if
(
sset
(
it
->
step
,
it
->
arg1
,
it
->
arg2
,
(
card
*
)(
it
->
ptarget
),
it
->
peffect
,
it
->
arg3
))
core
.
units
.
pop_front
();
else
it
->
step
++
;
...
...
@@ -409,7 +409,7 @@ int32 field::process() {
return
pduel
->
bufferlen
;
}
case
PROCESSOR_SSET_G
:
{
if
(
sset_g
(
it
->
step
,
it
->
arg1
,
it
->
arg2
,
it
->
ptarget
,
it
->
arg3
))
{
if
(
sset_g
(
it
->
step
,
it
->
arg1
,
it
->
arg2
,
it
->
ptarget
,
it
->
arg3
,
it
->
peffect
))
{
pduel
->
lua
->
add_param
(
returns
.
ivalue
[
0
],
PARAM_TYPE_INT
);
core
.
units
.
pop_front
();
}
else
...
...
@@ -4359,7 +4359,7 @@ int32 field::add_chain(uint16 step) {
set_spsummon_counter
(
clit
.
triggering_player
,
true
,
true
);
if
(
clit
.
opinfos
[
0x200
].
op_player
==
PLAYER_ALL
)
set_spsummon_counter
(
1
-
clit
.
triggering_player
,
true
,
true
);
if
(
(
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_ONCE
)
&&
peffect
->
is_flag
(
EFFECT_FLAG_CARD_TARGET
|
EFFECT_FLAG_COUNT_SS_ONCE
)
)
{
if
(
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_ONCE
)
{
auto
&
optarget
=
clit
.
opinfos
[
0x200
];
if
(
optarget
.
op_cards
)
{
if
(
optarget
.
op_player
==
PLAYER_ALL
)
{
...
...
@@ -4605,7 +4605,6 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
if
(
cait
->
opinfos
[
0x200
].
op_player
==
PLAYER_ALL
&&
core
.
spsummon_state_count_tmp
[
1
-
cait
->
triggering_player
]
==
core
.
spsummon_state_count
[
1
-
cait
->
triggering_player
])
set_spsummon_counter
(
1
-
cait
->
triggering_player
);
//sometimes it may add twice, only works for once per turn
if
(
cait
->
triggering_effect
->
is_flag
(
EFFECT_FLAG_CARD_TARGET
|
EFFECT_FLAG_COUNT_SS_ONCE
))
{
auto
&
optarget
=
cait
->
opinfos
[
0x200
];
if
(
optarget
.
op_cards
)
{
if
(
optarget
.
op_player
==
PLAYER_ALL
)
{
...
...
@@ -4635,7 +4634,6 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
}
}
}
}
core
.
spsummon_state_count_tmp
[
0
]
=
0
;
core
.
spsummon_state_count_tmp
[
1
]
=
0
;
core
.
chain_solving
=
FALSE
;
...
...
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