feat: added puncture and penetrate
This commit is contained in:
parent
451efd2bb7
commit
6c3c50689a
4 changed files with 104 additions and 59 deletions
|
|
@ -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:?}"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ pub enum DamageProcEffect {
|
|||
value: f32,
|
||||
bonus: SelfStatusEffect,
|
||||
},
|
||||
DamageOverTimer {
|
||||
DamageOverTime {
|
||||
value: f32,
|
||||
kind: DamageOverTimeType,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue