Giter Club home page Giter Club logo

windbot's Introduction

WindBot

A C# bot for YGOPro, compatible with the YGOSharp and SRVPro server.

How to use:

  • Compile WindBot.sln using Visual Studio or Mono.

  • Put cards.cdb next to the compiled WindBot.exe.

  • Run YGOPro, create a host.

  • Run WindBot and observe.

Supported commandlines

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.

Available decks

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

Unfinished decks

  • Blackwing

  • CyberDragon

  • Evilswarm

  • Gravekeeper

  • Graydle

  • Lightsworn

  • Nekroz

AI Template Generator

A Java program which generate executor code from deck, made by Levyaton. https://github.com/Levyaton/WindbotTemplateGenerator

Server mode

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.

Known issues

  • If one chain includes two activation that use AI.SelectCard, the second one won't select correctly.

Changelog

v0x134A (2019-05-30)

  • 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 AIFunctions to AIUtil (Usage: AI.Utils. -> Util.)
  • Rename AIFunctions.CompareCardAttack to CardContainer.CompareCardAttack
  • Update Util.SelectPreferredCards and Util.CheckSelectCount to return the result
  • Update ClientField.HasInMonstersZone to support check face-up card
  • Update AI.SelectCard #59
  • Handle swap control of cards
  • Change some int location to CardLocation location
  • Update default OnPreBattleBetween to 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 OnSelectEffectYn didn't have ActivateDescription
  • Fix ClientCard.Attacked
  • Fix infinite activation of ZexalWeapons

v0x1344 (2018-06-05)

  • Update YGOPro protrol to 0x1344
  • New decks: DarkMagician, SkyStriker
  • Add param to turn chat off
  • Add param to print verbose log
  • Add part of Zones enum and AI.SelectPlace
  • Add ClientCard.IsTuner, ClientCard.LinkMarker, ClientCard.HasLinkMarker
  • Add ShouldNotBeTarget and ShouldBeDisabledBeforeItUseEffectMonster enum
  • Add AI.Utils.GetBestBotMonster, AI.Utils.GetWorstBotMonster and AI.Utils.ChainContainPlayer
  • Add Executor.OnCardSorting and Executor.OnDraw
  • Add ClientField.GetColumnCount and ClientField.HasInHandOrInSpellZone etc.
  • Misc updates to LightswornShaddoldinosour and ChainBurn deck
  • Misc updates to default executors
  • Fix OnSelectUnselectCard
  • Fix OnMove to keep card data when moving

v0x1343 (2018-04-11)

  • Update YGOPro protrol to 0x1343
  • New decks: Trickstar, LightswornShaddoldinosour, ChainBurn
  • Update OnBattle, add Executor.OnSelectAttacker and Executor.OnSelectAttackTarget
  • Add Executor.OnSelectPosition, Executor.OnSelectBattleReplay
  • Add Bot.BattlingMonster
  • Add and update some default executors
  • Change Duel.LifePoints[0] to Bot.LifePoints
  • Change LastChainPlayer and CurrentChain to Duel class
  • Change ChainContainsCard and GetLastChainCard etc. to AI.Utils class
  • Fix turn count in match duel
  • Fix don't turn 0 atk monster to atk pos

v0x1342 (2017-12-26)

  • Update YGOPro protrol to 0x1342
  • Add Linux BotWrapper (a simple bash script)

v0x1341 (2017-11-27)

  • Update YGOPro protrol to 0x1341
  • Change the program to x86 only
  • Add BotWrapper for YGOPro bot mode
  • Add AI.SelectMaterials, OnSelectFusionMaterial, OnSelectPendulumSummon, AI.Utils.SelectPreferredCards etc.
  • Fix AI.Utils.GetBestEnemySpell to 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

