honse-sim 0.1.1 → 0.3.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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "honse-sim",
3
3
  "type": "module",
4
4
  "description": "WebAssembly adapter for the honse-sim race simulation engine.",
5
- "version": "0.1.1",
5
+ "version": "0.3.0",
6
6
  "license": "GPL-3.0-only",
7
7
  "repository": {
8
8
  "type": "git",
package/uma_sim_wasm.d.ts CHANGED
@@ -108,6 +108,28 @@ 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 —
120
+ * an unmapped effect `type` (what it does), `valueUsage` (how much), or `target`
121
+ * (who receives it), or a tiered usage that did not state the
122
+ * `preAppliedMultiplier` already folded into its modifier — so a simulation
123
+ * always runs, but a dropped effect makes that skill's contribution understated.
124
+ * Exposed so a consumer can say which skills are affected instead of presenting
125
+ * partial results as complete.
126
+ *
127
+ * The answer is a property of the skill data alone, so call it once per skill
128
+ * pool rather than per simulation. It accepts a whole pool: no unmapped code in
129
+ * any submitted skill can make this throw.
130
+ */
131
+ export function skillSupportReport(skills: any): any;
132
+
111
133
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
112
134
 
113
135
  export interface InitOutput {
@@ -119,6 +141,7 @@ export interface InitOutput {
119
141
  readonly runCompare: (a: any) => [number, number, number];
120
142
  readonly runContestedCompare: (a: any) => [number, number, number];
121
143
  readonly runRaceSim: (a: any) => [number, number, number];
144
+ readonly skillSupportReport: (a: any) => [number, number, number];
122
145
  readonly wasmracesimulator_new: (a: any) => [number, number, number];
123
146
  readonly wasmracesimulator_run: (a: number) => [number, number, number];
124
147
  readonly wasmracesimulator_setOnAfterRunnerTick: (a: number, b: any) => void;
package/uma_sim_wasm.js CHANGED
@@ -205,6 +205,36 @@ 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 —
218
+ * an unmapped effect `type` (what it does), `valueUsage` (how much), or `target`
219
+ * (who receives it), or a tiered usage that did not state the
220
+ * `preAppliedMultiplier` already folded into its modifier — so a simulation
221
+ * always runs, but a dropped effect makes that skill's contribution understated.
222
+ * Exposed so a consumer can say which skills are affected instead of presenting
223
+ * partial results as complete.
224
+ *
225
+ * The answer is a property of the skill data alone, so call it once per skill
226
+ * pool rather than per simulation. It accepts a whole pool: no unmapped code in
227
+ * any submitted skill can make this throw.
228
+ * @param {any} skills
229
+ * @returns {any}
230
+ */
231
+ export function skillSupportReport(skills) {
232
+ const ret = wasm.skillSupportReport(skills);
233
+ if (ret[2]) {
234
+ throw takeFromExternrefTable0(ret[1]);
235
+ }
236
+ return takeFromExternrefTable0(ret[0]);
237
+ }
208
238
  function __wbg_get_imports() {
209
239
  const import0 = {
210
240
  __proto__: null,
Binary file