refactor(slay-the-spire-like): rename depletion to consumedUses
Rename `depletion` to `consumedUses` in `GameItemMeta` to better reflect its purpose. Update combat effect logic and tests to use the new field name. Also apply consistent formatting and import organization to combat effect modules.
This commit is contained in:
@@ -82,7 +82,7 @@ function createItem(
|
||||
description: "",
|
||||
},
|
||||
shape: { id: "1x1", cells: [{ x: 0, y: 0 }] } as unknown as ParsedShape,
|
||||
depletion: costType === "uses" ? depletion : undefined,
|
||||
consumedUses: costType === "uses" ? depletion : undefined,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -591,7 +591,7 @@ describe("combat/effects", () => {
|
||||
|
||||
payCardCost(player, "uses", 3, "potion-1", inventory);
|
||||
|
||||
expect(item.meta?.depletion).toBe(4);
|
||||
expect(item.meta?.consumedUses).toBe(4);
|
||||
});
|
||||
|
||||
it("should do nothing for none cost card", () => {
|
||||
|
||||
Reference in New Issue
Block a user