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
1d44c448
Commit
1d44c448
authored
Oct 26, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
382d1024
6ea137f8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
+15
-5
card.cpp
card.cpp
+2
-2
libduel.cpp
libduel.cpp
+9
-0
operations.cpp
operations.cpp
+3
-3
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
1d44c448
...
@@ -2075,9 +2075,9 @@ int32 card::leave_field_redirect(uint32 reason) {
...
@@ -2075,9 +2075,9 @@ int32 card::leave_field_redirect(uint32 reason) {
return
LOCATION_REMOVED
;
return
LOCATION_REMOVED
;
// the ruling for the priority of the following redirects can't be confirmed for now
// the ruling for the priority of the following redirects can't be confirmed for now
if
(
redirects
&
LOCATION_DECK
)
{
if
(
redirects
&
LOCATION_DECK
)
{
if
(
redirects
&
LOCATION_DECKBOT
)
if
(
(
redirects
&
LOCATION_DECKBOT
)
==
LOCATION_DECKBOT
)
return
LOCATION_DECKBOT
;
return
LOCATION_DECKBOT
;
if
(
redirects
&
LOCATION_DECKSHF
)
if
(
(
redirects
&
LOCATION_DECKSHF
)
==
LOCATION_DECKSHF
)
return
LOCATION_DECKSHF
;
return
LOCATION_DECKSHF
;
return
LOCATION_DECK
;
return
LOCATION_DECK
;
}
}
...
...
libduel.cpp
View file @
1d44c448
...
@@ -1487,6 +1487,14 @@ int32 scriptlib::duel_disable_shuffle_check(lua_State *L) {
...
@@ -1487,6 +1487,14 @@ int32 scriptlib::duel_disable_shuffle_check(lua_State *L) {
pduel
->
game_field
->
core
.
shuffle_check_disabled
=
disable
;
pduel
->
game_field
->
core
.
shuffle_check_disabled
=
disable
;
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_disable_self_destroy_check
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
uint8
disable
=
TRUE
;
if
(
lua_gettop
(
L
)
>
0
)
disable
=
lua_toboolean
(
L
,
1
);
pduel
->
game_field
->
core
.
selfdes_disabled
=
disable
;
return
0
;
}
int32
scriptlib
::
duel_shuffle_deck
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_shuffle_deck
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
1
);
...
@@ -4505,6 +4513,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -4505,6 +4513,7 @@ static const struct luaL_Reg duellib[] = {
{
"DiscardDeck"
,
scriptlib
::
duel_discard_deck
},
{
"DiscardDeck"
,
scriptlib
::
duel_discard_deck
},
{
"DiscardHand"
,
scriptlib
::
duel_discard_hand
},
{
"DiscardHand"
,
scriptlib
::
duel_discard_hand
},
{
"DisableShuffleCheck"
,
scriptlib
::
duel_disable_shuffle_check
},
{
"DisableShuffleCheck"
,
scriptlib
::
duel_disable_shuffle_check
},
{
"DisableSelfDestroyCheck"
,
scriptlib
::
duel_disable_self_destroy_check
},
{
"ShuffleDeck"
,
scriptlib
::
duel_shuffle_deck
},
{
"ShuffleDeck"
,
scriptlib
::
duel_shuffle_deck
},
{
"ShuffleExtra"
,
scriptlib
::
duel_shuffle_extra
},
{
"ShuffleExtra"
,
scriptlib
::
duel_shuffle_extra
},
{
"ShuffleHand"
,
scriptlib
::
duel_shuffle_hand
},
{
"ShuffleHand"
,
scriptlib
::
duel_shuffle_hand
},
...
...
operations.cpp
View file @
1d44c448
...
@@ -861,12 +861,12 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
...
@@ -861,12 +861,12 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
change
=
false
;
change
=
false
;
if
(
!
pcard
->
is_affect_by_effect
(
reason_effect
))
if
(
!
pcard
->
is_affect_by_effect
(
reason_effect
))
change
=
false
;
change
=
false
;
if
(
core
.
duel_rule
<=
4
&&
(
pcard
->
get_type
()
&
TYPE_TRAPMONSTER
)
&&
get_useable_count
(
pcard
,
playerid
,
LOCATION_SZONE
,
playerid
,
LOCATION_REASON_CONTROL
)
<=
0
)
if
(
core
.
duel_rule
<=
4
&&
(
pcard
->
get_type
()
&
TYPE_TRAPMONSTER
)
&&
get_useable_count
(
pcard
,
playerid
,
LOCATION_SZONE
,
reason_player
,
LOCATION_REASON_CONTROL
)
<=
0
)
change
=
false
;
change
=
false
;
if
(
!
change
)
if
(
!
change
)
targets
->
container
.
erase
(
pcard
);
targets
->
container
.
erase
(
pcard
);
}
}
int32
fcount
=
get_useable_count
(
NULL
,
playerid
,
LOCATION_MZONE
,
playerid
,
LOCATION_REASON_CONTROL
,
zone
);
int32
fcount
=
get_useable_count
(
NULL
,
playerid
,
LOCATION_MZONE
,
reason_player
,
LOCATION_REASON_CONTROL
,
zone
);
if
(
fcount
<=
0
)
{
if
(
fcount
<=
0
)
{
destroy_set
->
swap
(
targets
->
container
);
destroy_set
->
swap
(
targets
->
container
);
core
.
units
.
begin
()
->
step
=
5
;
core
.
units
.
begin
()
->
step
=
5
;
...
@@ -910,7 +910,7 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
...
@@ -910,7 +910,7 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
return
FALSE
;
return
FALSE
;
}
}
card
*
pcard
=
*
targets
->
it
;
card
*
pcard
=
*
targets
->
it
;
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
,
FALSE
,
0
,
FALSE
,
zone
);
move_to_field
(
pcard
,
(
reason_player
!=
PLAYER_NONE
)
?
reason_player
:
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
,
FALSE
,
0
,
FALSE
,
zone
);
return
FALSE
;
return
FALSE
;
}
}
case
4
:
{
case
4
:
{
...
...
scriptlib.h
View file @
1d44c448
...
@@ -433,6 +433,7 @@ public:
...
@@ -433,6 +433,7 @@ public:
static
int32
duel_discard_deck
(
lua_State
*
L
);
static
int32
duel_discard_deck
(
lua_State
*
L
);
static
int32
duel_discard_hand
(
lua_State
*
L
);
static
int32
duel_discard_hand
(
lua_State
*
L
);
static
int32
duel_disable_shuffle_check
(
lua_State
*
L
);
static
int32
duel_disable_shuffle_check
(
lua_State
*
L
);
static
int32
duel_disable_self_destroy_check
(
lua_State
*
L
);
static
int32
duel_shuffle_deck
(
lua_State
*
L
);
static
int32
duel_shuffle_deck
(
lua_State
*
L
);
static
int32
duel_shuffle_extra
(
lua_State
*
L
);
static
int32
duel_shuffle_extra
(
lua_State
*
L
);
static
int32
duel_shuffle_hand
(
lua_State
*
L
);
static
int32
duel_shuffle_hand
(
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