feat: added bloodlust, double-edged, comeback, blindside
This commit is contained in:
parent
0c9d96375d
commit
71169690b7
7 changed files with 211 additions and 60 deletions
|
|
@ -70,6 +70,10 @@ pub enum WeaponBonusType {
|
||||||
// Misc
|
// Misc
|
||||||
Execute,
|
Execute,
|
||||||
Deadly,
|
Deadly,
|
||||||
|
Bloodlust,
|
||||||
|
DoubleEdged,
|
||||||
|
Blindside,
|
||||||
|
Comeback,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Component)]
|
#[derive(Component)]
|
||||||
|
|
@ -197,6 +201,14 @@ pub enum ArmourBypassBonus {
|
||||||
Penetrate { mitigation: f32 },
|
Penetrate { mitigation: f32 },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Component)]
|
||||||
|
pub enum MiscBonus {
|
||||||
|
Blindside { bonus: f32 },
|
||||||
|
Comeback { bonus: f32 },
|
||||||
|
Deadly { chance: f64 },
|
||||||
|
DoubleEdged { chance: f64 },
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Component, Display)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Component, Display)]
|
||||||
#[cfg_attr(feature = "json", derive(serde::Deserialize, serde::Serialize))]
|
#[cfg_attr(feature = "json", derive(serde::Deserialize, serde::Serialize))]
|
||||||
#[cfg_attr(feature = "json", serde(rename_all = "snake_case"))]
|
#[cfg_attr(feature = "json", serde(rename_all = "snake_case"))]
|
||||||
|
|
|
||||||
|
|
@ -132,10 +132,11 @@ pub enum PartDamageBonus {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Message)]
|
#[derive(Message)]
|
||||||
pub enum HealthRestore {
|
pub enum HealthChange {
|
||||||
Cauterise,
|
Cauterise,
|
||||||
Serotonin { extra_effectiveness: f32 },
|
Serotonin,
|
||||||
Bloodlust { dmg: u32, value: f32 },
|
Bloodlust { dmg: u32, value: f32 },
|
||||||
|
DoubleEdged { dmg: u32 },
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartDamageBonus {
|
impl PartDamageBonus {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
use bevy_ecs::{prelude::*, system::SystemParam};
|
use bevy_ecs::{prelude::*, system::SystemParam};
|
||||||
use proxisim_models::bundle::{
|
use proxisim_models::bundle::{
|
||||||
armour::{ArmourBodyPart, ArmourBodyParts, BodyPartCoverage},
|
armour::{ArmourBodyPart, ArmourBodyParts, BodyPartCoverage},
|
||||||
bonus::{ArmourBypassBonus, DamageMitigationBonus},
|
bonus::{ArmourBypassBonus, DamageMitigationBonus, MiscBonus},
|
||||||
player::{
|
player::{
|
||||||
Attacker, BodyPart, ChooseWeapon, CombatTurns, Current, CurrentTarget, Defeated, Defender,
|
Attacker, BodyPart, ChooseWeapon, CombatTurns, Current, CurrentTarget, Defeated, Defender,
|
||||||
FightEndType, Health, PartDamageBonus, Player, PlayerStrategy, Weapons,
|
FightEndType, Health, HealthChange, PartDamageBonus, Player, PlayerStrategy, Weapons,
|
||||||
},
|
},
|
||||||
stat::{
|
stat::{
|
||||||
AmmoControl, Clips, CritRate, DamageBonus, Defence, Dexterity, EffectiveStat, MaxHealth,
|
AmmoControl, Clips, CritRate, DamageBonus, Defence, Dexterity, EffectiveStat, MaxHealth,
|
||||||
|
|
@ -23,7 +23,10 @@ use crate::{
|
||||||
log,
|
log,
|
||||||
log::Logger,
|
log::Logger,
|
||||||
metrics::Metrics,
|
metrics::Metrics,
|
||||||
player::status_effect::{Bleed, DamageOverTime, DamageOverTimeType, DeferredDamage},
|
player::status_effect::{
|
||||||
|
Bleed, DamageOverTime, DamageOverTimeType, DeferredDamage, ExtraStatusEffectEffectiveness,
|
||||||
|
Hardened,
|
||||||
|
},
|
||||||
weapon::{DamageProcEffect, TurnTriggeredEffect, bonus::MultiTurnBonus},
|
weapon::{DamageProcEffect, TurnTriggeredEffect, bonus::MultiTurnBonus},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -243,6 +246,57 @@ fn check_bonus_mitigation(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(SystemParam)]
|
||||||
|
struct DamageBonusParams<'w, 's> {
|
||||||
|
misc_bonus_q: Query<'w, 's, &'static MiscBonus>,
|
||||||
|
part_bonus_q: Query<'w, 's, &'static PartDamageBonus>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Process miscellaneous bonuses that did not fall in any of the other categories
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
|
#[inline(always)]
|
||||||
|
fn check_damage_bonuses(
|
||||||
|
queries: &DamageBonusParams,
|
||||||
|
shared: &mut SharedParams,
|
||||||
|
p_children: &Children,
|
||||||
|
t_health: &Health,
|
||||||
|
p_health: &Health,
|
||||||
|
t_max_health: &SimpleStatEffective<MaxHealth>,
|
||||||
|
p_max_health: &SimpleStatEffective<MaxHealth>,
|
||||||
|
part: BodyPart,
|
||||||
|
dmg_bonus: &mut SimpleStatEffective<DamageBonus>,
|
||||||
|
double_edged: &mut bool,
|
||||||
|
) {
|
||||||
|
for bonus in queries.misc_bonus_q.iter_many(p_children) {
|
||||||
|
match bonus {
|
||||||
|
MiscBonus::Blindside { bonus } if t_health.0 == t_max_health.value => {
|
||||||
|
dmg_bonus.value += bonus;
|
||||||
|
}
|
||||||
|
MiscBonus::Comeback { bonus }
|
||||||
|
if p_health.0 as f32 / p_max_health.value as f32 <= 0.25 =>
|
||||||
|
{
|
||||||
|
dmg_bonus.value += bonus;
|
||||||
|
}
|
||||||
|
MiscBonus::Deadly { chance } if *chance >= 1.0 || shared.rng.random_bool(*chance) => {
|
||||||
|
dmg_bonus.value += 5.0;
|
||||||
|
}
|
||||||
|
MiscBonus::DoubleEdged { chance }
|
||||||
|
if *chance >= 1.0 || shared.rng.random_bool(*chance) =>
|
||||||
|
{
|
||||||
|
dmg_bonus.value += 1.0;
|
||||||
|
*double_edged = true;
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for bonus in queries.part_bonus_q.iter_many(p_children) {
|
||||||
|
if let Some(bonus) = bonus.dmg_bonus(part) {
|
||||||
|
dmg_bonus.value += bonus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(SystemParam)]
|
#[derive(SystemParam)]
|
||||||
struct DeferredDamageParams<'w, 's> {
|
struct DeferredDamageParams<'w, 's> {
|
||||||
damage_q: Query<'w, 's, (Entity, &'static DeferredDamage)>,
|
damage_q: Query<'w, 's, (Entity, &'static DeferredDamage)>,
|
||||||
|
|
@ -323,6 +377,7 @@ struct EntityParams<'w, 's> {
|
||||||
&'static SimpleStatEffective<CritRate>,
|
&'static SimpleStatEffective<CritRate>,
|
||||||
&'static SimpleStatEffective<WeaponAccuracy>,
|
&'static SimpleStatEffective<WeaponAccuracy>,
|
||||||
&'static SimpleStatEffective<DamageBonus>,
|
&'static SimpleStatEffective<DamageBonus>,
|
||||||
|
&'static SimpleStatEffective<MaxHealth>,
|
||||||
&'static Children,
|
&'static Children,
|
||||||
&'static mut Health,
|
&'static mut Health,
|
||||||
Has<Attacker>,
|
Has<Attacker>,
|
||||||
|
|
@ -350,14 +405,15 @@ struct EntityParams<'w, 's> {
|
||||||
// of multi turn bonuses
|
// of multi turn bonuses
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn use_damaging_weapon(
|
fn use_damaging_weapon(
|
||||||
(mut shared, mut bonus_mitigation, deferred): (
|
(mut shared, mut bonus_mitigation, deferred, misc_bonus): (
|
||||||
SharedParams,
|
SharedParams,
|
||||||
BonusMitigationParams,
|
BonusMitigationParams,
|
||||||
DeferredDamageParams,
|
DeferredDamageParams,
|
||||||
|
DamageBonusParams,
|
||||||
),
|
),
|
||||||
mut entities: EntityParams,
|
mut entities: EntityParams,
|
||||||
armour_q: Query<&ArmourBodyPart>,
|
armour_q: Query<&ArmourBodyPart>,
|
||||||
(damage_proc_q, part_bonus_q): (Query<&DamageProcEffect>, Query<&PartDamageBonus>),
|
damage_proc_q: Query<&DamageProcEffect>,
|
||||||
(mut ammo_q, mut temp_q): (
|
(mut ammo_q, mut temp_q): (
|
||||||
Query<(
|
Query<(
|
||||||
&mut Ammo,
|
&mut Ammo,
|
||||||
|
|
@ -382,6 +438,7 @@ fn use_damaging_weapon(
|
||||||
player_crit,
|
player_crit,
|
||||||
acc_bonus,
|
acc_bonus,
|
||||||
p_dmg_bonus,
|
p_dmg_bonus,
|
||||||
|
p_max_health,
|
||||||
p_children,
|
p_children,
|
||||||
mut p_health,
|
mut p_health,
|
||||||
attacker,
|
attacker,
|
||||||
|
|
@ -528,12 +585,6 @@ fn use_damaging_weapon(
|
||||||
|
|
||||||
let mut dmg_bonus = dmg_bonus + p_dmg_bonus;
|
let mut dmg_bonus = dmg_bonus + p_dmg_bonus;
|
||||||
|
|
||||||
for part_bonus in part_bonus_q.iter_many(children) {
|
|
||||||
if let Some(bonus) = part_bonus.dmg_bonus(body_part) {
|
|
||||||
dmg_bonus.value += bonus;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let bonus_mitigation = check_bonus_mitigation(
|
let bonus_mitigation = check_bonus_mitigation(
|
||||||
&mut bonus_mitigation,
|
&mut bonus_mitigation,
|
||||||
&mut shared,
|
&mut shared,
|
||||||
|
|
@ -546,32 +597,46 @@ fn use_damaging_weapon(
|
||||||
target_max_health,
|
target_max_health,
|
||||||
);
|
);
|
||||||
|
|
||||||
let spammo_bonus = ammo
|
if let Some((_, _, _, kind)) = ammo {
|
||||||
.as_ref()
|
match kind {
|
||||||
.map(|(_, _, _, kind)| match kind {
|
AmmoType::HollowPoint if piece.is_none() => armour_mitigation *= 1.5,
|
||||||
AmmoType::HollowPoint if piece.is_none() => {
|
AmmoType::HollowPoint => dmg_bonus.value += 0.50,
|
||||||
armour_mitigation *= 1.5;
|
AmmoType::Incindiary => dmg_bonus.value += 0.40,
|
||||||
0.0
|
AmmoType::Piercer => armour_mitigation *= 0.5,
|
||||||
|
_ => (),
|
||||||
}
|
}
|
||||||
AmmoType::HollowPoint => 0.50,
|
|
||||||
AmmoType::Incindiary => 0.40,
|
|
||||||
AmmoType::Piercer => {
|
|
||||||
armour_mitigation *= 0.5;
|
|
||||||
0.0
|
|
||||||
}
|
}
|
||||||
_ => 0.0,
|
|
||||||
})
|
|
||||||
.unwrap_or_default();
|
|
||||||
|
|
||||||
let mut dmg = dmg_intrinsic
|
let mut double_edged = false;
|
||||||
|
|
||||||
|
check_damage_bonuses(
|
||||||
|
&misc_bonus,
|
||||||
|
&mut shared,
|
||||||
|
children,
|
||||||
|
&health,
|
||||||
|
&p_health,
|
||||||
|
target_max_health,
|
||||||
|
p_max_health,
|
||||||
|
body_part,
|
||||||
|
&mut dmg_bonus,
|
||||||
|
&mut double_edged,
|
||||||
|
);
|
||||||
|
|
||||||
|
let dmg = dmg_intrinsic
|
||||||
* w_dmg.0
|
* w_dmg.0
|
||||||
* (1.0 + dmg_bonus.value + spammo_bonus)
|
* (1.0 + dmg_bonus.value)
|
||||||
* (1.0 - armour_mitigation)
|
* (1.0 - armour_mitigation)
|
||||||
* (1.0 - def_mitigation)
|
* (1.0 - def_mitigation)
|
||||||
* (1.0 - bonus_mitigation)
|
* (1.0 - bonus_mitigation)
|
||||||
* mult
|
* mult
|
||||||
* dmg_spread;
|
* dmg_spread;
|
||||||
let mut dmg_i = dmg.round() as u32;
|
let dmg_i = dmg.round() as u32;
|
||||||
|
|
||||||
|
if double_edged {
|
||||||
|
shared
|
||||||
|
.commands
|
||||||
|
.write_message(HealthChange::DoubleEdged { dmg: dmg_i });
|
||||||
|
}
|
||||||
|
|
||||||
shared.metrics.record_histogram(Some(player), "dmg", dmg_i);
|
shared.metrics.record_histogram(Some(player), "dmg", dmg_i);
|
||||||
shared.metrics.record_histogram(Some(weapon), "dmg", dmg_i);
|
shared.metrics.record_histogram(Some(weapon), "dmg", dmg_i);
|
||||||
|
|
@ -584,7 +649,7 @@ fn use_damaging_weapon(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let chance = (value / 100.0) as f64;
|
let chance = (value / 100.0) as f64;
|
||||||
if chance > 1.0 || shared.rng.random_bool(chance) {
|
if chance >= 1.0 || shared.rng.random_bool(chance) {
|
||||||
match bonus {
|
match bonus {
|
||||||
MultiTurnBonus::Blindfire => {
|
MultiTurnBonus::Blindfire => {
|
||||||
multi_attack_proc = Some(MultiAttack::Blindfire)
|
multi_attack_proc = Some(MultiAttack::Blindfire)
|
||||||
|
|
@ -640,19 +705,6 @@ fn use_damaging_weapon(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DamageProcEffect::Deadly { chance } => {
|
|
||||||
if chance >= 1.0 || shared.rng.random_bool(chance as f64) {
|
|
||||||
dmg = dmg_intrinsic
|
|
||||||
* w_dmg.0
|
|
||||||
* (1.0 + dmg_bonus.value + spammo_bonus + 5.0)
|
|
||||||
* (1.0 - armour_mitigation)
|
|
||||||
* (1.0 - def_mitigation)
|
|
||||||
* (1.0 - bonus_mitigation)
|
|
||||||
* mult
|
|
||||||
* dmg_spread;
|
|
||||||
dmg_i = dmg.round() as u32;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
DamageProcEffect::Execute { cutoff } => {
|
DamageProcEffect::Execute { cutoff } => {
|
||||||
if health.0 as f32 / target_max_health.value as f32 <= cutoff {
|
if health.0 as f32 / target_max_health.value as f32 <= cutoff {
|
||||||
shared.commands.entity(target).insert(Defeated);
|
shared.commands.entity(target).insert(Defeated);
|
||||||
|
|
@ -676,6 +728,12 @@ fn use_damaging_weapon(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DamageProcEffect::Bloodlust { ratio } => {
|
||||||
|
shared.commands.write_message(HealthChange::Bloodlust {
|
||||||
|
dmg: dmg_i,
|
||||||
|
value: ratio,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -822,18 +880,69 @@ fn restore_health(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn process_health_changes(
|
||||||
|
mut messages: MessageReader<HealthChange>,
|
||||||
|
mut logger: Logger,
|
||||||
|
mut p_query: Query<
|
||||||
|
(
|
||||||
|
Entity,
|
||||||
|
&SimpleStatEffective<MaxHealth>,
|
||||||
|
&mut Health,
|
||||||
|
Option<&ExtraStatusEffectEffectiveness<1, Hardened>>,
|
||||||
|
),
|
||||||
|
(With<Player>, With<Current>),
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
for message in messages.read() {
|
||||||
|
let (player, max_health, mut health, extra_effectiveness) = p_query.single_mut().unwrap();
|
||||||
|
let (source, delta) = match message {
|
||||||
|
HealthChange::Cauterise => {
|
||||||
|
let delta = (max_health.value as f32 * 0.2) as i16;
|
||||||
|
("Cauterise", delta)
|
||||||
|
}
|
||||||
|
HealthChange::Serotonin => {
|
||||||
|
let delta = (max_health.value as f32
|
||||||
|
* 0.25
|
||||||
|
* extra_effectiveness.map_or(1.0, |e| e.factor))
|
||||||
|
as i16;
|
||||||
|
("Serotonin", delta)
|
||||||
|
}
|
||||||
|
HealthChange::Bloodlust { dmg, value } => {
|
||||||
|
let delta = (*dmg as f32 * *value) as i16;
|
||||||
|
("Bloodlust", delta)
|
||||||
|
}
|
||||||
|
HealthChange::DoubleEdged { dmg } => {
|
||||||
|
let delta = -(*dmg as f32 * 0.25) as i16;
|
||||||
|
("Double-edged", delta)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let health_before = health.0;
|
||||||
|
health.0 = (health.0 as i16 + delta).clamp(1, max_health.value as i16) as u16;
|
||||||
|
|
||||||
|
log!(logger, "health_change", {
|
||||||
|
recipient: player,
|
||||||
|
source,
|
||||||
|
delta,
|
||||||
|
health_before,
|
||||||
|
health_after: health.0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn configure(stages: &mut Stages) {
|
pub(crate) fn configure(stages: &mut Stages) {
|
||||||
stats::configure(stages);
|
stats::configure(stages);
|
||||||
status_effect::configure(stages);
|
status_effect::configure(stages);
|
||||||
|
|
||||||
stages.add_event::<ChooseWeapon>();
|
stages.add_event::<ChooseWeapon>();
|
||||||
|
stages.add_event::<HealthChange>();
|
||||||
stages.equip.add_systems(designate_first);
|
stages.equip.add_systems(designate_first);
|
||||||
stages.pre_fight.add_systems(restore_health);
|
stages.pre_fight.add_systems(restore_health);
|
||||||
stages.pre_turn.add_systems(pick_action);
|
stages.pre_turn.add_systems(pick_action);
|
||||||
stages.turn.add_systems(use_damaging_weapon);
|
stages.turn.add_systems(use_damaging_weapon);
|
||||||
stages
|
stages
|
||||||
.post_turn
|
.post_turn
|
||||||
.add_systems((check_term_condition, change_roles))
|
.add_systems((check_term_condition, change_roles, process_health_changes))
|
||||||
.add_systems(
|
.add_systems(
|
||||||
check_stalemate
|
check_stalemate
|
||||||
.after(check_term_condition)
|
.after(check_term_condition)
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,6 @@ pub trait AdditiveStatusEffectMarker<const N: usize>: Send + Sync + 'static {
|
||||||
fn duration() -> f32;
|
fn duration() -> f32;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: instead of tracking it in the status effect itself, add generic
|
|
||||||
// `StatusEffectEffectiveness` and `StatusEffectExtraDuration` components
|
|
||||||
#[derive(Component)]
|
#[derive(Component)]
|
||||||
pub struct AdditiveStatusEffect<const N: usize, M>
|
pub struct AdditiveStatusEffect<const N: usize, M>
|
||||||
where
|
where
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use bevy_ecs::prelude::*;
|
use bevy_ecs::prelude::*;
|
||||||
use proxisim_models::bundle::{
|
use proxisim_models::bundle::{
|
||||||
bonus::{ArmourBypassBonus, BonusPartDamageBonus, BonusValue, WeaponBonusType},
|
bonus::{ArmourBypassBonus, BonusPartDamageBonus, BonusValue, MiscBonus, WeaponBonusType},
|
||||||
player::PartDamageBonus,
|
player::PartDamageBonus,
|
||||||
stat::{
|
stat::{
|
||||||
AdditiveBonus, AmmoControl, Clips, CritRate, DamageBonus, SimpleStatBonus,
|
AdditiveBonus, AmmoControl, Clips, CritRate, DamageBonus, SimpleStatBonus,
|
||||||
|
|
@ -455,8 +455,8 @@ pub(crate) fn prepare_bonuses(
|
||||||
WeaponBonusType::Deadly => {
|
WeaponBonusType::Deadly => {
|
||||||
commands
|
commands
|
||||||
.entity(weapon.parent())
|
.entity(weapon.parent())
|
||||||
.with_child(DamageProcEffect::Deadly {
|
.with_child(MiscBonus::Deadly {
|
||||||
chance: value.0 / 100.0,
|
chance: (value.0 / 100.0) as f64,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
WeaponBonusType::Execute => {
|
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:?}"),
|
val => unimplemented!("{val:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,8 +162,8 @@ pub enum DamageProcEffect {
|
||||||
Execute {
|
Execute {
|
||||||
cutoff: f32,
|
cutoff: f32,
|
||||||
},
|
},
|
||||||
Deadly {
|
Bloodlust {
|
||||||
chance: f32,
|
ratio: f32,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use bevy_ecs::prelude::*;
|
use bevy_ecs::prelude::*;
|
||||||
use proxisim_models::bundle::{
|
use proxisim_models::bundle::{
|
||||||
player::{Current, CurrentTarget, Player},
|
player::{Current, CurrentTarget, HealthChange, Player},
|
||||||
weapon::{BuffingTemp, DebuffingTemp, Usable, Uses},
|
weapon::{BuffingTemp, DebuffingTemp, Usable, Uses},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -76,11 +76,14 @@ fn use_buffing_temp(
|
||||||
let current = current_q.single().unwrap();
|
let current = current_q.single().unwrap();
|
||||||
|
|
||||||
match temp {
|
match temp {
|
||||||
BuffingTemp::Serotonin => effects.spawn_and_insert(
|
BuffingTemp::Serotonin => {
|
||||||
|
commands.write_message(HealthChange::Serotonin);
|
||||||
|
effects.spawn_and_insert(
|
||||||
AdditiveStatusEffect::<1, Hardened>::default(),
|
AdditiveStatusEffect::<1, Hardened>::default(),
|
||||||
current,
|
current,
|
||||||
AssociatedWeapon(weapon),
|
AssociatedWeapon(weapon),
|
||||||
),
|
)
|
||||||
|
}
|
||||||
BuffingTemp::Tyrosine => effects.spawn_and_insert(
|
BuffingTemp::Tyrosine => effects.spawn_and_insert(
|
||||||
AdditiveStatusEffect::<1, Sharpened>::default(),
|
AdditiveStatusEffect::<1, Sharpened>::default(),
|
||||||
current,
|
current,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue