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
List
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
nanahira
ygopro-core
Commits
8f605218
Commit
8f605218
authored
Mar 07, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
02147383
21824200
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
4 additions
and
33 deletions
+4
-33
card.cpp
card.cpp
+2
-2
card.h
card.h
+2
-2
field.h
field.h
+0
-2
interpreter.cpp
interpreter.cpp
+0
-2
libduel.cpp
libduel.cpp
+0
-18
operations.cpp
operations.cpp
+0
-3
processor.cpp
processor.cpp
+0
-2
scriptlib.h
scriptlib.h
+0
-2
No files found.
card.cpp
View file @
8f605218
...
...
@@ -2185,8 +2185,8 @@ effect* card::is_affected_by_effect(int32 code) {
rg
=
pduel
->
game_field
->
effects
.
aura_effect
.
equal_range
(
code
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
{
peffect
=
rg
.
first
->
second
;
if
(
!
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
)
&&
peffect
->
is_
available
(
)
&&
peffect
->
is_target
(
this
)
&&
is_affect_by_effect
(
peffect
))
if
(
!
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
)
&&
peffect
->
is_
target
(
this
)
&&
peffect
->
is_available
(
)
&&
is_affect_by_effect
(
peffect
))
return
peffect
;
}
return
0
;
...
...
card.h
View file @
8f605218
...
...
@@ -376,8 +376,8 @@ public:
#define RACE_PSYCHO 0x100000 //
#define RACE_DEVINE 0x200000 //
#define RACE_CREATORGOD 0x400000 //
#define RACE_WYRM 0x800000 //
#define RACE_CYBERS 0x1000000 //
#define RACE_WYRM
0x800000 //
#define RACE_CYBERS
0x1000000 //
//Reason
#define REASON_DESTROY 0x1 //
#define REASON_RELEASE 0x2 //
...
...
field.h
View file @
8f605218
...
...
@@ -294,8 +294,6 @@ struct processor {
uint8
attack_state_count
[
2
];
uint8
battle_phase_count
[
2
];
uint8
battled_count
[
2
];
uint8
tossed_coin_count
[
2
];
uint8
tossed_dice_count
[
2
];
uint8
phase_action
;
uint32
hint_timing
[
2
];
uint8
current_player
;
...
...
interpreter.cpp
View file @
8f605218
...
...
@@ -506,8 +506,6 @@ static const struct luaL_Reg duellib[] = {
{
"AddCustomActivityCounter"
,
scriptlib
::
duel_add_custom_activity_counter
},
{
"GetCustomActivityCount"
,
scriptlib
::
duel_get_custom_activity_count
},
{
"GetBattledCount"
,
scriptlib
::
duel_get_battled_count
},
{
"GetTossedCoinCount"
,
scriptlib
::
duel_get_tossed_coin_count
},
{
"GetTossedDiceCount"
,
scriptlib
::
duel_get_tossed_dice_count
},
{
"IsAbleToEnterBP"
,
scriptlib
::
duel_is_able_to_enter_bp
},
{
"VenomSwampCheck"
,
scriptlib
::
duel_venom_swamp_check
},
{
"SwapDeckAndGrave"
,
scriptlib
::
duel_swap_deck_and_grave
},
...
...
libduel.cpp
View file @
8f605218
...
...
@@ -3417,24 +3417,6 @@ int32 scriptlib::duel_get_battled_count(lua_State *L) {
lua_pushinteger
(
L
,
pduel
->
game_field
->
core
.
battled_count
[
playerid
]);
return
1
;
}
int32
scriptlib
::
duel_get_tossed_coin_count
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
core
.
tossed_coin_count
[
playerid
]);
return
1
;
}
int32
scriptlib
::
duel_get_tossed_dice_count
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
core
.
tossed_dice_count
[
playerid
]);
return
1
;
}
int32
scriptlib
::
duel_is_able_to_enter_bp
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_able_to_enter_bp
());
...
...
operations.cpp
View file @
8f605218
...
...
@@ -5051,7 +5051,6 @@ int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player,
pduel
->
write_buffer8
(
count
);
for
(
int32
i
=
0
;
i
<
count
;
++
i
)
{
core
.
coin_result
[
i
]
=
pduel
->
get_next_integer
(
0
,
1
);
core
.
tossed_coin_count
[
playerid
]
++
;
pduel
->
write_buffer8
(
core
.
coin_result
[
i
]);
}
raise_event
((
card
*
)
0
,
EVENT_TOSS_COIN_NEGATE
,
reason_effect
,
0
,
reason_player
,
playerid
,
count
);
...
...
@@ -5097,7 +5096,6 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
pduel
->
write_buffer8
(
count1
);
for
(
int32
i
=
0
;
i
<
count1
;
++
i
)
{
core
.
dice_result
[
i
]
=
pduel
->
get_next_integer
(
1
,
6
);
core
.
tossed_dice_count
[
playerid
]
++
;
pduel
->
write_buffer8
(
core
.
dice_result
[
i
]);
}
if
(
count2
>
0
)
{
...
...
@@ -5106,7 +5104,6 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
pduel
->
write_buffer8
(
count2
);
for
(
int32
i
=
0
;
i
<
count2
;
++
i
)
{
core
.
dice_result
[
count1
+
i
]
=
pduel
->
get_next_integer
(
1
,
6
);
core
.
tossed_dice_count
[
1
-
playerid
]
++
;
pduel
->
write_buffer8
(
core
.
dice_result
[
count1
+
i
]);
}
}
...
...
processor.cpp
View file @
8f605218
...
...
@@ -3936,8 +3936,6 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
core
.
attack_state_count
[
p
]
=
0
;
core
.
battle_phase_count
[
p
]
=
0
;
core
.
battled_count
[
p
]
=
0
;
core
.
tossed_coin_count
[
p
]
=
0
;
core
.
tossed_dice_count
[
p
]
=
0
;
core
.
summon_count
[
p
]
=
0
;
core
.
extra_summon
[
p
]
=
0
;
core
.
spsummon_once_map
[
p
].
clear
();
...
...
scriptlib.h
View file @
8f605218
...
...
@@ -507,8 +507,6 @@ public:
static
int32
duel_get_custom_activity_count
(
lua_State
*
L
);
static
int32
duel_is_able_to_enter_bp
(
lua_State
*
L
);
static
int32
duel_get_battled_count
(
lua_State
*
L
);
static
int32
duel_get_tossed_coin_count
(
lua_State
*
L
);
static
int32
duel_get_tossed_dice_count
(
lua_State
*
L
);
//specific card functions
static
int32
duel_venom_swamp_check
(
lua_State
*
L
);
...
...
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