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
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
Dark_Zane
MDPro3
Commits
ddb4b8f1
Commit
ddb4b8f1
authored
Apr 04, 2024
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SelectSum bug
parent
04980cd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
Assets/Scripts/MDPro3/Servants/OcgCore.cs
Assets/Scripts/MDPro3/Servants/OcgCore.cs
+5
-3
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCard.cs
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCard.cs
+18
-3
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCardItem.cs
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCardItem.cs
+2
-1
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+1
-1
No files found.
Assets/Scripts/MDPro3/Servants/OcgCore.cs
View file @
ddb4b8f1
...
...
@@ -4707,8 +4707,10 @@ namespace MDPro3
return
new
int
[]
{
sum1
,
sum2
};
}
public
static
bool
CheckSelectable
(
List
<
GameCard
>
cards
,
GameCard
card
,
List
<
GameCard
>
selectedCards
)
public
static
bool
CheckSelectable
(
List
<
GameCard
>
cards
,
GameCard
card
,
List
<
GameCard
>
selectedCards
,
int
max
)
{
if
(
selectedCards
.
Count
>=
max
)
return
false
;
bool
returnValue
=
false
;
var
sum
=
GetSelectLevelSum
(
selectedCards
);
if
(
sum
[
0
]
+
card
.
levelForSelect_1
==
Program
.
I
().
ocgcore
.
ES_level
||
sum
[
1
]
+
card
.
levelForSelect_2
==
Program
.
I
().
ocgcore
.
ES_level
)
...
...
@@ -4723,7 +4725,7 @@ namespace MDPro3
foreach
(
var
c
in
cards
)
if
(!
newSelectedCards
.
Contains
(
c
))
{
returnValue
=
CheckSelectable
(
cards
,
c
,
newSelectedCards
);
returnValue
=
CheckSelectable
(
cards
,
c
,
newSelectedCards
,
max
);
if
(
returnValue
)
return
true
;
}
...
...
@@ -5337,7 +5339,7 @@ namespace MDPro3
foreach
(
var
place
in
places
)
if
(
place
.
cardSelecting
)
if
(!
place
.
cardSelected
)
if
(
CheckSelectable
(
cardsInSelection
,
place
.
cookieCard
,
selected
))
if
(
CheckSelectable
(
cardsInSelection
,
place
.
cookieCard
,
selected
,
ES_max
))
place
.
CardInThisZoneSelectable
();
else
place
.
CardInThisZoneUnselectable
();
...
...
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCard.cs
View file @
ddb4b8f1
...
...
@@ -6,6 +6,7 @@ using UnityEngine;
using
UnityEngine.AddressableAssets
;
using
UnityEngine.UI
;
using
MDPro3.YGOSharp.OCGWrapper.Enums
;
using
YgomSystem.UI
;
namespace
MDPro3.UI
...
...
@@ -134,13 +135,27 @@ namespace MDPro3.UI
foreach
(
var
mono
in
monos
)
if
(!
mono
.
selected
)
if
(
OcgCore
.
CheckSelectable
(
Program
.
I
().
ocgcore
.
cardsInSelection
,
mono
.
card
,
selected
))
if
(
OcgCore
.
CheckSelectable
(
Program
.
I
().
ocgcore
.
cardsInSelection
,
mono
.
card
,
selected
,
max
))
mono
.
SelectableThis
();
else
mono
.
UnselectableThis
();
}
title
.
text
=
hint
+
"-"
+
OcgCore
.
GetSelectLevelSum
(
GetSelected
())[
0
].
ToString
()
+
"/"
+
core
.
ES_level
;
var
selectedSum
=
OcgCore
.
GetSelectLevelSum
(
GetSelected
());
if
(!
core
.
ES_overFlow
)
{
if
(
selectedSum
[
0
]
==
core
.
ES_level
||
selectedSum
[
1
]
==
core
.
ES_level
)
btnConfirm
.
GetComponent
<
ButtonPress
>().
SetInteractable
(
true
);
else
btnConfirm
.
GetComponent
<
ButtonPress
>().
SetInteractable
(
false
);
}
else
{
if
(
selectedSum
[
0
]
>
core
.
ES_level
||
selectedSum
[
1
]
>
core
.
ES_level
)
btnConfirm
.
GetComponent
<
ButtonPress
>().
SetInteractable
(
true
);
else
btnConfirm
.
GetComponent
<
ButtonPress
>().
SetInteractable
(
false
);
}
title
.
text
=
hint
+
"-"
+
selectedSum
[
0
].
ToString
()
+
"/"
+
core
.
ES_level
;
}
else
{
...
...
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCardItem.cs
View file @
ddb4b8f1
...
...
@@ -125,7 +125,6 @@ namespace MDPro3.UI
void
OnClick
()
{
AudioManager
.
PlaySE
(
"SE_MENU_SELECT_01"
);
if
((
card
.
p
.
location
&
(
uint
)
CardLocation
.
Onfield
)
>
0
&&
(
card
.
p
.
location
&
(
uint
)
CardLocation
.
Overlay
)
==
0
)
{
...
...
@@ -143,6 +142,7 @@ namespace MDPro3.UI
}
Program
.
I
().
ocgcore
.
description
.
Show
(
card
,
cardFace
.
material
);
if
(
selected
)
{
if
(!
unselectable
)
...
...
@@ -176,6 +176,7 @@ namespace MDPro3.UI
}
}
}
}
void
SelectThis
()
...
...
ProjectSettings/ProjectSettings.asset
View file @
ddb4b8f1
...
...
@@ -134,7 +134,7 @@ PlayerSettings:
16:10:
1
16:9:
1
Others
:
1
bundleVersion
:
1.0.
2.1
bundleVersion
:
1.0.
3
preloadedAssets
:
-
{
fileID
:
11400000
,
guid
:
5fb02d2098f52054b89ce4a9f63ba9ee
,
type
:
2
}
metroInputSource
:
0
...
...
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