Add a new "rechargeable" flag to items

A way to set this flag is not yet exposed in the scenario editor.
The flag is intended only for non-stackable items, but this currently isn't enforced.
Items now have a maximum number of charges, which is equal to their default number set in the item record.
Enchanted items with charges are now rechargeable.
This commit is contained in:
2024-08-29 01:06:11 -04:00
committed by Celtic Minstrel
parent 753dbbcc59
commit a4231005f6
17 changed files with 51 additions and 30 deletions

View File

@@ -37,6 +37,7 @@ TEST_CASE("Converting items from legacy scenarios") {
CHECK(new_item.bonus == 1);
CHECK(new_item.protection == 3);
CHECK(new_item.charges == 10);
CHECK(new_item.max_charges == 10);
CHECK(new_item.graphic_num == 62);
CHECK(new_item.type_flag == 100);
CHECK(new_item.value == 500);