Skip to content

Commit

Permalink
Merge pull request #450 from wyrmisis/main
Browse files Browse the repository at this point in the history
fix: Character move speed should calculate normally
  • Loading branch information
anthonyronda authored May 30, 2023
2 parents 197a5ce + b6de66c commit aad6548
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ export default ({ describe, it, expect }: QuenchMethods) => {
]);
expect(enc.value).to.equal(max);

})
describe('As fully encumbered flag', () => {
it('Encumbered over full load (1600.1)', () => {
});
describe("As fully encumbered flag", () => {
it("Encumbered over full load (1600.1)", () => {
let enc = new EncumbranceComplete(
1600,
[createMockItem('item', 1600.1, 1, { treasure: true })]
Expand All @@ -382,34 +382,24 @@ export default ({ describe, it, expect }: QuenchMethods) => {
);
expect(enc.encumbered).to.be.true;
})
describe('Not encumbered', () => {
it('from a partial load', () => {
const enc = new EncumbranceComplete(
1600,
[createMockItem('item', 400, 1, { treasure: true })]
);
expect(enc.encumbered).to.be.false;
})
})
});
describe("As fully encumbered flag", () => {
it("Encumbered at full load", () => {
let enc = new EncumbranceComplete(1600, [
createMockItem("item", 1600, 1, { treasure: true }),
]);
expect(enc.encumbered).to.be.true;
enc = new EncumbranceComplete(1600, [
createMockItem("item", 1600, 1, { treasure: false }),
]);
expect(enc.encumbered).to.be.true;
});
describe("Not encumbered", () => {
it("from a partial load", () => {
const enc = new EncumbranceComplete(1600, [
createMockItem("item", 400, 1, { treasure: true }),
]);
expect(enc.encumbered).to.be.false;
});
it("from a full load", () => {
let enc = new EncumbranceComplete(1600, [
createMockItem("item", 1600, 1, { treasure: true }),
]);
expect(enc.encumbered).to.be.false;
enc = new EncumbranceComplete(1600, [
createMockItem("item", 1600, 1, { treasure: false }),
]);
console.info(enc);
expect(enc.encumbered).to.be.false;
});
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/module/actor/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const removeFalsyElements = (arr) =>

export default class OseActor extends Actor {
prepareDerivedData() {
this.system.prepareDerivedData?.();
if (game.version.startsWith("10")) this.system.prepareDerivedData?.();
}

static migrateData(source) {
Expand Down

0 comments on commit aad6548

Please sign in to comment.