feat: added deadly and execute

This commit is contained in:
TotallyNot 2025-11-04 17:29:46 +01:00
parent 1c66dbf499
commit 9550cd2bbb
Signed by: pyrite
GPG key ID: 7F1BA9170CD35D15
5 changed files with 237 additions and 47 deletions

View file

@ -452,6 +452,21 @@ pub(crate) fn prepare_bonuses(
});
}
WeaponBonusType::Deadly => {
commands
.entity(weapon.parent())
.with_child(DamageProcEffect::Deadly {
chance: value.0 / 100.0,
});
}
WeaponBonusType::Execute => {
commands
.entity(weapon.parent())
.with_child(DamageProcEffect::Execute {
cutoff: value.0 / 100.0,
});
}
val => unimplemented!("{val:?}"),
}
}

View file

@ -149,6 +149,7 @@ pub enum DamageProcEffect {
value: f32,
bonus: OpponentStatusEffect,
},
SelfEffect {
value: f32,
bonus: SelfStatusEffect,
@ -157,6 +158,13 @@ pub enum DamageProcEffect {
value: f32,
kind: DamageOverTimeType,
},
Execute {
cutoff: f32,
},
Deadly {
chance: f32,
},
}
fn apply_passives(