-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Additional cleanup for tests * Tests for effects & mutations from enchantments * Enchantment values: stats * Enchantment values: SPEED * Some tests for speed / moves gain * Simplify check for enchantment 'has' condition * Clean up enchantment bonus calculation 1. Fix final value being out of bounds in some places. 2. Changed the formula for combining multiple enchantments to produce more easily predictable results. 3. Remove dead code * Renamed 2 functions to be less ambiguous * Enchantment values: ATTACK_COST, ITEM_ATTACK_COST * Enchantment values: MOVE_COST * Enchantment values: METABOLISM * Enchantment values: MANA_CAP, MANA_REGEN + mana tests * Migration for old enchant val enum strings * Consistent rounding for enchantment bonuses * fix typo * Revert effects cleanup change
- Loading branch information
Showing
23 changed files
with
1,092 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
[ | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_base", | ||
"name": "TEST relic base", | ||
"description": "A relic for test purposes", | ||
"category": "spare_parts", | ||
"weight": "1 kg", | ||
"volume": "100 ml", | ||
"material": [ "steel" ], | ||
"color": "red", | ||
"symbol": "*" | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_gives_trait", | ||
"copy-from": "test_relic_base", | ||
"name": "TEST relic gives trait", | ||
"relic_data": { "passive_effects": [ { "has": "HELD", "condition": "ALWAYS", "mutations": [ "CARNIVORE" ] } ] } | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_mods_stats", | ||
"copy-from": "test_relic_base", | ||
"name": "TEST relic mods stats", | ||
"relic_data": { | ||
"passive_effects": [ | ||
{ | ||
"has": "HELD", | ||
"condition": "ALWAYS", | ||
"values": [ | ||
{ "value": "STRENGTH", "add": 4, "multiply": 1 }, | ||
{ "value": "DEXTERITY", "add": -2 }, | ||
{ "value": "PERCEPTION", "add": 1, "multiply": -0.5 }, | ||
{ "value": "INTELLIGENCE", "add": -11 } | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_mods_speed", | ||
"copy-from": "test_relic_base", | ||
"name": "TEST relic mods speed", | ||
"relic_data": { | ||
"passive_effects": [ { "has": "HELD", "condition": "ALWAYS", "values": [ { "value": "SPEED", "add": 25, "multiply": -0.5 } ] } ] | ||
} | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_mods_atk_cost", | ||
"copy-from": "test_relic_base", | ||
"name": "TEST relic mods attack cost", | ||
"relic_data": { | ||
"passive_effects": [ { "has": "HELD", "condition": "ALWAYS", "values": [ { "value": "ATTACK_COST", "multiply": -0.2 } ] } ] | ||
} | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_sword", | ||
"name": "TEST relic sword", | ||
"description": "A relic sword for test purposes", | ||
"category": "spare_parts", | ||
"weight": "1250 g", | ||
"to_hit": 1, | ||
"color": "dark_gray", | ||
"symbol": "/", | ||
"material": [ "steel" ], | ||
"volume": "1 L", | ||
"bashing": 32, | ||
"cutting": 32, | ||
"price": 7500, | ||
"price_postapoc": 300, | ||
"relic_data": { | ||
"passive_effects": [ { "has": "HELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_ATTACK_COST", "add": -15 } ] } ] | ||
} | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_mods_mv_cost", | ||
"copy-from": "test_relic_base", | ||
"name": "TEST relic mods movement cost", | ||
"relic_data": { | ||
"passive_effects": [ { "has": "HELD", "condition": "ALWAYS", "values": [ { "value": "MOVE_COST", "multiply": -0.1 } ] } ] | ||
} | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_mods_metabolism", | ||
"copy-from": "test_relic_base", | ||
"name": "TEST relic mods metabolic rate", | ||
"relic_data": { | ||
"passive_effects": [ { "has": "HELD", "condition": "ALWAYS", "values": [ { "value": "METABOLISM", "multiply": -0.1 } ] } ] | ||
} | ||
}, | ||
{ | ||
"type": "GENERIC", | ||
"id": "test_relic_mods_manapool", | ||
"copy-from": "test_relic_base", | ||
"name": "TEST relic mods mana pool", | ||
"relic_data": { | ||
"passive_effects": [ | ||
{ | ||
"has": "HELD", | ||
"condition": "ALWAYS", | ||
"values": [ { "value": "MANA_CAP", "add": 100, "multiply": -0.3 }, { "value": "MANA_REGEN", "multiply": -0.3 } ] | ||
} | ||
] | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.