Commit 2ce621d4 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents d5784eaf 6ce35045
...@@ -15,12 +15,12 @@ jobs: ...@@ -15,12 +15,12 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup MSBuild.exe - name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1 uses: microsoft/setup-msbuild@v2
- name: Build! - name: Build!
run: msbuild $env:Solution_Name /t:Build /p:Configuration=Release run: msbuild $env:Solution_Name /t:Build /p:Configuration=Release
...@@ -36,7 +36,7 @@ jobs: ...@@ -36,7 +36,7 @@ jobs:
cd .. cd ..
- name: Upload build artifacts - name: Upload build artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
path: dist\WindBot.7z path: dist\WindBot.7z
...@@ -46,7 +46,7 @@ jobs: ...@@ -46,7 +46,7 @@ jobs:
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest" automatic_release_tag: "latest"
prerelease: true prerelease: false
title: "Development Build" title: "Development Build"
files: | files: |
dist/WindBot.7z dist/WindBot.7z
...@@ -2916,5 +2916,15 @@ namespace WindBot.Game.AI.Decks ...@@ -2916,5 +2916,15 @@ namespace WindBot.Game.AI.Decks
} }
return base.OnSelectPlace(cardId, player, location, available); 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
...@@ -2888,5 +2888,15 @@ namespace WindBot.Game.AI.Decks ...@@ -2888,5 +2888,15 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
} }
} }
\ No newline at end of file
...@@ -2976,5 +2976,15 @@ namespace WindBot.Game.AI.Decks ...@@ -2976,5 +2976,15 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
} }
} }
\ No newline at end of file
...@@ -1007,7 +1007,7 @@ namespace WindBot.Game.AI.Decks ...@@ -1007,7 +1007,7 @@ namespace WindBot.Game.AI.Decks
materials.Add(Bot.MonsterZone[6]); materials.Add(Bot.MonsterZone[6]);
linkchk = true; 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]); materials.Add(Bot.MonsterZone[5]);
linkchk = true; linkchk = true;
......
...@@ -3105,5 +3105,14 @@ namespace WindBot.Game.AI.Decks ...@@ -3105,5 +3105,14 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
} }
} }
\ No newline at end of file
...@@ -1823,5 +1823,15 @@ namespace WindBot.Game.AI.Decks ...@@ -1823,5 +1823,15 @@ namespace WindBot.Game.AI.Decks
} }
return base.OnPreBattleBetween(attacker, defender); return base.OnPreBattleBetween(attacker, defender);
} }
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
AI.SelectPlace(SelectSTPlace(Card, true));
return true;
}
return false;
}
} }
} }
...@@ -2899,5 +2899,15 @@ namespace WindBot.Game.AI.Decks ...@@ -2899,5 +2899,15 @@ namespace WindBot.Game.AI.Decks
} }
return false; return false;
} }
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
} }
} }
\ No newline at end of file
...@@ -192,6 +192,9 @@ namespace WindBot.Game.AI ...@@ -192,6 +192,9 @@ namespace WindBot.Game.AI
public const int NovoxTheSilenforcerDisciple = 25801745; public const int NovoxTheSilenforcerDisciple = 25801745;
public const int SilenforcingBarrier = 98477480; public const int SilenforcingBarrier = 98477480;
public const int DiabellzeOfTheOriginalSin = 53765052;
public const int PotOfExtravagance = 49238328;
} }
protected class _Setcode protected class _Setcode
...@@ -224,6 +227,7 @@ namespace WindBot.Game.AI ...@@ -224,6 +227,7 @@ namespace WindBot.Game.AI
AddExecutor(ExecutorType.Activate, _CardId.VaylantzWorld_ShinraBansho, DefaultVaylantzWorld_ShinraBansho); AddExecutor(ExecutorType.Activate, _CardId.VaylantzWorld_ShinraBansho, DefaultVaylantzWorld_ShinraBansho);
AddExecutor(ExecutorType.Activate, _CardId.VaylantzWorld_KonigWissen, DefaultVaylantzWorld_KonigWissen); AddExecutor(ExecutorType.Activate, _CardId.VaylantzWorld_KonigWissen, DefaultVaylantzWorld_KonigWissen);
AddExecutor(ExecutorType.Activate, _CardId.SantaClaws); AddExecutor(ExecutorType.Activate, _CardId.SantaClaws);
AddExecutor(ExecutorType.SpellSet, DefaultSetForDiabellze);
} }
protected int lightningStormOption = -1; protected int lightningStormOption = -1;
...@@ -1580,5 +1584,30 @@ namespace WindBot.Game.AI ...@@ -1580,5 +1584,30 @@ namespace WindBot.Game.AI
return crossoutDesignatorIdList.Contains(cardId) return crossoutDesignatorIdList.Contains(cardId)
|| (calledbytheGraveIdCountMap.ContainsKey(cardId) && calledbytheGraveIdCountMap[cardId] > 0); || (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;
}
} }
} }
...@@ -3,6 +3,7 @@ using System.Collections.Generic; ...@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading;
using WindBot.Game.AI; using WindBot.Game.AI;
using YGOSharp.Network; using YGOSharp.Network;
using YGOSharp.Network.Enums; using YGOSharp.Network.Enums;
...@@ -284,6 +285,7 @@ namespace WindBot.Game ...@@ -284,6 +285,7 @@ namespace WindBot.Game
private void OnDuelEnd(BinaryReader packet) private void OnDuelEnd(BinaryReader packet)
{ {
Thread.Sleep(500);
Connection.Close(); Connection.Close();
} }
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment