@adatechnology/game-test-room 0.1.1 → 0.1.2
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/dist/index.global.js +4 -1
- package/dist/index.global.js.map +1 -1
- package/package.json +3 -3
package/dist/index.global.js
CHANGED
|
@@ -1641,6 +1641,8 @@ var GameTestRoom = (() => {
|
|
|
1641
1641
|
var DMG_PER_J = 0.02;
|
|
1642
1642
|
var BLAST_COUPLING = 0.1;
|
|
1643
1643
|
var FLAMMABLE_FLUIDS = ["gas", "fuel"];
|
|
1644
|
+
var CUT_SLICE = 1;
|
|
1645
|
+
var cutFactorOf = (shape) => clamp2(Math.max(...shapeDims(shape)) / CUT_SLICE, 1, 50);
|
|
1644
1646
|
var clamp2 = (v, a, b) => Math.max(a, Math.min(b, v));
|
|
1645
1647
|
var isLost = (p) => p.st.status === "broken" || p.st.status === "melted" || p.st.status === "ashes";
|
|
1646
1648
|
var clone = (v) => structuredClone(v);
|
|
@@ -1793,6 +1795,7 @@ var GameTestRoom = (() => {
|
|
|
1793
1795
|
fuel0,
|
|
1794
1796
|
area: shapeArea(ps.shape),
|
|
1795
1797
|
thickness: partThickness(ps),
|
|
1798
|
+
cutFactor: cutFactorOf(ps.shape),
|
|
1796
1799
|
dims: shapeDims(ps.shape),
|
|
1797
1800
|
bound: shapeBound(ps.shape),
|
|
1798
1801
|
rt: c?.rt ?? { ...freshRuntime(), prevTemp: pst.temperature },
|
|
@@ -2314,7 +2317,7 @@ var GameTestRoom = (() => {
|
|
|
2314
2317
|
if (kind === "blunt") wearJoints(o, p, E * 0.3, void 0, 0, src);
|
|
2315
2318
|
else wearJoints(o, p, E * 0.3, point, 0.06, src);
|
|
2316
2319
|
const scale2 = mat.damageScale?.[kind] ?? 1;
|
|
2317
|
-
return applyDamage(o, p, Ec * DMG_PER_J * scale2, kind, point, d, E * 0.1, 12, src);
|
|
2320
|
+
return applyDamage(o, p, Ec * DMG_PER_J * scale2 * (kind === "slash" ? p.cutFactor : 1), kind, point, d, E * 0.1, 12, src);
|
|
2318
2321
|
};
|
|
2319
2322
|
const blastObject = (o, point, energy, radius, src) => {
|
|
2320
2323
|
const start = cur.length;
|