Skip to content

Commit

Permalink
微修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanasu committed Feb 16, 2024
1 parent 5fc526b commit 9d17a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/class/dice-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export class DiceBot extends GameObject {
return resultLine.split(' > ').map((resultFragment, i, a) => {
if (a.length === 1) return resultFragment;
if (i == 0) {
const regExp1 = (DiceBot.apiUrl && DiceBot.apiVersion == 1) ? /^(?:\: )\(([A-Z\d\+\-\*\/=\(\),\[\]\<\>@]+)\)$/i : /^\(([A-Z\d\+\-\*\/=\(\),\[\]\<\>@]+)\)$/i;
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);
if (parentheses && !parentheses[1].toUpperCase().startsWith('CHOICE')) {
Expand Down

0 comments on commit 9d17a65

Please sign in to comment.