Map Narwa's parts

This commit is contained in:
GreenComfyTea
2022-08-02 07:48:18 +03:00
parent 0f0aabb750
commit cad4e653fd
11 changed files with 57 additions and 34 deletions

View File

@@ -87,6 +87,8 @@ language.default_language = {
right_foreleg = "Foreleg R",
chest = "Chest",
shell = "Shell",
thundersacs = "Thundersacs"
},
ailments = {

View File

@@ -385,10 +385,28 @@ function part_names.init()
--language.current_language.parts.chest_windsac,
--language.current_language.parts.back_windsac
},
[99] = -- Thunder Serpent Narwa+ 99 (no parts?)
{},
[1379] = -- Narwa the Allmother+ 1379 (no parts?)
{},
[99] = -- Thunder Serpent Narwa+ 99
{
language.current_language.parts.head,
nil,
language.current_language.parts.right_arm,
language.current_language.parts.left_arm,
language.current_language.parts.tail,
nil,
language.current_language.parts.back,
language.current_language.parts.thundersacs
},
[1379] = -- Narwa the Allmother+ 1379
{
language.current_language.parts.head,
nil,
language.current_language.parts.right_arm,
language.current_language.parts.left_arm,
language.current_language.parts.tail,
nil,
language.current_language.parts.back,
language.current_language.parts.thundersacs
},
[1366] = -- Crimson Glow Valstrax 1366
{
language.current_language.parts.head,

View File

@@ -121,9 +121,9 @@ function body_part.draw(monster, part_UI, cached_config, parts_position_on_scree
local displayed_parts = {};
for REpart, part in pairs(monster.parts) do
local health_supported = part.max_health >= 0;
local break_supported = part.break_max_health >= 0;
local severe_supported = part.loss_max_health >= 0;
local health_supported = part.max_health > 0;
local break_supported = part.break_max_health > 0;
local severe_supported = part.loss_max_health > 0;
if health_supported then
if break_supported then

View File

@@ -688,8 +688,8 @@ function large_monster.update_parts(enemy, monster, physical_param)
end
end
part_id = part_id + 1;
::continue::
part_id = part_id + 1;
end
end

View File

@@ -92,6 +92,14 @@ function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_scre
return;
end
local draw_health = part_UI.flinch_visibility and part.max_health > 0;
local draw_break = part_UI.break_visibility and part.break_max_health > 0 and part.break_count < part.break_max_count;
local draw_severe = part_UI.loss_visibility and part.loss_max_health > 0 and not part.is_severed;
if not draw_health and not draw_break and not draw_severe then
return;
end
local part_name = "";
if cached_config.part_name_label.include.part_name then
part_name = part.name .. " ";
@@ -135,47 +143,36 @@ function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_scre
part_UI = part_UI.loss_visibility
};
if part_UI.flinch_visibility then
drawing.draw_bar(part_UI.flinch_bar, flinch_position_on_screen, opacity_scale,
part.health_percentage);
if draw_health then
drawing.draw_bar(part_UI.flinch_bar, flinch_position_on_screen, opacity_scale, part.health_percentage);
end
if part_UI.break_visibility and part.break_max_health ~= -1 and part.break_count <
part.break_max_count then
drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale,
part.break_health_percentage);
if draw_break then
drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale, part.break_health_percentage);
end
if part_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then
drawing.draw_bar(part_UI.loss_bar, loss_position_on_screen, opacity_scale,
part.loss_health_percentage);
if draw_severe then
drawing.draw_bar(part_UI.loss_bar, loss_position_on_screen, opacity_scale, part.loss_health_percentage);
end
drawing.draw_label(part_UI.part_name_label, position_on_screen, opacity_scale, part_name);
if part_UI.flinch_visibility then
if draw_health then
drawing.draw_label(part_UI.flinch_text_label, flinch_position_on_screen, opacity_scale);
drawing.draw_label(part_UI.flinch_value_label, flinch_position_on_screen, opacity_scale,
health_string);
drawing.draw_label(part_UI.flinch_percentage_label, flinch_position_on_screen, opacity_scale,
100 * part.health_percentage);
drawing.draw_label(part_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, health_string);
drawing.draw_label(part_UI.flinch_percentage_label, flinch_position_on_screen, opacity_scale, 100 * part.health_percentage);
end
if part_UI.break_visibility and part.break_max_health ~= -1 and part.break_count <
part.break_max_count then
if draw_break then
drawing.draw_label(part_UI.break_text_label, break_position_on_screen, opacity_scale);
drawing.draw_label(part_UI.break_value_label, break_position_on_screen, opacity_scale,
break_health_string);
drawing.draw_label(part_UI.break_percentage_label, break_position_on_screen, opacity_scale,
100 * part.break_health_percentage);
drawing.draw_label(part_UI.break_value_label, break_position_on_screen, opacity_scale, break_health_string);
drawing.draw_label(part_UI.break_percentage_label, break_position_on_screen, opacity_scale, 100 * part.break_health_percentage);
end
if part_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then
if draw_severe then
drawing.draw_label(part_UI.loss_text_label, loss_position_on_screen, opacity_scale);
drawing.draw_label(part_UI.loss_value_label, loss_position_on_screen, opacity_scale,
loss_health_string);
drawing.draw_label(part_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale,
100 * part.loss_health_percentage);
drawing.draw_label(part_UI.loss_value_label, loss_position_on_screen, opacity_scale, loss_health_string);
drawing.draw_label(part_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale, 100 * part.loss_health_percentage);
end
end

View File

@@ -318,6 +318,7 @@
"tail_mud": "Tail (Mud)",
"tail_tip": "Tail Tip",
"tail_windsac": "Tail (Windsac)",
"thundersacs": "Thundersacs",
"torso": "Torso",
"torso_mud": "Torso (Mud)",
"unknown": "?",

View File

@@ -318,6 +318,7 @@
"tail_mud": "尻尾(泥)",
"tail_tip": "尻尾先端",
"tail_windsac": "尻尾(風袋)",
"thundersacs": "Thundersacs",
"torso": "胴",
"torso_mud": "胴(泥)",
"unknown": "?",

View File

@@ -318,6 +318,7 @@
"tail_mud": "꼬리(진흙)",
"tail_tip": "꼬리끝",
"tail_windsac": "꼬리(바람주머니)",
"thundersacs": "Thundersacs",
"torso": "몸통",
"torso_mud": "몸통(진흙)",
"unknown": "?",

View File

@@ -318,6 +318,7 @@
"tail_mud": "Хвост (в грязи)",
"tail_tip": "Кончик хвоста",
"tail_windsac": "Хвост (мешочек)",
"thundersacs": "Грозовые мешочки",
"torso": "Торс",
"torso_mud": "Торс (в грязи)",
"unknown": "?",

View File

@@ -318,6 +318,7 @@
"tail_mud": "尾巴(泥)",
"tail_tip": "Tail Tip",
"tail_windsac": "尾巴(风袋)",
"thundersacs": "Thundersacs",
"torso": "躯干",
"torso_mud": "Torso (Mud)",
"unknown": "?",

View File

@@ -318,6 +318,7 @@
"tail_mud": "尾巴 (泥)",
"tail_tip": "Tail Tip",
"tail_windsac": "尾巴 (氣囊)",
"thundersacs": "Thundersacs",
"torso": "身軀",
"torso_mud": "Torso (Mud)",
"unknown": "?",