Commit f7366b40 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream'

parents fc1f021c 4c4c5c66
Pipeline #28976 passed with stages
in 4 minutes and 8 seconds
......@@ -55,28 +55,32 @@ namespace WindBot.Game.AI
{
return cards
.Where(card => card?.Data != null && card.HasType(CardType.Monster) && card.IsFaceup() && !(canBeTarget && card.IsShouldNotBeTarget()))
.OrderBy(card => card.Attack).FirstOrDefault();
.OrderByDescending(card => card.Attack)
.FirstOrDefault();
}
public static ClientCard GetHighestDefenseMonster(this IEnumerable<ClientCard> cards, bool canBeTarget = false)
{
return cards
.Where(card => card?.Data != null && card.HasType(CardType.Monster) && card.IsFaceup() && !(canBeTarget && card.IsShouldNotBeTarget()))
.OrderBy(card => card.Defense).FirstOrDefault();
.OrderByDescending(card => card.Defense)
.FirstOrDefault();
}
public static ClientCard GetLowestAttackMonster(this IEnumerable<ClientCard> cards, bool canBeTarget = false)
{
return cards
.Where(card => card?.Data != null && card.HasType(CardType.Monster) && card.IsFaceup() && !(canBeTarget && card.IsShouldNotBeTarget()))
.OrderByDescending(card => card.Attack).FirstOrDefault();
.OrderBy(card => card.Attack)
.FirstOrDefault();
}
public static ClientCard GetLowestDefenseMonster(this IEnumerable<ClientCard> cards, bool canBeTarget = false)
{
return cards
.Where(card => card?.Data != null && card.HasType(CardType.Monster) && card.IsFaceup() && !(canBeTarget && card.IsShouldNotBeTarget()))
.OrderByDescending(card => card.Defense).FirstOrDefault();
.OrderBy(card => card.Defense)
.FirstOrDefault();
}
public static bool ContainsMonsterWithLevel(this IEnumerable<ClientCard> cards, int level)
......
......@@ -212,6 +212,7 @@ namespace WindBot.Game.AI.Decks
activate_Genius = false;
activate_Sarutobi = false;
to_deck = false;
base.OnNewTurn();
}
public override bool OnSelectHand()
{
......
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