feat: added bloodlust, double-edged, comeback, blindside

This commit is contained in:
TotallyNot 2025-11-05 11:10:25 +01:00
parent 0c9d96375d
commit 71169690b7
Signed by: pyrite
GPG key ID: 7F1BA9170CD35D15
7 changed files with 211 additions and 60 deletions

View file

@ -1,6 +1,6 @@
use bevy_ecs::prelude::*;
use proxisim_models::bundle::{
bonus::{ArmourBypassBonus, BonusPartDamageBonus, BonusValue, WeaponBonusType},
bonus::{ArmourBypassBonus, BonusPartDamageBonus, BonusValue, MiscBonus, WeaponBonusType},
player::PartDamageBonus,
stat::{
AdditiveBonus, AmmoControl, Clips, CritRate, DamageBonus, SimpleStatBonus,
@ -455,8 +455,8 @@ pub(crate) fn prepare_bonuses(
WeaponBonusType::Deadly => {
commands
.entity(weapon.parent())
.with_child(DamageProcEffect::Deadly {
chance: value.0 / 100.0,
.with_child(MiscBonus::Deadly {
chance: (value.0 / 100.0) as f64,
});
}
WeaponBonusType::Execute => {
@ -467,6 +467,34 @@ pub(crate) fn prepare_bonuses(
});
}
WeaponBonusType::Bloodlust => {
commands
.entity(weapon.parent())
.with_child(DamageProcEffect::Bloodlust {
ratio: value.0 / 100.0,
});
}
WeaponBonusType::Comeback => {
commands
.entity(weapon.parent())
.with_child(MiscBonus::Comeback {
bonus: value.0 / 100.0,
});
}
WeaponBonusType::Blindside => {
commands
.entity(weapon.parent())
.with_child(MiscBonus::Blindside {
bonus: value.0 / 100.0,
});
}
WeaponBonusType::DoubleEdged => {
commands
.entity(weapon.parent())
.with_child(MiscBonus::DoubleEdged {
chance: value.0 as f64 / 100.0,
});
}
val => unimplemented!("{val:?}"),
}
}

View file

@ -162,8 +162,8 @@ pub enum DamageProcEffect {
Execute {
cutoff: f32,
},
Deadly {
chance: f32,
Bloodlust {
ratio: f32,
},
}

View file

@ -1,6 +1,6 @@
use bevy_ecs::prelude::*;
use proxisim_models::bundle::{
player::{Current, CurrentTarget, Player},
player::{Current, CurrentTarget, HealthChange, Player},
weapon::{BuffingTemp, DebuffingTemp, Usable, Uses},
};
@ -76,11 +76,14 @@ fn use_buffing_temp(
let current = current_q.single().unwrap();
match temp {
BuffingTemp::Serotonin => effects.spawn_and_insert(
AdditiveStatusEffect::<1, Hardened>::default(),
current,
AssociatedWeapon(weapon),
),
BuffingTemp::Serotonin => {
commands.write_message(HealthChange::Serotonin);
effects.spawn_and_insert(
AdditiveStatusEffect::<1, Hardened>::default(),
current,
AssociatedWeapon(weapon),
)
}
BuffingTemp::Tyrosine => effects.spawn_and_insert(
AdditiveStatusEffect::<1, Sharpened>::default(),
current,