Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mercury233 committed Mar 21, 2021
1 parent b1630c8 commit 13afeb7
Show file tree
Hide file tree
Showing 32 changed files with 2,910 additions and 1,760 deletions.
4 changes: 3 additions & 1 deletion libWindbot/Game/AI/CardExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ public static class CardExtension
/// </summary>
public static bool IsMonsterInvincible(this ClientCard card)
{
return !card.IsDisabled() && Enum.IsDefined(typeof(InvincibleMonster), card.Id);
return !card.IsDisabled() &&
(card.Controller == 0 && Enum.IsDefined(typeof(InvincibleBotMonster), card.Id) ||
card.Controller == 1 && Enum.IsDefined(typeof(InvincibleEnemyMonster), card.Id));
}

/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions libWindbot/Game/AI/Decks/AltergeistExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2742,8 +2742,6 @@ public override BattlePhaseAction OnSelectAttackTarget(ClientCard attacker, ILis

public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{

int HIINT_TOGRAVE = 504;
if (max == 1 && cards[0].Location == CardLocation.Deck
&& Util.GetLastChainCard() != null && Util.GetLastChainCard().IsCode(23002292) && Bot.GetRemainingCount(CardId.WakingtheDragon,1) > 0)
{
Expand All @@ -2764,7 +2762,7 @@ public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min,
Logger.DebugWriteLine("EvenlyMatched: min=" + min.ToString() + ", max=" + max.ToString());
}
else if (cards[0].Location == CardLocation.Hand && cards[cards.Count - 1].Location == CardLocation.Hand
&& (hint == 501 || hint == HIINT_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");
Expand Down
2 changes: 1 addition & 1 deletion libWindbot/Game/AI/Decks/DoEveryThingExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public DoEverythingExecutor(GameAI ai, Duel duel)
{
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.SummonOrSet);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
Expand Down
629 changes: 629 additions & 0 deletions libWindbot/Game/AI/Decks/FamiliarPossessedExecutor.cs

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions libWindbot/Game/AI/Decks/FrogExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,10 @@ public FrogExecutor(GameAI ai, Duel duel)

private int m_swapFrogSummoned;
private int m_flipFlopFrogSummoned;
private int m_treebornFrogCount = 0;

public override void OnNewTurn()
{
m_treebornFrogCount = 0;
base.OnNewTurn();
}

private bool TreebornFrog()
{
m_treebornFrogCount++;
return m_treebornFrogCount <= 5;
return true;
}

private bool SwapFrogSummon()
Expand Down
4 changes: 2 additions & 2 deletions libWindbot/Game/AI/Decks/HorusExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public HorusExecutor(GameAI ai, Duel duel) : base(ai, duel)
AddExecutor(ExecutorType.Activate, CardId.MonsterReborn, MonsterReborn);

AddExecutor(ExecutorType.Summon, CardId.WhiteNightDragon, WhiteNightDragon);
AddExecutor(ExecutorType.Summon, CardId.HorusTheBlackFlameDragonLv6, DefaultTributeSummon);
AddExecutor(ExecutorType.Summon, CardId.HorusTheBlackFlameDragonLv6, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.AlexandriteDragon);
AddExecutor(ExecutorType.SummonOrSet, CardId.AxeDragonute);
AddExecutor(ExecutorType.SummonOrSet, CardId.DodgerDragon);
Expand Down Expand Up @@ -157,7 +157,7 @@ private bool WhiteNightDragon()
if (card.IsCode(11224103))
return false;

return DefaultTributeSummon();
return DefaultMonsterSummon();
}

private bool HorusTheBlackFlameDragonLv8()
Expand Down
5 changes: 1 addition & 4 deletions libWindbot/Game/AI/Decks/Level8Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ public Level8Executor(GameAI ai, Duel duel)
private bool JetSynchronUsed = false;
private bool ScrapWyvernUsed = false;
private bool MaskedChameleonUsed = false;
private int ShootingRiserDragonCount = 0;

private int[] HandCosts = new[]
{
Expand Down Expand Up @@ -218,7 +217,6 @@ public override void OnNewTurn()
JetSynchronUsed = false;
ScrapWyvernUsed = false;
MaskedChameleonUsed = false;
ShootingRiserDragonCount = 0;
}

public override void OnChainEnd()
Expand Down Expand Up @@ -845,9 +843,8 @@ private bool ShootingRiserDragonEffect()
}
else
{
if (Duel.LastChainPlayer == 0 || ShootingRiserDragonCount >= 10)
if (Duel.LastChainPlayer == 0)
return false;
ShootingRiserDragonCount++;
AI.SelectCard(new[] {
CardId.BlackRoseMoonlightDragon,
CardId.ScrapDragon,
Expand Down
Loading

0 comments on commit 13afeb7

Please sign in to comment.