From 5f481092303a00a0fe75c2446b426bfad5063cd1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 29 Jan 2024 11:47:01 +0900 Subject: [PATCH] wip --- packages/misskey-mahjong/src/common.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/misskey-mahjong/src/common.ts b/packages/misskey-mahjong/src/common.ts index 0e3e0243bc..4816095f82 100644 --- a/packages/misskey-mahjong/src/common.ts +++ b/packages/misskey-mahjong/src/common.ts @@ -217,6 +217,19 @@ const YAKU_DEFINITIONS = [{ false).length >= 3) ); }, +}, { + name: 'seat-wind', + fan: 1, + calc: (state: EnvForCalcYaku) => { + return ( + (state.handTiles.filter(t => t === state.house).length >= 3) || + (state.huros.filter(huro => + huro.type === 'pon' ? huro.tile === state.house : + huro.type === 'ankan' ? huro.tile === state.house : + huro.type === 'minkan' ? huro.tile === state.house : + false).length >= 3) + ); + }, }, { name: 'tanyao', fan: 1,