Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
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
windbot
Commits
6e28da11
Commit
6e28da11
authored
Mar 18, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update HintMsg
parent
f193f1f9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
80 deletions
+71
-80
Game/AI/Decks/AltergeistExecutor.cs
Game/AI/Decks/AltergeistExecutor.cs
+1
-1
Game/AI/Decks/LuckyExecutor.cs
Game/AI/Decks/LuckyExecutor.cs
+2
-2
Game/AI/Decks/WitchcraftExecutor.cs
Game/AI/Decks/WitchcraftExecutor.cs
+3
-3
Game/AI/HintMsg.cs
Game/AI/HintMsg.cs
+56
-56
Game/GameAI.cs
Game/GameAI.cs
+9
-18
No files found.
Game/AI/Decks/AltergeistExecutor.cs
View file @
6e28da11
...
@@ -2762,7 +2762,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -2762,7 +2762,7 @@ namespace WindBot.Game.AI.Decks
Logger
.
DebugWriteLine
(
"EvenlyMatched: min="
+
min
.
ToString
()
+
", max="
+
max
.
ToString
());
Logger
.
DebugWriteLine
(
"EvenlyMatched: min="
+
min
.
ToString
()
+
", max="
+
max
.
ToString
());
}
}
else
if
(
cards
[
0
].
Location
==
CardLocation
.
Hand
&&
cards
[
cards
.
Count
-
1
].
Location
==
CardLocation
.
Hand
else
if
(
cards
[
0
].
Location
==
CardLocation
.
Hand
&&
cards
[
cards
.
Count
-
1
].
Location
==
CardLocation
.
Hand
&&
(
hint
==
HintMsg
.
HINTMSG_DISCARD
||
hint
==
HintMsg
.
HINTMSG_TOGRAVE
)
&&
min
==
max
)
&&
(
hint
==
HintMsg
.
Discard
||
hint
==
HintMsg
.
ToGrave
)
&&
min
==
max
)
{
{
if
(
Duel
.
LastChainPlayer
==
0
&&
Util
.
GetLastChainCard
().
IsCode
(
CardId
.
OneForOne
))
return
null
;
if
(
Duel
.
LastChainPlayer
==
0
&&
Util
.
GetLastChainCard
().
IsCode
(
CardId
.
OneForOne
))
return
null
;
Logger
.
DebugWriteLine
(
"Hand drop except OneForOne"
);
Logger
.
DebugWriteLine
(
"Hand drop except OneForOne"
);
...
...
Game/AI/Decks/LuckyExecutor.cs
View file @
6e28da11
...
@@ -67,8 +67,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -67,8 +67,8 @@ namespace WindBot.Game.AI.Decks
public
List
<
int
>
REMOVE_HINTMSG
=
new
List
<
int
>
public
List
<
int
>
REMOVE_HINTMSG
=
new
List
<
int
>
{
{
HintMsg
.
HINTMSG_RELEASE
,
HintMsg
.
HINTMSG_DESTROY
,
HintMsg
.
HINTMSG_REMOVE
,
HintMsg
.
HINTMSG_TOGRAVE
,
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
HINTMSG_RTOHAND
,
HintMsg
.
HINTMSG_TODECK
,
HintMsg
.
HINTMSG_DISABLE
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Disable
};
};
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
...
...
Game/AI/Decks/WitchcraftExecutor.cs
View file @
6e28da11
...
@@ -310,7 +310,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -310,7 +310,7 @@ namespace WindBot.Game.AI.Decks
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
{
// Patronus
// Patronus
if
(
hint
==
HintMsg
.
HINTMSG_ATOHAND
)
if
(
hint
==
HintMsg
.
AddToHand
)
{
{
bool
flag
=
true
;
bool
flag
=
true
;
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
...
@@ -335,7 +335,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -335,7 +335,7 @@ namespace WindBot.Game.AI.Decks
}
}
}
}
// MaxxC solution
// MaxxC solution
if
(
hint
==
HintMsg
.
HINTMSG_SPSUMMON
&&
enemy_activate_MaxxC
)
if
(
hint
==
HintMsg
.
SpSummon
&&
enemy_activate_MaxxC
)
{
{
// check whether SS from deck while using effect
// check whether SS from deck while using effect
bool
flag
=
true
;
bool
flag
=
true
;
...
@@ -393,7 +393,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -393,7 +393,7 @@ namespace WindBot.Game.AI.Decks
}
}
}
}
// MadameVerre
// MadameVerre
if
(
hint
==
HintMsg
.
HINTMSG_CONFIRM
)
if
(
hint
==
HintMsg
.
Confirm
)
{
{
Logger
.
DebugWriteLine
(
"** min-max: "
+
min
.
ToString
()
+
" / "
+
max
.
ToString
());
Logger
.
DebugWriteLine
(
"** min-max: "
+
min
.
ToString
()
+
" / "
+
max
.
ToString
());
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
...
...
Game/AI/HintMsg.cs
View file @
6e28da11
...
@@ -2,61 +2,61 @@
...
@@ -2,61 +2,61 @@
{
{
public
static
class
HintMsg
public
static
class
HintMsg
{
{
public
const
int
HINTMSG_RELEASE
=
500
,
public
const
int
Release
=
500
,
HINTMSG_DISCARD
=
501
,
Discard
=
501
,
HINTMSG_DESTROY
=
502
,
Destroy
=
502
,
HINTMSG_REMOVE
=
503
,
Remove
=
503
,
HINTMSG_TOGRAVE
=
504
,
ToGrave
=
504
,
HINTMSG_RTOHAND
=
505
,
ReturnToHand
=
505
,
HINTMSG_ATOHAND
=
506
,
AddToHand
=
506
,
HINTMSG_TODECK
=
507
,
ToDeck
=
507
,
HINTMSG_SUMMON
=
508
,
Summon
=
508
,
HINTMSG_SPSUMMON
=
509
,
SpSummon
=
509
,
HINTMSG_SET
=
510
,
Set
=
510
,
HINTMSG_FMATERIAL
=
511
,
FusionMaterial
=
511
,
HINTMSG_SMATERIAL
=
512
,
SynchroMaterial
=
512
,
HINTMSG_XMATERIAL
=
513
,
XyzMaterial
=
513
,
HINTMSG_FACEUP
=
514
,
Faceup
=
514
,
HINTMSG_FACEDOWN
=
515
,
Facedown
=
515
,
HINTMSG_ATTACK
=
516
,
Attack
=
516
,
HINTMSG_DEFENSE
=
517
,
Defense
=
517
,
HINTMSG_EQUIP
=
518
,
Equip
=
518
,
HINTMSG_REMOVEXYZ
=
519
,
RemoveXyz
=
519
,
HINTMSG_CONTROL
=
520
,
Control
=
520
,
HINTMSG_DESREPLACE
=
521
,
DestroyReplace
=
521
,
HINTMSG_FACEUPATTACK
=
522
,
FaceupAttack
=
522
,
HINTMSG_FACEUPDEFENSE
=
523
,
FaceupDefense
=
523
,
HINTMSG_FACEDOWNATTACK
=
524
,
FacedownAttack
=
524
,
HINTMSG_FACEDOWNDEFENSE
=
525
,
FacedownDefense
=
525
,
HINTMSG_CONFIRM
=
526
,
Confirm
=
526
,
HINTMSG_TOFIELD
=
527
,
ToField
=
527
,
HINTMSG_POSCHANGE
=
528
,
PosChange
=
528
,
HINTMSG_SELF
=
529
,
Self
=
529
,
HINTMSG_OPPO
=
530
,
Oppo
=
530
,
HINTMSG_TRIBUTE
=
531
,
Tribute
=
531
,
HINTMSG_DEATTACHFROM
=
532
,
DeattachFrom
=
532
,
HINTMSG_LMATERIAL
=
533
,
LinkMaterial
=
533
,
HINTMSG_ATTACKTARGET
=
549
,
AttackTarget
=
549
,
HINTMSG_EFFECT
=
550
,
Effect
=
550
,
HINTMSG_TARGET
=
551
,
Target
=
551
,
HINTMSG_COIN
=
552
,
Coin
=
552
,
HINTMSG_DICE
=
553
,
Dice
=
553
,
HINTMSG_CARDTYPE
=
554
,
CardType
=
554
,
HINTMSG_OPTION
=
555
,
Option
=
555
,
HINTMSG_RESOLVEEFFECT
=
556
,
ResolveEffect
=
556
,
HINTMSG_SELECT
=
560
,
Select
=
560
,
HINTMSG_POSITION
=
561
,
Position
=
561
,
HINTMSG_ATTRIBUTE
=
562
,
Attribute
=
562
,
HINTMSG_RACE
=
563
,
Race
=
563
,
HINTMSG_CODE
=
564
,
Code
=
564
,
HINGMSG_NUMBER
=
565
,
Number
=
565
,
HINGMSG_LVRANK
=
567
,
LvRank
=
567
,
HINTMSG_RESOLVECARD
=
568
,
ResolveCard
=
568
,
HINTMSG_ZONE
=
569
,
Zone
=
569
,
HINTMSG_DISABLEZONE
=
570
,
DisableZone
=
570
,
HINTMSG_TOZONE
=
571
,
ToZone
=
571
,
HINTMSG_COUNTER
=
572
,
Counter
=
572
,
HINTMSG_DISABLE
=
573
,
Disable
=
573
,
HINTMSG_OPERATECARD
=
574
;
OperateCard
=
574
;
}
}
}
}
\ No newline at end of file
Game/GameAI.cs
View file @
6e28da11
...
@@ -231,18 +231,12 @@ namespace WindBot.Game
...
@@ -231,18 +231,12 @@ namespace WindBot.Game
/// <returns>A new list containing the selected cards.</returns>
/// <returns>A new list containing the selected cards.</returns>
public
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
public
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
{
const
int
HINTMSG_FMATERIAL
=
511
;
const
int
HINTMSG_SMATERIAL
=
512
;
const
int
HINTMSG_XMATERIAL
=
513
;
const
int
HINTMSG_LMATERIAL
=
533
;
const
int
HINTMSG_SPSUMMON
=
509
;
// Check for the executor.
// Check for the executor.
IList
<
ClientCard
>
result
=
Executor
.
OnSelectCard
(
cards
,
min
,
max
,
hint
,
cancelable
);
IList
<
ClientCard
>
result
=
Executor
.
OnSelectCard
(
cards
,
min
,
max
,
hint
,
cancelable
);
if
(
result
!=
null
)
if
(
result
!=
null
)
return
result
;
return
result
;
if
(
hint
==
H
INTMSG_SPSUMMON
&&
min
==
1
&&
max
>
min
)
// pendulum summon
if
(
hint
==
H
intMsg
.
SpSummon
&&
min
==
1
&&
max
>
min
)
// pendulum summon
{
{
result
=
Executor
.
OnSelectPendulumSummon
(
cards
,
max
);
result
=
Executor
.
OnSelectPendulumSummon
(
cards
,
max
);
if
(
result
!=
null
)
if
(
result
!=
null
)
...
@@ -250,7 +244,7 @@ namespace WindBot.Game
...
@@ -250,7 +244,7 @@ namespace WindBot.Game
}
}
CardSelector
selector
=
null
;
CardSelector
selector
=
null
;
if
(
hint
==
H
INTMSG_FMATERIAL
||
hint
==
HINTMSG_SMATERIAL
||
hint
==
HINTMSG_XMATERIAL
||
hint
==
HINTMSG_LMATERIAL
)
if
(
hint
==
H
intMsg
.
FusionMaterial
||
hint
==
HintMsg
.
SynchroMaterial
||
hint
==
HintMsg
.
XyzMaterial
||
hint
==
HintMsg
.
LinkMaterial
)
{
{
if
(
m_materialSelector
!=
null
)
if
(
m_materialSelector
!=
null
)
{
{
...
@@ -259,13 +253,13 @@ namespace WindBot.Game
...
@@ -259,13 +253,13 @@ namespace WindBot.Game
}
}
else
else
{
{
if
(
hint
==
H
INTMSG_FMATERIAL
)
if
(
hint
==
H
intMsg
.
FusionMaterial
)
result
=
Executor
.
OnSelectFusionMaterial
(
cards
,
min
,
max
);
result
=
Executor
.
OnSelectFusionMaterial
(
cards
,
min
,
max
);
if
(
hint
==
H
INTMSG_SMATERIAL
)
if
(
hint
==
H
intMsg
.
SynchroMaterial
)
result
=
Executor
.
OnSelectSynchroMaterial
(
cards
,
0
,
min
,
max
);
result
=
Executor
.
OnSelectSynchroMaterial
(
cards
,
0
,
min
,
max
);
if
(
hint
==
H
INTMSG_XMATERIAL
)
if
(
hint
==
H
intMsg
.
XyzMaterial
)
result
=
Executor
.
OnSelectXyzMaterial
(
cards
,
min
,
max
);
result
=
Executor
.
OnSelectXyzMaterial
(
cards
,
min
,
max
);
if
(
hint
==
H
INTMSG_LMATERIAL
)
if
(
hint
==
H
intMsg
.
LinkMaterial
)
result
=
Executor
.
OnSelectLinkMaterial
(
cards
,
min
,
max
);
result
=
Executor
.
OnSelectLinkMaterial
(
cards
,
min
,
max
);
if
(
result
!=
null
)
if
(
result
!=
null
)
...
@@ -533,16 +527,13 @@ namespace WindBot.Game
...
@@ -533,16 +527,13 @@ namespace WindBot.Game
/// <returns></returns>
/// <returns></returns>
public
IList
<
ClientCard
>
OnSelectSum
(
IList
<
ClientCard
>
cards
,
int
sum
,
int
min
,
int
max
,
int
hint
,
bool
mode
)
public
IList
<
ClientCard
>
OnSelectSum
(
IList
<
ClientCard
>
cards
,
int
sum
,
int
min
,
int
max
,
int
hint
,
bool
mode
)
{
{
const
int
HINTMSG_RELEASE
=
500
;
const
int
HINTMSG_SMATERIAL
=
512
;
IList
<
ClientCard
>
selected
=
Executor
.
OnSelectSum
(
cards
,
sum
,
min
,
max
,
hint
,
mode
);
IList
<
ClientCard
>
selected
=
Executor
.
OnSelectSum
(
cards
,
sum
,
min
,
max
,
hint
,
mode
);
if
(
selected
!=
null
)
if
(
selected
!=
null
)
{
{
return
selected
;
return
selected
;
}
}
if
(
hint
==
H
INTMSG_RELEASE
||
hint
==
HINTMSG_SMATERIAL
)
if
(
hint
==
H
intMsg
.
Release
||
hint
==
HintMsg
.
SynchroMaterial
)
{
{
if
(
m_materialSelector
!=
null
)
if
(
m_materialSelector
!=
null
)
{
{
...
@@ -552,10 +543,10 @@ namespace WindBot.Game
...
@@ -552,10 +543,10 @@ namespace WindBot.Game
{
{
switch
(
hint
)
switch
(
hint
)
{
{
case
H
INTMSG_SMATERIAL
:
case
H
intMsg
.
SynchroMaterial
:
selected
=
Executor
.
OnSelectSynchroMaterial
(
cards
,
sum
,
min
,
max
);
selected
=
Executor
.
OnSelectSynchroMaterial
(
cards
,
sum
,
min
,
max
);
break
;
break
;
case
H
INTMSG_RELEASE
:
case
H
intMsg
.
Release
:
selected
=
Executor
.
OnSelectRitualTribute
(
cards
,
sum
,
min
,
max
);
selected
=
Executor
.
OnSelectRitualTribute
(
cards
,
sum
,
min
,
max
);
break
;
break
;
}
}
...
...
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