mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Load ori_rate for BasicBeam from assets
+ make fire turret ori_rate slower
This commit is contained in:
parent
36fa8bf4f7
commit
384409a1ed
@ -15,5 +15,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Cultist,
|
specifier: Cultist,
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Flamethrower,
|
specifier: Flamethrower,
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Flamethrower,
|
specifier: Flamethrower,
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
|||||||
energy_regen: 50,
|
energy_regen: 50,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: FromOri,
|
orientation_behavior: FromOri,
|
||||||
|
ori_rate: 0.1,
|
||||||
specifier: ClayGolem,
|
specifier: ClayGolem,
|
||||||
)
|
)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
BasicRanged(
|
BasicRanged(
|
||||||
energy_cost: 0,
|
energy_cost: 0,
|
||||||
buildup_duration: 0.5,
|
buildup_duration: 0.8,
|
||||||
recover_duration: 0.8,
|
recover_duration: 0.5,
|
||||||
projectile: ClayRocket(
|
projectile: ClayRocket(
|
||||||
damage: 500.0,
|
damage: 500.0,
|
||||||
knockback: 25.0,
|
knockback: 25.0,
|
||||||
radius: 10.0,
|
radius: 5.0,
|
||||||
),
|
),
|
||||||
projectile_body: Object(ClayRocket),
|
projectile_body: Object(ClayRocket),
|
||||||
projectile_light: None,
|
projectile_light: None,
|
||||||
|
@ -9,9 +9,9 @@ Shockwave(
|
|||||||
shockwave_angle: 180.0,
|
shockwave_angle: 180.0,
|
||||||
shockwave_vertical_angle: 90.0,
|
shockwave_vertical_angle: 90.0,
|
||||||
shockwave_speed: 15.0,
|
shockwave_speed: 15.0,
|
||||||
shockwave_duration: 2.5,
|
shockwave_duration: 3.5,
|
||||||
requires_ground: true,
|
requires_ground: true,
|
||||||
move_efficiency: 0.0,
|
move_efficiency: 0.0,
|
||||||
damage_kind: Crushing,
|
damage_kind: Crushing,
|
||||||
specifier: Ground,
|
specifier: Ground,
|
||||||
)
|
)
|
||||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Cultist,
|
specifier: Cultist,
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
|||||||
energy_regen: 25,
|
energy_regen: 25,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: HealingBeam,
|
specifier: HealingBeam,
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Flamethrower,
|
specifier: Flamethrower,
|
||||||
)
|
)
|
||||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Bubbles,
|
specifier: Bubbles,
|
||||||
)
|
)
|
||||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.3,
|
||||||
specifier: Flamethrower,
|
specifier: Flamethrower,
|
||||||
)
|
)
|
||||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Frost,
|
specifier: Frost,
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
|||||||
energy_regen: 50,
|
energy_regen: 50,
|
||||||
energy_drain: 0,
|
energy_drain: 0,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: LifestealBeam
|
specifier: LifestealBeam
|
||||||
)
|
)
|
||||||
|
@ -15,5 +15,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 350,
|
energy_drain: 350,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Flamethrower,
|
specifier: Flamethrower,
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,6 @@ BasicBeam(
|
|||||||
energy_regen: 0,
|
energy_regen: 0,
|
||||||
energy_drain: 350,
|
energy_drain: 350,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
ori_rate: 0.6,
|
||||||
specifier: Flamethrower,
|
specifier: Flamethrower,
|
||||||
)
|
)
|
||||||
|
@ -247,6 +247,7 @@ pub enum CharacterAbility {
|
|||||||
energy_regen: f32,
|
energy_regen: f32,
|
||||||
energy_drain: f32,
|
energy_drain: f32,
|
||||||
orientation_behavior: basic_beam::OrientationBehavior,
|
orientation_behavior: basic_beam::OrientationBehavior,
|
||||||
|
ori_rate: f32,
|
||||||
specifier: beam::FrontendSpecifier,
|
specifier: beam::FrontendSpecifier,
|
||||||
},
|
},
|
||||||
BasicAura {
|
BasicAura {
|
||||||
@ -1651,6 +1652,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
|||||||
energy_regen,
|
energy_regen,
|
||||||
energy_drain,
|
energy_drain,
|
||||||
orientation_behavior,
|
orientation_behavior,
|
||||||
|
ori_rate,
|
||||||
specifier,
|
specifier,
|
||||||
} => CharacterState::BasicBeam(basic_beam::Data {
|
} => CharacterState::BasicBeam(basic_beam::Data {
|
||||||
static_data: basic_beam::StaticData {
|
static_data: basic_beam::StaticData {
|
||||||
@ -1666,6 +1668,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
|||||||
energy_drain: *energy_drain,
|
energy_drain: *energy_drain,
|
||||||
ability_info,
|
ability_info,
|
||||||
orientation_behavior: *orientation_behavior,
|
orientation_behavior: *orientation_behavior,
|
||||||
|
ori_rate: *ori_rate,
|
||||||
specifier: *specifier,
|
specifier: *specifier,
|
||||||
},
|
},
|
||||||
timer: Duration::default(),
|
timer: Duration::default(),
|
||||||
|
@ -40,6 +40,8 @@ pub struct StaticData {
|
|||||||
pub energy_drain: f32,
|
pub energy_drain: f32,
|
||||||
/// Used to dictate how orientation functions in this state
|
/// Used to dictate how orientation functions in this state
|
||||||
pub orientation_behavior: OrientationBehavior,
|
pub orientation_behavior: OrientationBehavior,
|
||||||
|
/// How fast enemy can rotate with beam
|
||||||
|
pub ori_rate: f32,
|
||||||
/// What key is used to press ability
|
/// What key is used to press ability
|
||||||
pub ability_info: AbilityInfo,
|
pub ability_info: AbilityInfo,
|
||||||
/// Used to specify the beam to the frontend
|
/// Used to specify the beam to the frontend
|
||||||
@ -61,14 +63,10 @@ impl CharacterBehavior for Data {
|
|||||||
fn behavior(&self, data: &JoinData) -> StateUpdate {
|
fn behavior(&self, data: &JoinData) -> StateUpdate {
|
||||||
let mut update = StateUpdate::from(data);
|
let mut update = StateUpdate::from(data);
|
||||||
|
|
||||||
let ori_rate = match self.static_data.orientation_behavior {
|
let ori_rate = self.static_data.ori_rate;
|
||||||
OrientationBehavior::Normal => 0.6,
|
if self.static_data.orientation_behavior == OrientationBehavior::Turret {
|
||||||
OrientationBehavior::Turret => {
|
update.ori = Ori::from(data.inputs.look_dir);
|
||||||
update.ori = Ori::from(data.inputs.look_dir);
|
}
|
||||||
0.6
|
|
||||||
},
|
|
||||||
OrientationBehavior::FromOri => 0.1,
|
|
||||||
};
|
|
||||||
|
|
||||||
handle_orientation(data, &mut update, ori_rate);
|
handle_orientation(data, &mut update, ori_rate);
|
||||||
handle_move(data, &mut update, 0.4);
|
handle_move(data, &mut update, 0.4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user