mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use stealth stat on armors
This commit is contained in:
parent
cd2f7ad83a
commit
e6bfce99bb
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Added a filter search function for crafting menu, use "input:_____" to search for recipe inputs
|
- Added a filter search function for crafting menu, use "input:_____" to search for recipe inputs
|
||||||
- Added catalan (Catalonia) language translation
|
- Added catalan (Catalonia) language translation
|
||||||
- Sneaking with weapons drawn
|
- Sneaking with weapons drawn
|
||||||
|
- Stealth stat values on (some) armors
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 3.3,
|
energy_max: 3.3,
|
||||||
energy_reward: 0.034,
|
energy_reward: 0.034,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.034,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 3.3,
|
energy_max: 3.3,
|
||||||
energy_reward: 0.034,
|
energy_reward: 0.034,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.034,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 19.8,
|
energy_max: 19.8,
|
||||||
energy_reward: 0.2,
|
energy_reward: 0.2,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.2,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 6.6,
|
energy_max: 6.6,
|
||||||
energy_reward: 0.067,
|
energy_reward: 0.067,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.067,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 6.6,
|
energy_max: 6.6,
|
||||||
energy_reward: 0.067,
|
energy_reward: 0.067,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.067,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 13.2,
|
energy_max: 13.2,
|
||||||
energy_reward: 0.134,
|
energy_reward: 0.134,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.134,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 13.2,
|
energy_max: 13.2,
|
||||||
energy_reward: 0.134,
|
energy_reward: 0.134,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.134,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0.8,
|
energy_max: 0.8,
|
||||||
energy_reward: 0.009,
|
energy_reward: 0.009,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.009,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0.8,
|
energy_max: 0.8,
|
||||||
energy_reward: 0.009,
|
energy_reward: 0.009,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.009,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 5.0,
|
energy_max: 5.0,
|
||||||
energy_reward: 0.051,
|
energy_reward: 0.051,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.051,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 1.7,
|
energy_max: 1.7,
|
||||||
energy_reward: 0.017,
|
energy_reward: 0.017,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.017,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 1.7,
|
energy_max: 1.7,
|
||||||
energy_reward: 0.017,
|
energy_reward: 0.017,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.017,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 3.3,
|
energy_max: 3.3,
|
||||||
energy_reward: 0.034,
|
energy_reward: 0.034,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.034,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 3.3,
|
energy_max: 3.3,
|
||||||
energy_reward: 0.034,
|
energy_reward: 0.034,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.034,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 4.1,
|
energy_max: 4.1,
|
||||||
energy_reward: 0.042,
|
energy_reward: 0.042,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.042,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 4.1,
|
energy_max: 4.1,
|
||||||
energy_reward: 0.042,
|
energy_reward: 0.042,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.042,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 24.8,
|
energy_max: 24.8,
|
||||||
energy_reward: 0.252,
|
energy_reward: 0.252,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.252,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 8.3,
|
energy_max: 8.3,
|
||||||
energy_reward: 0.084,
|
energy_reward: 0.084,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.084,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 8.3,
|
energy_max: 8.3,
|
||||||
energy_reward: 0.084,
|
energy_reward: 0.084,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.084,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 16.5,
|
energy_max: 16.5,
|
||||||
energy_reward: 0.168,
|
energy_reward: 0.168,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.168,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 16.5,
|
energy_max: 16.5,
|
||||||
energy_reward: 0.168,
|
energy_reward: 0.168,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.168,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 2.5,
|
energy_max: 2.5,
|
||||||
energy_reward: 0.025,
|
energy_reward: 0.025,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.025,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 2.5,
|
energy_max: 2.5,
|
||||||
energy_reward: 0.025,
|
energy_reward: 0.025,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.025,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 14.9,
|
energy_max: 14.9,
|
||||||
energy_reward: 0.15,
|
energy_reward: 0.15,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.15,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 5.0,
|
energy_max: 5.0,
|
||||||
energy_reward: 0.05,
|
energy_reward: 0.05,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.05,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 5.0,
|
energy_max: 5.0,
|
||||||
energy_reward: 0.05,
|
energy_reward: 0.05,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.05,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 9.9,
|
energy_max: 9.9,
|
||||||
energy_reward: 0.1,
|
energy_reward: 0.1,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 9.9,
|
energy_max: 9.9,
|
||||||
energy_reward: 0.1,
|
energy_reward: 0.1,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 5.0,
|
energy_max: 5.0,
|
||||||
energy_reward: 0.05,
|
energy_reward: 0.05,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.05,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 5.0,
|
energy_max: 5.0,
|
||||||
energy_reward: 0.05,
|
energy_reward: 0.05,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.05,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 30.0,
|
energy_max: 30.0,
|
||||||
energy_reward: 0.3,
|
energy_reward: 0.3,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.3,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 10.0,
|
energy_max: 10.0,
|
||||||
energy_reward: 0.1,
|
energy_reward: 0.1,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 10.0,
|
energy_max: 10.0,
|
||||||
energy_reward: 0.1,
|
energy_reward: 0.1,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 20.0,
|
energy_max: 20.0,
|
||||||
energy_reward: 0.2,
|
energy_reward: 0.2,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.2,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 20.0,
|
energy_max: 20.0,
|
||||||
energy_reward: 0.2,
|
energy_reward: 0.2,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.2,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 1.7,
|
energy_max: 1.7,
|
||||||
energy_reward: 0.017,
|
energy_reward: 0.017,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.017,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 1.7,
|
energy_max: 1.7,
|
||||||
energy_reward: 0.017,
|
energy_reward: 0.017,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.017,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 9.9,
|
energy_max: 9.9,
|
||||||
energy_reward: 0.099,
|
energy_reward: 0.099,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.099,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 3.3,
|
energy_max: 3.3,
|
||||||
energy_reward: 0.033,
|
energy_reward: 0.033,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.033,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 3.3,
|
energy_max: 3.3,
|
||||||
energy_reward: 0.033,
|
energy_reward: 0.033,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.033,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 6.6,
|
energy_max: 6.6,
|
||||||
energy_reward: 0.066,
|
energy_reward: 0.066,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.066,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 6.6,
|
energy_max: 6.6,
|
||||||
energy_reward: 0.066,
|
energy_reward: 0.066,
|
||||||
crit_power: 0.0,
|
crit_power: 0.0,
|
||||||
stealth: 0.0,
|
stealth: 0.066,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 2.0,
|
energy_max: 2.0,
|
||||||
energy_reward: 0.025,
|
energy_reward: 0.025,
|
||||||
crit_power: 0.02,
|
crit_power: 0.02,
|
||||||
stealth: 0.0,
|
stealth: 0.02,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 13.5,
|
energy_max: 13.5,
|
||||||
energy_reward: 0.135,
|
energy_reward: 0.135,
|
||||||
crit_power: 0.125,
|
crit_power: 0.125,
|
||||||
stealth: 0.0,
|
stealth: 0.125,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 4.5,
|
energy_max: 4.5,
|
||||||
energy_reward: 0.045,
|
energy_reward: 0.045,
|
||||||
crit_power: 0.04,
|
crit_power: 0.04,
|
||||||
stealth: 0.0,
|
stealth: 0.04,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 4.5,
|
energy_max: 4.5,
|
||||||
energy_reward: 0.045,
|
energy_reward: 0.045,
|
||||||
crit_power: 0.04,
|
crit_power: 0.04,
|
||||||
stealth: 0.0,
|
stealth: 0.04,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 9.0,
|
energy_max: 9.0,
|
||||||
energy_reward: 0.1,
|
energy_reward: 0.1,
|
||||||
crit_power: 0.08,
|
crit_power: 0.08,
|
||||||
stealth: 0.0,
|
stealth: 0.08,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 9.0,
|
energy_max: 9.0,
|
||||||
energy_reward: 0.1,
|
energy_reward: 0.1,
|
||||||
crit_power: 0.08,
|
crit_power: 0.08,
|
||||||
stealth: 0.0,
|
stealth: 0.08,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.067,
|
crit_power: 0.067,
|
||||||
stealth: 0.0,
|
stealth: 0.067,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.067,
|
crit_power: 0.067,
|
||||||
stealth: 0.0,
|
stealth: 0.067,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.399,
|
crit_power: 0.399,
|
||||||
stealth: 0.0,
|
stealth: 0.399,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.133,
|
crit_power: 0.133,
|
||||||
stealth: 0.0,
|
stealth: 0.133,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.133,
|
crit_power: 0.133,
|
||||||
stealth: 0.0,
|
stealth: 0.133,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.266,
|
crit_power: 0.266,
|
||||||
stealth: 0.0,
|
stealth: 0.266,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.266,
|
crit_power: 0.266,
|
||||||
stealth: 0.0,
|
stealth: 0.266,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: High,
|
quality: High,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.1,
|
crit_power: 0.1,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.1,
|
crit_power: 0.1,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.6,
|
crit_power: 0.6,
|
||||||
stealth: 0.0,
|
stealth: 0.6,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.2,
|
crit_power: 0.2,
|
||||||
stealth: 0.0,
|
stealth: 0.2,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.2,
|
crit_power: 0.2,
|
||||||
stealth: 0.0,
|
stealth: 0.2,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.4,
|
crit_power: 0.4,
|
||||||
stealth: 0.0,
|
stealth: 0.4,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.4,
|
crit_power: 0.4,
|
||||||
stealth: 0.0,
|
stealth: 0.4,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Legendary,
|
quality: Legendary,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.034,
|
crit_power: 0.034,
|
||||||
stealth: 0.0,
|
stealth: 0.034,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.034,
|
crit_power: 0.034,
|
||||||
stealth: 0.0,
|
stealth: 0.034,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.201,
|
crit_power: 0.201,
|
||||||
stealth: 0.0,
|
stealth: 0.034,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.067,
|
crit_power: 0.067,
|
||||||
stealth: 0.0,
|
stealth: 0.067,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.067,
|
crit_power: 0.067,
|
||||||
stealth: 0.0,
|
stealth: 0.067,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.134,
|
crit_power: 0.134,
|
||||||
stealth: 0.0,
|
stealth: 0.134,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.134,
|
crit_power: 0.134,
|
||||||
stealth: 0.0,
|
stealth: 0.134,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Common,
|
quality: Common,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.084,
|
crit_power: 0.084,
|
||||||
stealth: 0.0,
|
stealth: 0.084,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.084,
|
crit_power: 0.084,
|
||||||
stealth: 0.0,
|
stealth: 0.084,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.501,
|
crit_power: 0.501,
|
||||||
stealth: 0.0,
|
stealth: 0.501,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.167,
|
crit_power: 0.167,
|
||||||
stealth: 0.0,
|
stealth: 0.167,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.167,
|
crit_power: 0.167,
|
||||||
stealth: 0.0,
|
stealth: 0.167,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.334,
|
crit_power: 0.334,
|
||||||
stealth: 0.0,
|
stealth: 0.334,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.334,
|
crit_power: 0.334,
|
||||||
stealth: 0.0,
|
stealth: 0.334,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.017,
|
crit_power: 0.017,
|
||||||
stealth: 0.0,
|
stealth: 0.017,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.017,
|
crit_power: 0.017,
|
||||||
stealth: 0.0,
|
stealth: 0.017,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.099,
|
crit_power: 0.099,
|
||||||
stealth: 0.0,
|
stealth: 0.099,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.033,
|
crit_power: 0.033,
|
||||||
stealth: 0.0,
|
stealth: 0.033,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.033,
|
crit_power: 0.033,
|
||||||
stealth: 0.0,
|
stealth: 0.033,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.066,
|
crit_power: 0.066,
|
||||||
stealth: 0.0,
|
stealth: 0.066,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.066,
|
crit_power: 0.066,
|
||||||
stealth: 0.0,
|
stealth: 0.066,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Low,
|
quality: Low,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.05,
|
crit_power: 0.05,
|
||||||
stealth: 0.0,
|
stealth: 0.05,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.05,
|
crit_power: 0.05,
|
||||||
stealth: 0.0,
|
stealth: 0.05,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.3,
|
crit_power: 0.3,
|
||||||
stealth: 0.0,
|
stealth: 0.3,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.1,
|
crit_power: 0.1,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.1,
|
crit_power: 0.1,
|
||||||
stealth: 0.0,
|
stealth: 0.1,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.2,
|
crit_power: 0.2,
|
||||||
stealth: 0.0,
|
stealth: 0.2,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 0,
|
energy_max: 0,
|
||||||
energy_reward: 0.0,
|
energy_reward: 0.0,
|
||||||
crit_power: 0.2,
|
crit_power: 0.2,
|
||||||
stealth: 0.0,
|
stealth: 0.2,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Moderate,
|
quality: Moderate,
|
||||||
|
@ -9,7 +9,7 @@ ItemDef(
|
|||||||
energy_max: 2.0,
|
energy_max: 2.0,
|
||||||
energy_reward: 0.025,
|
energy_reward: 0.025,
|
||||||
crit_power: 0.02,
|
crit_power: 0.02,
|
||||||
stealth: 0.0,
|
stealth: 0.02,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
quality: Epic,
|
quality: Epic,
|
||||||
|
@ -994,3 +994,22 @@ pub fn compute_max_energy_mod(inventory: Option<&Inventory>) -> f32 {
|
|||||||
.sum()
|
.sum()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Computes the sneak coefficient from armor. Agent perception distances are
|
||||||
|
/// divided by the resulting f32.
|
||||||
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
|
pub fn compute_stealth_coefficient(inventory: Option<&Inventory>) -> f32 {
|
||||||
|
// Starts with a value of 2.0 when summing the stats from each armor piece, and
|
||||||
|
// defaults to a value of 2.0 if no inventory is equipped
|
||||||
|
inventory.map_or(2.0, |inv| {
|
||||||
|
inv.equipped_items()
|
||||||
|
.filter_map(|item| {
|
||||||
|
if let ItemKind::Armor(armor) = &item.kind() {
|
||||||
|
Some(armor.stealth())
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.fold(2.0, |a, b| a + b.max(0.0))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -43,6 +43,8 @@ pub struct Stats {
|
|||||||
/// Crit power is summed, and then added to the default crit multiplier of
|
/// Crit power is summed, and then added to the default crit multiplier of
|
||||||
/// 1.25. Damage is multiplied by this value when an attack crits.
|
/// 1.25. Damage is multiplied by this value when an attack crits.
|
||||||
crit_power: f32,
|
crit_power: f32,
|
||||||
|
/// Stealth is summed along with the base stealth bonus (2.0), and then
|
||||||
|
/// the agent's perception distance is divided by this value
|
||||||
stealth: f32,
|
stealth: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use crate::rtsim::{Entity as RtSimData, RtSim};
|
use crate::rtsim::{Entity as RtSimData, RtSim};
|
||||||
use common::{
|
use common::{
|
||||||
|
combat,
|
||||||
comp::{
|
comp::{
|
||||||
self,
|
self,
|
||||||
agent::{
|
agent::{
|
||||||
@ -168,7 +169,6 @@ const PARTIAL_PATH_DIST: f32 = 50.0;
|
|||||||
const SEPARATION_DIST: f32 = 10.0;
|
const SEPARATION_DIST: f32 = 10.0;
|
||||||
const SEPARATION_BIAS: f32 = 0.8;
|
const SEPARATION_BIAS: f32 = 0.8;
|
||||||
const MAX_FLEE_DIST: f32 = 20.0;
|
const MAX_FLEE_DIST: f32 = 20.0;
|
||||||
const SNEAK_COEFFICIENT: f32 = 0.25;
|
|
||||||
const AVG_FOLLOW_DIST: f32 = 6.0;
|
const AVG_FOLLOW_DIST: f32 = 6.0;
|
||||||
const RETARGETING_THRESHOLD_SECONDS: f64 = 10.0;
|
const RETARGETING_THRESHOLD_SECONDS: f64 = 10.0;
|
||||||
const HEALING_ITEM_THRESHOLD: f32 = 0.5;
|
const HEALING_ITEM_THRESHOLD: f32 = 0.5;
|
||||||
@ -1529,11 +1529,11 @@ impl<'a> AgentData<'a> {
|
|||||||
let max_search_dist = agent.psyche.search_dist();
|
let max_search_dist = agent.psyche.search_dist();
|
||||||
let max_sight_dist = agent.psyche.sight_dist;
|
let max_sight_dist = agent.psyche.sight_dist;
|
||||||
let max_listen_dist = agent.psyche.listen_dist;
|
let max_listen_dist = agent.psyche.listen_dist;
|
||||||
let in_sight_dist = |e_pos: &Pos, e_char_state: Option<&CharacterState>| {
|
let in_sight_dist =
|
||||||
|
|e_pos: &Pos, e_char_state: Option<&CharacterState>, inventory: &Inventory| {
|
||||||
let search_dist = max_sight_dist
|
let search_dist = max_sight_dist
|
||||||
* if e_char_state.map_or(false, CharacterState::is_stealthy) {
|
/ if e_char_state.map_or(false, CharacterState::is_stealthy) {
|
||||||
// TODO: make sneak more effective based on a stat like e_stats.fitness
|
combat::compute_stealth_coefficient(Some(inventory))
|
||||||
SNEAK_COEFFICIENT
|
|
||||||
} else {
|
} else {
|
||||||
1.0
|
1.0
|
||||||
};
|
};
|
||||||
@ -1546,11 +1546,11 @@ impl<'a> AgentData<'a> {
|
|||||||
.map_or(true, |v| v.dot(*controller.inputs.look_dir) > 0.15)
|
.map_or(true, |v| v.dot(*controller.inputs.look_dir) > 0.15)
|
||||||
};
|
};
|
||||||
|
|
||||||
let in_listen_dist = |e_pos: &Pos, e_char_state: Option<&CharacterState>| {
|
let in_listen_dist =
|
||||||
|
|e_pos: &Pos, e_char_state: Option<&CharacterState>, inventory: &Inventory| {
|
||||||
let listen_dist = max_listen_dist
|
let listen_dist = max_listen_dist
|
||||||
* if e_char_state.map_or(false, CharacterState::is_stealthy) {
|
/ if e_char_state.map_or(false, CharacterState::is_stealthy) {
|
||||||
// TODO: make sneak more effective based on a stat like e_stats.fitness
|
combat::compute_stealth_coefficient(Some(inventory))
|
||||||
SNEAK_COEFFICIENT
|
|
||||||
} else {
|
} else {
|
||||||
1.0
|
1.0
|
||||||
};
|
};
|
||||||
@ -1558,9 +1558,10 @@ impl<'a> AgentData<'a> {
|
|||||||
e_pos.0.distance_squared(self.pos.0) < listen_dist.powi(2)
|
e_pos.0.distance_squared(self.pos.0) < listen_dist.powi(2)
|
||||||
};
|
};
|
||||||
|
|
||||||
let within_reach = |e_pos: &Pos, e_char_state: Option<&CharacterState>| {
|
let within_reach =
|
||||||
(in_sight_dist(e_pos, e_char_state) && within_fov(e_pos))
|
|e_pos: &Pos, e_char_state: Option<&CharacterState>, e_inventory: &Inventory| {
|
||||||
|| in_listen_dist(e_pos, e_char_state)
|
(in_sight_dist(e_pos, e_char_state, e_inventory) && within_fov(e_pos))
|
||||||
|
|| in_listen_dist(e_pos, e_char_state, e_inventory)
|
||||||
};
|
};
|
||||||
|
|
||||||
let owners_hostile = |e_alignment: Option<&Alignment>| {
|
let owners_hostile = |e_alignment: Option<&Alignment>| {
|
||||||
@ -1662,7 +1663,7 @@ impl<'a> AgentData<'a> {
|
|||||||
Option<&Alignment>,
|
Option<&Alignment>,
|
||||||
Option<&CharacterState>,
|
Option<&CharacterState>,
|
||||||
)| {
|
)| {
|
||||||
let can_target = within_reach(e_pos, e_char_state)
|
let can_target = within_reach(e_pos, e_char_state, e_inventory)
|
||||||
&& entity != *self.entity
|
&& entity != *self.entity
|
||||||
&& !e_health.is_dead
|
&& !e_health.is_dead
|
||||||
&& !invulnerability_is_in_buffs(read_data.buffs.get(entity));
|
&& !invulnerability_is_in_buffs(read_data.buffs.get(entity));
|
||||||
|
Loading…
Reference in New Issue
Block a user