v0x1340 (2017-11-06)

  • 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, ClientField functions
  • Add OnNewTurn, AI.SelectYesNo, AI.SelectThirdCard, Duel.ChainTargets, Duel.LastSummonPlayer
  • Shortcut Bot for Duel.Fields[0], Enemy for Duel.Fields[1]
  • CardId is now class instead of enum so (int) is no longer needed
  • Update the known card enums, add Floodgate, OneForXyz, FusionSpell, MonsterHasPreventActivationEffectInBattle
  • Update OnPreBattleBetween to calculate the ATK of cards like Number S39: Utopia the Lightning
  • Update direct attack handling

v0x133D (2017-09-24)

  • 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

TODO list

  • More decks

  • Documents for creating AI

  • AI.SelectPlace for 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

windbot's People

Contributors

handsomekiwi avatar jwyxym avatar levyaton avatar mercury233 avatar ohnkytablabdey avatar salix5 avatar sunx2 avatar theswerik avatar wind2009-louse avatar yspplayer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

windbot's Issues

Sync summon stuck in some condition

Used on ygopro 10339 (latest version), Dragunity deck.
If the bot got a LV10 non-tuner, a LV6 non-tuner, a LV2 tuner on field, it will try to sync summon L8 monster, but it will get stuck.
image

Monster reborn solution

有些monster需要先正规特召后,才能用monster reborn 復活他,如果非正规特召就在墓地裡,那隻monster便无法特召
在用monster reborn 时,要如何判断墓地 的monster 无法特召呢

When you add/draw a card and have to discard immediately afterwards, the bot does not see that card in the hand.

//Effect: Each player draws 1 card, then each player discards 1 card.
private bool ActivateDarkWorldDealings()
{
AI.SelectCard(CardToDiscard());
return true;
}

//Effect: During the Main Phase: You can add 1 "Ojama" card from your Deck to your hand, then discard 1 card
private bool ActivateOjamaPajamaSearch()
{
if (OjamaPajamaMaySearch == true)
{
AI.SelectCard(OjamaPajamaSearchHelper());
AI.SelectNextCard(CardToDiscard());
return true;
}
return false;
}

For instance: If we draw a card with dark world dealings or add a card to our hand with OjamaPajama we then have to discard a card.
I wrote a method that goes over my hand since I am an OjamaABC player and want to discard Ojama Magic A, B, or C as much as possible.

But I found out that the card we just added is not yet in the Bot.Hand.

Is there a fix for this? Or am I just doing it wrong xD

Data member of a ClientCard is null

I noticed that the Data member of certain Cards is null; the issue appeared while using the function Bot.MonsterZone.IsExistingMatchingCard() to see if on the field there were cards that matched a certain condition
Since there were cards accepted, the function still return false; so I procedeed with a debug and found that the Data member of the card "Lubellion the searing dragon" was null; since IsExistingMatchingCard returns the return of GetMatchingCardsCount, this one base its return on a condition like card.Data!=null && filter(card)
so even if the card matched the condition given (so filter(card) returned true) since the Data member was null, the function did not found cards that match the condition, when instead there was one

Error

I tried running the bot in debug mode in VS and it gave me this error:

System.Net.Sockets.SocketException was unhandled
HResult=-2147467259
Message=No connection could be made because the target machine actively refused it 127.0.0.1:13254
Source=System
ErrorCode=10061
NativeErrorCode=10061
StackTrace:
at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
at WindBot.Game.Network.GameConnection..ctor(IPAddress address, Int32 port) in c:\Users\Ryan\Downloads\windbot-master\windbot-master\Game\Network\GameConnection.cs:line 29
at WindBot.Game.GameClient.Start() in c:\Users\Ryan\Downloads\windbot-master\windbot-master\Game\GameClient.cs:line 31
at WindBot.Program.Run() in c:\Users\Ryan\Downloads\windbot-master\windbot-master\Program.cs:line 40
at WindBot.Program.Main() in c:\Users\Ryan\Downloads\windbot-master\windbot-master\Program.cs:line 27
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

I didn't modify anything in the code so I don't see why this happened.

How to Flip Summon

