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", right_foreleg = "Foreleg R",
chest = "Chest", chest = "Chest",
shell = "Shell", shell = "Shell",
thundersacs = "Thundersacs"
}, },
ailments = { ailments = {

View File

@@ -385,10 +385,28 @@ function part_names.init()
--language.current_language.parts.chest_windsac, --language.current_language.parts.chest_windsac,
--language.current_language.parts.back_windsac --language.current_language.parts.back_windsac
}, },
[99] = -- Thunder Serpent Narwa+ 99 (no parts?) [99] = -- Thunder Serpent Narwa+ 99
{}, {
[1379] = -- Narwa the Allmother+ 1379 (no parts?) 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 [1366] = -- Crimson Glow Valstrax 1366
{ {
language.current_language.parts.head, 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 = {}; local displayed_parts = {};
for REpart, part in pairs(monster.parts) do for REpart, part in pairs(monster.parts) do
local health_supported = part.max_health >= 0; local health_supported = part.max_health > 0;
local break_supported = part.break_max_health >= 0; local break_supported = part.break_max_health > 0;
local severe_supported = part.loss_max_health >= 0; local severe_supported = part.loss_max_health > 0;
if health_supported then if health_supported then
if break_supported then if break_supported then

View File

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

View File

@@ -92,6 +92,14 @@ function body_part_UI_entity.draw(part, part_UI, cached_config, position_on_scre
return; return;
end 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 = ""; local part_name = "";
if cached_config.part_name_label.include.part_name then if cached_config.part_name_label.include.part_name then
part_name = part.name .. " "; 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 part_UI = part_UI.loss_visibility
}; };
if part_UI.flinch_visibility then if draw_health then
drawing.draw_bar(part_UI.flinch_bar, flinch_position_on_screen, opacity_scale, drawing.draw_bar(part_UI.flinch_bar, flinch_position_on_screen, opacity_scale, part.health_percentage);
part.health_percentage);
end end
if part_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < if draw_break then
part.break_max_count then drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale, part.break_health_percentage);
drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale,
part.break_health_percentage);
end end
if part_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then if draw_severe then
drawing.draw_bar(part_UI.loss_bar, loss_position_on_screen, opacity_scale, drawing.draw_bar(part_UI.loss_bar, loss_position_on_screen, opacity_scale, part.loss_health_percentage);
part.loss_health_percentage);
end end
drawing.draw_label(part_UI.part_name_label, position_on_screen, opacity_scale, part_name); 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_text_label, flinch_position_on_screen, opacity_scale);
drawing.draw_label(part_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, drawing.draw_label(part_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, health_string);
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_percentage_label, flinch_position_on_screen, opacity_scale,
100 * part.health_percentage);
end end
if part_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < if draw_break then
part.break_max_count then
drawing.draw_label(part_UI.break_text_label, break_position_on_screen, opacity_scale); 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, drawing.draw_label(part_UI.break_value_label, break_position_on_screen, opacity_scale, break_health_string);
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_percentage_label, break_position_on_screen, opacity_scale,
100 * part.break_health_percentage);
end 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_text_label, loss_position_on_screen, opacity_scale);
drawing.draw_label(part_UI.loss_value_label, loss_position_on_screen, opacity_scale, drawing.draw_label(part_UI.loss_value_label, loss_position_on_screen, opacity_scale, loss_health_string);
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_health_percentage_label, loss_position_on_screen, opacity_scale,
100 * part.loss_health_percentage);
end end
end end

View File

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

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": "?", "unknown": "?",

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": "?", "unknown": "?",

View File

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

View File

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

View File

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