fix(mahjong): 麻雀をプレイできない問題を修正 (#14268)
* ビルドによる自動的なソース更新
* 麻雀関連のキーバリューペアを追加
* 役の定義をまとめてエクスポート
* タイポ修正
* Revert "麻雀関連のキーバリューペアを追加"
This reverts commit c349cdf70c.
* misskey-jsのビルドによる自動更新
			
			
This commit is contained in:
		
							
								
								
									
										4
									
								
								locales/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								locales/index.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -10257,9 +10257,9 @@ export interface Locale extends ILocale {
 | 
			
		||||
             */
 | 
			
		||||
            "churen": string;
 | 
			
		||||
            /**
 | 
			
		||||
             * 純正九連宝灯
 | 
			
		||||
             * 九連宝灯九面待
 | 
			
		||||
             */
 | 
			
		||||
            "pure-churen": string;
 | 
			
		||||
            "churen-9": string;
 | 
			
		||||
            /**
 | 
			
		||||
             * 天和
 | 
			
		||||
             */
 | 
			
		||||
 
 | 
			
		||||
@@ -1343,4 +1343,7 @@ export const endpointReqTypes: Record<keyof Endpoints, 'application/json' | 'mul
 | 
			
		||||
	'reversi/show-game': 'application/json',
 | 
			
		||||
	'reversi/surrender': 'application/json',
 | 
			
		||||
	'reversi/verify': 'application/json',
 | 
			
		||||
	'mahjong/create-room': 'application/json',
 | 
			
		||||
	'mahjong/join-room': 'application/json',
 | 
			
		||||
	'mahjong/show-room': 'application/json',
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -137,7 +137,7 @@ function countTiles(tiles: TileType[], target: TileType): number {
 | 
			
		||||
	return tiles.filter(t => t === target).length;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const NORAML_YAKU_DEFINITIONS: YakuDefiniyion[] = [{
 | 
			
		||||
export const NORMAL_YAKU_DEFINITIONS: YakuDefiniyion[] = [{
 | 
			
		||||
	name: 'tsumo',
 | 
			
		||||
	fan: 1,
 | 
			
		||||
	isYakuman: false,
 | 
			
		||||
@@ -766,6 +766,8 @@ export const YAKUMAN_DEFINITIONS: YakuDefiniyion[] = [{
 | 
			
		||||
	},
 | 
			
		||||
}];
 | 
			
		||||
 | 
			
		||||
export const YAKU_DEFINITIONS = NORMAL_YAKU_DEFINITIONS.concat(YAKUMAN_DEFINITIONS);
 | 
			
		||||
 | 
			
		||||
export function calcYakus(state: EnvForCalcYaku): YakuName[] {
 | 
			
		||||
	const oneHeadFourMentsuPatterns: (FourMentsuOneJyantou | null)[] = analyzeFourMentsuOneJyantou(state.handTiles);
 | 
			
		||||
	if (oneHeadFourMentsuPatterns.length === 0) oneHeadFourMentsuPatterns.push(null);
 | 
			
		||||
@@ -787,7 +789,7 @@ export function calcYakus(state: EnvForCalcYaku): YakuName[] {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	const yakuPatterns = oneHeadFourMentsuPatterns.map(fourMentsuOneJyantou => {
 | 
			
		||||
		return NORAML_YAKU_DEFINITIONS.map(yakuDef => {
 | 
			
		||||
		return NORMAL_YAKU_DEFINITIONS.map(yakuDef => {
 | 
			
		||||
			const result = yakuDef.calc(state, fourMentsuOneJyantou);
 | 
			
		||||
			return result ? yakuDef : null;
 | 
			
		||||
		}).filter(yaku => yaku != null) as YakuDefiniyion[];
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@ import CRC32 from 'crc-32';
 | 
			
		||||
import { TileType, House, Huro, TileId } from './common.js';
 | 
			
		||||
import * as Common from './common.js';
 | 
			
		||||
import { PlayerState } from './engine.player.js';
 | 
			
		||||
import { YAKU_DEFINITIONS } from "./common.yaku.js";
 | 
			
		||||
 | 
			
		||||
//#region syntax suger
 | 
			
		||||
function $(tid: TileId): Common.TileInstance {
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,7 @@
 | 
			
		||||
import CRC32 from 'crc-32';
 | 
			
		||||
import { TileType, House, Huro, TileId } from './common.js';
 | 
			
		||||
import * as Common from './common.js';
 | 
			
		||||
import { YAKU_DEFINITIONS } from './common.yaku.js';
 | 
			
		||||
 | 
			
		||||
//#region syntax suger
 | 
			
		||||
function $(tid: TileId): Common.TileInstance {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user