add difficulty settings, increase drops

This commit is contained in:
Jim 2025-09-02 17:51:16 -04:00
parent d35344f910
commit dccd6d319e
Signed by: jim
GPG key ID: 3D7D94BA53088BF4
9 changed files with 57 additions and 17 deletions

View file

@ -11,6 +11,7 @@ state = { path = "../state" }
combat = { path = "../combat" }
building = { path = "../building" }
inhabitant = { path = "../inhabitant" }
resources = { path = "../resources" }
combat_damagers = { path = "../combat_damagers" }
[lints]

View file

@ -8,6 +8,7 @@ use building::Building;
use combat::{GaveDamage, Health, Team};
use combat_damagers::ContactDamage;
use inhabitant::Inhabitant;
use resources::{Drops, Quantity};
use state::{BasePhaseState, GameSystemSet};
pub struct InhabitantSimbertPlugin;
@ -68,12 +69,13 @@ fn spawn(
res: Res<SimbertResources>,
) {
for SpawnSimbert { transform, mega } in reader.read() {
let (health, damage, transform, material) = if *mega {
let (health, damage, transform, material, drops) = if *mega {
(
Health::new(5.0 + 1.5 * phase.get().phase_count() as f32),
ContactDamage::new(6.0),
transform.with_scale(transform.scale * res.mega_scale),
res.mega_material.clone(),
Drops(Quantity { souls: 3, bones: 0 }),
)
} else {
(
@ -81,6 +83,7 @@ fn spawn(
ContactDamage::new(3.0),
transform.clone(),
res.material.clone(),
Drops::default(),
)
};
commands
@ -91,6 +94,7 @@ fn spawn(
MeshMaterial3d(material),
MaxLinearSpeed(25.),
Simbert,
drops,
transform,
health,
damage,