From 030cc0ca71262cedbed55743861e65efc6f5412d Mon Sep 17 00:00:00 2001 From: Oleg Klimenko Date: Sun, 7 May 2017 20:04:50 +0300 Subject: [PATCH] TYR-22 allow double riichi + ippatsu --- src/app/primitives/appstate/yaku.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/primitives/appstate/yaku.ts b/src/app/primitives/appstate/yaku.ts index c3d87d3..257bc5e 100644 --- a/src/app/primitives/appstate/yaku.ts +++ b/src/app/primitives/appstate/yaku.ts @@ -234,14 +234,14 @@ export function getAllowedYaku(outcome: AppOutcome, mrWinner: number): YakuId[] function _excludeYaku(outcome: AppOutcome, winner: number, rawYakuList: YakuId[], list: YakuId[], toBeExcluded: YakuId[]) { return list.filter((yaku: YakuId) => { - if ( // disable ippatsu if riichi is not selected + if ( // disable ippatsu if riichi or double riichi is not selected yaku === YakuId.IPPATSU && ( outcome.selectedOutcome === 'ron' || outcome.selectedOutcome === 'tsumo' || outcome.selectedOutcome === 'multiron' ) - && rawYakuList.indexOf(YakuId.RIICHI) === -1 + && (rawYakuList.indexOf(YakuId.RIICHI) === -1 && rawYakuList.indexOf(YakuId.DOUBLERIICHI) === -1) ) { return false; }