I've been trying to implement a way for WindBot to flip summon a monster on it's own. I can't seem to get my code to work to flip a monster already on field. Maybe there's a simple solution, just need some help to get there.

discard cost choose

在一些卡效果需要捨弃为代价,那我是否能列举一些卡为最后选择,让他能先捨弃其他卡呢,谢谢

Pendulum Summon

how to make windbot to perform pendulum summon?
like on screenshot below, windbot put correct monsters in pendulum zones with correct scales (3 and 6) for pendulum summon...after it only discarded card to graveyard (dinomist rex Lv 5)
http://i.imgur.com/e8rf3c4.png

thanks

Windbot cannot summon from the Extra Deck

Windbot works perfectly fine other than when it summons from the Extra Deck, he'll say what he's about to summon and then not summon it. This breaks the game. EX:
b1
b2
b3

Selctcard issue

如用SelectCard 选择多种卡片时,如下:
AI.SelectCard(new[]
{
CardId.a,
CardId.b,
CardId.c,
});
如何判断他选择到的是哪一个card.id呢?

Questions

Can the bot be used without being in a launcher-server configuration. Ie can i run ygosharp with windbot and duel him? Might sound stupid but i am a newbie trying to learn the Inner-workings of ygopro.

Maxx "C" solution

I want to write a function about Maxx "c" ,below is it's effect:
During either player's turn: You can send this card from your hand to the Graveyard; this turn, each time your opponent Special Summons a monster(s), immediately draw 1 card. You can only use 1 "Maxx "C"" per turn.

I want to chain when enemy activate effect in special summon monster(s),but I have no idea to start,please help me.

Windbot Add AI_Test2+AI_Test3+AI_Test4 etc.

Sorry, i would like to propose a change to the Windbot. I know it's complicated, but having already entered AI_Test, I ask if you can insert other Decks for Windbot like these, such as AI_Test2, AI_Test3, etc. This is because I would like more ability to insert custom decks against the windbot, no matter the difficulty level, I understand that it would be even more complicated, but I ask this change please, to add more AI_Test.

Is OnCardSorting method not developed yet?

Hello. I'm an amatuer user in Korea.
I was trying to make Flower Cardian AI script, and I had a problem on activation of cardian magic card .
The effect is "Choose 3 "Flower Cardian" monsters with different names from your Deck, and place them on top of your Deck in any order.".
So I thought of a way of OnSelectUnselect - OnCardSorting for scripting the AI, and I found out OnCardSorting method is not exactly completed yet.
I am not a professional programmer and I'm only doing this with my own interest, so could anyone help me how to solve this problem? Best regards.

WindBot can't be started

When running in VS, it attempts to run the .exe, then shows a popup saying WindBot cant be started. Checking the output shows 'Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll'. I am also unable to get .NET 4.0. I am also working with a C drive and a D drive

Is it possible to make the AI Flip summon

I'm working on an AI that needs to flip summon to trigger an effect

I can't find an Executor that flip summons, or an example deck that flip summons.

Is it possible to tell windbot to flip summon a given set monster?

Sorry if I've missed something

Use windbot in ygopro2

I want to use it with the game as an offline AI in ygopro2, If not, is there a version for ygopro2 links that contains offline AI?

linkmarker issue

I tried to find out the linkmarker of the linkmonster
below is my code:


if (Enemy.MonsterZone[5] != null)
Logger.DebugWriteLine("Enemy.MonsterZone[5].LinkMarker= " + Enemy.MonsterZone[5].defense);


and I got LinkMarker ==0
than I took a look in YGOSharp
it said:


if (HasType(CardType.Link))
{
LinkMarker = Defense;
Defense = 0;
}


than I tried add something in ClientCard.cs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
public int LinkMarker { get; private set; }
if ((flag & (int)Query.link) != 0)
LinkMarker = packet.ReadInt32();
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
and the result give the attack of the linkmonster<( ̄ ﹌  ̄)>

How Can I Program WindBot to Surrender?

