Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
YGOPRO-520DIY
ygopro
Commits
dff3d3e6
Commit
dff3d3e6
authored
Sep 30, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
parents
73630d7c
23f54dd0
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
611 additions
and
54 deletions
+611
-54
gframe/client_field.cpp
gframe/client_field.cpp
+83
-0
gframe/client_field.h
gframe/client_field.h
+6
-0
gframe/drawing.cpp
gframe/drawing.cpp
+13
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+20
-3
gframe/event_handler.cpp
gframe/event_handler.cpp
+67
-23
gframe/game.cpp
gframe/game.cpp
+1
-1
lflist.conf
lflist.conf
+411
-24
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+8
-0
No files found.
gframe/client_field.cpp
View file @
dff3d3e6
...
@@ -29,6 +29,7 @@ ClientField::ClientField() {
...
@@ -29,6 +29,7 @@ ClientField::ClientField() {
conti_act
=
false
;
conti_act
=
false
;
deck_reversed
=
false
;
deck_reversed
=
false
;
conti_selecting
=
false
;
conti_selecting
=
false
;
cant_check_grave
=
false
;
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
mzone
[
p
].
resize
(
7
,
0
);
mzone
[
p
].
resize
(
7
,
0
);
szone
[
p
].
resize
(
8
,
0
);
szone
[
p
].
resize
(
8
,
0
);
...
@@ -93,6 +94,7 @@ void ClientField::Clear() {
...
@@ -93,6 +94,7 @@ void ClientField::Clear() {
pzone_act
[
1
]
=
false
;
pzone_act
[
1
]
=
false
;
conti_act
=
false
;
conti_act
=
false
;
deck_reversed
=
false
;
deck_reversed
=
false
;
cant_check_grave
=
false
;
}
}
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
)
{
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
)
{
ClientCard
*
pcard
;
ClientCard
*
pcard
;
...
@@ -384,6 +386,18 @@ void ClientField::ClearChainSelect() {
...
@@ -384,6 +386,18 @@ void ClientField::ClearChainSelect() {
}
}
// needs to be synchronized with EGET_SCROLL_BAR_CHANGED
// needs to be synchronized with EGET_SCROLL_BAR_CHANGED
void
ClientField
::
ShowSelectCard
(
bool
buttonok
,
bool
chain
)
{
void
ClientField
::
ShowSelectCard
(
bool
buttonok
,
bool
chain
)
{
if
(
cant_check_grave
)
{
bool
has_card_in_grave
=
false
;
for
(
size_t
i
=
0
;
i
<
selectable_cards
.
size
();
++
i
)
{
if
(
selectable_cards
[
i
]
->
location
==
LOCATION_GRAVE
)
{
has_card_in_grave
=
true
;
break
;
}
}
if
(
has_card_in_grave
)
{
std
::
random_shuffle
(
selectable_cards
.
begin
(),
selectable_cards
.
end
());
}
}
int
startpos
;
int
startpos
;
size_t
ct
;
size_t
ct
;
if
(
selectable_cards
.
size
()
<=
5
)
{
if
(
selectable_cards
.
size
()
<=
5
)
{
...
@@ -410,6 +424,8 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
...
@@ -410,6 +424,8 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
wchar_t
formatBuffer
[
2048
];
wchar_t
formatBuffer
[
2048
];
if
(
conti_selecting
)
if
(
conti_selecting
)
myswprintf
(
formatBuffer
,
L"%ls"
,
DataManager
::
unknown_string
);
myswprintf
(
formatBuffer
,
L"%ls"
,
DataManager
::
unknown_string
);
else
if
(
cant_check_grave
&&
selectable_cards
[
i
]
->
location
==
LOCATION_GRAVE
)
myswprintf
(
formatBuffer
,
L"%ls"
,
dataManager
.
FormatLocation
(
selectable_cards
[
i
]
->
location
,
0
));
else
if
(
selectable_cards
[
i
]
->
location
==
LOCATION_OVERLAY
)
else
if
(
selectable_cards
[
i
]
->
location
==
LOCATION_OVERLAY
)
myswprintf
(
formatBuffer
,
L"%ls[%d](%d)"
,
myswprintf
(
formatBuffer
,
L"%ls[%d](%d)"
,
dataManager
.
FormatLocation
(
selectable_cards
[
i
]
->
overlayTarget
->
location
,
selectable_cards
[
i
]
->
overlayTarget
->
sequence
),
dataManager
.
FormatLocation
(
selectable_cards
[
i
]
->
overlayTarget
->
location
,
selectable_cards
[
i
]
->
overlayTarget
->
sequence
),
...
@@ -1209,6 +1225,27 @@ bool ClientField::CheckSelectSum() {
...
@@ -1209,6 +1225,27 @@ bool ClientField::CheckSelectSum() {
return
ret
;
return
ret
;
}
}
}
}
bool
ClientField
::
CheckSelectTribute
()
{
std
::
set
<
ClientCard
*>
selable
;
for
(
auto
sit
=
selectsum_all
.
begin
();
sit
!=
selectsum_all
.
end
();
++
sit
)
{
(
*
sit
)
->
is_selectable
=
false
;
(
*
sit
)
->
is_selected
=
false
;
selable
.
insert
(
*
sit
);
}
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
{
selected_cards
[
i
]
->
is_selectable
=
true
;
selected_cards
[
i
]
->
is_selected
=
true
;
selable
.
erase
(
selected_cards
[
i
]);
}
selectsum_cards
.
clear
();
bool
ret
=
check_sel_sum_trib_s
(
selable
,
0
,
0
);
selectable_cards
.
clear
();
for
(
auto
sit
=
selectsum_cards
.
begin
();
sit
!=
selectsum_cards
.
end
();
++
sit
)
{
(
*
sit
)
->
is_selectable
=
true
;
selectable_cards
.
push_back
(
*
sit
);
}
return
ret
;
}
bool
ClientField
::
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
)
{
bool
ClientField
::
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
)
{
if
(
index
==
left
.
end
())
if
(
index
==
left
.
end
())
return
false
;
return
false
;
...
@@ -1272,6 +1309,52 @@ bool ClientField::check_sum(std::set<ClientCard*>::const_iterator index, std::se
...
@@ -1272,6 +1309,52 @@ bool ClientField::check_sum(std::set<ClientCard*>::const_iterator index, std::se
||
(
l2
>
0
&&
acc
>
l2
&&
check_sum
(
index
,
end
,
acc
-
l2
,
count
+
1
))
||
(
l2
>
0
&&
acc
>
l2
&&
check_sum
(
index
,
end
,
acc
-
l2
,
count
+
1
))
||
check_sum
(
index
,
end
,
acc
,
count
);
||
check_sum
(
index
,
end
,
acc
,
count
);
}
}
bool
ClientField
::
check_sel_sum_trib_s
(
const
std
::
set
<
ClientCard
*>&
left
,
int
index
,
int
acc
)
{
if
(
acc
>
select_max
)
return
false
;
if
(
index
==
(
int
)
selected_cards
.
size
())
{
check_sel_sum_trib_t
(
left
,
acc
);
return
acc
>=
select_min
&&
acc
<=
select_max
;
}
int
l
=
selected_cards
[
index
]
->
opParam
;
int
l1
=
l
&
0xffff
;
int
l2
=
l
>>
16
;
bool
res1
=
false
,
res2
=
false
;
res1
=
check_sel_sum_trib_s
(
left
,
index
+
1
,
acc
+
l1
);
if
(
l2
>
0
)
res2
=
check_sel_sum_trib_s
(
left
,
index
+
1
,
acc
+
l2
);
return
res1
||
res2
;
}
void
ClientField
::
check_sel_sum_trib_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
)
{
for
(
auto
sit
=
left
.
begin
();
sit
!=
left
.
end
();
++
sit
)
{
if
(
selectsum_cards
.
find
(
*
sit
)
!=
selectsum_cards
.
end
())
continue
;
std
::
set
<
ClientCard
*>
testlist
(
left
);
testlist
.
erase
(
*
sit
);
int
l
=
(
*
sit
)
->
opParam
;
int
l1
=
l
&
0xffff
;
int
l2
=
l
>>
16
;
if
(
check_sum_trib
(
testlist
.
begin
(),
testlist
.
end
(),
acc
+
l1
)
||
(
l2
>
0
&&
check_sum_trib
(
testlist
.
begin
(),
testlist
.
end
(),
acc
+
l2
)))
{
selectsum_cards
.
insert
(
*
sit
);
}
}
}
bool
ClientField
::
check_sum_trib
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
)
{
if
(
acc
>=
select_min
&&
acc
<=
select_max
)
return
true
;
if
(
acc
>
select_max
||
index
==
end
)
return
false
;
int
l
=
(
*
index
)
->
opParam
;
int
l1
=
l
&
0xffff
;
int
l2
=
l
>>
16
;
if
((
acc
+
l1
>=
select_min
&&
acc
+
l1
<=
select_max
)
||
(
acc
+
l2
>=
select_min
&&
acc
+
l2
<=
select_max
))
return
true
;
++
index
;
return
check_sum_trib
(
index
,
end
,
acc
+
l1
)
||
check_sum_trib
(
index
,
end
,
acc
+
l2
)
||
check_sum_trib
(
index
,
end
,
acc
);
}
template
<
class
T
>
template
<
class
T
>
static
bool
is_declarable
(
T
const
&
cd
,
const
std
::
vector
<
int
>&
opcode
)
{
static
bool
is_declarable
(
T
const
&
cd
,
const
std
::
vector
<
int
>&
opcode
)
{
std
::
stack
<
int
>
stack
;
std
::
stack
<
int
>
stack
;
...
...
gframe/client_field.h
View file @
dff3d3e6
...
@@ -81,6 +81,7 @@ public:
...
@@ -81,6 +81,7 @@ public:
bool
last_chain
;
bool
last_chain
;
bool
deck_reversed
;
bool
deck_reversed
;
bool
conti_selecting
;
bool
conti_selecting
;
bool
cant_check_grave
;
ClientField
();
ClientField
();
void
Clear
();
void
Clear
();
...
@@ -106,10 +107,14 @@ public:
...
@@ -106,10 +107,14 @@ public:
void
FadeCard
(
ClientCard
*
pcard
,
int
alpha
,
int
frame
);
void
FadeCard
(
ClientCard
*
pcard
,
int
alpha
,
int
frame
);
bool
ShowSelectSum
(
bool
panelmode
);
bool
ShowSelectSum
(
bool
panelmode
);
bool
CheckSelectSum
();
bool
CheckSelectSum
();
bool
CheckSelectTribute
();
bool
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
);
bool
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
);
bool
check_sel_sum_s
(
const
std
::
set
<
ClientCard
*>&
left
,
int
index
,
int
acc
);
bool
check_sel_sum_s
(
const
std
::
set
<
ClientCard
*>&
left
,
int
index
,
int
acc
);
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
bool
check_sum
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
,
int
count
);
bool
check_sum
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
,
int
count
);
bool
check_sel_sum_trib_s
(
const
std
::
set
<
ClientCard
*>&
left
,
int
index
,
int
acc
);
void
check_sel_sum_trib_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
bool
check_sum_trib
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
);
void
UpdateDeclarableList
();
void
UpdateDeclarableList
();
...
@@ -146,5 +151,6 @@ public:
...
@@ -146,5 +151,6 @@ public:
//special cards
//special cards
#define CARD_MARINE_DOLPHIN 78734254
#define CARD_MARINE_DOLPHIN 78734254
#define CARD_TWINKLE_MOSS 13857930
#define CARD_TWINKLE_MOSS 13857930
#define CARD_QUESTION 38723936
#endif //CLIENT_FIELD_H
#endif //CLIENT_FIELD_H
gframe/drawing.cpp
View file @
dff3d3e6
...
@@ -408,7 +408,7 @@ void Game::DrawShadowText(CGUITTFont * font, const core::stringw & text, const c
...
@@ -408,7 +408,7 @@ void Game::DrawShadowText(CGUITTFont * font, const core::stringw & text, const c
void
Game
::
DrawMisc
()
{
void
Game
::
DrawMisc
()
{
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
irr
::
core
::
matrix4
im
,
ic
,
it
;
irr
::
core
::
matrix4
im
,
ic
,
it
,
ig
;
act_rot
.
Z
+=
0.02
f
;
act_rot
.
Z
+=
0.02
f
;
im
.
setRotationRadians
(
act_rot
);
im
.
setRotationRadians
(
act_rot
);
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tAct
);
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tAct
);
...
@@ -492,6 +492,18 @@ void Game::DrawMisc() {
...
@@ -492,6 +492,18 @@ void Game::DrawMisc() {
driver
->
drawVertexPrimitiveList
(
matManager
.
vChainNum
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vChainNum
,
4
,
matManager
.
iRectangle
,
2
);
}
}
}
}
if
(
dField
.
cant_check_grave
)
{
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tNegated
);
driver
->
setMaterial
(
matManager
.
mTexture
);
ig
.
setTranslation
(
vector3df
((
matManager
.
vFieldGrave
[
0
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldGrave
[
0
][
rule
][
1
].
Pos
.
X
)
/
2
,
(
matManager
.
vFieldGrave
[
0
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldGrave
[
0
][
rule
][
2
].
Pos
.
Y
)
/
2
,
dField
.
grave
[
0
].
size
()
*
0.01
f
+
0.02
f
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
ig
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vNegate
,
4
,
matManager
.
iRectangle
,
2
);
ig
.
setTranslation
(
vector3df
((
matManager
.
vFieldGrave
[
1
][
rule
][
0
].
Pos
.
X
+
matManager
.
vFieldGrave
[
1
][
rule
][
1
].
Pos
.
X
)
/
2
,
(
matManager
.
vFieldGrave
[
1
][
rule
][
0
].
Pos
.
Y
+
matManager
.
vFieldGrave
[
1
][
rule
][
2
].
Pos
.
Y
)
/
2
,
dField
.
grave
[
1
].
size
()
*
0.01
f
+
0.02
f
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
ig
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vNegate
,
4
,
matManager
.
iRectangle
,
2
);
}
//finish button
//finish button
if
(
btnCancelOrFinish
->
isVisible
()
&&
dField
.
select_ready
)
if
(
btnCancelOrFinish
->
isVisible
()
&&
dField
.
select_ready
)
DrawSelectionLine
(
btnCancelOrFinish
,
2
,
0xffffff00
);
DrawSelectionLine
(
btnCancelOrFinish
,
2
,
0xffffff00
);
...
...
gframe/duelclient.cpp
View file @
dff3d3e6
...
@@ -1690,7 +1690,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1690,7 +1690,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_DISFIELD
:
{
case
MSG_SELECT_DISFIELD
:
{
int
selecting_player
=
BufferIO
::
ReadInt8
(
pbuf
);
int
selecting_player
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_min
=
count
>
0
?
count
:
1
;
mainGame
->
dField
.
select_ready
=
false
;
mainGame
->
dField
.
select_cancelable
=
count
==
0
;
mainGame
->
dField
.
selectable_field
=
~
BufferIO
::
ReadInt32
(
pbuf
);
mainGame
->
dField
.
selectable_field
=
~
BufferIO
::
ReadInt32
(
pbuf
);
if
(
selecting_player
==
mainGame
->
LocalPlayer
(
1
))
if
(
selecting_player
==
mainGame
->
LocalPlayer
(
1
))
mainGame
->
dField
.
selectable_field
=
(
mainGame
->
dField
.
selectable_field
>>
16
)
|
(
mainGame
->
dField
.
selectable_field
<<
16
);
mainGame
->
dField
.
selectable_field
=
(
mainGame
->
dField
.
selectable_field
>>
16
)
|
(
mainGame
->
dField
.
selectable_field
<<
16
);
...
@@ -1765,6 +1768,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1765,6 +1768,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
return
true
;
return
true
;
}
}
if
(
mainGame
->
dField
.
select_cancelable
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
}
return
false
;
return
false
;
}
}
case
MSG_SELECT_POSITION
:
{
case
MSG_SELECT_POSITION
:
{
...
@@ -1818,6 +1824,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1818,6 +1824,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
selectable_cards
.
clear
();
mainGame
->
dField
.
selectable_cards
.
clear
();
mainGame
->
dField
.
selected_cards
.
clear
();
mainGame
->
dField
.
selected_cards
.
clear
();
mainGame
->
dField
.
selectsum_all
.
clear
();
mainGame
->
dField
.
selectsum_cards
.
clear
();
mainGame
->
dField
.
select_panalmode
=
false
;
mainGame
->
dField
.
select_panalmode
=
false
;
int
c
,
l
,
s
,
t
;
int
c
,
l
,
s
,
t
;
unsigned
int
code
;
unsigned
int
code
;
...
@@ -1833,10 +1841,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1833,10 +1841,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if
(
code
&&
pcard
->
code
!=
code
)
if
(
code
&&
pcard
->
code
!=
code
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
mainGame
->
dField
.
selectable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
selectable_cards
.
push_back
(
pcard
);
pcard
->
opParam
=
t
;
mainGame
->
dField
.
selectsum_all
.
push_back
(
pcard
);
pcard
->
opParam
=
t
<<
16
|
1
;
pcard
->
select_seq
=
i
;
pcard
->
select_seq
=
i
;
pcard
->
is_selectable
=
true
;
pcard
->
is_selectable
=
true
;
}
}
mainGame
->
dField
.
CheckSelectTribute
();
if
(
select_hint
)
if
(
select_hint
)
myswprintf
(
textBuffer
,
L"%ls(%d-%d)"
,
dataManager
.
GetDesc
(
select_hint
),
myswprintf
(
textBuffer
,
L"%ls(%d-%d)"
,
dataManager
.
GetDesc
(
select_hint
),
mainGame
->
dField
.
select_min
,
mainGame
->
dField
.
select_max
);
mainGame
->
dField
.
select_min
,
mainGame
->
dField
.
select_max
);
...
@@ -3615,7 +3625,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3615,7 +3625,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
chtype
=
BufferIO
::
ReadInt8
(
pbuf
);
int
chtype
=
BufferIO
::
ReadInt8
(
pbuf
);
int
value
=
BufferIO
::
ReadInt32
(
pbuf
);
int
value
=
BufferIO
::
ReadInt32
(
pbuf
);
auto
&
player_desc_hints
=
mainGame
->
dField
.
player_desc_hints
[
player
];
auto
&
player_desc_hints
=
mainGame
->
dField
.
player_desc_hints
[
player
];
if
(
chtype
==
PHINT_DESC_ADD
)
{
if
(
value
==
CARD_QUESTION
&&
player
==
0
)
{
if
(
chtype
==
PHINT_DESC_ADD
)
{
mainGame
->
dField
.
cant_check_grave
=
true
;
}
else
if
(
chtype
==
PHINT_DESC_REMOVE
)
{
mainGame
->
dField
.
cant_check_grave
=
false
;
}
}
else
if
(
chtype
==
PHINT_DESC_ADD
)
{
player_desc_hints
[
value
]
++
;
player_desc_hints
[
value
]
++
;
}
else
if
(
chtype
==
PHINT_DESC_REMOVE
)
{
}
else
if
(
chtype
==
PHINT_DESC_REMOVE
)
{
player_desc_hints
[
value
]
--
;
player_desc_hints
[
value
]
--
;
...
...
gframe/event_handler.cpp
View file @
dff3d3e6
...
@@ -889,6 +889,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -889,6 +889,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
else
{
}
else
{
if
(
conti_selecting
)
if
(
conti_selecting
)
myswprintf
(
formatBuffer
,
L"%ls"
,
DataManager
::
unknown_string
);
myswprintf
(
formatBuffer
,
L"%ls"
,
DataManager
::
unknown_string
);
else
if
(
cant_check_grave
&&
selectable_cards
[
i
]
->
location
==
LOCATION_GRAVE
)
myswprintf
(
formatBuffer
,
L"%ls"
,
dataManager
.
FormatLocation
(
selectable_cards
[
i
]
->
location
,
0
));
else
if
(
selectable_cards
[
i
+
pos
]
->
location
==
LOCATION_OVERLAY
)
else
if
(
selectable_cards
[
i
+
pos
]
->
location
==
LOCATION_OVERLAY
)
myswprintf
(
formatBuffer
,
L"%ls[%d](%d)"
,
myswprintf
(
formatBuffer
,
L"%ls[%d](%d)"
,
dataManager
.
FormatLocation
(
selectable_cards
[
i
+
pos
]
->
overlayTarget
->
location
,
selectable_cards
[
i
+
pos
]
->
overlayTarget
->
sequence
),
dataManager
.
FormatLocation
(
selectable_cards
[
i
+
pos
]
->
overlayTarget
->
location
,
selectable_cards
[
i
+
pos
]
->
overlayTarget
->
sequence
),
...
@@ -1189,6 +1191,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1189,6 +1191,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
LOCATION_GRAVE
:
{
case
LOCATION_GRAVE
:
{
if
(
grave
[
hovered_controler
].
size
()
==
0
)
if
(
grave
[
hovered_controler
].
size
()
==
0
)
break
;
break
;
if
(
cant_check_grave
)
break
;
ShowMenu
(
COMMAND_LIST
,
x
,
y
);
ShowMenu
(
COMMAND_LIST
,
x
,
y
);
break
;
break
;
}
}
...
@@ -1239,6 +1243,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1239,6 +1243,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
int
command_flag
=
0
;
int
command_flag
=
0
;
if
(
grave
[
hovered_controler
].
size
()
==
0
)
if
(
grave
[
hovered_controler
].
size
()
==
0
)
break
;
break
;
if
(
cant_check_grave
)
break
;
for
(
size_t
i
=
0
;
i
<
grave
[
hovered_controler
].
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
grave
[
hovered_controler
].
size
();
++
i
)
command_flag
|=
grave
[
hovered_controler
][
i
]
->
cmdFlag
;
command_flag
|=
grave
[
hovered_controler
][
i
]
->
cmdFlag
;
command_flag
|=
COMMAND_LIST
;
command_flag
|=
COMMAND_LIST
;
...
@@ -1335,16 +1341,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1335,16 +1341,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
selected_field
=
0
;
selected_field
=
0
;
DuelClient
::
SetResponseB
(
respbuf
,
p
);
DuelClient
::
SetResponseB
(
respbuf
,
p
);
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
ShowCancelOrFinishButton
(
0
);
}
}
}
}
}
}
break
;
break
;
}
}
case
MSG_SELECT_CARD
:
case
MSG_SELECT_CARD
:
{
case
MSG_SELECT_TRIBUTE
:
{
if
(
!
(
hovered_location
&
0xe
)
||
!
clicked_card
||
!
clicked_card
->
is_selectable
)
if
(
!
(
hovered_location
&
0xe
)
||
!
clicked_card
||
!
clicked_card
->
is_selectable
)
break
;
break
;
if
(
clicked_card
->
is_selected
)
{
if
(
clicked_card
->
is_selected
)
{
clicked_card
->
is_selected
=
false
;
clicked_card
->
is_selected
=
false
;
int
i
=
0
;
int
i
=
0
;
while
(
selected_cards
[
i
]
!=
clicked_card
)
i
++
;
while
(
selected_cards
[
i
]
!=
clicked_card
)
i
++
;
...
@@ -1353,18 +1359,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1353,18 +1359,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
clicked_card
->
is_selected
=
true
;
clicked_card
->
is_selected
=
true
;
selected_cards
.
push_back
(
clicked_card
);
selected_cards
.
push_back
(
clicked_card
);
}
}
int
min
=
selected_cards
.
size
(),
max
=
0
;
if
(
selected_cards
.
size
()
>=
select_max
)
{
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_CARD
)
{
max
=
selected_cards
.
size
();
}
else
{
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
max
+=
selected_cards
[
i
]
->
opParam
;
}
if
(
min
>=
select_max
)
{
SetResponseSelectedCards
();
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
ShowCancelOrFinishButton
(
0
);
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
}
else
if
(
max
>=
select_min
)
{
}
else
if
(
selected_cards
.
size
()
>=
select_min
)
{
if
(
selected_cards
.
size
()
==
selectable_cards
.
size
())
{
if
(
selected_cards
.
size
()
==
selectable_cards
.
size
())
{
SetResponseSelectedCards
();
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
ShowCancelOrFinishButton
(
0
);
...
@@ -1372,18 +1371,37 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1372,18 +1371,37 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
else
{
}
else
{
select_ready
=
true
;
select_ready
=
true
;
ShowCancelOrFinishButton
(
2
);
ShowCancelOrFinishButton
(
2
);
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_TRIBUTE
)
{
wchar_t
wbuf
[
256
],
*
pwbuf
=
wbuf
;
BufferIO
::
CopyWStrRef
(
dataManager
.
GetSysString
(
209
),
pwbuf
,
256
);
*
pwbuf
++
=
L'\n'
;
BufferIO
::
CopyWStrRef
(
dataManager
.
GetSysString
(
210
),
pwbuf
,
256
);
mainGame
->
stQMessage
->
setText
(
wbuf
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
}
}
}
}
else
{
}
else
{
select_ready
=
false
;
select_ready
=
false
;
if
(
select_cancelable
&&
min
==
0
)
if
(
select_cancelable
&&
selected_cards
.
size
()
==
0
)
ShowCancelOrFinishButton
(
1
);
else
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_TRIBUTE
:
{
if
(
!
(
hovered_location
&
0xe
)
||
!
clicked_card
||
!
clicked_card
->
is_selectable
)
break
;
if
(
clicked_card
->
is_selected
)
{
auto
it
=
std
::
find
(
selected_cards
.
begin
(),
selected_cards
.
end
(),
clicked_card
);
selected_cards
.
erase
(
it
);
}
else
{
selected_cards
.
push_back
(
clicked_card
);
}
if
(
CheckSelectTribute
())
{
if
(
selectsum_cards
.
size
()
==
0
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
DuelClient
::
SendResponse
();
}
else
{
select_ready
=
true
;
ShowCancelOrFinishButton
(
2
);
}
}
else
{
select_ready
=
false
;
if
(
select_cancelable
&&
selected_cards
.
size
()
==
0
)
ShowCancelOrFinishButton
(
1
);
ShowCancelOrFinishButton
(
1
);
else
else
ShowCancelOrFinishButton
(
0
);
ShowCancelOrFinishButton
(
0
);
...
@@ -1719,6 +1737,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1719,6 +1737,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
display_cards
.
clear
();
display_cards
.
clear
();
switch
(
event
.
KeyInput
.
Key
)
{
switch
(
event
.
KeyInput
.
Key
)
{
case
irr
:
:
KEY_F1
:
case
irr
:
:
KEY_F1
:
if
(
cant_check_grave
)
break
;
loc_id
=
1004
;
loc_id
=
1004
;
for
(
auto
it
=
grave
[
0
].
rbegin
();
it
!=
grave
[
0
].
rend
();
++
it
)
for
(
auto
it
=
grave
[
0
].
rbegin
();
it
!=
grave
[
0
].
rend
();
++
it
)
display_cards
.
push_back
(
*
it
);
display_cards
.
push_back
(
*
it
);
...
@@ -1743,6 +1763,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1743,6 +1763,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
break
;
break
;
case
irr
:
:
KEY_F5
:
case
irr
:
:
KEY_F5
:
if
(
cant_check_grave
)
break
;
loc_id
=
1004
;
loc_id
=
1004
;
for
(
auto
it
=
grave
[
1
].
rbegin
();
it
!=
grave
[
1
].
rend
();
++
it
)
for
(
auto
it
=
grave
[
1
].
rbegin
();
it
!=
grave
[
1
].
rend
();
++
it
)
display_cards
.
push_back
(
*
it
);
display_cards
.
push_back
(
*
it
);
...
@@ -2316,14 +2338,18 @@ void ClientField::SetShowMark(ClientCard* pcard, bool enable) {
...
@@ -2316,14 +2338,18 @@ void ClientField::SetShowMark(ClientCard* pcard, bool enable) {
}
}
void
ClientField
::
ShowCardInfoInList
(
ClientCard
*
pcard
,
irr
::
gui
::
IGUIElement
*
element
,
irr
::
gui
::
IGUIElement
*
parent
)
{
void
ClientField
::
ShowCardInfoInList
(
ClientCard
*
pcard
,
irr
::
gui
::
IGUIElement
*
element
,
irr
::
gui
::
IGUIElement
*
parent
)
{
std
::
wstring
str
(
L""
);
std
::
wstring
str
(
L""
);
wchar_t
formatBuffer
[
2048
];
if
(
pcard
->
code
)
{
if
(
pcard
->
code
)
{
str
.
append
(
dataManager
.
GetName
(
pcard
->
code
));
str
.
append
(
dataManager
.
GetName
(
pcard
->
code
));
}
}
if
(
pcard
->
overlayTarget
)
{
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
225
),
dataManager
.
GetName
(
pcard
->
overlayTarget
->
code
),
pcard
->
overlayTarget
->
sequence
+
1
);
str
.
append
(
L"
\n
"
).
append
(
formatBuffer
);
}
if
((
pcard
->
status
&
STATUS_PROC_COMPLETE
)
if
((
pcard
->
status
&
STATUS_PROC_COMPLETE
)
&&
(
pcard
->
type
&
(
TYPE_RITUAL
|
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
|
TYPE_SPSUMMON
)))
&&
(
pcard
->
type
&
(
TYPE_RITUAL
|
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
|
TYPE_SPSUMMON
)))
str
.
append
(
L"
\n
"
).
append
(
dataManager
.
GetSysString
(
224
));
str
.
append
(
L"
\n
"
).
append
(
dataManager
.
GetSysString
(
224
));
for
(
size_t
i
=
0
;
i
<
chains
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
chains
.
size
();
++
i
)
{
wchar_t
formatBuffer
[
2048
];
auto
chit
=
chains
[
i
];
auto
chit
=
chains
[
i
];
if
(
pcard
==
chit
.
chain_card
)
{
if
(
pcard
==
chit
.
chain_card
)
{
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
216
),
i
+
1
);
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
216
),
i
+
1
);
...
@@ -2469,6 +2495,11 @@ void ClientField::CancelOrFinish() {
...
@@ -2469,6 +2495,11 @@ void ClientField::CancelOrFinish() {
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
break
;
}
}
if
(
select_ready
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
DuelClient
::
SendResponse
();
}
break
;
break
;
}
}
case
MSG_SELECT_SUM
:
{
case
MSG_SELECT_SUM
:
{
...
@@ -2509,6 +2540,19 @@ void ClientField::CancelOrFinish() {
...
@@ -2509,6 +2540,19 @@ void ClientField::CancelOrFinish() {
}
}
break
;
break
;
}
}
case
MSG_SELECT_PLACE
:
{
if
(
select_cancelable
)
{
unsigned
char
respbuf
[
3
];
respbuf
[
0
]
=
mainGame
->
LocalPlayer
(
0
);
respbuf
[
1
]
=
0
;
respbuf
[
2
]
=
0
;
mainGame
->
dField
.
selectable_field
=
0
;
DuelClient
::
SetResponseB
(
respbuf
,
3
);
DuelClient
::
SendResponse
();
ShowCancelOrFinishButton
(
0
);
}
break
;
}
}
}
}
}
}
}
gframe/game.cpp
View file @
dff3d3e6
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include "netserver.h"
#include "netserver.h"
#include "single_mode.h"
#include "single_mode.h"
const
unsigned
short
PRO_VERSION
=
0x135
1
;
const
unsigned
short
PRO_VERSION
=
0x135
2
;
namespace
ygo
{
namespace
ygo
{
...
...
lflist.conf
View file @
dff3d3e6
This diff is collapsed.
Click to expand it.
ocgcore
@
d3eceea9
Subproject commit
e1e9af3e34d303b43aa1bc23e45a1eca2b60a247
Subproject commit
d3eceea9499fbf137887bc980214147c2ae6294e
script
@
b6819fc3
Subproject commit
0895099e40fef293c6f7653836c5cdf7a36b9e61
Subproject commit
b6819fc3480b886fd6f1a840297e8df2367e0c43
strings.conf
View file @
dff3d3e6
...
@@ -80,6 +80,7 @@
...
@@ -80,6 +80,7 @@
!
system
222
是否要发动诱发效果?
!
system
222
是否要发动诱发效果?
!
system
223
稍后将询问其他可以发动的效果。
!
system
223
稍后将询问其他可以发动的效果。
!
system
224
已用正规方法特殊召唤
!
system
224
已用正规方法特殊召唤
!
system
225
叠放于[%
ls
](%
d
)下
!
system
500
请选择要解放的卡
!
system
500
请选择要解放的卡
!
system
501
请选择要丢弃的手卡
!
system
501
请选择要丢弃的手卡
!
system
502
请选择要破坏的卡
!
system
502
请选择要破坏的卡
...
@@ -1035,3 +1036,10 @@
...
@@ -1035,3 +1036,10 @@
!
setname
0
x14e
电脑堺 電脳堺
!
setname
0
x14e
电脑堺 電脳堺
!
setname
0
x114e
电脑堺门 電脳堺門
!
setname
0
x114e
电脑堺门 電脳堺門
!
setname
0
x14f
双天
!
setname
0
x14f
双天
!
setname
0
x150
大贤者 マギストス
#setname 0x151 双子 Twin
!
setname
0
x1151
直播☆双子
Live
☆
Twin
!
setname
0
x2151
邪恶★双子
Evil
★
Twin
!
setname
0
x152
姬丝基勒 キスキル
!
setname
0
x153
璃拉 リィラ
!
setname
0
x154
龙辉巧 ドライトロン
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