diff --git a/assets/voxygen/element/icons/lifesteal.png b/assets/voxygen/element/icons/lifesteal.png new file mode 100644 index 0000000000..c9e6120184 --- /dev/null +++ b/assets/voxygen/element/icons/lifesteal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:535c9bb15a0edc5a2e9b54e6f311c96e5b9f6869ade33dd02bcbe674d4116482 +size 636 diff --git a/voxygen/src/hud/diary.rs b/voxygen/src/hud/diary.rs index 9547fd9d67..c8cb25b898 100644 --- a/voxygen/src/hud/diary.rs +++ b/voxygen/src/hud/diary.rs @@ -3249,7 +3249,7 @@ impl<'a> Widget for Diary<'a> { // 5 1 6 // 3 0 4 // 8 2 7 - Button::image(self.imgs.heal_0) + Button::image(self.imgs.skill_sceptre_heal) .w_h(74.0, 74.0) .mid_top_with_margin_on(state.skills_top_l[0], 3.0) .with_tooltip( @@ -3422,7 +3422,7 @@ impl<'a> Widget for Diary<'a> { { events.push(Event::UnlockSkill(skill)); }; - Button::image(self.imgs.heal_bomb) + Button::image(self.imgs.skill_sceptre_heal) .w_h(74.0, 74.0) .mid_top_with_margin_on(state.skills_top_r[0], 3.0) .with_tooltip( diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index c63747e245..4c1e9eec99 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -446,12 +446,13 @@ image_ids! { // Icons snake_arrow_0: "voxygen.element.icons.snake", - heal_0: "voxygen.element.icons.heal_0", + skill_sceptre_lifesteal: "voxygen.element.icons.lifesteal", sword_whirlwind: "voxygen.element.icons.sword_whirlwind", - heal_bomb: "voxygen.element.icons.heal_bomb", + skill_sceptre_heal: "voxygen.element.icons.heal_0", hammerleap: "voxygen.element.icons.skill_hammerleap", skill_axe_leap_slash: "voxygen.element.icons.skill_axe_leap_slash", skill_bow_jump_burst: "voxygen.element.icons.skill_bow_jump_burst", + skill_sceptre_aura: "voxygen.element.icons.heal_bomb", missing_icon: "voxygen.element.icons.missing_icon_grey", // Buttons diff --git a/voxygen/src/hud/skillbar.rs b/voxygen/src/hud/skillbar.rs index d62f070447..9eba391183 100644 --- a/voxygen/src/hud/skillbar.rs +++ b/voxygen/src/hud/skillbar.rs @@ -585,7 +585,7 @@ impl<'a> Widget for Skillbar<'a> { ToolKind::Hammer => self.imgs.twohhammer_m1, ToolKind::Axe => self.imgs.twohaxe_m1, ToolKind::Bow => self.imgs.bow_m1, - ToolKind::Sceptre => self.imgs.heal_0, + ToolKind::Sceptre => self.imgs.skill_sceptre_lifesteal, ToolKind::Staff => self.imgs.fireball, ToolKind::Debug => self.imgs.flyingrod_m1, _ => self.imgs.nothing, @@ -632,7 +632,7 @@ impl<'a> Widget for Skillbar<'a> { Some(ToolKind::Hammer) => self.imgs.hammergolf, Some(ToolKind::Axe) => self.imgs.axespin, Some(ToolKind::Bow) => self.imgs.bow_m2, - Some(ToolKind::Sceptre) => self.imgs.heal_bomb, + Some(ToolKind::Sceptre) => self.imgs.skill_sceptre_heal, Some(ToolKind::Staff) => self.imgs.flamethrower, Some(ToolKind::Debug) => self.imgs.flyingrod_m2, _ => self.imgs.nothing, @@ -926,37 +926,32 @@ impl<'a> Widget for Skillbar<'a> { let combo_txt = format!("{} Combo", combo.combo); let combo_cnt = combo.combo as f32; let time_since_last_update = comp::combo::COMBO_DECAY_START - combo.timer; + let alpha = (1.0 - time_since_last_update * tweak!(0.2)).min(1.0) as f32; let fnt_col = Color::Rgba( // White -> Yellow -> Red text color gradient depending on count - (1.0 - combo_cnt / (combo_cnt + tweak!(1.0))).max(0.79), + (1.0 - combo_cnt / (combo_cnt + tweak!(20.0))).max(0.79), (1.0 - combo_cnt / (combo_cnt + tweak!(80.0))).max(0.19), (1.0 - combo_cnt / (combo_cnt + tweak!(5.0))).max(0.17), - (time_since_last_update - 8.0).min(1.0) as f32, + alpha, ); - let fnt_size = ((14.0 + combo.timer as f32 * tweak!(0.5)).min(tweak!(20.0))) as u32 - + if (time_since_last_update - 12.0) < 1.0 { - 1 + let fnt_size = ((14.0 + combo.timer as f32 * tweak!(0.8)).min(tweak!(30.0))) as u32 + + if (time_since_last_update) < tweak!(0.1) { + tweak!(2) } else { 0 - }; // Increase size for higher counts, "flash" on update by increasing the font size by 2 - //dbg!(combo); // Delete this before merging + }; // Increase size for higher counts, "flash" on update by increasing the font size by 2 Rectangle::fill_with([10.0, 10.0], color::TRANSPARENT) .middle_of(ui.window) .set(state.ids.combo_align, ui); Text::new(combo_txt.as_str()) .mid_bottom_with_margin_on( state.ids.combo_align, - tweak!(-350.0) + time_since_last_update * tweak!(4.0) - 8.0, + tweak!(-350.0) + time_since_last_update * tweak!(-8.0), ) .font_size(self.fonts.cyri.scale(fnt_size)) .font_id(self.fonts.cyri.conrod_id) - .color(Color::Rgba( - 0.0, - 0.0, - 0.0, - (time_since_last_update - 8.0).min(1.0) as f32, - )) + .color(Color::Rgba(0.0, 0.0, 0.0, alpha)) .set(state.ids.combo_bg, ui); Text::new(combo_txt.as_str()) .bottom_right_with_margins_on(state.ids.combo_bg, 1.0, 1.0) diff --git a/voxygen/src/hud/slots.rs b/voxygen/src/hud/slots.rs index b6228e343e..37353ab5b9 100644 --- a/voxygen/src/hud/slots.rs +++ b/voxygen/src/hud/slots.rs @@ -116,6 +116,7 @@ pub enum HotbarImage { HammerLeap, AxeLeapSlash, BowJumpBurst, + SceptreAura, } type HotbarSource<'a> = ( @@ -239,6 +240,7 @@ impl<'a> SlotKey, HotbarImageSource<'a>> for HotbarSlot { HotbarImage::HammerLeap => vec![imgs.hammerleap], HotbarImage::AxeLeapSlash => vec![imgs.skill_axe_leap_slash], HotbarImage::BowJumpBurst => vec![imgs.skill_bow_jump_burst], + HotbarImage::SceptreAura => vec![imgs.skill_sceptre_aura], } } } @@ -268,6 +270,7 @@ fn hotbar_image(tool: ToolKind) -> Option { ToolKind::Bow => Some(HotbarImage::BowJumpBurst), ToolKind::Debug => Some(HotbarImage::SnakeArrow), ToolKind::Sword => Some(HotbarImage::SwordWhirlwind), + ToolKind::Sceptre => Some(HotbarImage::SceptreAura), _ => None, } } diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 7f195b9aa7..a5bca89126 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -107,7 +107,10 @@ fn consumable_desc(effects: &[Effect], desc: &str) -> String { format!("Raises Maximum Health by {}", strength) }, BuffKind::Invulnerability => "Grants invulnerability".to_string(), - BuffKind::Bleeding | BuffKind::CampfireHeal | BuffKind::Cursed => continue, + BuffKind::Bleeding + | BuffKind::CampfireHeal + | BuffKind::Cursed + | BuffKind::ProtectingWard => continue, }; write!(&mut description, "\n\n{}", buff_desc).unwrap(); @@ -125,7 +128,8 @@ fn consumable_desc(effects: &[Effect], desc: &str) -> String { BuffKind::Bleeding | BuffKind::Potion | BuffKind::CampfireHeal - | BuffKind::Cursed => continue, + | BuffKind::Cursed + | BuffKind::ProtectingWard => continue, } } else if let BuffKind::Saturation | BuffKind::Regeneration = buff.kind { "every second".to_string()