mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-25 04:48:22 -08:00
Merge pull request #52 from GreenComfyTea/main
This commit is contained in:
@@ -435,7 +435,91 @@ function ailments.draw_dynamic(monster, ailments_position_on_screen, opacity_sca
|
||||
|
||||
--sort parts here
|
||||
local displayed_ailments = {};
|
||||
for REpart, ailment in pairs(monster.ailments) do
|
||||
for id, ailment in pairs(monster.ailments) do
|
||||
if id == ailments.paralyze_id then
|
||||
if not cached_config.filter.paralysis then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.sleep_id then
|
||||
if not cached_config.filter.sleep then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.stun_id then
|
||||
if not cached_config.filter.stun then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.flash_id then
|
||||
if not cached_config.filter.flash then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.poison_id then
|
||||
if not cached_config.filter.poison then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.blast_id then
|
||||
if not cached_config.filter.blast then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.exhaust_id then
|
||||
if not cached_config.filter.exhaust then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ride_id then
|
||||
if not cached_config.filter.ride then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.water_id then
|
||||
if not cached_config.filter.waterblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fire_id then
|
||||
if not cached_config.filter.fireblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ice_id then
|
||||
if not cached_config.filter.iceblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.thunder_id then
|
||||
if not cached_config.filter.thunderblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_trap_id then
|
||||
if not cached_config.filter.fall_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_trap_id then
|
||||
if not cached_config.filter.shock_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.capture_id then
|
||||
if not cached_config.filter.tranq_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.koyashi_id then
|
||||
if not cached_config.filter.dung_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.steel_fang_id then
|
||||
if not cached_config.filter.steel_fang then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_quick_sand_id then
|
||||
if not cached_config.filter.quick_sand then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_otomo_trap_id then
|
||||
if not cached_config.filter.fall_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_otomo_trap_id then
|
||||
if not cached_config.filter.shock_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
goto continue;
|
||||
end
|
||||
|
||||
if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and ailment.buildup_limit ~= 0 and ailment.activate_count == 0 and not ailment.is_active then
|
||||
goto continue;
|
||||
end
|
||||
@@ -514,7 +598,91 @@ function ailments.draw_static(monster, ailments_position_on_screen, opacity_scal
|
||||
|
||||
--sort parts here
|
||||
local displayed_ailments = {};
|
||||
for REpart, ailment in pairs(monster.ailments) do
|
||||
for id, ailment in pairs(monster.ailments) do
|
||||
if id == ailments.paralyze_id then
|
||||
if not cached_config.filter.paralysis then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.sleep_id then
|
||||
if not cached_config.filter.sleep then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.stun_id then
|
||||
if not cached_config.filter.stun then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.flash_id then
|
||||
if not cached_config.filter.flash then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.poison_id then
|
||||
if not cached_config.filter.poison then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.blast_id then
|
||||
if not cached_config.filter.blast then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.exhaust_id then
|
||||
if not cached_config.filter.exhaust then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ride_id then
|
||||
if not cached_config.filter.ride then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.water_id then
|
||||
if not cached_config.filter.waterblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fire_id then
|
||||
if not cached_config.filter.fireblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ice_id then
|
||||
if not cached_config.filter.iceblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.thunder_id then
|
||||
if not cached_config.filter.thunderblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_trap_id then
|
||||
if not cached_config.filter.fall_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_trap_id then
|
||||
if not cached_config.filter.shock_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.capture_id then
|
||||
if not cached_config.filter.tranq_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.koyashi_id then
|
||||
if not cached_config.filter.dung_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.steel_fang_id then
|
||||
if not cached_config.filter.steel_fang then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_quick_sand_id then
|
||||
if not cached_config.filter.quick_sand then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_otomo_trap_id then
|
||||
if not cached_config.filter.fall_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_otomo_trap_id then
|
||||
if not cached_config.filter.shock_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
goto continue;
|
||||
end
|
||||
|
||||
if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and ailment.buildup_limit ~= 0 and ailment.activate_count == 0 and not ailment.is_active then
|
||||
goto continue;
|
||||
end
|
||||
@@ -593,6 +761,90 @@ function ailments.draw_highlighted(monster, ailments_position_on_screen, opacity
|
||||
--sort parts here
|
||||
local displayed_ailments = {};
|
||||
for id, ailment in pairs(monster.ailments) do
|
||||
if id == ailments.paralyze_id then
|
||||
if not cached_config.filter.paralysis then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.sleep_id then
|
||||
if not cached_config.filter.sleep then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.stun_id then
|
||||
if not cached_config.filter.stun then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.flash_id then
|
||||
if not cached_config.filter.flash then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.poison_id then
|
||||
if not cached_config.filter.poison then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.blast_id then
|
||||
if not cached_config.filter.blast then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.exhaust_id then
|
||||
if not cached_config.filter.exhaust then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ride_id then
|
||||
if not cached_config.filter.ride then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.water_id then
|
||||
if not cached_config.filter.waterblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fire_id then
|
||||
if not cached_config.filter.fireblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ice_id then
|
||||
if not cached_config.filter.iceblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.thunder_id then
|
||||
if not cached_config.filter.thunderblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_trap_id then
|
||||
if not cached_config.filter.fall_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_trap_id then
|
||||
if not cached_config.filter.shock_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.capture_id then
|
||||
if not cached_config.filter.tranq_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.koyashi_id then
|
||||
if not cached_config.filter.dung_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.steel_fang_id then
|
||||
if not cached_config.filter.steel_fang then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_quick_sand_id then
|
||||
if not cached_config.filter.quick_sand then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_otomo_trap_id then
|
||||
if not cached_config.filter.fall_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_otomo_trap_id then
|
||||
if not cached_config.filter.shock_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
goto continue;
|
||||
end
|
||||
|
||||
if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and ailment.buildup_limit ~= 0 and ailment.activate_count == 0 and not ailment.is_active then
|
||||
goto continue;
|
||||
end
|
||||
@@ -669,7 +921,91 @@ function ailments.draw_small(monster, ailments_position_on_screen, opacity_scale
|
||||
|
||||
--sort parts here
|
||||
local displayed_ailments = {};
|
||||
for REpart, ailment in pairs(monster.ailments) do
|
||||
for id, ailment in pairs(monster.ailments) do
|
||||
if id == ailments.paralyze_id then
|
||||
if not cached_config.filter.paralysis then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.sleep_id then
|
||||
if not cached_config.filter.sleep then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.stun_id then
|
||||
if not cached_config.filter.stun then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.flash_id then
|
||||
if not cached_config.filter.flash then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.poison_id then
|
||||
if not cached_config.filter.poison then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.blast_id then
|
||||
if not cached_config.filter.blast then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.exhaust_id then
|
||||
if not cached_config.filter.exhaust then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ride_id then
|
||||
if not cached_config.filter.ride then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.water_id then
|
||||
if not cached_config.filter.waterblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fire_id then
|
||||
if not cached_config.filter.fireblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.ice_id then
|
||||
if not cached_config.filter.iceblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.thunder_id then
|
||||
if not cached_config.filter.thunderblight then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_trap_id then
|
||||
if not cached_config.filter.fall_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_trap_id then
|
||||
if not cached_config.filter.shock_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.capture_id then
|
||||
if not cached_config.filter.tranq_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.koyashi_id then
|
||||
if not cached_config.filter.dung_bomb then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.steel_fang_id then
|
||||
if not cached_config.filter.steel_fang then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_quick_sand_id then
|
||||
if not cached_config.filter.quick_sand then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.fall_otomo_trap_id then
|
||||
if not cached_config.filter.fall_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
elseif id == ailments.shock_otomo_trap_id then
|
||||
if not cached_config.filter.shock_otomo_trap then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
goto continue;
|
||||
end
|
||||
|
||||
if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and ailment.buildup_limit ~= 0 and ailment.activate_count == 0 and not ailment.is_active then
|
||||
goto continue;
|
||||
end
|
||||
|
||||
@@ -197,16 +197,64 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
|
||||
|
||||
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;
|
||||
|
||||
if health_supported then
|
||||
if break_supported then
|
||||
if severe_supported then
|
||||
if not cached_config.filter.health_break_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health_break then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
else
|
||||
if severe_supported then
|
||||
if not cached_config.filter.health_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if break_supported then
|
||||
if severe_supported then
|
||||
if not cached_config.filter.break_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.break_ then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
else
|
||||
if severe_supported then
|
||||
if not cached_config.filter.severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if cached_config.settings.hide_undamaged_parts
|
||||
and ((part.health == part.max_health and part.flinch_count == 0) or part.max_health < 0)
|
||||
and ((part.break_health == part.break_max_health and part.break_count == 0) or part.break_max_health < 0)
|
||||
and ((part.loss_health == part.loss_max_health and not part.is_severed) or part.loss_max_health < 0) then
|
||||
and ((part.health == part.max_health and part.flinch_count == 0) or not health_supported)
|
||||
and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported)
|
||||
and ((part.loss_health == part.loss_max_health and not part.is_severed) or not severe_supported) then
|
||||
goto continue;
|
||||
end
|
||||
|
||||
if (not part.body_part_dynamic_UI.flinch_visibility or part.max_health < 0)
|
||||
and (not part.body_part_dynamic_UI.break_visibility or part.break_max_health < 0 or part.break_count >= part.break_max_count)
|
||||
and (not part.body_part_dynamic_UI.loss_visibility or part.loss_max_health < 0 or part.is_severed) then
|
||||
if (not part.body_part_dynamic_UI.flinch_visibility or not health_supported)
|
||||
and (not part.body_part_dynamic_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count)
|
||||
and (not part.body_part_dynamic_UI.loss_visibility or not severe_supported or part.is_severed) then
|
||||
goto continue;
|
||||
end
|
||||
|
||||
@@ -331,15 +379,64 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
|
||||
|
||||
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;
|
||||
|
||||
if health_supported then
|
||||
if break_supported then
|
||||
if severe_supported then
|
||||
if not cached_config.filter.health_break_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health_break then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
else
|
||||
if severe_supported then
|
||||
if not cached_config.filter.health_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if break_supported then
|
||||
if severe_supported then
|
||||
if not cached_config.filter.break_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.break_ then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
else
|
||||
if severe_supported then
|
||||
if not cached_config.filter.severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if cached_config.settings.hide_undamaged_parts
|
||||
and ((part.health == part.max_health and part.flinch_count == 0) or part.max_health < 0)
|
||||
and ((part.break_health == part.break_max_health and part.break_count == 0) or part.break_max_health < 0)
|
||||
and ((part.loss_health == part.loss_max_health and not part.is_severed) or part.loss_max_health < 0) then
|
||||
and ((part.health == part.max_health and part.flinch_count == 0) or not health_supported)
|
||||
and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported)
|
||||
and ((part.loss_health == part.loss_max_health and not part.is_severed) or not severe_supported) then
|
||||
goto continue;
|
||||
end
|
||||
if (not part.body_part_static_UI.flinch_visibility or part.max_health < 0)
|
||||
and (not part.body_part_static_UI.break_visibility or part.break_max_health < 0 or part.break_count >= part.break_max_count)
|
||||
and (not part.body_part_static_UI.loss_visibility or part.loss_max_health < 0 or part.is_severed) then
|
||||
|
||||
if (not part.body_part_static_UI.flinch_visibility or not health_supported)
|
||||
and (not part.body_part_static_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count)
|
||||
and (not part.body_part_static_UI.loss_visibility or not severe_supported or part.is_severed) then
|
||||
goto continue;
|
||||
end
|
||||
|
||||
@@ -465,16 +562,64 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
|
||||
|
||||
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;
|
||||
|
||||
if health_supported then
|
||||
if break_supported then
|
||||
if severe_supported then
|
||||
if not cached_config.filter.health_break_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health_break then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
else
|
||||
if severe_supported then
|
||||
if not cached_config.filter.health_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if break_supported then
|
||||
if severe_supported then
|
||||
if not cached_config.filter.break_severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.break_ then
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
else
|
||||
if severe_supported then
|
||||
if not cached_config.filter.severe then
|
||||
goto continue;
|
||||
end
|
||||
else
|
||||
goto continue;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if cached_config.settings.hide_undamaged_parts
|
||||
and ((part.health == part.max_health and part.flinch_count == 0) or part.max_health < 0)
|
||||
and ((part.break_health == part.break_max_health and part.break_count == 0) or part.break_max_health < 0)
|
||||
and ((part.loss_health == part.loss_max_health and not part.is_severed) or part.loss_max_health < 0) then
|
||||
and ((part.health == part.max_health and part.flinch_count == 0) or not health_supported)
|
||||
and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported)
|
||||
and ((part.loss_health == part.loss_max_health and not part.is_severed) or not severe_supported) then
|
||||
goto continue;
|
||||
end
|
||||
|
||||
if (not part.body_part_highlighted_UI.flinch_visibility or part.max_health < 0)
|
||||
and (not part.body_part_highlighted_UI.break_visibility or part.break_max_health < 0 or part.break_count >= part.break_max_count)
|
||||
and (not part.body_part_highlighted_UI.loss_visibility or part.loss_max_health < 0 or part.is_severed) then
|
||||
if (not part.body_part_highlighted_UI.flinch_visibility or not health_supported)
|
||||
and (not part.body_part_highlighted_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count)
|
||||
and (not part.body_part_highlighted_UI.loss_visibility or not severe_supported or part.is_severed) then
|
||||
goto continue;
|
||||
end
|
||||
|
||||
|
||||
@@ -88,6 +88,8 @@ function large_monster.new(enemy)
|
||||
large_monster.init_dynamic_UI(monster);
|
||||
large_monster.init_highlighted_UI(monster);
|
||||
|
||||
monster.name = monster.name .. " " .. tostring(monster.id);
|
||||
|
||||
if large_monster.list[enemy] == nil then
|
||||
large_monster.list[enemy] = monster;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user