A C# bot for YGOPro, compatible with the YGOSharp and SRVPro server.
-
Compile
WindBot.slnusing Visual Studio or Mono. -
Put
cards.cdbnext to the compiledWindBot.exe. -
Run YGOPro, create a host.
-
Run WindBot and observe.
Name
The nickname for the bot.
Deck
The deck to be used by the bot. Available decks are listed below. Keep empty to use random deck.
DeckFile
The deck file (.ydk) to be used by the bot. Will be set by Deck automatically, but you can override it.
Note: Most cards not in the original deck are unknown to the bot, and won't be summoned or activated in the duel.
Dialog
The dialog texts to be used by the bot. See Dialogs folder for list.
Host
The IP of the host to be connected to.
Port
The port of the host to be connected to.
HostInfo
The host info (password) to be used.
Version
The version of YGOPro.
Hand
If you are testing deck, you may want to make sure the bot go first or second. Hand=1 will make the bot always show Scissors, 2 for Rock, 3 for Paper.
Chat
False to turn the chat of bot off.
Debug
Print verbose log of card movement info. False at default. (May be updated in future)
ServerMode and ServerPort
WindBot can run as a "server", provide a http interface to create bot.
Easy:
-
Burn
-
Frog
-
Horus
-
MokeyMokey
-
MokeyMokeyKing
-
OldSchool
Normal:
-
Altergeist
-
Blue-Eyes
-
BlueEyesMaxDragon
-
Brave
-
ChainBurn
-
DarkMagician
-
Dragun
-
Dragunity
-
GrenMajuThunderBoarder
-
Level VIII
-
LightswornShaddoldinosour
-
Orcust
-
Phantasm
-
Qliphort
-
Rainbow
-
Rank V
-
Salamangreat
-
SkyStriker
-
ST1732
-
ThunderDragon
-
Toadally Awesome
-
Trickstar
-
Yosenju
-
Zexal Weapons
-
Zoodiac
-
Blackwing
-
CyberDragon
-
Evilswarm
-
Gravekeeper
-
Graydle
-
Lightsworn
-
Nekroz
A tool which generates a WindBot deck code template from a YGOPro deck file.
You can use it to create a new deck for WindBot quickly.
https://mercury233.me/windbot/gen.html
WindBot can run as a "server", provide a http interface to create bot.
eg. http://127.0.0.1:2399/?name=%E2%91%A8&deck=Blue-Eyes&host=127.0.0.1&port=7911&dialog=cirno.zh-CN
In this situation, it will be multi-threaded. This can be useful for servers, since it don't use large amount memory.
The parameters are same as commandlines, but low cased.
Note: Currently the server bind to all interfaces, so it requires elevated privileges to run. You can otherwise use the following command to add a URL ACL for your port (2399 for example), which allows all users to access it:
netsh http add urlacl url=http://+:2399/ user=Everyone
- If one chain includes two activation that use
AI.SelectCard, the second one won't select correctly.
- Update YGOPro protrol to 0x134A
- New decks: Altergeist, BlueEyesMaxDragon, GrenMajuThunderBoarder, Level8, Orcust, Phantasm, Salamangreat
- Use LINQ in codes
- Add random bot feature to BotWrapper
- Add
ClientCard.Sequence,ClientCard.ProcCompleted,ClientCard.IsSpecialSummoned - Add
ClientCard.EquipCards,ClientCard.OwnTargets, handle equip cards - Add
ClientCard.IsCode, handle card alias - Add
ClientCard.GetLinkedZones,ClientCard.HasSetcode - Add
ClientField.UnderAttack,ClientField.GetLinkedZones,ClientField.GetFieldSpellCard - Add
Duel.SummoningCards,Duel.LastSummonedCards - Add
Util.GetTotalAttackingMonsterAttack,Util.GetBotAvailZonesFromExtraDeck - Add
GetMatchingCards,GetFirstMatchingCard,IsExistingMatchingCard - Add
ExecutorType.GoToBattlePhase,ExecutorType.GoToMainPhase2,ExecutorType.GoToEndPhase - Add
DefaultScapegoat,DefaultMaxxC,DefaultAshBlossomAndJoyousSpring,DefaultGhostOgreAndSnowRabbit,DefaultGhostBelleAndHauntedMansion,DefaultEffectVeiler,DefaultCalledByTheGrave,DefaultInfiniteImpermanence - Rename
AIFunctionstoAIUtil(Usage:AI.Utils.->Util.) - Rename
AIFunctions.CompareCardAttacktoCardContainer.CompareCardAttack - Update
Util.SelectPreferredCardsandUtil.CheckSelectCountto return the result - Update
ClientField.HasInMonstersZoneto support check face-up card - Update
AI.SelectCard#59 - Handle swap control of cards
- Change some
int locationtoCardLocation location - Update default
OnPreBattleBetweento recognize more cards - Misc updates to default executors
- Misc updates to the AI of some decks
- Update the known card enums
- Fix
CardSelector.Select - Fix
OnSelectEffectYndidn't haveActivateDescription - Fix
ClientCard.Attacked - Fix infinite activation of ZexalWeapons
- Update YGOPro protrol to 0x1344
- New decks: DarkMagician, SkyStriker
- Add param to turn chat off
- Add param to print verbose log
- Add part of
Zonesenum andAI.SelectPlace - Add
ClientCard.IsTuner,ClientCard.LinkMarker,ClientCard.HasLinkMarker - Add
ShouldNotBeTargetandShouldBeDisabledBeforeItUseEffectMonsterenum - Add
AI.Utils.GetBestBotMonster,AI.Utils.GetWorstBotMonsterandAI.Utils.ChainContainPlayer - Add
Executor.OnCardSortingandExecutor.OnDraw - Add
ClientField.GetColumnCountandClientField.HasInHandOrInSpellZoneetc. - Misc updates to LightswornShaddoldinosour and ChainBurn deck
- Misc updates to default executors
- Fix OnSelectUnselectCard
- Fix OnMove to keep card data when moving
- Update YGOPro protrol to 0x1343
- New decks: Trickstar, LightswornShaddoldinosour, ChainBurn
- Update
OnBattle, addExecutor.OnSelectAttackerandExecutor.OnSelectAttackTarget - Add
Executor.OnSelectPosition,Executor.OnSelectBattleReplay - Add
Bot.BattlingMonster - Add and update some default executors
- Change
Duel.LifePoints[0]toBot.LifePoints - Change
LastChainPlayerandCurrentChaintoDuelclass - Change
ChainContainsCardandGetLastChainCardetc. toAI.Utilsclass - Fix turn count in match duel
- Fix don't turn 0 atk monster to atk pos
- Update YGOPro protrol to 0x1342
- Add Linux BotWrapper (a simple bash script)
- Update YGOPro protrol to 0x1341
- Change the program to x86 only
- Add BotWrapper for YGOPro bot mode
- Add
AI.SelectMaterials,OnSelectFusionMaterial,OnSelectPendulumSummon,AI.Utils.SelectPreferredCardsetc. - Fix
AI.Utils.GetBestEnemySpellto not return normal spell currently activating - Fix AI don't attack defense Crystal Wing or S39
- Fix ZexalWeapons AI don't change defense S39 back
- Minor updates
- Update YGOPro protrol to 0x1340
- Add support for the New Master Rule
- Decks update
- New commandline parameters
- Add support for Match and TAG duel
- Add server mode
- Bot dialogs now customable
- Only use normal deck when random picking decks
- Send sorry when the AI did something wrong that make the duel can't continue (for example, selected illegal card)
- Send info when the deck of the AI is illegal (for example, lflist dismatch)
- Fix the issue that the bot will attack Dupe Frog with low attack monster when there is monster next to Dupe Frog
- Fix the issue that synchro summon stuck in some condition #7
- Fix C#6.0 (VS2015) support
- Fix
OnUpdateData - New and updated
DefaultExecutor - New and updated
AI.Utils,ClientCard,ClientFieldfunctions - Add
OnNewTurn,AI.SelectYesNo,AI.SelectThirdCard,Duel.ChainTargets,Duel.LastSummonPlayer - Shortcut
BotforDuel.Fields[0],EnemyforDuel.Fields[1] CardIdis now class instead of enum so(int)is no longer needed- Update the known card enums, add
Floodgate,OneForXyz,FusionSpell,MonsterHasPreventActivationEffectInBattle - Update
OnPreBattleBetweento calculate the ATK of cards like Number S39: Utopia the Lightning - Update direct attack handling
- Update YGOPro protrol to 0x133D
- Use the latest YGOSharp.Network to improve performances
- Update the namespace of
YGOSharp.OCGWrapper - Fix the default trap cards not always activating
-
More decks
-
Documents for creating AI
-
AI.SelectPlacefor linked zones or not linked zones -
AI.SelectTribute -
Get equip of card.
-
Better new master rule support
-
Update the known card enums
-
More default common cards executor