mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Allow axe combo to reward energy without skillpoint
When the character does not have the Double Strike Combo skill, the ability's stage_data only contains one element, and thus the stage_data.len() - 1 expression would set the max_energy_regen to 0. This change forces the multiplier to 1 in this specific case, so the axe can still reward energy without the combo skill point, to match the other weapons.
This commit is contained in:
parent
a1e22df944
commit
1b5c3883a4
@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Players no longer spawn underground if their waypoint is underground
|
||||
- Map will now zoom around the cursor's position and drag correctly
|
||||
- No more jittering while running down slopes with the glider out
|
||||
- Axe normal attack rewards energy without skill points
|
||||
|
||||
## [0.10.0] - 2021-06-12
|
||||
|
||||
|
@ -1021,9 +1021,9 @@ impl CharacterAbility {
|
||||
0
|
||||
};
|
||||
*max_energy_gain = *max_energy_gain
|
||||
* ((energy_level + 1) * stage_data.len() as u16 - 1) as f32
|
||||
* ((energy_level + 1) * stage_data.len() as u16 - 1).max(1) as f32
|
||||
/ (Axe(DsRegen).max_level().unwrap() + 1) as f32
|
||||
* (stage_data.len() - 1) as f32;
|
||||
* (stage_data.len() - 1).max(1) as f32;
|
||||
*scales_from_combo = skillset
|
||||
.skill_level(Axe(DsDamage))
|
||||
.unwrap_or(None)
|
||||
|
Loading…
Reference in New Issue
Block a user