mons-web 0.1.111 → 0.1.114

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/mons-web.d.ts CHANGED
@@ -25,27 +25,9 @@ export enum Modifier {
25
25
  }
26
26
  /**
27
27
  */
28
- export enum EventModelKind {
29
- MonMove = 0,
30
- ManaMove = 1,
31
- ManaScored = 2,
32
- MysticAction = 3,
33
- DemonAction = 4,
34
- DemonAdditionalStep = 5,
35
- SpiritTargetMove = 6,
36
- PickupBomb = 7,
37
- PickupPotion = 8,
38
- PickupMana = 9,
39
- MonFainted = 10,
40
- ManaDropped = 11,
41
- SupermanaBackToBase = 12,
42
- BombAttack = 13,
43
- MonAwake = 14,
44
- BombExplosion = 15,
45
- NextTurn = 16,
46
- GameOver = 17,
47
- Takeback = 18,
48
- UsePotion = 19,
28
+ export enum Color {
29
+ White = 0,
30
+ Black = 1,
49
31
  }
50
32
  /**
51
33
  */
@@ -56,32 +38,28 @@ export enum Consumable {
56
38
  }
57
39
  /**
58
40
  */
59
- export enum AvailableMoveKind {
60
- MonMove = 0,
61
- ManaMove = 1,
62
- Action = 2,
63
- Potion = 3,
41
+ export enum MonKind {
42
+ Demon = 0,
43
+ Drainer = 1,
44
+ Angel = 2,
45
+ Spirit = 3,
46
+ Mystic = 4,
64
47
  }
65
48
  /**
66
49
  */
67
- export enum ManaKind {
50
+ export enum SquareModelKind {
68
51
  Regular = 0,
69
- Supermana = 1,
70
- }
71
- /**
72
- */
73
- export enum ItemModelKind {
74
- Mon = 0,
75
- Mana = 1,
76
- MonWithMana = 2,
77
- MonWithConsumable = 3,
78
- Consumable = 4,
52
+ ConsumableBase = 1,
53
+ SupermanaBase = 2,
54
+ ManaBase = 3,
55
+ ManaPool = 4,
56
+ MonBase = 5,
79
57
  }
80
58
  /**
81
59
  */
82
- export enum Color {
83
- White = 0,
84
- Black = 1,
60
+ export enum ManaKind {
61
+ Regular = 0,
62
+ Supermana = 1,
85
63
  }
86
64
  /**
87
65
  */
@@ -98,22 +76,44 @@ export enum NextInputKind {
98
76
  }
99
77
  /**
100
78
  */
101
- export enum MonKind {
102
- Demon = 0,
103
- Drainer = 1,
104
- Angel = 2,
105
- Spirit = 3,
106
- Mystic = 4,
79
+ export enum AvailableMoveKind {
80
+ MonMove = 0,
81
+ ManaMove = 1,
82
+ Action = 2,
83
+ Potion = 3,
107
84
  }
108
85
  /**
109
86
  */
110
- export enum SquareModelKind {
111
- Regular = 0,
112
- ConsumableBase = 1,
113
- SupermanaBase = 2,
114
- ManaBase = 3,
115
- ManaPool = 4,
116
- MonBase = 5,
87
+ export enum ItemModelKind {
88
+ Mon = 0,
89
+ Mana = 1,
90
+ MonWithMana = 2,
91
+ MonWithConsumable = 3,
92
+ Consumable = 4,
93
+ }
94
+ /**
95
+ */
96
+ export enum EventModelKind {
97
+ MonMove = 0,
98
+ ManaMove = 1,
99
+ ManaScored = 2,
100
+ MysticAction = 3,
101
+ DemonAction = 4,
102
+ DemonAdditionalStep = 5,
103
+ SpiritTargetMove = 6,
104
+ PickupBomb = 7,
105
+ PickupPotion = 8,
106
+ PickupMana = 9,
107
+ MonFainted = 10,
108
+ ManaDropped = 11,
109
+ SupermanaBackToBase = 12,
110
+ BombAttack = 13,
111
+ MonAwake = 14,
112
+ BombExplosion = 15,
113
+ NextTurn = 16,
114
+ GameOver = 17,
115
+ Takeback = 18,
116
+ UsePotion = 19,
117
117
  }
118
118
  /**
119
119
  */
@@ -522,7 +522,12 @@ export interface InitOutput {
522
522
  readonly __wbg_get_nextinputmodel_location: (a: number) => number;
523
523
  readonly __wbg_squaremodel_free: (a: number) => void;
524
524
  readonly __wbg_set_nextinputmodel_location: (a: number, b: number) => void;
525
- readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
525
+ readonly __wbg_get_location_i: (a: number) => number;
526
+ readonly __wbg_get_location_j: (a: number) => number;
527
+ readonly __wbg_location_free: (a: number) => void;
528
+ readonly __wbg_set_location_i: (a: number, b: number) => void;
529
+ readonly __wbg_set_location_j: (a: number, b: number) => void;
530
+ readonly location_new: (a: number, b: number) => number;
526
531
  readonly __wbg_get_mon_color: (a: number) => number;
527
532
  readonly __wbg_get_mon_cooldown: (a: number) => number;
528
533
  readonly __wbg_get_mon_kind: (a: number) => number;
@@ -534,20 +539,12 @@ export interface InitOutput {
534
539
  readonly mon_faint: (a: number) => void;
535
540
  readonly mon_is_fainted: (a: number) => number;
536
541
  readonly mon_new: (a: number, b: number, c: number) => number;
537
- readonly __wbg_get_location_i: (a: number) => number;
538
- readonly __wbg_get_location_j: (a: number) => number;
539
- readonly __wbg_location_free: (a: number) => void;
540
- readonly __wbg_set_location_i: (a: number, b: number) => void;
541
- readonly __wbg_set_location_j: (a: number, b: number) => void;
542
- readonly location_new: (a: number, b: number) => number;
542
+ readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
543
543
  readonly __wbindgen_malloc: (a: number, b: number) => number;
544
544
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
545
- readonly __wbindgen_export_2: WebAssembly.Table;
546
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he9bf1cd1c1c5a3c5: (a: number, b: number) => void;
547
545
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
548
546
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
549
547
  readonly __wbindgen_exn_store: (a: number) => void;
550
- readonly wasm_bindgen__convert__closures__invoke2_mut__h6cfc31b0a14c9fbd: (a: number, b: number, c: number, d: number) => void;
551
548
  }
552
549
 
553
550
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/mons-web.js CHANGED
@@ -116,40 +116,6 @@ function getInt32Memory0() {
116
116
  return cachedInt32Memory0;
117
117
  }
118
118
 
119
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
120
- ? { register: () => {}, unregister: () => {} }
121
- : new FinalizationRegistry(state => {
122
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
123
- });
124
-
125
- function makeMutClosure(arg0, arg1, dtor, f) {
126
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
127
- const real = (...args) => {
128
- // First up with a closure we increment the internal reference
129
- // count. This ensures that the Rust closure environment won't
130
- // be deallocated while we're invoking it.
131
- state.cnt++;
132
- const a = state.a;
133
- state.a = 0;
134
- try {
135
- return f(a, state.b, ...args);
136
- } finally {
137
- if (--state.cnt === 0) {
138
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
139
- CLOSURE_DTORS.unregister(state);
140
- } else {
141
- state.a = a;
142
- }
143
- }
144
- };
145
- real.original = state;
146
- CLOSURE_DTORS.register(real, state, state);
147
- return real;
148
- }
149
- function __wbg_adapter_26(arg0, arg1) {
150
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he9bf1cd1c1c5a3c5(arg0, arg1);
151
- }
152
-
153
119
  let cachedUint32Memory0 = null;
154
120
 
155
121
  function getUint32Memory0() {
@@ -230,10 +196,6 @@ function handleError(f, args) {
230
196
  wasm.__wbindgen_exn_store(addHeapObject(e));
231
197
  }
232
198
  }
233
- function __wbg_adapter_151(arg0, arg1, arg2, arg3) {
234
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h6cfc31b0a14c9fbd(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
235
- }
236
-
237
199
  /**
238
200
  */
239
201
  export const OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
@@ -242,31 +204,31 @@ export const OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput"
242
204
  export const Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
243
205
  /**
244
206
  */
245
- export const EventModelKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",ManaScored:2,"2":"ManaScored",MysticAction:3,"3":"MysticAction",DemonAction:4,"4":"DemonAction",DemonAdditionalStep:5,"5":"DemonAdditionalStep",SpiritTargetMove:6,"6":"SpiritTargetMove",PickupBomb:7,"7":"PickupBomb",PickupPotion:8,"8":"PickupPotion",PickupMana:9,"9":"PickupMana",MonFainted:10,"10":"MonFainted",ManaDropped:11,"11":"ManaDropped",SupermanaBackToBase:12,"12":"SupermanaBackToBase",BombAttack:13,"13":"BombAttack",MonAwake:14,"14":"MonAwake",BombExplosion:15,"15":"BombExplosion",NextTurn:16,"16":"NextTurn",GameOver:17,"17":"GameOver",Takeback:18,"18":"Takeback",UsePotion:19,"19":"UsePotion", });
207
+ export const Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
246
208
  /**
247
209
  */
248
210
  export const Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
249
211
  /**
250
212
  */
251
- export const AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
213
+ export const MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
252
214
  /**
253
215
  */
254
- export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
216
+ export const SquareModelKind = Object.freeze({ Regular:0,"0":"Regular",ConsumableBase:1,"1":"ConsumableBase",SupermanaBase:2,"2":"SupermanaBase",ManaBase:3,"3":"ManaBase",ManaPool:4,"4":"ManaPool",MonBase:5,"5":"MonBase", });
255
217
  /**
256
218
  */
257
- export const ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
219
+ export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
258
220
  /**
259
221
  */
260
- export const Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
222
+ export const NextInputKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",MysticAction:2,"2":"MysticAction",DemonAction:3,"3":"DemonAction",DemonAdditionalStep:4,"4":"DemonAdditionalStep",SpiritTargetCapture:5,"5":"SpiritTargetCapture",SpiritTargetMove:6,"6":"SpiritTargetMove",SelectConsumable:7,"7":"SelectConsumable",BombAttack:8,"8":"BombAttack", });
261
223
  /**
262
224
  */
263
- export const NextInputKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",MysticAction:2,"2":"MysticAction",DemonAction:3,"3":"DemonAction",DemonAdditionalStep:4,"4":"DemonAdditionalStep",SpiritTargetCapture:5,"5":"SpiritTargetCapture",SpiritTargetMove:6,"6":"SpiritTargetMove",SelectConsumable:7,"7":"SelectConsumable",BombAttack:8,"8":"BombAttack", });
225
+ export const AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
264
226
  /**
265
227
  */
266
- export const MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
228
+ export const ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
267
229
  /**
268
230
  */
269
- export const SquareModelKind = Object.freeze({ Regular:0,"0":"Regular",ConsumableBase:1,"1":"ConsumableBase",SupermanaBase:2,"2":"SupermanaBase",ManaBase:3,"3":"ManaBase",ManaPool:4,"4":"ManaPool",MonBase:5,"5":"MonBase", });
231
+ export const EventModelKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",ManaScored:2,"2":"ManaScored",MysticAction:3,"3":"MysticAction",DemonAction:4,"4":"DemonAction",DemonAdditionalStep:5,"5":"DemonAdditionalStep",SpiritTargetMove:6,"6":"SpiritTargetMove",PickupBomb:7,"7":"PickupBomb",PickupPotion:8,"8":"PickupPotion",PickupMana:9,"9":"PickupMana",MonFainted:10,"10":"MonFainted",ManaDropped:11,"11":"ManaDropped",SupermanaBackToBase:12,"12":"SupermanaBackToBase",BombAttack:13,"13":"BombAttack",MonAwake:14,"14":"MonAwake",BombExplosion:15,"15":"BombExplosion",NextTurn:16,"16":"NextTurn",GameOver:17,"17":"GameOver",Takeback:18,"18":"Takeback",UsePotion:19,"19":"UsePotion", });
270
232
 
271
233
  const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
272
234
  ? { register: () => {}, unregister: () => {} }
@@ -1443,41 +1405,20 @@ function __wbg_get_imports() {
1443
1405
  const ret = getStringFromWasm0(arg0, arg1);
1444
1406
  return addHeapObject(ret);
1445
1407
  };
1446
- imports.wbg.__wbindgen_is_function = function(arg0) {
1447
- const ret = typeof(getObject(arg0)) === 'function';
1448
- return ret;
1449
- };
1450
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1451
- const ret = getObject(arg0);
1452
- return addHeapObject(ret);
1453
- };
1454
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
1455
- const obj = takeObject(arg0).original;
1456
- if (obj.cnt-- == 1) {
1457
- obj.a = 0;
1458
- return true;
1459
- }
1460
- const ret = false;
1461
- return ret;
1462
- };
1463
- imports.wbg.__wbindgen_number_new = function(arg0) {
1464
- const ret = arg0;
1465
- return addHeapObject(ret);
1466
- };
1467
1408
  imports.wbg.__wbg_outputmodel_new = function(arg0) {
1468
1409
  const ret = OutputModel.__wrap(arg0);
1469
1410
  return addHeapObject(ret);
1470
1411
  };
1471
- imports.wbg.__wbg_eventmodel_new = function(arg0) {
1472
- const ret = EventModel.__wrap(arg0);
1412
+ imports.wbg.__wbg_nextinputmodel_new = function(arg0) {
1413
+ const ret = NextInputModel.__wrap(arg0);
1473
1414
  return addHeapObject(ret);
1474
1415
  };
1475
1416
  imports.wbg.__wbg_location_new = function(arg0) {
1476
1417
  const ret = Location.__wrap(arg0);
1477
1418
  return addHeapObject(ret);
1478
1419
  };
1479
- imports.wbg.__wbg_nextinputmodel_new = function(arg0) {
1480
- const ret = NextInputModel.__wrap(arg0);
1420
+ imports.wbg.__wbg_eventmodel_new = function(arg0) {
1421
+ const ret = EventModel.__wrap(arg0);
1481
1422
  return addHeapObject(ret);
1482
1423
  };
1483
1424
  imports.wbg.__wbg_verbosetrackingentitymodel_new = function(arg0) {
@@ -1517,6 +1458,10 @@ function __wbg_get_imports() {
1517
1458
  const ret = module.require;
1518
1459
  return addHeapObject(ret);
1519
1460
  }, arguments) };
1461
+ imports.wbg.__wbindgen_is_function = function(arg0) {
1462
+ const ret = typeof(getObject(arg0)) === 'function';
1463
+ return ret;
1464
+ };
1520
1465
  imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
1521
1466
  const ret = getObject(arg0).msCrypto;
1522
1467
  return addHeapObject(ret);
@@ -1586,23 +1531,9 @@ function __wbg_get_imports() {
1586
1531
  const ret = getObject(arg0).call(getObject(arg1));
1587
1532
  return addHeapObject(ret);
1588
1533
  }, arguments) };
1589
- imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
1590
- try {
1591
- var state0 = {a: arg0, b: arg1};
1592
- var cb0 = (arg0, arg1) => {
1593
- const a = state0.a;
1594
- state0.a = 0;
1595
- try {
1596
- return __wbg_adapter_151(a, state0.b, arg0, arg1);
1597
- } finally {
1598
- state0.a = a;
1599
- }
1600
- };
1601
- const ret = new Promise(cb0);
1602
- return addHeapObject(ret);
1603
- } finally {
1604
- state0.a = state0.b = 0;
1605
- }
1534
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1535
+ const ret = getObject(arg0);
1536
+ return addHeapObject(ret);
1606
1537
  };
1607
1538
  imports.wbg.__wbg_reject_a778418101c86bc9 = function(arg0) {
1608
1539
  const ret = Promise.reject(getObject(arg0));
@@ -1616,14 +1547,6 @@ function __wbg_get_imports() {
1616
1547
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1617
1548
  return addHeapObject(ret);
1618
1549
  }, arguments) };
1619
- imports.wbg.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1620
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
1621
- return addHeapObject(ret);
1622
- }, arguments) };
1623
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
1624
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
1625
- return addHeapObject(ret);
1626
- }, arguments) };
1627
1550
  imports.wbg.__wbindgen_memory = function() {
1628
1551
  const ret = wasm.memory;
1629
1552
  return addHeapObject(ret);
@@ -1631,10 +1554,6 @@ function __wbg_get_imports() {
1631
1554
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1632
1555
  throw new Error(getStringFromWasm0(arg0, arg1));
1633
1556
  };
1634
- imports.wbg.__wbindgen_closure_wrapper542 = function(arg0, arg1, arg2) {
1635
- const ret = makeMutClosure(arg0, arg1, 21, __wbg_adapter_26);
1636
- return addHeapObject(ret);
1637
- };
1638
1557
 
1639
1558
  return imports;
1640
1559
  }
package/mons-web_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mons-web",
3
3
  "type": "module",
4
4
  "description": "super metal mons",
5
- "version": "0.1.111",
5
+ "version": "0.1.114",
6
6
  "license": "CC0-1.0",
7
7
  "repository": {
8
8
  "type": "git",