honse-sim 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/uma_sim_wasm.d.ts +18 -0
- package/uma_sim_wasm.js +25 -0
- package/uma_sim_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/uma_sim_wasm.d.ts
CHANGED
|
@@ -108,6 +108,23 @@ export function runRaceSim(params: any): any;
|
|
|
108
108
|
*/
|
|
109
109
|
export function skillActivationPercent(base_wit: number): number;
|
|
110
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Which of the submitted skills this engine models only partially.
|
|
113
|
+
*
|
|
114
|
+
* `skills` is an array of the same skill objects a simulation takes. Returns one
|
|
115
|
+
* entry per skill that loses at least one effect, each listing the dropped
|
|
116
|
+
* effects and whether the skill is left inert; a fully modeled skill is omitted,
|
|
117
|
+
* so an empty array means full coverage.
|
|
118
|
+
*
|
|
119
|
+
* The engine drops effects it cannot model rather than rejecting the skill (an
|
|
120
|
+
* unmapped effect `type`, or a `valueUsage` with no scaling policy), so a
|
|
121
|
+
* simulation always runs — but a dropped effect makes that skill's contribution
|
|
122
|
+
* understated. Exposed so a consumer can say which skills are affected instead
|
|
123
|
+
* of presenting partial results as complete. The answer is a property of the
|
|
124
|
+
* skill data alone, so call it once per skill pool rather than per simulation.
|
|
125
|
+
*/
|
|
126
|
+
export function skillSupportReport(skills: any): any;
|
|
127
|
+
|
|
111
128
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
112
129
|
|
|
113
130
|
export interface InitOutput {
|
|
@@ -119,6 +136,7 @@ export interface InitOutput {
|
|
|
119
136
|
readonly runCompare: (a: any) => [number, number, number];
|
|
120
137
|
readonly runContestedCompare: (a: any) => [number, number, number];
|
|
121
138
|
readonly runRaceSim: (a: any) => [number, number, number];
|
|
139
|
+
readonly skillSupportReport: (a: any) => [number, number, number];
|
|
122
140
|
readonly wasmracesimulator_new: (a: any) => [number, number, number];
|
|
123
141
|
readonly wasmracesimulator_run: (a: number) => [number, number, number];
|
|
124
142
|
readonly wasmracesimulator_setOnAfterRunnerTick: (a: number, b: any) => void;
|
package/uma_sim_wasm.js
CHANGED
|
@@ -205,6 +205,31 @@ export function skillActivationPercent(base_wit) {
|
|
|
205
205
|
const ret = wasm.skillActivationPercent(base_wit);
|
|
206
206
|
return ret;
|
|
207
207
|
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Which of the submitted skills this engine models only partially.
|
|
211
|
+
*
|
|
212
|
+
* `skills` is an array of the same skill objects a simulation takes. Returns one
|
|
213
|
+
* entry per skill that loses at least one effect, each listing the dropped
|
|
214
|
+
* effects and whether the skill is left inert; a fully modeled skill is omitted,
|
|
215
|
+
* so an empty array means full coverage.
|
|
216
|
+
*
|
|
217
|
+
* The engine drops effects it cannot model rather than rejecting the skill (an
|
|
218
|
+
* unmapped effect `type`, or a `valueUsage` with no scaling policy), so a
|
|
219
|
+
* simulation always runs — but a dropped effect makes that skill's contribution
|
|
220
|
+
* understated. Exposed so a consumer can say which skills are affected instead
|
|
221
|
+
* of presenting partial results as complete. The answer is a property of the
|
|
222
|
+
* skill data alone, so call it once per skill pool rather than per simulation.
|
|
223
|
+
* @param {any} skills
|
|
224
|
+
* @returns {any}
|
|
225
|
+
*/
|
|
226
|
+
export function skillSupportReport(skills) {
|
|
227
|
+
const ret = wasm.skillSupportReport(skills);
|
|
228
|
+
if (ret[2]) {
|
|
229
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
230
|
+
}
|
|
231
|
+
return takeFromExternrefTable0(ret[0]);
|
|
232
|
+
}
|
|
208
233
|
function __wbg_get_imports() {
|
|
209
234
|
const import0 = {
|
|
210
235
|
__proto__: null,
|
package/uma_sim_wasm_bg.wasm
CHANGED
|
Binary file
|