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
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
xiaoye
windbot
Commits
2ce621d4
Commit
2ce621d4
authored
Apr 20, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into master
parents
d5784eaf
6ce35045
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
105 additions
and
15 deletions
+105
-15
.github/workflows/test-build.yml
.github/workflows/test-build.yml
+4
-4
Game/AI/Decks/AltergeistExecutor.cs
Game/AI/Decks/AltergeistExecutor.cs
+10
-0
Game/AI/Decks/DogmatikaExecutor.cs
Game/AI/Decks/DogmatikaExecutor.cs
+10
-0
Game/AI/Decks/ExosisterExecutor.cs
Game/AI/Decks/ExosisterExecutor.cs
+10
-0
Game/AI/Decks/SuperheavySamuraiExecutor.cs
Game/AI/Decks/SuperheavySamuraiExecutor.cs
+1
-1
Game/AI/Decks/SwordsoulExecutor.cs
Game/AI/Decks/SwordsoulExecutor.cs
+9
-0
Game/AI/Decks/TrickstarExecutor.cs
Game/AI/Decks/TrickstarExecutor.cs
+10
-0
Game/AI/Decks/WitchcraftExecutor.cs
Game/AI/Decks/WitchcraftExecutor.cs
+10
-0
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+39
-10
Game/GameBehavior.cs
Game/GameBehavior.cs
+2
-0
sqlite3.dll
sqlite3.dll
+0
-0
No files found.
.github/workflows/test-build.yml
View file @
2ce621d4
...
...
@@ -15,12 +15,12 @@ jobs:
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v
3
uses
:
actions/checkout@v
4
with
:
fetch-depth
:
0
-
name
:
Setup MSBuild.exe
uses
:
microsoft/setup-msbuild@v
1
uses
:
microsoft/setup-msbuild@v
2
-
name
:
Build!
run
:
msbuild $env:Solution_Name /t:Build /p:Configuration=Release
...
...
@@ -36,7 +36,7 @@ jobs:
cd ..
-
name
:
Upload build artifacts
uses
:
actions/upload-artifact@v
3
uses
:
actions/upload-artifact@v
4
with
:
path
:
dist\WindBot.7z
...
...
@@ -46,7 +46,7 @@ jobs:
with
:
repo_token
:
"
${{
secrets.GITHUB_TOKEN
}}"
automatic_release_tag
:
"
latest"
prerelease
:
tru
e
prerelease
:
fals
e
title
:
"
Development
Build"
files
:
|
dist/WindBot.7z
Game/AI/Decks/AltergeistExecutor.cs
View file @
2ce621d4
...
...
@@ -2916,5 +2916,15 @@ namespace WindBot.Game.AI.Decks
}
return
base
.
OnSelectPlace
(
cardId
,
player
,
location
,
available
);
}
protected
override
bool
DefaultSetForDiabellze
()
{
if
(
base
.
DefaultSetForDiabellze
())
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
return
true
;
}
return
false
;
}
}
}
\ No newline at end of file
Game/AI/Decks/DogmatikaExecutor.cs
View file @
2ce621d4
...
...
@@ -2888,5 +2888,15 @@ namespace WindBot.Game.AI.Decks
return
false
;
}
protected
override
bool
DefaultSetForDiabellze
()
{
if
(
base
.
DefaultSetForDiabellze
())
{
SelectSTPlace
(
null
,
true
);
return
true
;
}
return
false
;
}
}
}
\ No newline at end of file
Game/AI/Decks/ExosisterExecutor.cs
View file @
2ce621d4
...
...
@@ -2976,5 +2976,15 @@ namespace WindBot.Game.AI.Decks
return
false
;
}
protected
override
bool
DefaultSetForDiabellze
()
{
if
(
base
.
DefaultSetForDiabellze
())
{
SelectSTPlace
(
null
,
true
);
return
true
;
}
return
false
;
}
}
}
\ No newline at end of file
Game/AI/Decks/SuperheavySamuraiExecutor.cs
View file @
2ce621d4
...
...
@@ -1007,7 +1007,7 @@ namespace WindBot.Game.AI.Decks
materials
.
Add
(
Bot
.
MonsterZone
[
6
]);
linkchk
=
true
;
}
else
if
(
Bot
.
MonsterZone
[
5
]
!=
null
&&
Bot
.
MonsterZone
[
5
].
Controller
==
0
&&
Bot
.
MonsterZone
[
5
].
Id
!=
CardId
.
Scarecrow
&&
!
FinalCards
(
Bot
.
MonsterZone
[
6
].
Id
))
else
if
(
Bot
.
MonsterZone
[
5
]
!=
null
&&
Bot
.
MonsterZone
[
5
].
Controller
==
0
&&
Bot
.
MonsterZone
[
5
].
Id
!=
CardId
.
Scarecrow
&&
!
FinalCards
(
Bot
.
MonsterZone
[
5
].
Id
))
{
materials
.
Add
(
Bot
.
MonsterZone
[
5
]);
linkchk
=
true
;
...
...
Game/AI/Decks/SwordsoulExecutor.cs
View file @
2ce621d4
...
...
@@ -3105,5 +3105,14 @@ namespace WindBot.Game.AI.Decks
return
false
;
}
protected
override
bool
DefaultSetForDiabellze
()
{
if
(
base
.
DefaultSetForDiabellze
())
{
SelectSTPlace
(
null
,
true
);
return
true
;
}
return
false
;
}
}
}
\ No newline at end of file
Game/AI/Decks/TrickstarExecutor.cs
View file @
2ce621d4
...
...
@@ -1823,5 +1823,15 @@ namespace WindBot.Game.AI.Decks
}
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
protected
override
bool
DefaultSetForDiabellze
()
{
if
(
base
.
DefaultSetForDiabellze
())
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
return
true
;
}
return
false
;
}
}
}
Game/AI/Decks/WitchcraftExecutor.cs
View file @
2ce621d4
...
...
@@ -2899,5 +2899,15 @@ namespace WindBot.Game.AI.Decks
}
return
false
;
}
protected
override
bool
DefaultSetForDiabellze
()
{
if
(
base
.
DefaultSetForDiabellze
())
{
SelectSTPlace
(
null
,
true
);
return
true
;
}
return
false
;
}
}
}
\ No newline at end of file
Game/AI/DefaultExecutor.cs
View file @
2ce621d4
...
...
@@ -192,6 +192,9 @@ namespace WindBot.Game.AI
public
const
int
NovoxTheSilenforcerDisciple
=
25801745
;
public
const
int
SilenforcingBarrier
=
98477480
;
public
const
int
DiabellzeOfTheOriginalSin
=
53765052
;
public
const
int
PotOfExtravagance
=
49238328
;
}
protected
class
_Setcode
...
...
@@ -224,6 +227,7 @@ namespace WindBot.Game.AI
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
VaylantzWorld_ShinraBansho
,
DefaultVaylantzWorld_ShinraBansho
);
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
VaylantzWorld_KonigWissen
,
DefaultVaylantzWorld_KonigWissen
);
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
SantaClaws
);
AddExecutor
(
ExecutorType
.
SpellSet
,
DefaultSetForDiabellze
);
}
protected
int
lightningStormOption
=
-
1
;
...
...
@@ -343,7 +347,7 @@ namespace WindBot.Game.AI
if
(
defender
.
IsMonsterDangerous
())
{
bool
canIgnoreIt
=
!
attacker
.
IsDisabled
()
&&
(
attacker
.
IsCode
(
_CardId
.
UltimateConductorTytanno
)
&&
defender
.
IsDefense
()
||
attacker
.
IsCode
(
_CardId
.
UltimateConductorTytanno
)
&&
defender
.
IsDefense
()
||
attacker
.
IsCode
(
_CardId
.
ElShaddollConstruct
)
&&
defender
.
IsSpecialSummoned
||
attacker
.
IsCode
(
_CardId
.
AllyOfJusticeCatastor
)
&&
!
defender
.
HasAttribute
(
CardAttribute
.
Dark
));
if
(!
canIgnoreIt
)
...
...
@@ -385,7 +389,7 @@ namespace WindBot.Game.AI
if
(
attacker
.
IsMonsterInvincible
())
attacker
.
RealPower
=
9999
;
if
(
attacker
.
EquipCards
.
Any
(
equip
=>
equip
.
IsCode
(
_CardId
.
MoonMirrorShield
)
&&
!
equip
.
IsDisabled
()))
attacker
.
RealPower
=
defender
.
RealPower
+
100
;
}
...
...
@@ -419,13 +423,13 @@ namespace WindBot.Game.AI
if
(
defender
.
OwnTargets
.
Any
(
card
=>
card
.
IsCode
(
_CardId
.
PhantomKnightsFogBlade
)
&&
!
card
.
IsDisabled
()))
return
false
;
if
(
defender
.
HasSetcode
(
_Setcode
.
EarthboundImmortal
)
&&
!
defender
.
IsDisabled
())
return
false
;
bool
attackHighestMonster
=
Enemy
.
HasInMonstersZone
(
_CardId
.
RockOfTheVanquisher
,
true
)
&&
Enemy
.
GetMonsters
().
Any
(
card
=>
card
.
HasSetcode
(
_Setcode
.
VanquishSoul
))
||
Enemy
.
HasInMonstersZone
(
_CardId
.
GladiatorBeastDomitianus
,
true
)
||
Enemy
.
HasInMonstersZone
(
_CardId
.
PatricianOfDarkness
)
||
Enemy
.
HasInMonstersZone
(
_CardId
.
RockOfTheVanquisher
,
true
)
&&
Enemy
.
GetMonsters
().
Any
(
card
=>
card
.
HasSetcode
(
_Setcode
.
VanquishSoul
))
||
Enemy
.
HasInMonstersZone
(
_CardId
.
GladiatorBeastDomitianus
,
true
)
||
Enemy
.
HasInMonstersZone
(
_CardId
.
PatricianOfDarkness
)
||
Enemy
.
HasInMonstersZone
(
_CardId
.
DictatorOfD
,
true
)
&&
Enemy
.
GetMonsters
().
Any
(
card
=>
card
.
HasSetcode
(
_Setcode
.
BlueEyes
));
if
(
attackHighestMonster
)
{
...
...
@@ -437,16 +441,16 @@ namespace WindBot.Game.AI
if
(
Enemy
.
HasInSpellZone
(
_CardId
.
SpiralDischarge
,
true
)
&&
Enemy
.
HasInMonstersZone
(
_CardId
.
GaiaTheDragonChampion
)
&&
!
defender
.
IsCode
(
_CardId
.
GaiaTheDragonChampion
))
return
false
;
if
(
Enemy
.
HasInSpellZone
(
_CardId
.
CrusadiaVanguard
,
true
)
&&
Enemy
.
GetMonsters
().
Any
(
card
=>
card
.
HasSetcode
(
_Setcode
.
Crusadia
)
&&
card
.
HasType
(
CardType
.
Link
))
&&
!
defender
.
HasType
(
CardType
.
Link
))
return
false
;
if
(
defender
.
IsCode
(
_CardId
.
RescueACEHydrant
)
&&
!
defender
.
IsDisabled
()
&&
Enemy
.
GetMonsters
().
Any
(
monster
=>
monster
.
HasSetcode
(
_Setcode
.
RescueACE
)
&&
!
monster
.
IsCode
(
_CardId
.
RescueACEHydrant
)))
return
false
;
if
(
Enemy
.
HasInSpellZone
(
_CardId
.
SilenforcingBarrier
,
true
)
&&
Enemy
.
HasInMonstersZone
(
_CardId
.
NovoxTheSilenforcerDisciple
,
faceUp
:
true
)
&&
!
defender
.
HasType
(
CardType
.
Ritual
))
return
false
;
return
true
;
}
...
...
@@ -540,7 +544,7 @@ namespace WindBot.Game.AI
extraDeck
[
shuffleCount
]
=
extraDeck
[
index
];
extraDeck
[
index
]
=
tempCard
;
}
return
Util
.
CheckSelectCount
(
extraDeck
,
cards
,
min
,
max
);
}
...
...
@@ -1580,5 +1584,30 @@ namespace WindBot.Game.AI
return
crossoutDesignatorIdList
.
Contains
(
cardId
)
||
(
calledbytheGraveIdCountMap
.
ContainsKey
(
cardId
)
&&
calledbytheGraveIdCountMap
[
cardId
]
>
0
);
}
protected
virtual
bool
DefaultSetForDiabellze
()
{
if
(
Card
==
null
)
return
false
;
if
(
Card
.
Id
==
_CardId
.
PotOfExtravagance
)
return
false
;
if
(
Enemy
.
HasInMonstersZone
(
_CardId
.
DiabellzeOfTheOriginalSin
,
true
,
faceUp
:
true
)
&&
Card
.
HasType
(
CardType
.
Spell
)
&&
!
Card
.
HasType
(
CardType
.
QuickPlay
))
{
if
(
Bot
.
SpellZone
.
Any
(
c
=>
c
!=
null
&&
Duel
.
MainPhase
.
ActivableCards
.
Contains
(
c
)
&&
c
.
HasType
(
CardType
.
Spell
)
&&
!
Card
.
HasType
(
CardType
.
QuickPlay
)
&&
c
.
IsFacedown
()))
{
return
false
;
}
foreach
(
CardExecutor
exec
in
Executors
)
{
if
(
exec
.
Type
==
ExecutorType
.
Activate
&&
exec
.
CardId
==
Card
.
Id
)
{
if
(
exec
.
Func
==
null
||
exec
.
Func
())
{
return
true
;
}
}
}
}
return
false
;
}
}
}
Game/GameBehavior.cs
View file @
2ce621d4
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.IO
;
using
System.Linq
;
using
System.Text.RegularExpressions
;
using
System.Threading
;
using
WindBot.Game.AI
;
using
YGOSharp.Network
;
using
YGOSharp.Network.Enums
;
...
...
@@ -284,6 +285,7 @@ namespace WindBot.Game
private
void
OnDuelEnd
(
BinaryReader
packet
)
{
Thread
.
Sleep
(
500
);
Connection
.
Close
();
}
...
...
sqlite3.dll
View file @
2ce621d4
No preview for this file type
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