feat: added parry and homerun
This commit is contained in:
parent
71169690b7
commit
67131c7985
9 changed files with 440 additions and 181 deletions
|
|
@ -59,7 +59,7 @@ pub enum WeaponBonusType {
|
|||
Roshambo,
|
||||
Throttle,
|
||||
|
||||
// Attack nullification types
|
||||
// Action nullification types
|
||||
Homerun,
|
||||
Parry,
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ pub struct Defeated;
|
|||
#[derive(Component)]
|
||||
pub struct Current;
|
||||
|
||||
#[derive(Component)]
|
||||
pub struct PickedAction(pub WeaponSlot);
|
||||
|
||||
#[derive(Component)]
|
||||
pub struct CurrentTarget;
|
||||
|
||||
|
|
@ -139,6 +142,13 @@ pub enum HealthChange {
|
|||
DoubleEdged { dmg: u32 },
|
||||
}
|
||||
|
||||
#[derive(Component, Debug)]
|
||||
pub enum ActionNullification {
|
||||
Parry { chance: f64 },
|
||||
Homerun { chance: f64 },
|
||||
GentsStripClub,
|
||||
}
|
||||
|
||||
impl PartDamageBonus {
|
||||
pub fn dmg_bonus(&self, part: BodyPart) -> Option<f32> {
|
||||
match self {
|
||||
|
|
|
|||
|
|
@ -305,11 +305,11 @@ impl WeaponDto {
|
|||
commands.insert(EquippedMods(mods));
|
||||
|
||||
if let Some(bonus) = &self.bonuses[0] {
|
||||
commands.insert(children![WeaponBonusBundle::new(bonus.bonus, bonus.value)]);
|
||||
commands.with_child(WeaponBonusBundle::new(bonus.bonus, bonus.value));
|
||||
}
|
||||
|
||||
if let Some(bonus) = &self.bonuses[1] {
|
||||
commands.insert(children![WeaponBonusBundle::new(bonus.bonus, bonus.value)]);
|
||||
commands.with_child(WeaponBonusBundle::new(bonus.bonus, bonus.value));
|
||||
}
|
||||
|
||||
commands.id()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue