mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'juliancoffee/clay_golem_tweak' into 'master'
clay golem tweak See merge request veloren/veloren!2478
This commit is contained in:
commit
e7f54d6306
@ -17,8 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Entity-entity pushback is no longer applied in forced movement states like rolling and leaping.
|
||||
- Updated audio library (rodio 0.13 -> 0.14).
|
||||
- Improve entity-terrain physics performance by reducing the number of voxel lookups.
|
||||
- Clay Golem uses shockwave only after specific fraction of health and other difficulty adjustments.
|
||||
|
||||
### Removed
|
||||
- Enemies no more spawn in dungeon boss room
|
||||
|
||||
### Fixed
|
||||
- Crafting Stations aren't exploadable anymore
|
||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Cultist,
|
||||
)
|
||||
)
|
||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Flamethrower,
|
||||
)
|
||||
)
|
||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Flamethrower,
|
||||
)
|
||||
)
|
||||
|
@ -2,13 +2,19 @@ BasicBeam(
|
||||
buildup_duration: 0.5,
|
||||
recover_duration: 0.4,
|
||||
beam_duration: 0.25,
|
||||
damage: 100,
|
||||
damage: 70,
|
||||
tick_rate: 2.0,
|
||||
range: 40.0,
|
||||
max_angle: 1.0,
|
||||
damage_effect: None,
|
||||
damage_effect: Some(Buff((
|
||||
kind: Burning,
|
||||
dur_secs: 5.0,
|
||||
strength: DamageFraction(0.75),
|
||||
chance: 0.75,
|
||||
))),
|
||||
energy_regen: 50,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: FromOri,
|
||||
ori_rate: 0.07,
|
||||
specifier: ClayGolem,
|
||||
)
|
||||
)
|
||||
|
@ -1,11 +1,11 @@
|
||||
BasicRanged(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 0.5,
|
||||
recover_duration: 0.8,
|
||||
buildup_duration: 0.8,
|
||||
recover_duration: 0.5,
|
||||
projectile: ClayRocket(
|
||||
damage: 500.0,
|
||||
knockback: 25.0,
|
||||
radius: 10.0,
|
||||
radius: 5.0,
|
||||
),
|
||||
projectile_body: Object(ClayRocket),
|
||||
projectile_light: None,
|
||||
|
@ -1,6 +1,6 @@
|
||||
Shockwave(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 0.6,
|
||||
buildup_duration: 1.5,
|
||||
swing_duration: 0.12,
|
||||
recover_duration: 1.2,
|
||||
damage: 500,
|
||||
@ -9,9 +9,9 @@ Shockwave(
|
||||
shockwave_angle: 180.0,
|
||||
shockwave_vertical_angle: 90.0,
|
||||
shockwave_speed: 15.0,
|
||||
shockwave_duration: 2.5,
|
||||
shockwave_duration: 3.5,
|
||||
requires_ground: true,
|
||||
move_efficiency: 0.0,
|
||||
damage_kind: Crushing,
|
||||
specifier: Ground,
|
||||
)
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 0.8,
|
||||
swing_duration: 0.2,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.5,
|
||||
base_damage: 200,
|
||||
base_poise_damage: 50,
|
||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Cultist,
|
||||
)
|
||||
)
|
||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
||||
energy_regen: 25,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: HealingBeam,
|
||||
)
|
||||
)
|
||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Flamethrower,
|
||||
)
|
||||
)
|
||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Bubbles,
|
||||
)
|
||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.3,
|
||||
specifier: Flamethrower,
|
||||
)
|
||||
)
|
||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Frost,
|
||||
)
|
||||
)
|
||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
||||
energy_regen: 50,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: LifestealBeam
|
||||
)
|
||||
)
|
||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 350,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Flamethrower,
|
||||
)
|
||||
)
|
||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
||||
energy_regen: 0,
|
||||
energy_drain: 350,
|
||||
orientation_behavior: Normal,
|
||||
ori_rate: 0.6,
|
||||
specifier: Flamethrower,
|
||||
)
|
||||
|
@ -247,6 +247,7 @@ pub enum CharacterAbility {
|
||||
energy_regen: f32,
|
||||
energy_drain: f32,
|
||||
orientation_behavior: basic_beam::OrientationBehavior,
|
||||
ori_rate: f32,
|
||||
specifier: beam::FrontendSpecifier,
|
||||
},
|
||||
BasicAura {
|
||||
@ -1651,6 +1652,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
||||
energy_regen,
|
||||
energy_drain,
|
||||
orientation_behavior,
|
||||
ori_rate,
|
||||
specifier,
|
||||
} => CharacterState::BasicBeam(basic_beam::Data {
|
||||
static_data: basic_beam::StaticData {
|
||||
@ -1666,6 +1668,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
||||
energy_drain: *energy_drain,
|
||||
ability_info,
|
||||
orientation_behavior: *orientation_behavior,
|
||||
ori_rate: *ori_rate,
|
||||
specifier: *specifier,
|
||||
},
|
||||
timer: Duration::default(),
|
||||
|
@ -511,7 +511,7 @@ impl Body {
|
||||
_ => 10000,
|
||||
},
|
||||
Body::Golem(golem) => match golem.species {
|
||||
golem::Species::ClayGolem => 7500,
|
||||
golem::Species::ClayGolem => 4500,
|
||||
_ => 10000,
|
||||
},
|
||||
Body::Theropod(theropod) => match theropod.species {
|
||||
@ -676,7 +676,7 @@ impl Body {
|
||||
_ => 1.0,
|
||||
},
|
||||
Body::Golem(g) => match g.species {
|
||||
golem::Species::ClayGolem => 1.2,
|
||||
golem::Species::ClayGolem => 2.0,
|
||||
_ => 1.0,
|
||||
},
|
||||
_ => 1.0,
|
||||
|
@ -40,6 +40,8 @@ pub struct StaticData {
|
||||
pub energy_drain: f32,
|
||||
/// Used to dictate how orientation functions in this state
|
||||
pub orientation_behavior: OrientationBehavior,
|
||||
/// How fast enemy can rotate with beam
|
||||
pub ori_rate: f32,
|
||||
/// What key is used to press ability
|
||||
pub ability_info: AbilityInfo,
|
||||
/// Used to specify the beam to the frontend
|
||||
@ -61,14 +63,10 @@ impl CharacterBehavior for Data {
|
||||
fn behavior(&self, data: &JoinData) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
|
||||
let ori_rate = match self.static_data.orientation_behavior {
|
||||
OrientationBehavior::Normal => 0.6,
|
||||
OrientationBehavior::Turret => {
|
||||
update.ori = Ori::from(data.inputs.look_dir);
|
||||
0.6
|
||||
},
|
||||
OrientationBehavior::FromOri => 0.1,
|
||||
};
|
||||
let ori_rate = self.static_data.ori_rate;
|
||||
if self.static_data.orientation_behavior == OrientationBehavior::Turret {
|
||||
update.ori = Ori::from(data.inputs.look_dir);
|
||||
}
|
||||
|
||||
handle_orientation(data, &mut update, ori_rate);
|
||||
handle_move(data, &mut update, 0.4);
|
||||
|
@ -3477,6 +3477,9 @@ impl<'a> AgentData<'a> {
|
||||
const GOLEM_LONG_RANGE: f32 = 50.0;
|
||||
const GOLEM_TARGET_SPEED: f32 = 8.0;
|
||||
let golem_melee_range = self.body.map_or(0.0, |b| b.radius()) + GOLEM_MELEE_RANGE;
|
||||
// Fraction of health, used for activation of shockwave
|
||||
// If golem don't have health for some reason, assume it's full
|
||||
let health_fraction = self.health.map_or(1.0, |h| h.fraction());
|
||||
// Magnitude squared of cross product of target velocity with golem orientation
|
||||
let target_speed_cross_sqd = agent
|
||||
.target
|
||||
@ -3502,7 +3505,7 @@ impl<'a> AgentData<'a> {
|
||||
}
|
||||
}
|
||||
} else if attack_data.dist_sqrd < GOLEM_LASER_RANGE.powi(2) {
|
||||
if matches!(self.char_state, CharacterState::BasicBeam(c) if c.timer < Duration::from_secs(10))
|
||||
if matches!(self.char_state, CharacterState::BasicBeam(c) if c.timer < Duration::from_secs(5))
|
||||
|| target_speed_cross_sqd < GOLEM_TARGET_SPEED.powi(2)
|
||||
&& can_see_tgt(
|
||||
&*read_data.terrain,
|
||||
@ -3512,13 +3515,14 @@ impl<'a> AgentData<'a> {
|
||||
)
|
||||
&& attack_data.angle < 45.0
|
||||
{
|
||||
// If target in range threshold and haven't been lasering for more than 10
|
||||
// If target in range threshold and haven't been lasering for more than 5
|
||||
// seconds already or if target is moving slow-ish, laser them
|
||||
controller
|
||||
.actions
|
||||
.push(ControlAction::basic_input(InputKind::Secondary));
|
||||
} else {
|
||||
// Else target moving too fast for laser, shockwave time
|
||||
} else if health_fraction < 0.7 {
|
||||
// Else target moving too fast for laser, shockwave time.
|
||||
// But only if damaged enough
|
||||
controller
|
||||
.actions
|
||||
.push(ControlAction::basic_input(InputKind::Ability(0)));
|
||||
@ -3536,8 +3540,9 @@ impl<'a> AgentData<'a> {
|
||||
controller
|
||||
.actions
|
||||
.push(ControlAction::basic_input(InputKind::Ability(1)));
|
||||
} else {
|
||||
// Else target moving too fast for laser, shockwave time
|
||||
} else if health_fraction < 0.7 {
|
||||
// Else target moving too fast for laser, shockwave time.
|
||||
// But only if damaged enough
|
||||
controller
|
||||
.actions
|
||||
.push(ControlAction::basic_input(InputKind::Ability(0)));
|
||||
|
@ -541,7 +541,7 @@ impl Floor {
|
||||
.map(|density| dynamic_rng.gen_range(0..density.recip() as usize) == 0)
|
||||
.unwrap_or(false)
|
||||
&& !tile_is_pillar
|
||||
&& !(room.boss && room.difficulty == 5)
|
||||
&& !room.boss
|
||||
{
|
||||
// Randomly displace them a little
|
||||
let raw_entity = EntityInfo::at(
|
||||
|
Loading…
Reference in New Issue
Block a user