I'm working on programming a bot for an Exodia FTK strategy. I want the bot to surrender right away if any of the Exodia pieces are sent to its graveyard. Is it feasible to incorporate this feature?

WindBot won't compile since v0x1344, do I need to install something?

Compiler just throws a lot of errors and doesn't even output the windbot.exe. I have just installed MsBuild v12, NET Framework dev pack v4.7, Ms Build Tools 2013 all cause of that and that didn't help. This didn't happen with previous versions of WindBot, I'll leave the screenshot, hope you can help with this. Have a nice day.

sin titulo_2

How to distinguish same cards with different additional information

我在编写关于珠泪的融合效果的过程中遇到了如下的问题:
同一区域内的多张同名卡中的一张在连锁上发动效果的情况下,我希望使用SelectCard()选择那些卡中未在连锁上发动过效果的一张卡。但这一方法并不能区分他们。
如何区分同一卡名的多张卡当中有附加信息的卡并选择他们?
I encountered the following problems in the process of writing about the fusion effect of [Tearalaments]:
When one of the multiple cards with the same name in the same area activate an effect on the chain, I want to use SelectCard() to select the one that has not activated the effect on the chain. But this function can't distinguish them.
How to distinguish the cards with additional information among multiple cards with the same card name and select them?

Connection Could Not Be Reached Because The Target Machine Actively Refused The Connection

I compiled this with Visual Studio, and got the executable running. However, everytime I run it by itself I get the System.Net.Sockets.TcpClient exception.
When I run it after Ygopro has a LAN server of the same IP and Port, the application throws no error and just does nothing. I'm not sure if I am running this app correctly and need help.

Is Windbot intended to work alonside a YgoSharp server, or can it be run with a LAN server?

Error when compile in linux

Hello i have an error when compile the source in linux. Any suggestion? i followed this steps:

#5

XBuild Engine Version 2.10.8.1
Mono, Version 2.10.8.1
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.

Build started 26/9/2017 20:04:59.


Project "/home/aluno/ygopro/novos/wb/WindBot.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
Target Build:
Project "/home/aluno/ygopro/novos/wb/WindBot.csproj" (default target(s)):
/home/aluno/ygopro/novos/wb/WindBot.csproj: warning : Project has unknown ToolsVersion '12.0'. Using the default tools version '4.0' instead.
Target PrepareForBuild:
Configuration: Release Platform: AnyCPU
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool /usr/bin/dmcs execution started with arguments: /noconfig /optimize+ /out:obj/Release/WindBot.exe Game/AI/AIFunctions.cs Game/AI/CardContainer.cs Game/AI/CardExecutor.cs Game/AI/CardExtension.cs Game/AI/CardSelector.cs Game/AI/DeckAttribute.cs Game/AI/DecksManager.cs Game/AI/Decks/BurnExecutor.cs Game/AI/Decks/DragunityExecutor.cs Game/AI/Decks/FrogExecutor.cs Game/AI/Decks/HorusExecutor.cs Game/AI/Decks/OldSchoolExecutor.cs Game/AI/Decks/Rank5Executor.cs Game/AI/Decks/ZexalWeaponsExecutor.cs Game/AI/DefaultExecutor.cs Game/AI/Dialogs.cs Game/AI/Enums/DangerousMonster.cs Game/AI/Enums/InvincibleMonster.cs Game/AI/Enums/NegateAttackSpell.cs Game/AI/Enums/NegatesEffects.cs Game/AI/Enums/NegatesSpells.cs Game/AI/Enums/NegatesSummons.cs Game/AI/Enums/NegatesTraps.cs Game/AI/Executor.cs Game/AI/ExecutorType.cs Game/BattlePhase.cs Game/BattlePhaseAction.cs Game/ClientCard.cs Game/ClientField.cs Game/Deck.cs Game/Duel.cs Game/GameAI.cs Game/GameBehavior.cs Game/GameClient.cs Game/GamePacketFactory.cs Game/MainPhase.cs Game/MainPhaseAction.cs Game/Room.cs Logger.cs Program.cs Properties/AssemblyInfo.cs /target:exe /define:TRACE /platform:AnyCPU /reference:./Mono.Data.Sqlite.dll /reference:/usr/lib/mono/4.0/System.dll /reference:/usr/lib/mono/4.0/System.Data.dll /reference:./YGOSharp.Network.dll /reference:./YGOSharp.OCGWrapper.dll /reference:./YGOSharp.OCGWrapper.Enums.dll /reference:/usr/lib/mono/4.0/System.Core.dll /reference:/usr/lib/mono/4.0/mscorlib.dll /reference:/usr/lib/mono/4.0/System.Transactions.dll /warn:2
Game/AI/DecksManager.cs(39,51): error CS1525: Unexpected symbol deck' Game/AI/DecksManager.cs(39,55): error CS1525: Unexpected symbol )'
Game/Deck.cs(66,52): error CS1525: Unexpected symbol id', expecting .'
Game/Deck.cs(66,54): error CS1525: Unexpected symbol )', expecting .'
Task "Csc" execution -- FAILED
Done building target "CoreCompile" in project "/home/aluno/ygopro/novos/wb/WindBot.csproj".-- FAILED
Done building project "/home/aluno/ygopro/novos/wb/WindBot.csproj".-- FAILED
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/home/aluno/ygopro/novos/wb/WindBot.sln".-- FAILED
Done building project "/home/aluno/ygopro/novos/wb/WindBot.sln".-- FAILED

