feat: added property damage boost

This commit is contained in:
TotallyNot 2025-11-04 16:35:40 +01:00
parent 6c3c50689a
commit 1c66dbf499
Signed by: pyrite
GPG key ID: 7F1BA9170CD35D15
3 changed files with 21 additions and 4 deletions

View file

@ -178,6 +178,12 @@ pub struct FactionUpgrades {
pub side_effects: u16,
}
#[derive(Component, Default)]
#[cfg_attr(feature = "json", derive(serde::Deserialize))]
pub struct Property {
pub damage: bool,
}
#[derive(Component)]
#[cfg_attr(feature = "json", derive(serde::Deserialize))]
pub enum DrugCooldown {
@ -204,4 +210,5 @@ pub(crate) struct PassiveBundle {
pub merits: Merits,
pub education: Education,
pub faction: FactionUpgrades,
pub property: Property,
}

View file

@ -3,7 +3,7 @@ use bevy_ecs::prelude::*;
use crate::{
bundle::{
armour::PlayerArmour,
passive::{DrugCooldown, Education, FactionUpgrades, Merits, PassiveBundle},
passive::{DrugCooldown, Education, FactionUpgrades, Merits, PassiveBundle, Property},
player::{PlayerBundle, PlayerStrategy, Weapons},
stat::{Defence, Dexterity, Speed, StatBundle, Strength},
},
@ -43,6 +43,7 @@ pub struct PlayerDto {
pub stats: Stats,
pub merits: Option<Merits>,
pub education: Option<Education>,
pub property: Option<Property>,
pub weapons: EquippedWeapons,
pub armour: EquippedArmour,
pub faction: Option<FactionUpgrades>,
@ -65,11 +66,13 @@ impl PlayerDto {
let education = self.education.unwrap_or_default();
let merits = self.merits.unwrap_or_default();
let faction = self.faction.unwrap_or_default();
let property = self.property.unwrap_or_default();
commands.insert(PassiveBundle {
education,
merits,
faction,
property,
});
let mut weapons = None;