minor balance tweaks
This commit is contained in:
parent
e9379a6a94
commit
283b86d04a
7 changed files with 99 additions and 31 deletions
|
|
@ -8,7 +8,7 @@ use building::Building;
|
|||
use combat::{GaveDamage, Health, Team};
|
||||
use combat_damagers::ContactDamage;
|
||||
use inhabitant::Inhabitant;
|
||||
use state::GameSystemSet;
|
||||
use state::{BasePhaseState, GameSystemSet};
|
||||
|
||||
pub struct InhabitantCoranthPlugin;
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ fn spawn(
|
|||
mut commands: Commands,
|
||||
mut meshes: ResMut<Assets<Mesh>>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
phase: Res<State<BasePhaseState>>,
|
||||
) {
|
||||
for SpawnCoranth { transform } in reader.read() {
|
||||
commands
|
||||
|
|
@ -50,7 +51,7 @@ fn spawn(
|
|||
MaxLinearSpeed(25.),
|
||||
Coranth,
|
||||
transform.clone(),
|
||||
Health::new(5.0),
|
||||
Health::new(1.0 + phase.get().phase_count() as f32),
|
||||
ContactDamage::new(5.0),
|
||||
Name::from("Coranth"),
|
||||
Team::Inhabitant.collision_layers(),
|
||||
|
|
@ -70,7 +71,7 @@ fn explode(
|
|||
};
|
||||
let origin = gtf.translation();
|
||||
for e in spatial_query.shape_intersections(
|
||||
&Collider::sphere(5.0),
|
||||
&Collider::sphere(2.0),
|
||||
origin,
|
||||
Quat::IDENTITY,
|
||||
// &SpatialQueryFilter::from_mask(Team::Inhabitant),
|
||||
|
|
@ -78,7 +79,7 @@ fn explode(
|
|||
) {
|
||||
if let Ok((gtf, mut v)) = other_query.get_mut(e) {
|
||||
let delta = gtf.translation() - origin;
|
||||
v.0 += delta.normalize_or_zero() * 2.0;
|
||||
v.0 += delta.normalize_or_zero();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue