This commit is contained in:
syuilo 2019-05-05 20:16:05 +09:00
parent 22596d3f04
commit 4114392f2b
3 changed files with 4 additions and 4 deletions

View File

@ -2059,8 +2059,8 @@ pages:
_seedRandomPick: _seedRandomPick:
arg1: "シード" arg1: "シード"
arg2: "リスト" arg2: "リスト"
dailyRPWPM: "確率付きリストからランダムに選択 (ユーザーごとに日替わり)" DRPWPM: "確率付きリストからランダムに選択 (ユーザーごとに日替わり)"
_ddailyRPWPM: _DRPWPM:
arg1: "テキストのリスト" arg1: "テキストのリスト"
number: "数値" number: "数値"
stringToNumber: "テキストを数値に" stringToNumber: "テキストを数値に"

View File

@ -178,7 +178,7 @@ export class ASEvaluator {
seedRandom: (seed: any, probability: number) => Math.floor(seedrandom(seed)() * 100) < probability, seedRandom: (seed: any, probability: number) => Math.floor(seedrandom(seed)() * 100) < probability,
seedRannum: (seed: any, min: number, max: number) => min + Math.floor(seedrandom(seed)() * (max - min + 1)), seedRannum: (seed: any, min: number, max: number) => min + Math.floor(seedrandom(seed)() * (max - min + 1)),
seedRandomPick: (seed: any, list: any[]) => list[Math.floor(seedrandom(seed)() * list.length)], seedRandomPick: (seed: any, list: any[]) => list[Math.floor(seedrandom(seed)() * list.length)],
dailyRPWPM: (list: string[]) => { DRPWPM: (list: string[]) => {
const xs = []; const xs = [];
let totalFactor = 0; let totalFactor = 0;
for (const x of list) { for (const x of list) {

View File

@ -81,7 +81,7 @@ export const funcDefs: Record<string, { in: any[]; out: any; category: string; i
randomPick: { in: [0], out: 0, category: 'random', icon: faDice, }, randomPick: { in: [0], out: 0, category: 'random', icon: faDice, },
dailyRandomPick: { in: [0], out: 0, category: 'random', icon: faDice, }, dailyRandomPick: { in: [0], out: 0, category: 'random', icon: faDice, },
seedRandomPick: { in: [null, 0], out: 0, category: 'random', icon: faDice, }, seedRandomPick: { in: [null, 0], out: 0, category: 'random', icon: faDice, },
dailyRPWPM: { in: ['stringArray'], out: 'string', category: 'random', icon: faDice, }, // dailyRandomPickWithProbabilityMapping DRPWPM: { in: ['stringArray'], out: 'string', category: 'random', icon: faDice, }, // dailyRandomPickWithProbabilityMapping
}; };
export const literalDefs: Record<string, { out: any; category: string; icon: any; }> = { export const literalDefs: Record<string, { out: any; category: string; icon: any; }> = {