diff --git a/assets/common/items/npc_weapons/npcweapon/cyclops_hammer.ron b/assets/common/items/npc_weapons/npcweapon/stone_golems_fist.ron similarity index 52% rename from assets/common/items/npc_weapons/npcweapon/cyclops_hammer.ron rename to assets/common/items/npc_weapons/npcweapon/stone_golems_fist.ron index 904f65a5e0..e5dc1c1817 100644 --- a/assets/common/items/npc_weapons/npcweapon/cyclops_hammer.ron +++ b/assets/common/items/npc_weapons/npcweapon/stone_golems_fist.ron @@ -1,9 +1,9 @@ Item( - name: "Cyclops Hammer", - description: "Wielded by a mighty cyclops.", + name: "Stone Golem's Fist", + description: "Was attached to a mighty stone golem.", kind: Tool( ( - kind: NpcWeapon("CyclopsHammer"), + kind: NpcWeapon("StoneGolemsFist"), stats: ( equip_time_millis: 500, power: 1.00, diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 6b98dedcf4..7e2ebda6f1 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -519,11 +519,6 @@ "voxel.weapon.shield.wood-0", (0.0, 0.0, 0.0), (-90.0, 90.0, 0.0), 2.4, ), - // Npc weapons (for test purposes, remove when done) - Tool(NpcWeapon("CyclopsHammer")): VoxTrans( - "voxel.weapon.npcweapon.cyclops_hammer", - (2.0, -1.0, 0.0), (-135.0, 90.0, 0.0), 1.1, - ), // Lanterns Lantern("Black0"): Png( "element.icons.lantern_black-0", diff --git a/assets/voxygen/shaders/particle-frag.glsl b/assets/voxygen/shaders/particle-frag.glsl index 3667c2468a..ad4152bce3 100644 --- a/assets/voxygen/shaders/particle-frag.glsl +++ b/assets/voxygen/shaders/particle-frag.glsl @@ -86,9 +86,5 @@ void main() { vec3 color = surf_color; #endif -<<<<<<< HEAD tgt_color = vec4(color, f_col.a); -======= - tgt_color = vec4(color, 1.0); ->>>>>>> 62119c37a... Tweak particle effects } diff --git a/assets/voxygen/shaders/particle-vert.glsl b/assets/voxygen/shaders/particle-vert.glsl index 0c3c40e45e..10069112c1 100644 --- a/assets/voxygen/shaders/particle-vert.glsl +++ b/assets/voxygen/shaders/particle-vert.glsl @@ -54,7 +54,7 @@ const float earth_gravity = 9.807; struct Attr { vec3 offs; - float scale; + vec3 scale; vec4 col; mat4 rot; }; @@ -123,7 +123,7 @@ void main() { vec3(0), vec3(rand2 * 0.02, rand3 * 0.02, 1.0 + rand4 * 0.1) ), - linear_scale(0.5), + vec3(linear_scale(0.5)), vec4(1, 1, 1, start_end(1.0, 0.0)), spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 0.5) ); @@ -133,7 +133,7 @@ void main() { vec3(rand0 * 0.25, rand1 * 0.25, 0.3), vec3(rand2 * 0.1, rand3 * 0.1, 2.0 + rand4 * 1.0) ), - 1.0, + vec3(1.0), vec4(2, 0.8 + rand5 * 0.3, 0, 1), spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3) ); @@ -143,7 +143,7 @@ void main() { vec3(rand0, rand1, rand3) * 0.3, vec3(rand4, rand5, rand6) * 2.0 + grav_vel(earth_gravity) ), - 1.0, + vec3(1.0), vec4(3.5, 3 + rand7, 0, 1), spin_in_axis(vec3(1,0,0),0) ); @@ -153,7 +153,7 @@ void main() { vec3(0), vec3(rand4, rand5, rand6) * 40.0 + grav_vel(earth_gravity) ), - 3.0 + rand0, + vec3(3.0 + rand0), vec4(vec3(0.6 + rand7 * 0.4), 1), spin_in_axis(vec3(1,0,0),0) ); @@ -163,7 +163,7 @@ void main() { vec3(0), vec3(rand1, rand2, rand3) * 40.0 + grav_vel(earth_gravity) ), - 3.0 + rand0, + vec3(3.0 + rand0), vec4(0.15, 0.4, 1, 1), identity() ); @@ -173,7 +173,7 @@ void main() { vec3(0), vec3(rand1, rand2, rand3) * 40.0 + grav_vel(earth_gravity) ), - 3.0 + rand0, + vec3(3.0 + rand0), vec4(0, 1, 0, 1), identity() ); @@ -183,7 +183,7 @@ void main() { vec3(0), vec3(rand1, rand2, rand3) * 40.0 + grav_vel(earth_gravity) ), - 3.0 + rand0, + vec3(3.0 + rand0), vec4(0.7, 0.0, 1.0, 1.0), identity() ); @@ -193,7 +193,7 @@ void main() { vec3(0), vec3(rand1, rand2, rand3) * 40.0 + grav_vel(earth_gravity) ), - 3.0 + rand0, + vec3(3.0 + rand0), vec4(1, 0, 0, 1), identity() ); @@ -203,7 +203,7 @@ void main() { vec3(0), vec3(rand1, rand2, rand3) * 40.0 + grav_vel(earth_gravity) ), - 3.0 + rand0, + vec3(3.0 + rand0), vec4(1, 1, 0, 1), identity() ); @@ -213,7 +213,7 @@ void main() { vec3(0), vec3(0, 0, -2) ) + vec3(sin(lifetime), sin(lifetime + 0.7), sin(lifetime * 0.5)) * 2.0, - 4, + vec3(4), vec4(vec3(0.2 + rand7 * 0.2, 0.2 + (0.5 + rand6 * 0.5) * 0.6, 0), 1), spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5) ); @@ -244,10 +244,8 @@ void main() { } else if (inst_mode == GROUND_SHOCKWAVE) { attr = Attr( vec3(0.0), - vec3(1.0, 1.0, (3.0 * rand0 * sin(2.0 * lifetime * 3.14 * 2.0))) / 3, - //3.0 + 5.0 * rand5, + vec3(11.0, 11.0, (33.0 * rand0 * sin(2.0 * lifetime * 3.14 * 2.0))) / 3, vec4(vec3(0.32 + (rand0 * 0.04), 0.22 + (rand1 * 0.03), 0.05 + (rand2 * 0.01)), 1), - //rotationMatrix(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5) spin_in_axis(vec3(1,0,0),0) ); } else { @@ -256,7 +254,7 @@ void main() { vec3(rand0 * 0.25, rand1 * 0.25, 1.7 + rand5), vec3(rand2 * 0.1, rand3 * 0.1, 1.0 + rand4 * 0.5) ), - exp_scale(-0.2), + vec3(exp_scale(-0.2)), vec4(1), spin_in_axis(vec3(1,0,0),0) ); diff --git a/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron b/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron index d967085b4a..79969d1c5c 100644 --- a/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron +++ b/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron @@ -1,9 +1,4 @@ -({ // Npc weapons (for test purposes, remove when done) - NpcWeapon("CyclopsHammer"): ( - vox_spec: ("weapon.npcweapon.cyclops_hammer", (-2.5, -7.5, -5.0)), - color: None - ), - //Swords +({ //Swords Sword("BasicSword"): ( vox_spec: ("weapon.sword.rusty_2h", (-1.5, -6.5, -4.0)), color: None diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index ec9ba06157..16435dc608 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -263,7 +263,7 @@ impl Body { _ => 1000, }, Body::Object(_) => 10000, - Body::Golem(_) => 1500, + Body::Golem(_) => 2560, Body::Theropod(_) => 50, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { quadruped_low::Species::Crocodile => 600, @@ -330,7 +330,7 @@ impl Body { _ => 100, }, Body::Object(_) => 10, - Body::Golem(_) => 150, + Body::Golem(_) => 260, Body::Theropod(_) => 20, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { quadruped_low::Species::Crocodile => 20, @@ -395,7 +395,7 @@ impl Body { _ => 100, }, Body::Object(_) => 1, - Body::Golem(_) => 75, + Body::Golem(_) => 256, Body::Theropod(_) => 2, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { quadruped_low::Species::Crocodile => 10, @@ -425,7 +425,7 @@ impl Body { Body::FishSmall(_) => 1, Body::BipedLarge(_) => 2, Body::Object(_) => 0, - Body::Golem(_) => 5, + Body::Golem(_) => 12, Body::Theropod(_) => 1, Body::QuadrupedLow(_) => 1, } diff --git a/common/src/comp/damage.rs b/common/src/comp/damage.rs index 3d2f7b4c0b..ef2fab150a 100644 --- a/common/src/comp/damage.rs +++ b/common/src/comp/damage.rs @@ -76,14 +76,6 @@ impl Damage { } }, DamageSource::Shockwave => { - // Critical hit - if rand::random() { - self.healthchange *= 1.2; - } - // Block - if block { - self.healthchange *= 1.0 - BLOCK_EFFICIENCY - } // Armor self.healthchange *= 1.0 - loadout.get_damage_reduction(); diff --git a/common/src/comp/inventory/item/tool.rs b/common/src/comp/inventory/item/tool.rs index aa939ef37e..cb73b19547 100644 --- a/common/src/comp/inventory/item/tool.rs +++ b/common/src/comp/inventory/item/tool.rs @@ -116,16 +116,6 @@ impl Tool { match &self.kind { Sword(_) => vec![ - GroundShockwave { - energy_cost: 0, - buildup_duration: Duration::from_millis(500), - recover_duration: Duration::from_millis(1000), - damage: 500, - knockback: -30.0, - shockwave_angle: 90.0, - shockwave_speed: 10.0, - shockwave_duration: Duration::from_millis(3000), - }, TripleStrike { base_damage: (60.0 * self.base_power()) as u32, needs_timing: false, @@ -359,7 +349,7 @@ impl Tool { BasicBlock, ], NpcWeapon(kind) => { - if kind == "CyclopsHammer" { + if kind == "StoneGolemsFist" { vec![ BasicMelee { energy_cost: 0, @@ -375,10 +365,10 @@ impl Tool { buildup_duration: Duration::from_millis(500), recover_duration: Duration::from_millis(1000), damage: 500, - knockback: -30.0, + knockback: -40.0, shockwave_angle: 90.0, - shockwave_speed: 10.0, - shockwave_duration: Duration::from_millis(3000), + shockwave_speed: 20.0, + shockwave_duration: Duration::from_millis(2000), }, ] } else { diff --git a/common/src/loadout_builder.rs b/common/src/loadout_builder.rs index e890778ef2..0fee2d99a8 100644 --- a/common/src/loadout_builder.rs +++ b/common/src/loadout_builder.rs @@ -1,7 +1,8 @@ use crate::{ comp::{ + golem, item::{Item, ItemKind}, - Alignment, Body, biped_large, CharacterAbility, ItemConfig, Loadout, + Alignment, Body, CharacterAbility, ItemConfig, Loadout, }, }; use rand::Rng; @@ -66,15 +67,16 @@ impl LoadoutBuilder { ))) } - /// Builds loadout of creature when spawned + /// Builds loadout of creature when spawned pub fn build_loadout(body: Body, alignment: Alignment, mut main_tool: Option) -> Self { match body { - Body::BipedLarge(biped_large) => match biped_large.species { - biped_large::Species::Cyclops => { - main_tool = Some(Item::new_from_asset_expect("common.items.weapons.bossweapon.cyclops_hammer")); + Body::Golem(golem) => match golem.species { + golem::Species::StoneGolem => { + main_tool = Some(Item::new_from_asset_expect( + "common.items.weapons.bossweapon.stone_golems_fist", + )); }, - _ => {}, - } + }, _ => {}, }; @@ -185,8 +187,8 @@ impl LoadoutBuilder { }, _ => LoadoutBuilder::animal(body).build(), }, - Body::BipedLarge(biped_large) => match biped_large.species { - biped_large::Species::Cyclops => Loadout { + Body::Golem(golem) => match golem.species { + golem::Species::StoneGolem => Loadout { active_item, second_item: None, shoulder: None, @@ -203,8 +205,7 @@ impl LoadoutBuilder { head: None, tabard: None, }, - _ => LoadoutBuilder::animal(body).build(), - } + }, _ => LoadoutBuilder::animal(body).build(), }; diff --git a/common/src/sys/agent.rs b/common/src/sys/agent.rs index 239905cad0..aae09363b9 100644 --- a/common/src/sys/agent.rs +++ b/common/src/sys/agent.rs @@ -268,6 +268,7 @@ impl<'a> System<'a> for Sys { Melee, RangedPowerup, Staff, + StoneGolemBoss, } let tactic = match loadout.active_item.as_ref().and_then(|ic| { @@ -279,6 +280,13 @@ impl<'a> System<'a> for Sys { }) { Some(ToolKind::Bow(_)) => Tactic::RangedPowerup, Some(ToolKind::Staff(_)) => Tactic::Staff, + Some(ToolKind::NpcWeapon(kind)) => { + if kind == "StoneGolemsFist" { + Tactic::StoneGolemBoss + } else { + Tactic::Melee + } + }, _ => Tactic::Melee, }; @@ -355,7 +363,9 @@ impl<'a> System<'a> for Sys { * 0.1; match tactic { - Tactic::Melee | Tactic::Staff => inputs.primary.set_state(true), + Tactic::Melee | Tactic::Staff | Tactic::StoneGolemBoss => { + inputs.primary.set_state(true) + }, Tactic::RangedPowerup => inputs.roll.set_state(true), } } else if dist_sqrd < MAX_CHASE_DIST.powf(2.0) @@ -385,6 +395,13 @@ impl<'a> System<'a> for Sys { } inputs.secondary.set_state(true); + } else if let Tactic::StoneGolemBoss = tactic { + if *powerup > 5.0 { + inputs.secondary.set_state(true); + *powerup = 0.0; + } else { + *powerup += dt.0; + } } } diff --git a/common/src/sys/shockwave.rs b/common/src/sys/shockwave.rs index 1e19f95735..f5f9244df1 100644 --- a/common/src/sys/shockwave.rs +++ b/common/src/sys/shockwave.rs @@ -214,7 +214,7 @@ impl<'a> System<'a> for Sys { local_emitter.emit(LocalEvent::ApplyForce { entity: b, force: shockwave.knockback - * *Dir::slerp(ori.0, Dir::new(Vec3::new(0.0, 0.0, -1.0)), 0.5), + * *Dir::slerp(ori.0, Dir::new(Vec3::new(0.0, 0.0, -1.0)), 0.85), }); } else { local_emitter.emit(LocalEvent::ApplyForce {