Build FAILED.

Warnings:

/home/aluno/ygopro/novos/wb/WindBot.sln (default targets) ->
(Build target) ->
/home/aluno/ygopro/novos/wb/WindBot.csproj (default targets) ->

/home/aluno/ygopro/novos/wb/WindBot.csproj:  warning : Project has unknown ToolsVersion '12.0'. Using the default tools version '4.0' instead.

Errors:

/home/aluno/ygopro/novos/wb/WindBot.sln (default targets) ->
(Build target) ->
/home/aluno/ygopro/novos/wb/WindBot.csproj (default targets) ->
/usr/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) ->

Game/AI/DecksManager.cs(39,51): error CS1525: Unexpected symbol `deck'
Game/AI/DecksManager.cs(39,55): error CS1525: Unexpected symbol `)'
Game/Deck.cs(66,52): error CS1525: Unexpected symbol `id', expecting `.'
Game/Deck.cs(66,54): error CS1525: Unexpected symbol `)', expecting `.'

 1 Warning(s)
 4 Error(s)

Time Elapsed 00:00:00.6244640

Windbot is crashing when 'core.to_m2 = FALSE' (Skipping Main Phase 2)

Hey there,

Whenever i try to 'skip_m2'(Basically i'm running the bot on a 'speed duel' server, when i need to disable the MP2), the bot just crashs, probably because it cannot go to the MainPhase2 (i got that). Ive tried to do a 'work around' and put it to go straight to the End Phase, it works, but another bug due to this 'fix' is that AI keeps attacking all monsters on the field instead of end its turn.

It's probably something about 'SelectBattleCmd', since i'm not into coding kinda guy i couldn't figure out by myself the issue. Any help is really appreciated, Thanks!

linkmonster issue

I tried to find out the linkmarker of the linkmonster
below is my code:

if (Enemy.MonsterZone[5] != null)
Logger.DebugWriteLine("Enemy.MonsterZone[5].LinkMarker= " + Enemy.MonsterZone[5].defense);

and I got LinkMarker ==0
than I took a look in YGOSharp
it said:____________________________________________________________________________________________________
if (HasType(CardType.Link))
{
LinkMarker = Defense;
Defense = 0;
}


than I tried add something in ClientCard.cs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
public int LinkMarker { get; private set; }
if ((flag & (int)Query.link) != 0)
LinkMarker = packet.ReadInt32();
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
and the result give the attack of the linkmonster<( ̄ ﹌  ̄)>

突进

突进这张卡,期望效果:已方怪兽被攻击时,选中此怪兽并发动
如何能判断出怪兽被攻击?

当前版本(0x134a)输入启动参数后直接退出了

我直接下载ZIP文件后打开,在调试选项卡的命令行参数输入:
Deck=Lightsworn
(该卡组和AI类文件都存在了,就没动)
打开YGOpro最新版,建立好了主机(默认参数)
再在调试模式下运行WindBot,结果直接退出了。。
线程 0x5f68 已退出,返回值为 0 (0x0)。
线程 0x67e8 已退出,返回值为 0 (0x0)。
程序“[23216] Bot.vshost.exe”已退出,返回值为 0 (0x0)。

并没有加入游戏并准备 = =!

Bypassing bot's default discarding

I am currently adding an exodia deck to my copy of this, and unfortunately the bot occasionally gets left with more than 6 cards in hand, and always discards from one side of the hand, eventually resulting in pieces of exodia being discarded.

What function do I need to override in the deck executor to stop this happening, if possible?

And enhancement for the Adventure AI

Hello, I come across this scenery: if I destroy Fateful Adventure with a Ghost Ogre, the AI end with a very weak board despite being able to end in a better board with the cards in play for example a TG Hyper Librarian and a lv3 Cupid Pitch for which at the very least it could end with a Borreload Savage Dragon with 3 negates...

I came a cross this scenery a couple of times so I guess something in code made it stop there instead of going further...

WindBot won't join the room

Hi, I downloaded your project to make new ai and use them on Edopro by Project ignis. I create a new executor and add deck to the "deck" folder; then I add card db on debug folder; open solution on VS and set as parameter "Deck=Zarc" (I am creating a Zarc bot). I named "ZarcExecutor" the executor and "AI_Zarc" the deck. After that I start debug and Windbot start but not join the room, preaviously created on LAN. How can I let the bot join the room? What I have done wrong?

Here is the code of the Executor:
`using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
using System.Linq;

namespace WindBot.Game.AI.Decks
{
[Deck("Zarc", "AI_Zarc")]

public class ZarcExecutor : DefaultExecutor
{

    public ZarcExecutor(GameAI ai, Duel duel)
    : base(ai, duel)
    {

    }
}

}
`

It's the default code given on the wiki

Tools?

I do not know how long the project will be developed, but I thought it would be a lot easier to write a simple tool for programming AI cards. This would improve AI's ability to play different decks, and developers of other YGOPro-based games could easily adapt AI to their needs.

For example, Man-Eater Bug - Flip, select the strongest enemy monster if FLIP succeeds.

Such bot based on action, which would be programmed.

Special Summoning Monster from Deck due to Card effect

Hi. I am making a bot that uses Spirit Charmers Structure Deck. I can't figure out how to Special Summon Awakening of the Possessed - Nefariouser Archfiend from the deck by tributing 1 spellcaster and 1 level 4 or lower Earth monster on the bot's field.

I have this code currently and it seems SpSummon doesn't seem to work:

[Deck("SpiritCharmers", "AI_SDSpiritCharmers")]
public class SpiritCharmers : DefaultExecutor
{
	public SpiritCharmers(GameAI ai, Duel duel)
	: base(ai, duel)
        {
		...
                AddExecutor(ExecutorType.SpSummon, CardId.AwakeningNefariouserArch, AwakeningNefariouserArch_Effect);
		...
	}
	
	public bool AwakeningNefariouserArch_Effect()
	{
		if (ActivateDescription == Util.GetStringId(CardId.AwakeningNefariouserArch, 0))
		{
			AI.SelectCard(CardId.AwakeningNefariouserArch);
			return true;
		}

		return false;
	}
}

The bot special summons but only if Awakening of the Possessed - Nefariouser Archfiend is on the hand which is not really productive. Any help would be appreciated.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.