Commit 75aa85de authored by xiaoye's avatar xiaoye

Merge branch 'master' of https://code.moenext.com/mycard/windbot

parents 3175207d 69217b5b
Pipeline #31529 passed with stages
in 1 minute and 3 seconds
...@@ -177,6 +177,22 @@ namespace WindBot.Game.AI.Decks ...@@ -177,6 +177,22 @@ namespace WindBot.Game.AI.Decks
return null; return null;
} }
public override void OnSpSummoned()
{
// not special summoned by chain
if (Duel.GetCurrentSolvingChainCard() == null)
{
foreach (ClientCard card in Duel.LastSummonedCards)
{
if (card.Controller == 0 && card.IsCode(CardId.AlternativeWhiteDragon))
{
AlternativeWhiteDragonSummoned = true;
}
}
}
base.OnSpSummoned();
}
private bool DragonShrineEffect() private bool DragonShrineEffect()
{ {
AI.SelectCard( AI.SelectCard(
...@@ -501,7 +517,6 @@ namespace WindBot.Game.AI.Decks ...@@ -501,7 +517,6 @@ namespace WindBot.Game.AI.Decks
private bool AlternativeWhiteDragonSummon() private bool AlternativeWhiteDragonSummon()
{ {
AlternativeWhiteDragonSummoned = true;
return true; return true;
} }
......
...@@ -245,6 +245,16 @@ namespace WindBot.Game.AI ...@@ -245,6 +245,16 @@ namespace WindBot.Game.AI
return 0; return 0;
} }
/// <summary>
/// Called when card is successfully special summoned.
/// Used on monsters that can only special summoned once per turn.
/// </summary>
public virtual void OnSpSummoned()
{
// For overriding
return;
}
public void SetMain(MainPhase main) public void SetMain(MainPhase main)
{ {
Main = main; Main = main;
......
...@@ -167,6 +167,15 @@ namespace WindBot.Game ...@@ -167,6 +167,15 @@ namespace WindBot.Game
Executor.OnChainSolved(chainIndex); Executor.OnChainSolved(chainIndex);
} }
/// <summary>
/// Called when card is successfully special summoned.
/// Used on monsters that can only special summoned once per turn.
/// </summary>
public void OnSpSummoned()
{
Executor.OnSpSummoned();
}
/// <summary> /// <summary>
/// Called when a chain has been solved. /// Called when a chain has been solved.
/// </summary> /// </summary>
......
...@@ -1971,6 +1971,7 @@ namespace WindBot.Game ...@@ -1971,6 +1971,7 @@ namespace WindBot.Game
card.IsSpecialSummoned = true; card.IsSpecialSummoned = true;
_duel.LastSummonedCards.Add(card); _duel.LastSummonedCards.Add(card);
} }
_ai.OnSpSummoned();
_duel.SummoningCards.Clear(); _duel.SummoningCards.Clear();
} }
......
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