diff --git a/src/app/class/cut-in-list.ts b/src/app/class/cut-in-list.ts index 5e515c3c..77f997d7 100644 --- a/src/app/class/cut-in-list.ts +++ b/src/app/class/cut-in-list.ts @@ -68,7 +68,7 @@ export class CutInList extends ObjectNode implements InnerXml { let isMatch = false; for (const postfix of cutIn.postfixes) { if (StringUtil.toHalfWidth(text).toUpperCase().trimRight().endsWith(StringUtil.toHalfWidth(postfix).toUpperCase().trimRight()) - || StringUtil.toHalfWidth(text.replace(/\s>\s/g, ' → ')).toUpperCase().trimRight().endsWith(StringUtil.toHalfWidth(postfix).toUpperCase().trimRight())) { + || StringUtil.toHalfWidth(text.replace(/(\s|^)>\s/g, '$1→ ')).toUpperCase().trimRight().endsWith(StringUtil.toHalfWidth(postfix).toUpperCase().trimRight())) { isMatch = true; if ((postfix.slice(0, 1) == '@' || postfix.slice(0, 1) == '@') && textTagMatch.length < postfix.length) textTagMatch = postfix; } diff --git a/src/app/class/dice-bot.ts b/src/app/class/dice-bot.ts index cc53bcfd..9a587421 100644 --- a/src/app/class/dice-bot.ts +++ b/src/app/class/dice-bot.ts @@ -650,9 +650,15 @@ export class DiceBot extends GameObject { let barabaraDiceInfos = []; let rerollDiceInfos = []; let upperDiceInfos = []; - return resultLine.split(' > ').map((resultFragment, i, a) => { + if (id === 'Cthulhu7th' && /^\d+(:?回目|次|번째): >/.test(resultLine)) resultLine = '🎲' + resultLine; + return resultLine.split(/\s>\s/).map((resultFragment, i, a) => { if (a.length === 1) return resultFragment; if (i == 0) { + if ((id === 'Cthulhu' && /\d\) (?:故障ナンバー|故障率|고장넘버)\[\-?\d+\]/.test(resultFragment)) + || (id === 'Cthulhu7th' && /\d\) (?:ボーナス・ペナルティダイス|獎勵、懲罰骰値|보너스, 패널티 주사위)\[\-?\d+\]/.test(resultFragment)) + ) { + return '🎲' + resultFragment; + } const regExp1 = (DiceBot.apiUrl && DiceBot.apiVersion == 1) ? /^(?:\: )\(([A-Z\d\+\-\*\/=\(\),\[\]\<\>@#\$]+)\)$/i : /^\(([A-Z\d\+\-\*\/=\(\),\[\]\<\>@#\$]+)\)$/i; const regExp2 = (DiceBot.apiUrl && DiceBot.apiVersion == 1) ? /^(?:\: )\((CHOICE(?:\d+)?[\[\( ].+)\)$/i : /^\((CHOICE(?:\d+)?[\[\( ].+)\)$/i; const parentheses = resultFragment.match(regExp1) || resultFragment.match(regExp2); @@ -805,7 +811,7 @@ export class DiceBot extends GameObject { } } return resultFragment; - }).join(' → '); + }).join(' > ').replace(/(\s|^)>\s/g, '$1→ '); }).join("\n"); } diff --git a/src/app/class/stand-list.ts b/src/app/class/stand-list.ts index e97171fd..40041790 100644 --- a/src/app/class/stand-list.ts +++ b/src/app/class/stand-list.ts @@ -94,7 +94,7 @@ export class StandList extends DataElement { for (let postfix of postfixes.split(/[\r\n]+/g)) { if (postfix == null || postfix.trim().length == 0) continue; if (StringUtil.toHalfWidth(text).toUpperCase().trimRight().endsWith(StringUtil.toHalfWidth(postfix).trimRight().toUpperCase()) - || StringUtil.toHalfWidth(text.replace(/\s>\s/g, ' → ')).toUpperCase().trimRight().endsWith(StringUtil.toHalfWidth(postfix).trimRight().toUpperCase())) { + || StringUtil.toHalfWidth(text.replace(/(\s|^)>\s/g, '$1→ ')).toUpperCase().trimRight().endsWith(StringUtil.toHalfWidth(postfix).trimRight().toUpperCase())) { if ((postfix.slice(0, 1) == '@' || postfix.slice(0, 1) == '@') && textTagMatch.length < postfix.length) textTagMatch = postfix; conditionPostfix = true; }