Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
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
赤子奈落
MDPro3
Commits
29f844aa
Commit
29f844aa
authored
Mar 08, 2026
by
Senator John
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch' into 'master'
Patch See merge request
!28
parents
2a369a96
08a8d2c2
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
1457 additions
and
141 deletions
+1457
-141
Assets/Prefabs/ScriptableObjects/TextureContainer.asset
Assets/Prefabs/ScriptableObjects/TextureContainer.asset
+4
-0
Assets/Scripts/MDPro3/Duel/BG/DuelBGManager.cs
Assets/Scripts/MDPro3/Duel/BG/DuelBGManager.cs
+3
-0
Assets/Scripts/MDPro3/Duel/CardDescription.cs
Assets/Scripts/MDPro3/Duel/CardDescription.cs
+1
-1
Assets/Scripts/MDPro3/Duel/CardList.cs
Assets/Scripts/MDPro3/Duel/CardList.cs
+467
-4
Assets/Scripts/MDPro3/Duel/Message/DuelMessage.cs
Assets/Scripts/MDPro3/Duel/Message/DuelMessage.cs
+3
-3
Assets/Scripts/MDPro3/Duel/YGOSharp/Banlist.cs
Assets/Scripts/MDPro3/Duel/YGOSharp/Banlist.cs
+23
-4
Assets/Scripts/MDPro3/Duel/YGOSharp/BanlistManager.cs
Assets/Scripts/MDPro3/Duel/YGOSharp/BanlistManager.cs
+116
-1
Assets/Scripts/MDPro3/Duel/YGOSharp/CardsManager.cs
Assets/Scripts/MDPro3/Duel/YGOSharp/CardsManager.cs
+179
-88
Assets/Scripts/MDPro3/Duel/YgoServer.cs
Assets/Scripts/MDPro3/Duel/YgoServer.cs
+18
-3
Assets/Scripts/MDPro3/Helper/InterString.cs
Assets/Scripts/MDPro3/Helper/InterString.cs
+2
-2
Assets/Scripts/MDPro3/ScriptableObjects/TextureContainer.cs
Assets/Scripts/MDPro3/ScriptableObjects/TextureContainer.cs
+4
-0
Assets/Scripts/MDPro3/Servant/OcgCore.cs
Assets/Scripts/MDPro3/Servant/OcgCore.cs
+9
-1
Assets/Scripts/MDPro3/Servant/OnlineServant.cs
Assets/Scripts/MDPro3/Servant/OnlineServant.cs
+3
-0
Assets/Scripts/MDPro3/Servant/RoomServant.cs
Assets/Scripts/MDPro3/Servant/RoomServant.cs
+2
-0
Assets/Scripts/MDPro3/Servant/SoloSelector.cs
Assets/Scripts/MDPro3/Servant/SoloSelector.cs
+83
-6
Assets/Scripts/MDPro3/UI/ElementObjectManager/CardInfoManager.cs
...Scripts/MDPro3/UI/ElementObjectManager/CardInfoManager.cs
+1
-1
Assets/Scripts/MDPro3/UI/SelectionButton/SelectionButton_CardInCollection.cs
...o3/UI/SelectionButton/SelectionButton_CardInCollection.cs
+2
-3
Assets/Scripts/MDPro3/UI/SelectionButton/SelectionToggle_AppearanceItem.cs
...Pro3/UI/SelectionButton/SelectionToggle_AppearanceItem.cs
+21
-15
Assets/Scripts/MDPro3/UI/ServantUI/SettingServantUI.cs
Assets/Scripts/MDPro3/UI/ServantUI/SettingServantUI.cs
+17
-2
Assets/Scripts/MDPro3/UI/UIWidget/Deck/CardInfoDetail.cs
Assets/Scripts/MDPro3/UI/UIWidget/Deck/CardInfoDetail.cs
+1
-1
Assets/Scripts/MDPro3/UI/UIWidget/UIWidgetCardBase.cs
Assets/Scripts/MDPro3/UI/UIWidget/UIWidgetCardBase.cs
+1
-1
Assets/Scripts/YGOSharp/YGOSharp/Banlist.cs
Assets/Scripts/YGOSharp/YGOSharp/Banlist.cs
+20
-3
Assets/Scripts/YGOSharp/YGOSharp/BanlistManager.cs
Assets/Scripts/YGOSharp/YGOSharp/BanlistManager.cs
+9
-2
Assets/Texture/GUI_Used/GUI_Duel_CardStats_Base_0.png
Assets/Texture/GUI_Used/GUI_Duel_CardStats_Base_0.png
+0
-0
Assets/Texture/GUI_Used/GUI_Duel_CardStats_Base_0.png.meta
Assets/Texture/GUI_Used/GUI_Duel_CardStats_Base_0.png.meta
+156
-0
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Default.png
...re/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Default.png
+0
-0
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Default.png.meta
...I_Used/GUI_Duel_GenericCardList_ViewIcon_Default.png.meta
+156
-0
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Expand.png
...ure/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Expand.png
+0
-0
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Expand.png.meta
...UI_Used/GUI_Duel_GenericCardList_ViewIcon_Expand.png.meta
+156
-0
No files found.
Assets/Prefabs/ScriptableObjects/TextureContainer.asset
View file @
29f844aa
...
@@ -346,6 +346,10 @@ MonoBehaviour:
...
@@ -346,6 +346,10 @@ MonoBehaviour:
listOpRemoved
:
{
fileID
:
21300000
,
guid
:
066065a6b1b767c418d2889597305402
,
type
:
3
}
listOpRemoved
:
{
fileID
:
21300000
,
guid
:
066065a6b1b767c418d2889597305402
,
type
:
3
}
listMyXyz
:
{
fileID
:
21300000
,
guid
:
dcbfe2b5c52ef9c45a945e6099f96860
,
type
:
3
}
listMyXyz
:
{
fileID
:
21300000
,
guid
:
dcbfe2b5c52ef9c45a945e6099f96860
,
type
:
3
}
listOpXyz
:
{
fileID
:
21300000
,
guid
:
dc626d3f4895db448969ee261eac22c6
,
type
:
3
}
listOpXyz
:
{
fileID
:
21300000
,
guid
:
dc626d3f4895db448969ee261eac22c6
,
type
:
3
}
listSingleColumn
:
{
fileID
:
21300000
,
guid
:
1593fc89217af42499c6ab1514ab1709
,
type
:
3
}
listViewIconExpand
:
{
fileID
:
21300000
,
guid
:
838190b6b8c45334bab89da28a238150
,
type
:
3
}
listViewIconDefault
:
{
fileID
:
21300000
,
guid
:
9f9e97c267d35b84db512595c857ffba
,
type
:
3
}
listCardStatsBase
:
{
fileID
:
21300000
,
guid
:
5b696a850bf3a3443bf0e67396ecc181
,
type
:
3
}
CardAffectDisable
:
{
fileID
:
21300000
,
guid
:
5e4f5281aaf73274c888adbe5afce0e0
,
type
:
3
}
CardAffectDisable
:
{
fileID
:
21300000
,
guid
:
5e4f5281aaf73274c888adbe5afce0e0
,
type
:
3
}
CardAffectEquip
:
{
fileID
:
21300000
,
guid
:
1a678cbbdf93a5449aa105d7c2d6d83a
,
type
:
3
}
CardAffectEquip
:
{
fileID
:
21300000
,
guid
:
1a678cbbdf93a5449aa105d7c2d6d83a
,
type
:
3
}
CardAffectField
:
{
fileID
:
21300000
,
guid
:
4185642e1b53a404ea1e358e5ccda6fe
,
type
:
3
}
CardAffectField
:
{
fileID
:
21300000
,
guid
:
4185642e1b53a404ea1e358e5ccda6fe
,
type
:
3
}
...
...
Assets/Scripts/MDPro3/Duel/BG/DuelBGManager.cs
View file @
29f844aa
...
@@ -99,6 +99,9 @@ namespace MDPro3.Duel
...
@@ -99,6 +99,9 @@ namespace MDPro3.Duel
UIManager
.
UIBlackIn
(
Core
.
TransitionTime
);
UIManager
.
UIBlackIn
(
Core
.
TransitionTime
);
await
UniTask
.
WaitForSeconds
(
Core
.
TransitionTime
);
await
UniTask
.
WaitForSeconds
(
Core
.
TransitionTime
);
await
UniTask
.
WaitUntil
(()
=>
Appearance
.
loaded
);
await
UniTask
.
WaitUntil
(()
=>
Appearance
.
loaded
);
// Rebuild appearance assets on each match load so random selections
// (icon / frame / protector) are re-rolled per duel.
await
Program
.
instance
.
appearance
.
LoadSettingAssets
();
await
ABLoader
.
CacheMasterDuelBundles
();
await
ABLoader
.
CacheMasterDuelBundles
();
Program
.
instance
.
ocgcore
.
LoadDuelButton
();
Program
.
instance
.
ocgcore
.
LoadDuelButton
();
...
...
Assets/Scripts/MDPro3/Duel/CardDescription.cs
View file @
29f844aa
...
@@ -255,7 +255,7 @@ namespace MDPro3
...
@@ -255,7 +255,7 @@ namespace MDPro3
manager
.
GetElement
(
"PropertyMonster"
).
SetActive
(
false
);
manager
.
GetElement
(
"PropertyMonster"
).
SetActive
(
false
);
manager
.
GetElement
(
"PropertySpell"
).
SetActive
(
true
);
manager
.
GetElement
(
"PropertySpell"
).
SetActive
(
true
);
manager
.
GetElement
<
Image
>(
"SpellType"
).
sprite
=
TextureManager
.
GetSpellTrapTypeIcon
(
data
);
manager
.
GetElement
<
Image
>(
"SpellType"
).
sprite
=
TextureManager
.
GetSpellTrapTypeIcon
(
data
);
manager
.
GetElement
<
Text
>(
"TextSpellType"
).
text
=
data
.
GetSpellTrapType
();
manager
.
GetElement
<
Text
>(
"TextSpellType"
).
text
=
data
.
GetSpellTrapType
(
true
);
}
}
RefreshLimitIcon
(
data
.
Id
);
RefreshLimitIcon
(
data
.
Id
);
}
}
...
...
Assets/Scripts/MDPro3/Duel/CardList.cs
View file @
29f844aa
This diff is collapsed.
Click to expand it.
Assets/Scripts/MDPro3/Duel/Message/DuelMessage.cs
View file @
29f844aa
...
@@ -656,13 +656,13 @@ namespace MDPro3.Duel
...
@@ -656,13 +656,13 @@ namespace MDPro3.Duel
MessageManager
.
Cast
(
InterString
.
Get
(
"请联系开发者修复这张特殊胜利的卡。"
));
MessageManager
.
Cast
(
InterString
.
Get
(
"请联系开发者修复这张特殊胜利的卡。"
));
}
}
// Start win/lose field animation first, then show result text while it is ongoing.
duelBGManager
.
ShowBGEnd
(
duelResult
);
await
duelBGManager
.
ShowDuelResultText
(
duelText
);
await
duelBGManager
.
ShowDuelResultText
(
duelText
);
MessageManager
.
Cast
(
endingReason
);
MessageManager
.
Cast
(
endingReason
);
if
(
condition
!=
Condition
.
Replay
)
if
(
condition
!=
Condition
.
Replay
)
Core
.
GetUI
<
OcgCoreUI
>().
ShowSaveReplay
();
Core
.
GetUI
<
OcgCoreUI
>().
ShowSaveReplay
();
duelBGManager
.
ShowBGEnd
(
duelResult
);
}
}
protected
override
UniTask
GameMessage_UpdateData
(
BinaryReader
reader
)
protected
override
UniTask
GameMessage_UpdateData
(
BinaryReader
reader
)
...
@@ -3337,4 +3337,4 @@ namespace MDPro3.Duel
...
@@ -3337,4 +3337,4 @@ namespace MDPro3.Duel
#
endregion
#
endregion
}
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/Duel/YGOSharp/Banlist.cs
View file @
29f844aa
...
@@ -8,6 +8,8 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -8,6 +8,8 @@ namespace MDPro3.Duel.YGOSharp
public
IList
<
int
>
BannedIds
{
get
;
private
set
;
}
public
IList
<
int
>
BannedIds
{
get
;
private
set
;
}
public
IList
<
int
>
LimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
LimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
SemiLimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
SemiLimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
UnlimitedIds
{
get
;
private
set
;
}
public
bool
WhitelistOnly
{
get
;
private
set
;
}
public
uint
Hash
{
get
;
private
set
;
}
public
uint
Hash
{
get
;
private
set
;
}
public
string
Name
=
""
;
public
string
Name
=
""
;
...
@@ -16,6 +18,8 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -16,6 +18,8 @@ namespace MDPro3.Duel.YGOSharp
BannedIds
=
new
List
<
int
>();
BannedIds
=
new
List
<
int
>();
LimitedIds
=
new
List
<
int
>();
LimitedIds
=
new
List
<
int
>();
SemiLimitedIds
=
new
List
<
int
>();
SemiLimitedIds
=
new
List
<
int
>();
UnlimitedIds
=
new
List
<
int
>();
WhitelistOnly
=
false
;
Hash
=
0x7dfcee6a
;
Hash
=
0x7dfcee6a
;
}
}
...
@@ -37,7 +41,9 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -37,7 +41,9 @@ namespace MDPro3.Duel.YGOSharp
return
1
;
return
1
;
if
(
SemiLimitedIds
.
Contains
(
cardId
))
if
(
SemiLimitedIds
.
Contains
(
cardId
))
return
2
;
return
2
;
return
3
;
if
(
UnlimitedIds
.
Contains
(
cardId
))
return
3
;
return
WhitelistOnly
?
0
:
3
;
}
}
else
else
{
{
...
@@ -47,14 +53,24 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -47,14 +53,24 @@ namespace MDPro3.Duel.YGOSharp
return
1
;
return
1
;
if
(
SemiLimitedIds
.
Contains
(
al
))
if
(
SemiLimitedIds
.
Contains
(
al
))
return
2
;
return
2
;
return
3
;
if
(
UnlimitedIds
.
Contains
(
al
))
return
3
;
return
WhitelistOnly
?
0
:
3
;
}
}
}
}
public
void
EnableWhitelistMode
()
{
if
(
WhitelistOnly
)
return
;
WhitelistOnly
=
true
;
Hash
^=
0x0f0f0f0f
;
}
public
void
Add
(
int
cardId
,
int
quantity
)
public
void
Add
(
int
cardId
,
int
quantity
)
{
{
if
(
quantity
<
0
||
quantity
>
2
)
if
(
quantity
<
0
||
quantity
>
3
)
return
;
return
;
switch
(
quantity
)
switch
(
quantity
)
{
{
...
@@ -67,9 +83,12 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -67,9 +83,12 @@ namespace MDPro3.Duel.YGOSharp
case
2
:
case
2
:
SemiLimitedIds
.
Add
(
cardId
);
SemiLimitedIds
.
Add
(
cardId
);
break
;
break
;
case
3
:
UnlimitedIds
.
Add
(
cardId
);
break
;
}
}
uint
code
=
(
uint
)
cardId
;
uint
code
=
(
uint
)
cardId
;
Hash
=
Hash
^
((
code
<<
18
)
|
(
code
>>
14
))
^
((
code
<<
(
27
+
quantity
))
|
(
code
>>
(
5
-
quantity
)));
Hash
=
Hash
^
((
code
<<
18
)
|
(
code
>>
14
))
^
((
code
<<
(
27
+
quantity
))
|
(
code
>>
(
5
-
quantity
)));
}
}
}
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/Duel/YGOSharp/BanlistManager.cs
View file @
29f844aa
using
Ionic.Zip
;
using
Ionic.Zip
;
using
MDPro3.Servant
;
using
MDPro3.Servant
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Text
;
namespace
MDPro3.Duel.YGOSharp
namespace
MDPro3.Duel.YGOSharp
{
{
...
@@ -9,6 +11,9 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -9,6 +11,9 @@ namespace MDPro3.Duel.YGOSharp
{
{
public
static
List
<
Banlist
>
Banlists
{
get
;
private
set
;
}
public
static
List
<
Banlist
>
Banlists
{
get
;
private
set
;
}
public
static
string
EmptyBanlistName
=
"N/A"
;
public
static
string
EmptyBanlistName
=
"N/A"
;
private
static
bool
localServerLflistInjected
;
private
static
string
localServerLflistBackupContent
;
private
const
string
LfListFileName
=
"lflist.conf"
;
public
static
void
Initialize
()
public
static
void
Initialize
()
{
{
...
@@ -54,6 +59,110 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -54,6 +59,110 @@ namespace MDPro3.Duel.YGOSharp
Banlists
.
Add
(
current
);
Banlists
.
Add
(
current
);
}
}
public
static
void
PrepareLocalServerLflist
()
{
if
(
localServerLflistInjected
)
return
;
if
(!
Config
.
GetBool
(
"Expansions"
,
true
))
return
;
try
{
if
(!
File
.
Exists
(
Program
.
PATH_LFLIST
))
return
;
localServerLflistBackupContent
=
File
.
ReadAllText
(
Program
.
PATH_LFLIST
);
var
mergedContent
=
BuildMergedLflistContent
();
if
(
string
.
IsNullOrEmpty
(
mergedContent
)
||
mergedContent
==
localServerLflistBackupContent
)
{
localServerLflistBackupContent
=
null
;
return
;
}
File
.
WriteAllText
(
Program
.
PATH_LFLIST
,
mergedContent
);
localServerLflistInjected
=
true
;
}
catch
(
Exception
e
)
{
localServerLflistBackupContent
=
null
;
localServerLflistInjected
=
false
;
UnityEngine
.
Debug
.
LogError
(
"Failed to prepare LAN lflist.conf."
);
UnityEngine
.
Debug
.
LogException
(
e
);
}
}
public
static
void
RestoreLocalServerLflist
()
{
if
(!
localServerLflistInjected
)
return
;
try
{
if
(
localServerLflistBackupContent
!=
null
)
File
.
WriteAllText
(
Program
.
PATH_LFLIST
,
localServerLflistBackupContent
);
}
catch
(
Exception
e
)
{
UnityEngine
.
Debug
.
LogError
(
"Failed to restore original lflist.conf."
);
UnityEngine
.
Debug
.
LogException
(
e
);
}
finally
{
localServerLflistBackupContent
=
null
;
localServerLflistInjected
=
false
;
}
}
private
static
string
BuildMergedLflistContent
()
{
StringBuilder
builder
=
new
StringBuilder
();
var
confPath
=
Program
.
PATH_EXPANSIONS
+
LfListFileName
;
AppendLflistFromFile
(
builder
,
confPath
);
foreach
(
var
zip
in
ZipHelper
.
zips
)
{
if
(
zip
.
Name
.
ToLower
().
EndsWith
(
"script.zip"
))
continue
;
foreach
(
var
file
in
zip
.
EntryFileNames
)
{
if
(!
file
.
ToLower
().
EndsWith
(
LfListFileName
))
continue
;
var
entry
=
zip
[
file
];
using
(
var
memoryStream
=
new
MemoryStream
())
{
entry
.
Extract
(
memoryStream
);
memoryStream
.
Position
=
0
;
using
(
var
reader
=
new
StreamReader
(
memoryStream
))
AppendLflistText
(
builder
,
reader
.
ReadToEnd
());
}
}
}
AppendLflistFromFile
(
builder
,
Program
.
PATH_LFLIST
);
return
builder
.
ToString
();
}
private
static
void
AppendLflistFromFile
(
StringBuilder
builder
,
string
path
)
{
if
(!
File
.
Exists
(
path
))
return
;
AppendLflistText
(
builder
,
File
.
ReadAllText
(
path
));
}
private
static
void
AppendLflistText
(
StringBuilder
builder
,
string
text
)
{
if
(
string
.
IsNullOrWhiteSpace
(
text
))
return
;
if
(
builder
.
Length
>
0
&&
builder
[
builder
.
Length
-
1
]
!=
'\n'
)
builder
.
AppendLine
();
builder
.
Append
(
text
);
if
(
builder
.
Length
>
0
&&
builder
[
builder
.
Length
-
1
]
!=
'\n'
)
builder
.
AppendLine
();
}
public
static
void
InitializeFromReader
(
StreamReader
reader
)
public
static
void
InitializeFromReader
(
StreamReader
reader
)
{
{
Banlist
current
=
null
;
Banlist
current
=
null
;
...
@@ -73,6 +182,12 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -73,6 +182,12 @@ namespace MDPro3.Duel.YGOSharp
Banlists
.
Add
(
current
);
Banlists
.
Add
(
current
);
continue
;
continue
;
}
}
if
(
line
.
StartsWith
(
"$"
))
{
if
(
current
!=
null
&&
line
.
Equals
(
"$whitelist"
,
StringComparison
.
OrdinalIgnoreCase
))
current
.
EnableWhitelistMode
();
continue
;
}
if
(!
line
.
Contains
(
" "
))
if
(!
line
.
Contains
(
" "
))
continue
;
continue
;
if
(
current
==
null
)
if
(
current
==
null
)
...
@@ -149,4 +264,4 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -149,4 +264,4 @@ namespace MDPro3.Duel.YGOSharp
return
returnValue
;
return
returnValue
;
}
}
}
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/Duel/YGOSharp/CardsManager.cs
View file @
29f844aa
This diff is collapsed.
Click to expand it.
Assets/Scripts/MDPro3/Duel/YgoServer.cs
View file @
29f844aa
using
System.Runtime.InteropServices
;
using
System.Runtime.InteropServices
;
using
System.Threading
;
using
System.Threading
;
using
MDPro3.Duel.YGOSharp
;
namespace
MDPro3.Net
namespace
MDPro3.Net
{
{
...
@@ -21,15 +22,29 @@ namespace MDPro3.Net
...
@@ -21,15 +22,29 @@ namespace MDPro3.Net
serverThread
=
new
Thread
(()
=>
serverThread
=
new
Thread
(()
=>
{
{
Dll
.
start_server
(
args
);
try
{
Dll
.
start_server
(
args
);
}
finally
{
BanlistManager
.
RestoreLocalServerLflist
();
}
});
});
serverThread
.
Start
();
serverThread
.
Start
();
}
}
public
static
void
StopServer
()
public
static
void
StopServer
()
{
{
Dll
.
stop_server
();
try
serverThread
?.
Abort
();
{
Dll
.
stop_server
();
}
finally
{
serverThread
?.
Abort
();
BanlistManager
.
RestoreLocalServerLflist
();
}
}
}
public
static
bool
ServerRunning
()
public
static
bool
ServerRunning
()
...
...
Assets/Scripts/MDPro3/Helper/InterString.cs
View file @
29f844aa
...
@@ -25,8 +25,8 @@ namespace MDPro3
...
@@ -25,8 +25,8 @@ namespace MDPro3
public
static
void
Initialize
()
public
static
void
Initialize
()
{
{
translations
.
Clear
();
translations
.
Clear
();
translationsForRender
.
Clear
();
translationsForRender
=
new
Dictionary
<
string
,
string
>
();
translationsForPrerelease
.
Clear
();
translationsForPrerelease
=
new
Dictionary
<
string
,
string
>
();
path
=
Program
.
PATH_LOCALES
+
Language
.
GetConfig
()
+
PATH_CONF_FILE
;
path
=
Program
.
PATH_LOCALES
+
Language
.
GetConfig
()
+
PATH_CONF_FILE
;
if
(!
File
.
Exists
(
path
))
if
(!
File
.
Exists
(
path
))
...
...
Assets/Scripts/MDPro3/ScriptableObjects/TextureContainer.cs
View file @
29f844aa
...
@@ -298,6 +298,10 @@ namespace MDPro3
...
@@ -298,6 +298,10 @@ namespace MDPro3
public
Sprite
listOpRemoved
;
public
Sprite
listOpRemoved
;
public
Sprite
listMyXyz
;
public
Sprite
listMyXyz
;
public
Sprite
listOpXyz
;
public
Sprite
listOpXyz
;
public
Sprite
listSingleColumn
;
public
Sprite
listViewIconExpand
;
public
Sprite
listViewIconDefault
;
public
Sprite
listCardStatsBase
;
[
Header
(
"Card Affect"
)]
[
Header
(
"Card Affect"
)]
public
Sprite
CardAffectDisable
;
public
Sprite
CardAffectDisable
;
...
...
Assets/Scripts/MDPro3/Servant/OcgCore.cs
View file @
29f844aa
...
@@ -131,6 +131,7 @@ namespace MDPro3.Servant
...
@@ -131,6 +131,7 @@ namespace MDPro3.Servant
public
static
float
nextNegateAction_AdditionalTime
;
public
static
float
nextNegateAction_AdditionalTime
;
public
static
ElementObjectManager
nextNegateAction_AdditionalManager
;
public
static
ElementObjectManager
nextNegateAction_AdditionalManager
;
public
static
Action
startCard
;
public
static
Action
startCard
;
public
Action
onSurrenderConfirmed
;
public
static
Material
myProtector
;
public
static
Material
myProtector
;
public
static
Material
opProtector
;
public
static
Material
opProtector
;
...
@@ -653,11 +654,13 @@ namespace MDPro3.Servant
...
@@ -653,11 +654,13 @@ namespace MDPro3.Servant
InterString
.
Get
(
"是"
),
InterString
.
Get
(
"是"
),
InterString
.
Get
(
"否"
)
InterString
.
Get
(
"否"
)
};
};
UIManager
.
ShowPopupYesOrNo
(
selections
,
ActionSurrender
,
null
);
UIManager
.
ShowPopupYesOrNo
(
selections
,
ActionSurrender
,
ActionCancelSurrender
);
}
}
private
void
ActionSurrender
()
private
void
ActionSurrender
()
{
{
onSurrenderConfirmed
?.
Invoke
();
onSurrenderConfirmed
=
null
;
surrendered
=
true
;
surrendered
=
true
;
if
(
TcpHelper
.
tcpClient
!=
null
&&
TcpHelper
.
tcpClient
.
Connected
)
if
(
TcpHelper
.
tcpClient
!=
null
&&
TcpHelper
.
tcpClient
.
Connected
)
{
{
...
@@ -670,6 +673,11 @@ namespace MDPro3.Servant
...
@@ -670,6 +673,11 @@ namespace MDPro3.Servant
OnExit
();
OnExit
();
}
}
private
void
ActionCancelSurrender
()
{
onSurrenderConfirmed
=
null
;
}
#
endregion
#
endregion
#
region
Message
#
region
Message
...
...
Assets/Scripts/MDPro3/Servant/OnlineServant.cs
View file @
29f844aa
...
@@ -51,6 +51,8 @@ namespace MDPro3.Servant
...
@@ -51,6 +51,8 @@ namespace MDPro3.Servant
if
(
servantUI
!=
null
)
if
(
servantUI
!=
null
)
RefreshDeckSelector
();
RefreshDeckSelector
();
// Re-roll random duel icon/frame/protector whenever returning to lobby.
_
=
Program
.
instance
.
appearance
.
LoadSettingAssets
();
StartCoroutine
(
RefreshMyCardAssets
());
StartCoroutine
(
RefreshMyCardAssets
());
}
}
...
@@ -145,6 +147,7 @@ namespace MDPro3.Servant
...
@@ -145,6 +147,7 @@ namespace MDPro3.Servant
RoomServant
.
FromLocalHost
=
true
;
RoomServant
.
FromLocalHost
=
true
;
RoomServant
.
FromHandTest
=
false
;
RoomServant
.
FromHandTest
=
false
;
BanlistManager
.
PrepareLocalServerLflist
();
YgoServer
.
StartServer
(
args
);
YgoServer
.
StartServer
(
args
);
TcpHelper
.
LinkStart
(
"127.0.0.1"
,
Config
.
Get
(
"DuelPlayerName0"
,
Config
.
EMPTY_STRING
),
port
.
ToString
(),
string
.
Empty
,
true
,
null
);
TcpHelper
.
LinkStart
(
"127.0.0.1"
,
Config
.
Get
(
"DuelPlayerName0"
,
Config
.
EMPTY_STRING
),
port
.
ToString
(),
string
.
Empty
,
true
,
null
);
}
}
...
...
Assets/Scripts/MDPro3/Servant/RoomServant.cs
View file @
29f844aa
...
@@ -67,6 +67,8 @@ namespace MDPro3.Servant
...
@@ -67,6 +67,8 @@ namespace MDPro3.Servant
CoreShowing
=
0
;
CoreShowing
=
0
;
Program
.
instance
.
ui_
.
chatPanel
.
Show
(
false
);
Program
.
instance
.
ui_
.
chatPanel
.
Show
(
false
);
OcgCore
.
handler
=
Handler
;
OcgCore
.
handler
=
Handler
;
// Re-roll random duel/watch icon & frame whenever entering a room.
_
=
Program
.
instance
.
appearance
.
LoadSettingAssets
();
GetUI
<
RoomServantUI
>().
RefreshDeckSelector
();
GetUI
<
RoomServantUI
>().
RefreshDeckSelector
();
}
}
...
...
Assets/Scripts/MDPro3/Servant/SoloSelector.cs
View file @
29f844aa
...
@@ -47,6 +47,17 @@ namespace MDPro3.Servant
...
@@ -47,6 +47,17 @@ namespace MDPro3.Servant
[
HideInInspector
]
public
SelectionToggle_Solo
lastSoloItem
;
[
HideInInspector
]
public
SelectionToggle_Solo
lastSoloItem
;
private
string
lastSoloCommand
=
string
.
Empty
;
private
int
lastSoloPort
=
7911
;
private
int
lastSoloLp
=
8000
;
private
int
lastSoloHand
=
5
;
private
int
lastSoloDraw
=
1
;
private
bool
lastSoloLockHand
;
private
bool
lastSoloNoCheck
;
private
bool
lastSoloNoShuffle
;
private
bool
hasLastSoloLaunchConfig
;
private
bool
retryLastSoloDuelWhenShown
;
#
region
Servant
#
region
Servant
public
override
int
Depth
=>
3
;
public
override
int
Depth
=>
3
;
...
@@ -59,6 +70,13 @@ namespace MDPro3.Servant
...
@@ -59,6 +70,13 @@ namespace MDPro3.Servant
LoadBots
();
LoadBots
();
}
}
protected
override
void
ApplyShowArrangement
(
int
preDepth
)
{
base
.
ApplyShowArrangement
(
preDepth
);
if
(
retryLastSoloDuelWhenShown
)
StartCoroutine
(
RetryLastSoloDuelWhenReady
());
}
protected
override
void
FirstLoadEvent
()
protected
override
void
FirstLoadEvent
()
{
{
base
.
FirstLoadEvent
();
base
.
FirstLoadEvent
();
...
@@ -164,7 +182,19 @@ namespace MDPro3.Servant
...
@@ -164,7 +182,19 @@ namespace MDPro3.Servant
{
{
string
aiCommand
=
GetWindBotCommand
(
aiCode
,
diyDeck
);
string
aiCommand
=
GetWindBotCommand
(
aiCode
,
diyDeck
);
if
(!
string
.
IsNullOrEmpty
(
aiCommand
))
if
(!
string
.
IsNullOrEmpty
(
aiCommand
))
Launch
(
aiCommand
,
GetUI
<
SoloSelectorUI
>().
IsLockHand
(),
GetUI
<
SoloSelectorUI
>().
IsNoCheck
(),
GetUI
<
SoloSelectorUI
>().
IsNoShuffle
());
{
var
ui
=
GetUI
<
SoloSelectorUI
>();
var
lockHand
=
ui
.
IsLockHand
();
var
noCheck
=
ui
.
IsNoCheck
();
var
noShuffle
=
ui
.
IsNoShuffle
();
var
duelPort
=
ui
.
GetPort
();
var
duelLp
=
ui
.
GetLP
();
var
duelHand
=
ui
.
GetHand
();
var
duelDraw
=
ui
.
GetDraw
();
RememberLastSoloLaunch
(
aiCommand
,
duelPort
,
duelLp
,
duelHand
,
duelDraw
,
lockHand
,
noCheck
,
noShuffle
);
LaunchWithConfig
(
aiCommand
,
duelPort
,
duelLp
,
duelHand
,
duelDraw
,
lockHand
,
noCheck
,
noShuffle
);
}
}
}
public
void
StartAIForRoom
(
int
aiCode
,
bool
diyDeck
)
public
void
StartAIForRoom
(
int
aiCode
,
bool
diyDeck
)
...
@@ -229,13 +259,60 @@ namespace MDPro3.Servant
...
@@ -229,13 +259,60 @@ namespace MDPro3.Servant
}
}
public
void
Launch
(
string
command
,
bool
lockHand
,
bool
noCheck
,
bool
noShuffle
)
public
void
Launch
(
string
command
,
bool
lockHand
,
bool
noCheck
,
bool
noShuffle
)
{
{
port
=
GetUI
<
SoloSelectorUI
>().
GetPort
().
ToString
();
var
ui
=
GetUI
<
SoloSelectorUI
>();
LaunchWithConfig
(
command
,
ui
.
GetPort
(),
ui
.
GetLP
(),
ui
.
GetHand
(),
ui
.
GetDraw
(),
lockHand
,
noCheck
,
noShuffle
);
}
public
bool
CanRetryLastSoloDuel
()
{
return
hasLastSoloLaunchConfig
;
}
public
void
QueueRetryLastSoloDuel
()
{
if
(!
CanRetryLastSoloDuel
())
return
;
retryLastSoloDuelWhenShown
=
true
;
}
private
void
RememberLastSoloLaunch
(
string
command
,
int
duelPort
,
int
duelLp
,
int
duelHand
,
int
duelDraw
,
bool
lockHand
,
bool
noCheck
,
bool
noShuffle
)
{
lastSoloCommand
=
command
;
lastSoloPort
=
duelPort
;
lastSoloLp
=
duelLp
;
lastSoloHand
=
duelHand
;
lastSoloDraw
=
duelDraw
;
lastSoloLockHand
=
lockHand
;
lastSoloNoCheck
=
noCheck
;
lastSoloNoShuffle
=
noShuffle
;
hasLastSoloLaunchConfig
=
true
;
}
private
IEnumerator
RetryLastSoloDuelWhenReady
()
{
yield
return
null
;
while
(
showing
&&
inTransition
)
yield
return
null
;
if
(!
showing
||
!
retryLastSoloDuelWhenShown
||
!
hasLastSoloLaunchConfig
)
yield
break
;
retryLastSoloDuelWhenShown
=
false
;
LaunchWithConfig
(
lastSoloCommand
,
lastSoloPort
,
lastSoloLp
,
lastSoloHand
,
lastSoloDraw
,
lastSoloLockHand
,
lastSoloNoCheck
,
lastSoloNoShuffle
);
}
private
void
LaunchWithConfig
(
string
command
,
int
duelPort
,
int
duelLp
,
int
duelHand
,
int
duelDraw
,
bool
lockHand
,
bool
noCheck
,
bool
noShuffle
)
{
port
=
duelPort
.
ToString
();
string
lp
=
GetUI
<
SoloSelectorUI
>().
GetLP
()
.
ToString
();
string
lp
=
duelLp
.
ToString
();
string
hand
=
GetUI
<
SoloSelectorUI
>().
GetHand
()
.
ToString
();
string
hand
=
duelHand
.
ToString
();
string
draw
=
GetUI
<
SoloSelectorUI
>().
GetDraw
()
.
ToString
();
string
draw
=
duelDraw
.
ToString
();
string
args
=
port
+
" -1 5 0 F "
+
(
noCheck
?
"T "
:
"F "
)
+
(
noShuffle
?
"T "
:
"F "
)
+
lp
+
" "
+
hand
+
" "
+
draw
+
" 0 0"
;
string
args
=
port
+
" -1 5 0 F "
+
(
noCheck
?
"T "
:
"F "
)
+
(
noShuffle
?
"T "
:
"F "
)
+
lp
+
" "
+
hand
+
" "
+
draw
+
" 0 0"
;
if
(
TcpHelper
.
IsPortAvailable
(
int
.
Parse
(
port
)
))
if
(
TcpHelper
.
IsPortAvailable
(
duelPort
))
{
{
YgoServer
.
StartServer
(
args
);
YgoServer
.
StartServer
(
args
);
RoomServant
.
FromSolo
=
true
;
RoomServant
.
FromSolo
=
true
;
...
...
Assets/Scripts/MDPro3/UI/ElementObjectManager/CardInfoManager.cs
View file @
29f844aa
...
@@ -419,7 +419,7 @@ namespace MDPro3.UI
...
@@ -419,7 +419,7 @@ namespace MDPro3.UI
SpellTrapType
.
SetActive
(
true
);
SpellTrapType
.
SetActive
(
true
);
IconSpellTrapType
.
sprite
=
TextureManager
.
container
.
GetCardSpellTrapTypeIcon
(
data
);
IconSpellTrapType
.
sprite
=
TextureManager
.
container
.
GetCardSpellTrapTypeIcon
(
data
);
TextSpellTrapType
.
text
TextSpellTrapType
.
text
=
StringHelper
.
SecondType
(
data
.
Type
)
+
StringHelper
.
MainType
(
data
.
Typ
e
);
=
data
.
GetSpellTrapType
(
tru
e
);
IconAtk
.
gameObject
.
SetActive
(
false
);
IconAtk
.
gameObject
.
SetActive
(
false
);
IconDef
.
gameObject
.
SetActive
(
false
);
IconDef
.
gameObject
.
SetActive
(
false
);
...
...
Assets/Scripts/MDPro3/UI/SelectionButton/SelectionButton_CardInCollection.cs
View file @
29f844aa
...
@@ -234,8 +234,7 @@ namespace MDPro3.UI
...
@@ -234,8 +234,7 @@ namespace MDPro3.UI
cardCollectionView
.
superScrollView
.
scrollRect
.
OnBeginDrag
(
eventData
);
cardCollectionView
.
superScrollView
.
scrollRect
.
OnBeginDrag
(
eventData
);
dragStartPosition
=
eventData
.
position
;
dragStartPosition
=
eventData
.
position
;
dragProcessing
=
true
;
dragProcessing
=
true
;
//draging = !DeckEditor.useMobileLayout;
draging
=
!
DeckEditor
.
UseMobileLayout
;
draging
=
false
;
dragIni
=
false
;
dragIni
=
false
;
}
}
...
@@ -357,4 +356,4 @@ namespace MDPro3.UI
...
@@ -357,4 +356,4 @@ namespace MDPro3.UI
#
endregion
#
endregion
}
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/UI/SelectionButton/SelectionToggle_AppearanceItem.cs
View file @
29f844aa
...
@@ -46,6 +46,7 @@ namespace MDPro3.UI
...
@@ -46,6 +46,7 @@ namespace MDPro3.UI
public
string
description
;
public
string
description
;
public
string
path
;
public
string
path
;
private
bool
loaded
;
private
bool
loaded
;
private
Material
protectorMaterial
;
private
Coroutine
refreshCoroutine
;
private
Coroutine
refreshCoroutine
;
private
Coroutine
hideCoroutine
;
private
Coroutine
hideCoroutine
;
...
@@ -71,8 +72,13 @@ namespace MDPro3.UI
...
@@ -71,8 +72,13 @@ namespace MDPro3.UI
if
(
path
.
StartsWith
(
"Protector"
))
if
(
path
.
StartsWith
(
"Protector"
))
{
{
Protector
.
material
=
await
ABLoader
.
LoadProtectorMaterial
(
itemID
.
ToString
(),
destroyCancellationToken
);
protectorMaterial
=
await
ABLoader
.
LoadProtectorMaterial
(
itemID
.
ToString
(),
destroyCancellationToken
);
Protector
.
material
.
renderQueue
=
3000
;
if
(
protectorMaterial
!=
null
)
protectorMaterial
.
renderQueue
=
3000
;
// Use default UI material for list rendering so viewport/mask clipping works while scrolling.
Protector
.
texture
=
protectorMaterial
==
null
?
null
:
protectorMaterial
.
mainTexture
;
Protector
.
material
=
null
;
Protector
.
color
=
Color
.
white
;
Protector
.
color
=
Color
.
white
;
Icon
.
gameObject
.
SetActive
(
false
);
Icon
.
gameObject
.
SetActive
(
false
);
}
}
...
@@ -150,7 +156,7 @@ namespace MDPro3.UI
...
@@ -150,7 +156,7 @@ namespace MDPro3.UI
{
{
DeckEditor
.
Deck
.
Protector
=
itemID
;
DeckEditor
.
Deck
.
Protector
=
itemID
;
Program
.
instance
.
deckEditor
.
GetUI
<
DeckEditorUI
>().
DeckView
.
SetDirty
(
true
);
Program
.
instance
.
deckEditor
.
GetUI
<
DeckEditorUI
>().
DeckView
.
SetDirty
(
true
);
Program
.
instance
.
deckEditor
.
GetUI
<
DeckEditorUI
>().
IconProtector
.
material
=
Protector
.
m
aterial
;
Program
.
instance
.
deckEditor
.
GetUI
<
DeckEditorUI
>().
IconProtector
.
material
=
protectorM
aterial
;
}
}
}
}
else
if
(
path
.
StartsWith
(
"FieldIcon"
))
else
if
(
path
.
StartsWith
(
"FieldIcon"
))
...
@@ -211,38 +217,38 @@ namespace MDPro3.UI
...
@@ -211,38 +217,38 @@ namespace MDPro3.UI
if
(
Appearance
.
player
==
"0"
)
if
(
Appearance
.
player
==
"0"
)
{
{
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
Appearance
.
duelProtector0
=
Protector
.
m
aterial
;
Appearance
.
duelProtector0
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
Appearance
.
watchProtector0
=
Protector
.
m
aterial
;
Appearance
.
watchProtector0
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
Appearance
.
replayProtector0
=
Protector
.
m
aterial
;
Appearance
.
replayProtector0
=
protectorM
aterial
;
}
}
else
if
(
Appearance
.
player
==
"1"
)
else
if
(
Appearance
.
player
==
"1"
)
{
{
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
Appearance
.
duelProtector1
=
Protector
.
m
aterial
;
Appearance
.
duelProtector1
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
Appearance
.
watchProtector1
=
Protector
.
m
aterial
;
Appearance
.
watchProtector1
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
Appearance
.
replayProtector1
=
Protector
.
m
aterial
;
Appearance
.
replayProtector1
=
protectorM
aterial
;
}
}
else
if
(
Appearance
.
player
==
"0Tag"
)
else
if
(
Appearance
.
player
==
"0Tag"
)
{
{
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
Appearance
.
duelProtector0Tag
=
Protector
.
m
aterial
;
Appearance
.
duelProtector0Tag
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
Appearance
.
watchProtector0Tag
=
Protector
.
m
aterial
;
Appearance
.
watchProtector0Tag
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
Appearance
.
replayProtector0Tag
=
Protector
.
m
aterial
;
Appearance
.
replayProtector0Tag
=
protectorM
aterial
;
}
}
else
if
(
Appearance
.
player
==
"1Tag"
)
else
if
(
Appearance
.
player
==
"1Tag"
)
{
{
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Duel
)
Appearance
.
duelProtector1Tag
=
Protector
.
m
aterial
;
Appearance
.
duelProtector1Tag
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Watch
)
Appearance
.
watchProtector1Tag
=
Protector
.
m
aterial
;
Appearance
.
watchProtector1Tag
=
protectorM
aterial
;
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
else
if
(
Appearance
.
condition
==
Appearance
.
Condition
.
Replay
)
Appearance
.
replayProtector1Tag
=
Protector
.
m
aterial
;
Appearance
.
replayProtector1Tag
=
protectorM
aterial
;
}
}
}
}
else
else
...
...
Assets/Scripts/MDPro3/UI/ServantUI/SettingServantUI.cs
View file @
29f844aa
...
@@ -547,6 +547,7 @@ namespace MDPro3.UI.ServantUI
...
@@ -547,6 +547,7 @@ namespace MDPro3.UI.ServantUI
public
override
void
Initialize
(
Servant
.
Servant
servant
)
public
override
void
Initialize
(
Servant
.
Servant
servant
)
{
{
base
.
Initialize
(
servant
);
base
.
Initialize
(
servant
);
ButtonRetry
.
SetClickEvent
(
OnRetry
);
InitializeVolume
();
InitializeVolume
();
InitializeScreenMode
();
InitializeScreenMode
();
...
@@ -609,7 +610,10 @@ namespace MDPro3.UI.ServantUI
...
@@ -609,7 +610,10 @@ namespace MDPro3.UI.ServantUI
ToggleWatch
.
gameObject
.
SetActive
(
false
);
ToggleWatch
.
gameObject
.
SetActive
(
false
);
ToggleReplay
.
gameObject
.
SetActive
(
false
);
ToggleReplay
.
gameObject
.
SetActive
(
false
);
ButtonRetry
.
gameObject
.
SetActive
(
false
);
var
canRetrySolo
=
RoomServant
.
FromSolo
;
ButtonRetry
.
gameObject
.
SetActive
(
canRetrySolo
);
if
(
canRetrySolo
)
ButtonRetry
.
SetButtonText
(
InterString
.
Get
(
"重试"
));
ButtonSurrender
.
gameObject
.
SetActive
(
true
);
ButtonSurrender
.
gameObject
.
SetActive
(
true
);
ButtonSurrender
.
SetButtonText
(
InterString
.
Get
(
"投降"
));
ButtonSurrender
.
SetButtonText
(
InterString
.
Get
(
"投降"
));
}
}
...
@@ -2387,6 +2391,17 @@ namespace MDPro3.UI.ServantUI
...
@@ -2387,6 +2391,17 @@ namespace MDPro3.UI.ServantUI
Program
.
instance
.
ocgcore
.
OnDuelResultConfirmed
(
true
);
Program
.
instance
.
ocgcore
.
OnDuelResultConfirmed
(
true
);
}
}
public
void
OnRetry
()
{
if
(
OcgCore
.
condition
!=
OcgCore
.
Condition
.
Duel
||
!
RoomServant
.
FromSolo
)
return
;
if
(!
Program
.
instance
.
solo
.
CanRetryLastSoloDuel
())
return
;
Program
.
instance
.
ocgcore
.
onSurrenderConfirmed
=
Program
.
instance
.
solo
.
QueueRetryLastSoloDuel
;
Program
.
instance
.
ocgcore
.
OnDuelResultConfirmed
(
true
);
}
}
}
public
partial
class
SROptions
public
partial
class
SROptions
...
@@ -2444,4 +2459,4 @@ namespace MDPro3.UI.ServantUI
...
@@ -2444,4 +2459,4 @@ namespace MDPro3.UI.ServantUI
}
}
}
}
}
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/UI/UIWidget/Deck/CardInfoDetail.cs
View file @
29f844aa
...
@@ -410,7 +410,7 @@ namespace MDPro3.UI
...
@@ -410,7 +410,7 @@ namespace MDPro3.UI
ParamatorAreaBottom
.
SetActive
(
false
);
ParamatorAreaBottom
.
SetActive
(
false
);
SpellTrapType
.
SetActive
(
true
);
SpellTrapType
.
SetActive
(
true
);
IconSpellTrapType
.
sprite
=
TextureManager
.
container
.
GetCardSpellTrapTypeIcon
(
data
);
IconSpellTrapType
.
sprite
=
TextureManager
.
container
.
GetCardSpellTrapTypeIcon
(
data
);
TextSpellTrapType
.
text
=
data
.
GetSpellTrapType
();
TextSpellTrapType
.
text
=
data
.
GetSpellTrapType
(
true
);
PoolGroup
.
SetParent
(
ParamatorAreaTop
.
transform
,
false
);
PoolGroup
.
SetParent
(
ParamatorAreaTop
.
transform
,
false
);
}
}
...
...
Assets/Scripts/MDPro3/UI/UIWidget/UIWidgetCardBase.cs
View file @
29f844aa
...
@@ -428,7 +428,7 @@ namespace MDPro3.UI
...
@@ -428,7 +428,7 @@ namespace MDPro3.UI
{
{
SpellTrapType
.
SetActive
(
true
);
SpellTrapType
.
SetActive
(
true
);
IconSpellTrapType
.
sprite
=
TextureManager
.
container
.
GetCardSpellTrapTypeIcon
(
data
);
IconSpellTrapType
.
sprite
=
TextureManager
.
container
.
GetCardSpellTrapTypeIcon
(
data
);
TextSpellTrapType
.
text
=
data
.
GetSpellTrapType
();
TextSpellTrapType
.
text
=
data
.
GetSpellTrapType
(
true
);
IconAtk
.
gameObject
.
SetActive
(
false
);
IconAtk
.
gameObject
.
SetActive
(
false
);
IconDef
.
gameObject
.
SetActive
(
false
);
IconDef
.
gameObject
.
SetActive
(
false
);
...
...
Assets/Scripts/YGOSharp/YGOSharp/Banlist.cs
View file @
29f844aa
...
@@ -7,6 +7,8 @@ namespace YGOSharp
...
@@ -7,6 +7,8 @@ namespace YGOSharp
public
IList
<
int
>
BannedIds
{
get
;
private
set
;
}
public
IList
<
int
>
BannedIds
{
get
;
private
set
;
}
public
IList
<
int
>
LimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
LimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
SemiLimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
SemiLimitedIds
{
get
;
private
set
;
}
public
IList
<
int
>
UnlimitedIds
{
get
;
private
set
;
}
public
bool
WhitelistOnly
{
get
;
private
set
;
}
public
uint
Hash
{
get
;
private
set
;
}
public
uint
Hash
{
get
;
private
set
;
}
public
Banlist
()
public
Banlist
()
...
@@ -14,6 +16,8 @@ namespace YGOSharp
...
@@ -14,6 +16,8 @@ namespace YGOSharp
BannedIds
=
new
List
<
int
>();
BannedIds
=
new
List
<
int
>();
LimitedIds
=
new
List
<
int
>();
LimitedIds
=
new
List
<
int
>();
SemiLimitedIds
=
new
List
<
int
>();
SemiLimitedIds
=
new
List
<
int
>();
UnlimitedIds
=
new
List
<
int
>();
WhitelistOnly
=
false
;
Hash
=
0x7dfcee6a
;
Hash
=
0x7dfcee6a
;
}
}
...
@@ -25,12 +29,22 @@ namespace YGOSharp
...
@@ -25,12 +29,22 @@ namespace YGOSharp
return
1
;
return
1
;
if
(
SemiLimitedIds
.
Contains
(
cardId
))
if
(
SemiLimitedIds
.
Contains
(
cardId
))
return
2
;
return
2
;
return
3
;
if
(
UnlimitedIds
.
Contains
(
cardId
))
return
3
;
return
WhitelistOnly
?
0
:
3
;
}
public
void
EnableWhitelistMode
()
{
if
(
WhitelistOnly
)
return
;
WhitelistOnly
=
true
;
Hash
^=
0x0f0f0f0f
;
}
}
public
void
Add
(
int
cardId
,
int
quantity
)
public
void
Add
(
int
cardId
,
int
quantity
)
{
{
if
(
quantity
<
0
||
quantity
>
2
)
if
(
quantity
<
0
||
quantity
>
3
)
return
;
return
;
switch
(
quantity
)
switch
(
quantity
)
{
{
...
@@ -43,9 +57,12 @@ namespace YGOSharp
...
@@ -43,9 +57,12 @@ namespace YGOSharp
case
2
:
case
2
:
SemiLimitedIds
.
Add
(
cardId
);
SemiLimitedIds
.
Add
(
cardId
);
break
;
break
;
case
3
:
UnlimitedIds
.
Add
(
cardId
);
break
;
}
}
uint
code
=
(
uint
)
cardId
;
uint
code
=
(
uint
)
cardId
;
Hash
=
Hash
^
((
code
<<
18
)
|
(
code
>>
14
))
^
((
code
<<
(
27
+
quantity
))
|
(
code
>>
(
5
-
quantity
)));
Hash
=
Hash
^
((
code
<<
18
)
|
(
code
>>
14
))
^
((
code
<<
(
27
+
quantity
))
|
(
code
>>
(
5
-
quantity
)));
}
}
}
}
}
}
\ No newline at end of file
Assets/Scripts/YGOSharp/YGOSharp/BanlistManager.cs
View file @
29f844aa
using
System.Collections.Generic
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
namespace
YGOSharp
namespace
YGOSharp
...
@@ -25,6 +26,12 @@ namespace YGOSharp
...
@@ -25,6 +26,12 @@ namespace YGOSharp
Banlists
.
Add
(
current
);
Banlists
.
Add
(
current
);
continue
;
continue
;
}
}
if
(
line
.
StartsWith
(
"$"
))
{
if
(
current
!=
null
&&
line
.
Equals
(
"$whitelist"
,
StringComparison
.
OrdinalIgnoreCase
))
current
.
EnableWhitelistMode
();
continue
;
}
if
(!
line
.
Contains
(
" "
))
if
(!
line
.
Contains
(
" "
))
continue
;
continue
;
if
(
current
==
null
)
if
(
current
==
null
)
...
@@ -44,4 +51,4 @@ namespace YGOSharp
...
@@ -44,4 +51,4 @@ namespace YGOSharp
return
0
;
return
0
;
}
}
}
}
}
}
\ No newline at end of file
Assets/Texture/GUI_Used/GUI_Duel_CardStats_Base_0.png
0 → 100644
View file @
29f844aa
1.32 KB
Assets/Texture/GUI_Used/GUI_Duel_CardStats_Base_0.png.meta
0 → 100644
View file @
29f844aa
fileFormatVersion: 2
guid: 5b696a850bf3a3443bf0e67396ecc181
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Default.png
0 → 100644
View file @
29f844aa
152 Bytes
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Default.png.meta
0 → 100644
View file @
29f844aa
fileFormatVersion: 2
guid: 9f9e97c267d35b84db512595c857ffba
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Expand.png
0 → 100644
View file @
29f844aa
208 Bytes
Assets/Texture/GUI_Used/GUI_Duel_GenericCardList_ViewIcon_Expand.png.meta
0 → 100644
View file @
29f844aa
fileFormatVersion: 2
guid: 838190b6b8c45334bab89da28a238150
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
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