feat: added puncture and penetrate

This commit is contained in:
TotallyNot 2025-11-04 16:14:49 +01:00
parent 451efd2bb7
commit 6c3c50689a
Signed by: pyrite
GPG key ID: 7F1BA9170CD35D15
4 changed files with 104 additions and 59 deletions

View file

@ -1,6 +1,6 @@
use bevy_ecs::prelude::*;
use proxisim_models::bundle::{
bonus::{BonusPartDamageBonus, BonusValue, WeaponBonusType},
bonus::{ArmourBypassBonus, BonusPartDamageBonus, BonusValue, WeaponBonusType},
player::PartDamageBonus,
stat::{
AdditiveBonus, AmmoControl, Clips, CritRate, DamageBonus, SimpleStatBonus,
@ -431,12 +431,27 @@ pub(crate) fn prepare_bonuses(
WeaponBonusType::Bleed => {
commands
.entity(weapon.parent())
.with_child(DamageProcEffect::DamageOverTimer {
.with_child(DamageProcEffect::DamageOverTime {
value: value.0,
kind: DamageOverTimeType::Bleed,
});
}
WeaponBonusType::Puncture => {
commands
.entity(weapon.parent())
.with_child(ArmourBypassBonus::Puncture {
chance: value.0 / 100.0,
});
}
WeaponBonusType::Penetrate => {
commands
.entity(weapon.parent())
.with_child(ArmourBypassBonus::Penetrate {
mitigation: value.0 / 100.0,
});
}
val => unimplemented!("{val:?}"),
}
}

View file

@ -153,7 +153,7 @@ pub enum DamageProcEffect {
value: f32,
bonus: SelfStatusEffect,
},
DamageOverTimer {
DamageOverTime {
value: f32,
kind: DamageOverTimeType,
},