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
Show 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
Logger
.
DebugWriteLine
(
"EvenlyMatched: min="
+
min
.
ToString
()
+
", max="
+
max
.
ToString
());
}
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
;
Logger
.
DebugWriteLine
(
"Hand drop except OneForOne"
);
...
...
Game/AI/Decks/LuckyExecutor.cs
View file @
6e28da11
...
...
@@ -67,8 +67,8 @@ namespace WindBot.Game.AI.Decks
public
List
<
int
>
REMOVE_HINTMSG
=
new
List
<
int
>
{
HintMsg
.
HINTMSG_RELEASE
,
HintMsg
.
HINTMSG_DESTROY
,
HintMsg
.
HINTMSG_REMOVE
,
HintMsg
.
HINTMSG_TOGRAVE
,
HintMsg
.
HINTMSG_RTOHAND
,
HintMsg
.
HINTMSG_TODECK
,
HintMsg
.
HINTMSG_DISABLE
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Disable
};
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
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
// Patronus
if
(
hint
==
HintMsg
.
HINTMSG_ATOHAND
)
if
(
hint
==
HintMsg
.
AddToHand
)
{
bool
flag
=
true
;
foreach
(
ClientCard
card
in
cards
)
...
...
@@ -335,7 +335,7 @@ namespace WindBot.Game.AI.Decks
}
}
// 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
bool
flag
=
true
;
...
...
@@ -393,7 +393,7 @@ namespace WindBot.Game.AI.Decks
}
}
// MadameVerre
if
(
hint
==
HintMsg
.
HINTMSG_CONFIRM
)
if
(
hint
==
HintMsg
.
Confirm
)
{
Logger
.
DebugWriteLine
(
"** min-max: "
+
min
.
ToString
()
+
" / "
+
max
.
ToString
());
foreach
(
ClientCard
card
in
cards
)
...
...
Game/AI/HintMsg.cs
View file @
6e28da11
...
...
@@ -2,61 +2,61 @@
{
public
static
class
HintMsg
{
public
const
int
HINTMSG_RELEASE
=
500
,
HINTMSG_DISCARD
=
501
,
HINTMSG_DESTROY
=
502
,
HINTMSG_REMOVE
=
503
,
HINTMSG_TOGRAVE
=
504
,
HINTMSG_RTOHAND
=
505
,
HINTMSG_ATOHAND
=
506
,
HINTMSG_TODECK
=
507
,
HINTMSG_SUMMON
=
508
,
HINTMSG_SPSUMMON
=
509
,
HINTMSG_SET
=
510
,
HINTMSG_FMATERIAL
=
511
,
HINTMSG_SMATERIAL
=
512
,
HINTMSG_XMATERIAL
=
513
,
HINTMSG_FACEUP
=
514
,
HINTMSG_FACEDOWN
=
515
,
HINTMSG_ATTACK
=
516
,
HINTMSG_DEFENSE
=
517
,
HINTMSG_EQUIP
=
518
,
HINTMSG_REMOVEXYZ
=
519
,
HINTMSG_CONTROL
=
520
,
HINTMSG_DESREPLACE
=
521
,
HINTMSG_FACEUPATTACK
=
522
,
HINTMSG_FACEUPDEFENSE
=
523
,
HINTMSG_FACEDOWNATTACK
=
524
,
HINTMSG_FACEDOWNDEFENSE
=
525
,
HINTMSG_CONFIRM
=
526
,
HINTMSG_TOFIELD
=
527
,
HINTMSG_POSCHANGE
=
528
,
HINTMSG_SELF
=
529
,
HINTMSG_OPPO
=
530
,
HINTMSG_TRIBUTE
=
531
,
HINTMSG_DEATTACHFROM
=
532
,
HINTMSG_LMATERIAL
=
533
,
HINTMSG_ATTACKTARGET
=
549
,
HINTMSG_EFFECT
=
550
,
HINTMSG_TARGET
=
551
,
HINTMSG_COIN
=
552
,
HINTMSG_DICE
=
553
,
HINTMSG_CARDTYPE
=
554
,
HINTMSG_OPTION
=
555
,
HINTMSG_RESOLVEEFFECT
=
556
,
HINTMSG_SELECT
=
560
,
HINTMSG_POSITION
=
561
,
HINTMSG_ATTRIBUTE
=
562
,
HINTMSG_RACE
=
563
,
HINTMSG_CODE
=
564
,
HINGMSG_NUMBER
=
565
,
HINGMSG_LVRANK
=
567
,
HINTMSG_RESOLVECARD
=
568
,
HINTMSG_ZONE
=
569
,
HINTMSG_DISABLEZONE
=
570
,
HINTMSG_TOZONE
=
571
,
HINTMSG_COUNTER
=
572
,
HINTMSG_DISABLE
=
573
,
HINTMSG_OPERATECARD
=
574
;
public
const
int
Release
=
500
,
Discard
=
501
,
Destroy
=
502
,
Remove
=
503
,
ToGrave
=
504
,
ReturnToHand
=
505
,
AddToHand
=
506
,
ToDeck
=
507
,
Summon
=
508
,
SpSummon
=
509
,
Set
=
510
,
FusionMaterial
=
511
,
SynchroMaterial
=
512
,
XyzMaterial
=
513
,
Faceup
=
514
,
Facedown
=
515
,
Attack
=
516
,
Defense
=
517
,
Equip
=
518
,
RemoveXyz
=
519
,
Control
=
520
,
DestroyReplace
=
521
,
FaceupAttack
=
522
,
FaceupDefense
=
523
,
FacedownAttack
=
524
,
FacedownDefense
=
525
,
Confirm
=
526
,
ToField
=
527
,
PosChange
=
528
,
Self
=
529
,
Oppo
=
530
,
Tribute
=
531
,
DeattachFrom
=
532
,
LinkMaterial
=
533
,
AttackTarget
=
549
,
Effect
=
550
,
Target
=
551
,
Coin
=
552
,
Dice
=
553
,
CardType
=
554
,
Option
=
555
,
ResolveEffect
=
556
,
Select
=
560
,
Position
=
561
,
Attribute
=
562
,
Race
=
563
,
Code
=
564
,
Number
=
565
,
LvRank
=
567
,
ResolveCard
=
568
,
Zone
=
569
,
DisableZone
=
570
,
ToZone
=
571
,
Counter
=
572
,
Disable
=
573
,
OperateCard
=
574
;
}
}
\ No newline at end of file
Game/GameAI.cs
View file @
6e28da11
...
...
@@ -231,18 +231,12 @@ namespace WindBot.Game
/// <returns>A new list containing the selected cards.</returns>
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.
IList
<
ClientCard
>
result
=
Executor
.
OnSelectCard
(
cards
,
min
,
max
,
hint
,
cancelable
);
if
(
result
!=
null
)
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
);
if
(
result
!=
null
)
...
...
@@ -250,7 +244,7 @@ namespace WindBot.Game
}
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
)
{
...
...
@@ -259,13 +253,13 @@ namespace WindBot.Game
}
else
{
if
(
hint
==
H
INTMSG_FMATERIAL
)
if
(
hint
==
H
intMsg
.
FusionMaterial
)
result
=
Executor
.
OnSelectFusionMaterial
(
cards
,
min
,
max
);
if
(
hint
==
H
INTMSG_SMATERIAL
)
if
(
hint
==
H
intMsg
.
SynchroMaterial
)
result
=
Executor
.
OnSelectSynchroMaterial
(
cards
,
0
,
min
,
max
);
if
(
hint
==
H
INTMSG_XMATERIAL
)
if
(
hint
==
H
intMsg
.
XyzMaterial
)
result
=
Executor
.
OnSelectXyzMaterial
(
cards
,
min
,
max
);
if
(
hint
==
H
INTMSG_LMATERIAL
)
if
(
hint
==
H
intMsg
.
LinkMaterial
)
result
=
Executor
.
OnSelectLinkMaterial
(
cards
,
min
,
max
);
if
(
result
!=
null
)
...
...
@@ -533,16 +527,13 @@ namespace WindBot.Game
/// <returns></returns>
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
);
if
(
selected
!=
null
)
{
return
selected
;
}
if
(
hint
==
H
INTMSG_RELEASE
||
hint
==
HINTMSG_SMATERIAL
)
if
(
hint
==
H
intMsg
.
Release
||
hint
==
HintMsg
.
SynchroMaterial
)
{
if
(
m_materialSelector
!=
null
)
{
...
...
@@ -552,10 +543,10 @@ namespace WindBot.Game
{
switch
(
hint
)
{
case
H
INTMSG_SMATERIAL
:
case
H
intMsg
.
SynchroMaterial
:
selected
=
Executor
.
OnSelectSynchroMaterial
(
cards
,
sum
,
min
,
max
);
break
;
case
H
INTMSG_RELEASE
:
case
H
intMsg
.
Release
:
selected
=
Executor
.
OnSelectRitualTribute
(
cards
,
sum
,
min
,
max
);
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