mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix loot tables, enemy bar color change
This commit is contained in:
parent
3d46d51871
commit
06e7ac25c1
@ -11,7 +11,7 @@
|
||||
(1, "common.items.weapons.staff.cultist_staff"),
|
||||
(1, "common.items.weapons.hammer.cultist_purp_2h-0"),
|
||||
(1, "common.items.weapons.sword.cultist_purp_2h-0"),
|
||||
(0.25, "common.items.weapons.crafting_ing.mindflayer_bag_damaged"),
|
||||
(0.25, "common.items.crafting_ing.mindflayer_bag_damaged"),
|
||||
// misc
|
||||
(1, "common.items.boss_drops.lantern"),
|
||||
(0.1, "common.items.glider.glider_purp"),
|
||||
|
@ -1,7 +1,7 @@
|
||||
[
|
||||
// Misc
|
||||
(0.25, "common.items.armor.neck.neck_1"),
|
||||
(0.5, "common.items.crafting_ing.cloth_scraps"),
|
||||
(2.0, "common.items.crafting_ing.cloth_scraps"),
|
||||
(1.0, "common.items.crafting_ing.empty_vial"),
|
||||
(0.1, "common.items.glider.glider_blue"),
|
||||
(0.1, "common.items.glider.glider_morpho"),
|
||||
@ -21,11 +21,11 @@
|
||||
(0.10, "common.items.weapons.sword.greatsword_2h_orn-1"),
|
||||
(0.10, "common.items.weapons.sword.greatsword_2h_orn-2"),
|
||||
// axes
|
||||
(0.20, "common.items.weapons.axe.bloodsteel_axe-0"),
|
||||
(0.20, "common.items.weapons.axe.bloodsteel_axe-1"),
|
||||
(0.20, "common.items.weapons.axe.bloodsteel_axe-2"),
|
||||
(0.30, "common.items.weapons.axe.cobalt_axe-0"),
|
||||
(0.10, "common.items.weapons.axe.malachite_axe-0"),
|
||||
(0.02, "common.items.weapons.axe.bloodsteel_axe-0"),
|
||||
(0.02, "common.items.weapons.axe.bloodsteel_axe-1"),
|
||||
(0.02, "common.items.weapons.axe.bloodsteel_axe-2"),
|
||||
(0.01, "common.items.weapons.axe.cobalt_axe-0"),
|
||||
(0.001, "common.items.weapons.axe.malachite_axe-0"),
|
||||
(0.04, "common.items.weapons.axe.iron_axe-7"),
|
||||
(0.04, "common.items.weapons.axe.iron_axe-8"),
|
||||
(0.04, "common.items.weapons.axe.iron_axe-9"),
|
||||
@ -41,7 +41,7 @@
|
||||
// staves
|
||||
(1.00, "common.items.weapons.staff.bone_staff"),
|
||||
(1.00, "common.items.weapons.staff.amethyst_staff"),
|
||||
(0.05, "common.items.weapons.sceptre.sceptre_velorite_0"),
|
||||
(0.001, "common.items.weapons.sceptre.sceptre_velorite_0"),
|
||||
// hammers
|
||||
(0.30, "common.items.weapons.hammer.cobalt_hammer-0"),
|
||||
(0.30, "common.items.weapons.hammer.cobalt_hammer-1"),
|
||||
@ -56,7 +56,7 @@
|
||||
(0.05, "common.items.weapons.hammer.steel_hammer-4"),
|
||||
(0.05, "common.items.weapons.hammer.steel_hammer-5"),
|
||||
// bows
|
||||
(0.05, "common.items.weapons.bow.nature_ore_longbow-0"),
|
||||
(0.001, "common.items.weapons.bow.nature_ore_longbow-0"),
|
||||
|
||||
|
||||
]
|
||||
|
@ -1,4 +1,4 @@
|
||||
[
|
||||
(1, "common.items.crafting_ing.leather_troll"),
|
||||
(0.5, "common.items.crafting_ing.leather_scraps"),
|
||||
(0.25, "common.items.crafting_ing.leather_scraps"),
|
||||
]
|
@ -318,28 +318,21 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
|
||||
biped_large::Species::Wendigo => match rng.gen_range(0, 7) {
|
||||
0 => "common.loot_tables.loot_table_food",
|
||||
1 => "common.loot_tables.loot_table_wendigo",
|
||||
3 => "common.loot_tables.loot_table_armor_heavy",
|
||||
5 => "common.loot_tables.loot_table_weapon_uncommon",
|
||||
6 => "common.loot_tables.loot_table_weapon_rare",
|
||||
2 => "common.loot_tables.loot_table_weapon_uncommon",
|
||||
_ => "common.loot_tables.loot_table_cave_large",
|
||||
},
|
||||
biped_large::Species::Troll => match rng.gen_range(0, 10) {
|
||||
0 => "common.loot_tables.loot_table_food",
|
||||
1 => "common.loot_tables.loot_table_cave_large",
|
||||
3 => "common.loot_tables.loot_table_armor_heavy",
|
||||
5 => "common.loot_tables.loot_table_weapon_uncommon",
|
||||
6 => "common.loot_tables.loot_table_weapon_rare",
|
||||
2 => "common.loot_tables.loot_table_weapon_uncommon",
|
||||
_ => "common.loot_tables.loot_table_troll",
|
||||
},
|
||||
biped_large::Species::Occultsaurok
|
||||
| biped_large::Species::Mightysaurok
|
||||
| biped_large::Species::Slysaurok => "common.loot_tables.loot_table_saurok",
|
||||
_ => match rng.gen_range(0, 10) {
|
||||
_ => match rng.gen_range(0, 4) {
|
||||
0 => "common.loot_tables.loot_table_food",
|
||||
1 => "common.loot_tables.loot_table_armor_nature",
|
||||
3 => "common.loot_tables.loot_table_armor_heavy",
|
||||
5 => "common.loot_tables.loot_table_weapon_uncommon",
|
||||
6 => "common.loot_tables.loot_table_weapon_rare",
|
||||
_ => "common.loot_tables.loot_table_cave_large",
|
||||
},
|
||||
},
|
||||
|
@ -98,6 +98,7 @@ const HP_COLOR: Color = Color::Rgba(0.33, 0.63, 0.0, 1.0);
|
||||
const LOW_HP_COLOR: Color = Color::Rgba(0.93, 0.59, 0.03, 1.0);
|
||||
const CRITICAL_HP_COLOR: Color = Color::Rgba(0.79, 0.19, 0.17, 1.0);
|
||||
const STAMINA_COLOR: Color = Color::Rgba(0.29, 0.62, 0.75, 0.9);
|
||||
const ENEMY_HP_COLOR: Color = Color::Rgba(0.93, 0.1, 0.29, 1.0);
|
||||
//const TRANSPARENT: Color = Color::Rgba(0.0, 0.0, 0.0, 0.0);
|
||||
//const FOCUS_COLOR: Color = Color::Rgba(1.0, 0.56, 0.04, 1.0);
|
||||
//const RAGE_COLOR: Color = Color::Rgba(0.5, 0.04, 0.13, 1.0);
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::{
|
||||
img_ids::Imgs, DEFAULT_NPC, FACTION_COLOR, GROUP_COLOR, GROUP_MEMBER, HP_COLOR, LOW_HP_COLOR,
|
||||
REGION_COLOR, SAY_COLOR, STAMINA_COLOR, TELL_COLOR, TEXT_BG, TEXT_COLOR,
|
||||
img_ids::Imgs, DEFAULT_NPC, ENEMY_HP_COLOR, FACTION_COLOR, GROUP_COLOR, GROUP_MEMBER, HP_COLOR,
|
||||
LOW_HP_COLOR, REGION_COLOR, SAY_COLOR, STAMINA_COLOR, TELL_COLOR, TEXT_BG, TEXT_COLOR,
|
||||
};
|
||||
use crate::{
|
||||
hud::get_buff_info,
|
||||
@ -309,7 +309,7 @@ impl<'a> Widget for Overhead<'a> {
|
||||
if should_show_healthbar(health) {
|
||||
// Show HP Bar
|
||||
let hp_ani = (self.pulse * 4.0/* speed factor */).cos() * 0.5 + 1.0; //Animation timer
|
||||
let crit_hp_color: Color = Color::Rgba(0.79, 0.19, 0.17, hp_ani);
|
||||
let crit_hp_color: Color = Color::Rgba(0.93, 0.59, 0.03, hp_ani);
|
||||
|
||||
// Background
|
||||
Image::new(self.imgs.enemy_health_bg)
|
||||
@ -326,13 +326,16 @@ impl<'a> Widget for Overhead<'a> {
|
||||
(4.5 + (hp_percentage / 100.0 * 36.45 - 36.45)) * BARSIZE,
|
||||
MANA_BAR_Y + 7.5,
|
||||
)
|
||||
.color(Some(if hp_percentage <= 25.0 {
|
||||
crit_hp_color
|
||||
} else if hp_percentage <= 50.0 {
|
||||
LOW_HP_COLOR
|
||||
.color(if self.in_group {
|
||||
// Different HP bar colors only for group members
|
||||
Some(match hp_percentage {
|
||||
x if (0.0..25.0).contains(&x) => crit_hp_color,
|
||||
x if (25.0..50.0).contains(&x) => LOW_HP_COLOR,
|
||||
_ => HP_COLOR,
|
||||
})
|
||||
} else {
|
||||
HP_COLOR
|
||||
}))
|
||||
Some(ENEMY_HP_COLOR)
|
||||
})
|
||||
.parent(id)
|
||||
.set(state.ids.health_bar, ui);
|
||||
let mut txt = format!("{}/{}", health_cur_txt, health_max_txt);
|
||||
|
Loading…
Reference in New Issue
Block a user