Files
hjha-server/GameFix/Common/Card/StyleChecker/Helper/CardStyle510KMultExtendHelper.cs
xiaoou e9616125ce feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) +
game logic (GameFix/GameDAL/ServerData) +
network layer (NetWorkMessage) +
data layer (ObjectModel) +
utilities (MrWu/Core/Config/CloudAPI/dll) +
adapters (zyxAdapter/base)

.NET 8.0 C# solution, 16 projects, 958 source files
2026-07-07 12:02:15 +08:00

51 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using GameMessage;
namespace GameFix.Poker
{
/// <summary>
/// 多副510K (可带 510k单牌)
/// </summary>
public class CardStyle510KMultExtendHelper : CardStyle510KMultHelper
{
public CardStyle510KMultExtendHelper(int mult) : base(mult)
{
}
internal override List<CardGroupList> GetAllStyleCards(CardBaseGroup group, bool isSplitCard)
{
List<CardGroupList> ret = new List<CardGroupList>();
var c510KList = CardFunc.Get510KList(group.SelfCards, _mult);
if (c510KList.Count > 0)
{
// 剩下得 5 10 k也添加上
var c510KGroup = new CardGroupList(c510KList.SelectMany(x => x));
var c510KCards = group.SelfCards.Where(x => V_510K.Contains(x.Value)).ToList();
c510KGroup.AddRange(c510KCards);
ret.Add(c510KGroup);
}
return ret;
}
internal override bool CheckStyleNormal(CardBaseGroup group, out CardStyleInfo cardStyleInfo)
{
cardStyleInfo = null;
if (group.Cards.Count >= CardCnt)
{
var c510KList = CardFunc.Get510KList(group.Cards, _mult);
var c510KListLong = c510KList.SelectMany(x => x).ToList();
var remainCardList = group.Cards.Where(x => !c510KListLong.Contains(x) && V_510K.Contains(x.Value)).ToList();
if (remainCardList.Count + c510KListLong.Count == group.Cards.Count)
{
cardStyleInfo = new CardStyleInfo(CardStyle, 0, c510KList.Count);
cardStyleInfo.CustomInt = c510KList.Count; // 510K的个数
return true;
}
}
return false;
}
}
}