6 Commits

Author SHA1 Message Date
GreenComfyTea
084dd9667e Abnormal Statuses: Implemented 2023-08-10 16:52:47 +03:00
GreenComfyTea
c509876712 Skills: Refactoring + Added Heroics, Resuscitate 2023-08-10 16:51:34 +03:00
GreenComfyTea
7b63e34ad0 Melody Effects: Use key if missing name 2023-08-10 16:50:19 +03:00
GreenComfyTea
c6a520996f Dangos: Use key if missing name 2023-08-10 16:49:58 +03:00
GreenComfyTea
f6fefb19d4 Consumables: Formatting + Use key if missing name 2023-08-10 16:49:42 +03:00
GreenComfyTea
1c20591b33 Fix Total Damage registering too large values 2023-08-10 16:48:41 +03:00
18 changed files with 804 additions and 79 deletions

View File

@@ -48,6 +48,7 @@ local melody_effects = require("MHR_Overlay.Buffs.melody_effects");
local endemic_life_buffs = require("MHR_Overlay.Buffs.endemic_life_buffs");
local skills = require("MHR_Overlay.Buffs.skills");
local dangos = require("MHR_Overlay.Buffs.dangos");
local abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
local players = require("MHR_Overlay.Damage_Meter.players");
local non_players = require("MHR_Overlay.Damage_Meter.non_players");
@@ -124,6 +125,7 @@ melody_effects.init_dependencies();
endemic_life_buffs.init_dependencies();
skills.init_dependencies();
dangos.init_dependencies();
abnormal_statuses.init_dependencies();
damage_hook.init_dependencies();
players.init_dependencies();
@@ -195,6 +197,7 @@ melody_effects.init_module();
endemic_life_buffs.init_module();
skills.init_module();
dangos.init_module();
abnormal_statuses.init_module();
damage_hook.init_module();
players.init_module();

View File

@@ -0,0 +1,308 @@
local this = {};
local buffs;
local buff_UI_entity;
local config;
local singletons;
local players;
local utils;
local language;
local error_handler;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local os = os;
local ValueType = ValueType;
local package = package;
this.list = {
--poison = nil,
--stun = nil,
--sleep = nil,
--paralyze = nil,
--quake = nil,
--ear = nil,
--defense_down = nil,
--resistance_down = nil,
--stink = nil,
--onibomb = nil,
--bomb = nil,
--beto = nil,
--fire = nil,
};
local frenzy_infected_duration = 121;
local player_quest_base_type_def = sdk.find_type_definition("snow.player.PlayerQuestBase");
-- Fireblight
local fire_duration_timer = player_quest_base_type_def:get_field("_FireLDurationTimer");
-- Waterblight
local water_duration_timer = player_quest_base_type_def:get_field("_WaterLDurationTimer");
-- Iceblight
local ice_duration_timer = player_quest_base_type_def:get_field("_IceLDurationTimer");
-- Thunderblight
local thunder_duration_timer = player_quest_base_type_def:get_field("_ThunderLDurationTimer");
-- Dragonblight
local dragon_duration_timer = player_quest_base_type_def:get_field("_DragonLDurationTimer");
-- blastblight
local bomb_duration_timer = player_quest_base_type_def:get_field("_BombDurationTimer");
-- Bubbleblight
local bubble_damage_timer = player_quest_base_type_def:get_field("_BubbleDamageTimer");
-- Hellfireblight
local oni_bomb_duration_timer = player_quest_base_type_def:get_field("_OniBombDurationTimer");
-- Bloodblight
local mystery_debuff_timer = player_quest_base_type_def:get_field("_MysteryDebuffTimer");
-- Frostblight
local get_is_frozen_damage_method = player_quest_base_type_def:get_method("get_IsFrozenDamage");
-- Poison
local poison_duration_timer = player_quest_base_type_def:get_field("_PoisonDurationTimer");
-- Stun
local stun_duration_timer = player_quest_base_type_def:get_field("_StunDurationTimer");
-- Sleep
local sleep_duration_timer = player_quest_base_type_def:get_field("_SleepDurationTimer");
-- Paralysis
local paralyze_duration_timer = player_quest_base_type_def:get_field("_ParalyzeDurationTimer");
-- Defense Down
local defense_down_duration_timer = player_quest_base_type_def:get_field("_DefenceDownDurationTimer");
-- Resistance Down
local resistance_down_duration_timer = player_quest_base_type_def:get_field("_ResistanceDownDurationTimer");
-- Tremor
local quake_duration_timer = player_quest_base_type_def:get_field("_QuakeDurationTimer");
-- Roar
local ear_duration_timer = player_quest_base_type_def:get_field("_EarDurationTimer");
-- Webbed
local beto_duration_timer = player_quest_base_type_def:get_field("_BetoDurationTimer");
-- Stench
local stink_duration_timer = player_quest_base_type_def:get_field("_StinkDurationTimer");
-- Leeched
local blooding_enemy_timer = player_quest_base_type_def:get_field("_BloodingEnemyTimer");
-- Bleeding
local bleeding_debuff_timer = player_quest_base_type_def:get_field("_BleedingDebuffTimer");
-- Engulfed
local get_is_vacuum_damage_method = player_quest_base_type_def:get_method("get__IsVacuumDamage");
-- Muck
local get_is_mud_damage_method = player_quest_base_type_def:get_method("get__IsMudDamage");
local get_is_gold_mud_damage_method = player_quest_base_type_def:get_method("get__IsGoldMudDamage");
-- Frenzy Infected
local virus_accumulator_field = player_quest_base_type_def:get_field("_VirusAccumulator");
local virus_timer_field = player_quest_base_type_def:get_field("_VirusTimer");
-- Frenzy
local virus_onset_timer_field = player_quest_base_type_def:get_field("_VirusOnsetTimer");
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
-- Frenzy Overcome
local virus_overcome_buff_timer_field = player_data_type_def:get_field("_VirusOvercomeBuffTimer");
local system_array_type_def = sdk.find_type_definition("System.Array");
local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
function this.update(player, player_data)
--local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
--if item_parameter == nil then
-- error_handler.report("consumables.update", "Failed to access Data: item_parameter");
-- return;
--end
-- Missing:
-- Whirlwind
this.update_muck(player);
this.update_frenzy_infection(player);
this.update_generic_timer("fireblight", player, fire_duration_timer);
this.update_generic_timer("waterblight", player, water_duration_timer);
this.update_generic_timer("iceblight", player, ice_duration_timer);
this.update_generic_timer("thunderblight", player, thunder_duration_timer);
this.update_generic_timer("dragonblight", player, dragon_duration_timer);
this.update_generic_timer("blastblight", player, bomb_duration_timer);
this.update_generic_timer("bubbleblight", player, bubble_damage_timer);
this.update_generic_timer("hellfireblight", player, oni_bomb_duration_timer);
this.update_generic_timer("bloodblight", player, mystery_debuff_timer);
this.update_generic_timer("poison", player, poison_duration_timer);
this.update_generic_timer("stun", player, stun_duration_timer);
this.update_generic_timer("paralysis", player, paralyze_duration_timer);
this.update_generic_timer("sleep", player, sleep_duration_timer);
this.update_generic_timer("defense_down", player, defense_down_duration_timer);
this.update_generic_timer("resistance_down", player, resistance_down_duration_timer);
this.update_generic_timer("tremor", player, quake_duration_timer);
this.update_generic_timer("roar", player, ear_duration_timer);
this.update_generic_timer("webbed", player, beto_duration_timer);
this.update_generic_timer("stench", player, stink_duration_timer);
this.update_generic_timer("leeched", player, blooding_enemy_timer, true);
-- whirlwind?
this.update_generic_timer("bleeding", player, bleeding_debuff_timer);
this.update_generic_timer("frenzy", player, virus_onset_timer_field);
this.update_generic_timer("frenzy_overcome", player_data, virus_overcome_buff_timer_field);
this.update_generic_boolean_value_method("engulfed", player, get_is_vacuum_damage_method);
this.update_generic_boolean_value_method("frostblight", player, get_is_frozen_damage_method);
end
function this.update_generic_timer(debuff_key, timer_owner, timer_field, is_infinite)
if is_infinite == nil then is_infinite = false; end
local timer = timer_field:get_data(timer_owner);
if timer == nil then
error_handler.report("abnormal_statuses.update_generic_timer", string.format("Failed to access Data: %s_timer", debuff_key));
return;
end
if timer == 0 then
this.list[debuff_key] = nil;
return;
end
if is_infinite then
timer = nil;
else
timer = timer / 60;
end
this.update_generic(debuff_key, timer);
end
function this.update_generic_boolean_value_method(debuff_key, value_owner, value_method)
local value = value_method:call(value_owner);
if value == nil then
error_handler.report("abnormal_statuses.update_generic_boolean_value_method", string.format("Failed to access Data: %s_value", debuff_key));
return;
end
if not value then
this.list[debuff_key] = nil;
return;
end
this.update_generic(debuff_key, nil);
end
function this.update_muck(player)
local is_mud_damage = get_is_mud_damage_method:call(player);
if is_mud_damage == nil then
error_handler.report("abnormal_statuses.update_generic_boolean_value_method", "Failed to access Data: is_mud_damage");
return;
end
local is_gold_mud_damage = get_is_gold_mud_damage_method:call(player);
if is_gold_mud_damage == nil then
error_handler.report("abnormal_statuses.update_generic_boolean_value_method", "Failed to access Data: is_gold_mud_damage");
return;
end
if not is_mud_damage and not is_gold_mud_damage then
this.list.muck = nil;
return;
end
this.update_generic("muck", nil);
end
function this.update_frenzy_infection(player)
local virus_accumulator_value = virus_accumulator_field:get_data(player);
if virus_accumulator_value == nil then
error_handler.report("abnormal_statuses.update_frenzy_infection", "Failed to access Data: virus_accumulator_value");
return;
end
local virus_timer = virus_timer_field:get_data(player);
if virus_timer == nil then
error_handler.report("abnormal_statuses.update_frenzy_infection", "Failed to access Data: virus_timer");
return;
end
if virus_accumulator_value == 0 and virus_timer == 0 then
this.list.frenzy_infection = nil;
return;
end
local timer = frenzy_infected_duration - (virus_accumulator_value + virus_timer / 60);
this.update_generic("frenzy_infection", timer, frenzy_infected_duration);
end
function this.update_generic(debuff_key, timer, duration)
duration = duration or timer;
local debuff = this.list[debuff_key];
if debuff == nil then
local name = language.current_language.ailments[debuff_key];
if name == nil then
name = debuff_key;
end
debuff = buffs.new(buffs.types.debuff, debuff_key, name, 1, duration);
this.list[debuff_key] = debuff;
elseif timer ~= nil then
buffs.update_timer(debuff, timer);
end
end
function this.init_names()
for debuff_key, debuff in pairs(this.list) do
local name = language.current_language.ailments[debuff_key];
if name == nil then
name = debuff_key;
end
debuff.name = name;
end
end
function this.init_dependencies()
buffs = require("MHR_Overlay.Buffs.buffs");
config = require("MHR_Overlay.Misc.config");
utils = require("MHR_Overlay.Misc.utils");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
singletons = require("MHR_Overlay.Game_Handler.singletons");
players = require("MHR_Overlay.Damage_Meter.players");
language = require("MHR_Overlay.Misc.language");
error_handler = require("MHR_Overlay.Misc.error_handler");
end
function this.init_module()
end
return this;

View File

@@ -14,6 +14,7 @@ local error_handler;
local endemic_life_buffs;
local skills;
local dangos;
local abnormal_statuses;
local sdk = sdk;
local tostring = tostring;
@@ -52,6 +53,7 @@ this.types = {
melody_effect = 1,
dango = 2,
skill = 4,
debuff = 8
};
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
@@ -124,6 +126,7 @@ function this.init_names()
endemic_life_buffs.init_names();
skills.init_names();
dangos.init_names();
abnormal_statuses.init_names();
end
function this.update()
@@ -148,6 +151,8 @@ function this.update()
return;
end
abnormal_statuses.update(master_player);
local master_player_data = get_player_data_method:call(master_player);
if master_player_data ~= nil then
consumables.update(master_player_data);
@@ -186,6 +191,10 @@ function this.update_timer(buff, timer)
timer = 0;
end
if timer > buff.duration then
buff.duration = timer;
end
local minutes_left = math.floor(timer / 60);
buff.timer = timer;
@@ -217,10 +226,11 @@ function this.init_dependencies()
endemic_life_buffs = require("MHR_Overlay.Buffs.endemic_life_buffs");
skills = require("MHR_Overlay.Buffs.skills");
dangos = require("MHR_Overlay.Buffs.dangos");
abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
end
function this.init_module()
time.new_timer(this.update, 0.5);
time.new_timer(this.update, 1/60);
end
return this;

View File

@@ -137,7 +137,7 @@ function this.update_generic(consumable_key, player_data, item_parameter, value_
local value = value_field:get_data(player_data);
if value == nil then
error_handler.report("consumables.update_generic_with_value", string.format("Failed to access Data: %s_value", consumable_key));
error_handler.report("consumables.update_generic", string.format("Failed to access Data: %s_value", consumable_key));
return;
end
@@ -149,7 +149,7 @@ function this.update_generic(consumable_key, player_data, item_parameter, value_
local timer = timer_field:get_data(player_data);
if timer == nil then
error_handler.report("consumables.update_generic_with_value", string.format("Failed to access Data: %s_timer", consumable_key));
error_handler.report("consumables.update_generic", string.format("Failed to access Data: %s_timer", consumable_key));
return;
end
@@ -162,7 +162,7 @@ function this.update_generic(consumable_key, player_data, item_parameter, value_
if consumable == nil then
local timer_const_value = timer_const_value_field:get_data(item_parameter);
if timer_const_value == nil then
error_handler.report("consumables.update_generic_with_value", string.format("Failed to access Data: %s_timer_const_value", consumable_key));
error_handler.report("consumables.update_generic", string.format("Failed to access Data: %s_timer_const_value", consumable_key));
return;
end
@@ -303,8 +303,14 @@ function this.update_gourmet_fish(player_data, item_parameter)
end
function this.init_names()
for key, buff in pairs(this.list) do
buff.name = language.current_language.consumables[key];
for consumable_key, consumable in pairs(this.list) do
local name = language.current_language.consumables[consumable_key];
if name == nil then
name = consumable_key;
end
consumable.name = name;
end
end

View File

@@ -105,8 +105,14 @@ function this.update_dango_defender(player_data, item_parameter)
end
function this.init_names()
for key, buff in pairs(this.list) do
buff.name = language.current_language.dangos[key];
for dango_key, dango in pairs(this.list) do
local name = language.current_language.dangos[dango_key];
if name == nil then
name = dango_key;
end
dango.name = name;
end
end

View File

@@ -142,8 +142,14 @@ function this.update_melody_effect(lua_index, melody_data)
end
function this.init_names()
for index, buff in pairs(this.list) do
buff.name = language.current_language.melody_effects[buff.key];
for index, dango in pairs(this.list) do
local name = language.current_language.dangos[dango.key];
if name == nil then
name = dango.key;
end
dango.name = name;
end
end

View File

@@ -58,9 +58,22 @@ this.list = {
offensive_guard = nil,
hellfire_cloak = nil,
agitator = nil,
furious = nil
furious = nil,
heaven_sent = nil,
heroics = nil,
resuscitate = nil
};
local skill_data_list = {
peak_performance = { id = 3, is_equipped = false },
resentment = { id = 4, is_equipped = false },
resuscitate = { id = 5, is_equipped = false },
maximum_might = { id = 10, is_equipped = false },
heroics = { id = 91, is_equipped = false },
dragonheart = { id = 103, is_equipped = false },
dereliction = { id = 113, is_equipped = false }
}
local burst_breakpoint = 5;
local kushara_daora_soul_breakpoint = 5;
local intrepid_heart_minimal_value = 400;
@@ -119,14 +132,22 @@ local furious_skill_stamina_buff_second_timer_field = player_data_type_def:get_f
local player_base_type_def = sdk.find_type_definition("snow.player.PlayerBase");
local player_weapon_type_field = player_base_type_def:get_field("_playerWeaponType");
local get_player_skill_list_method = player_base_type_def:get_method("get_PlayerSkillList");
-- Latent Power
local power_freedom_timer_field = player_base_type_def:get_field("_PowerFreedomTimer");
-- Protective Polish
local sharpness_gauge_boost_timer_field = player_base_type_def:get_field("_SharpnessGaugeBoostTimer");
-- Heroics
local is_predicament_power_up_method = player_base_type_def:get_method("isPredicamentPowerUp");
-- Resuscitate
local is_debuff_state_method = player_base_type_def:get_method("isDebuffState");
local player_skill_list_type_def = get_player_skill_list_method:get_return_type();
local has_skill_method = player_skill_list_type_def:get_method("hasSkill");
local player_quest_base_type_def = sdk.find_type_definition("snow.player.PlayerQuestBase");
-- Wind Mantle
@@ -140,46 +161,110 @@ local length_method = system_array_type_def:get_method("get_Length");
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
function this.update(player, player_data)
local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
if item_parameter == nil then
error_handler.report("skills.update", "Failed to access Data: item_parameter");
return;
end
--local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager);
--if item_parameter == nil then
-- error_handler.report("skills.update", "Failed to access Data: item_parameter");
-- return;
--end
this.update_equipped_skill_data(player);
this.update_dereliction(player_data);
this.update_wind_mantle(player);
this.update_heaven_sent(player);
this.update_generic("burst", player_data, rengeki_power_up_count_field, rengeki_power_up_timer_field, nil, burst_breakpoint);
this.update_generic("kushala_daora_soul", player_data,
hyakuryu_dragon_power_up_count_field, hyakuryu_dragon_power_up_timer_field, nil, kushara_daora_soul_breakpoint);
this.update_generic("intrepid_heart", player_data, equip_skill_223_accumulator_field, nil, intrepid_heart_minimal_value, nil, true);
this.update_generic("latent_power", player, nil, power_freedom_timer_field);
this.update_generic("protective_polish", player, nil, sharpness_gauge_boost_timer_field);
this.update_generic("grinder_s", player_data, nil, brand_new_sharpness_adjust_up_timer_field);
this.update_generic("counterstrike", player_data, nil, counterattack_powerup_timer_field);
this.update_generic("affinity_sliding", player_data, nil, sliding_powerup_timer_field);
this.update_generic("coalescence", player_data, nil, disaster_turn_powerup_timer_field);
this.update_generic("adrenaline_rush", player_data, nil, equip_skill_208_atk_up_field);
this.update_generic("wall_runner", player_data, nil, wall_run_powerup_timer_field);
this.update_generic("offensive_guard", player_data, nil, equip_skill_036_timer_field);
this.update_generic("hellfire_cloak", player_data, nil, onibi_powerup_timer_field);
this.update_generic("agitator", player_data, nil, challenge_timer_field, nil, nil, true);
this.update_generic("furious", player_data, nil, furious_skill_stamina_buff_second_timer_field);
this.update_generic_number_value_field("burst", player_data,
rengeki_power_up_count_field, rengeki_power_up_timer_field, false, nil, burst_breakpoint);
this.update_generic_number_value_field("kushala_daora_soul", player_data,
hyakuryu_dragon_power_up_count_field, hyakuryu_dragon_power_up_timer_field, false, nil, kushara_daora_soul_breakpoint);
this.update_generic_number_value_field("intrepid_heart", player_data, equip_skill_223_accumulator_field, nil, true, intrepid_heart_minimal_value);
this.update_generic_timer("latent_power", player, power_freedom_timer_field);
this.update_generic_timer("protective_polish", player, sharpness_gauge_boost_timer_field);
this.update_generic_timer("grinder_s", player_data, brand_new_sharpness_adjust_up_timer_field);
this.update_generic_timer("counterstrike", player_data, counterattack_powerup_timer_field);
this.update_generic_timer("affinity_sliding", player_data, sliding_powerup_timer_field);
this.update_generic_timer("coalescence", player_data, disaster_turn_powerup_timer_field);
this.update_generic_timer("adrenaline_rush", player_data, equip_skill_208_atk_up_field);
this.update_generic_timer("wall_runner", player_data, wall_run_powerup_timer_field);
this.update_generic_timer("offensive_guard", player_data, equip_skill_036_timer_field);
this.update_generic_timer("hellfire_cloak", player_data, onibi_powerup_timer_field);
this.update_generic_timer("agitator", player_data, challenge_timer_field, true);
this.update_generic_timer("furious", player_data, furious_skill_stamina_buff_second_timer_field);
this.update_generic_boolean_value_method("heaven_sent", player, is_active_equip_skill_230_method);
this.update_generic_boolean_value_method("heroics", player, is_predicament_power_up_method);
this.update_generic_boolean_value_method("resuscitate", player, is_debuff_state_method);
end
function this.update_generic(skill_key, timer_owner, value_field, timer_field, minimal_value, breakpoint, is_infinite)
minimal_value = minimal_value or 1;
function this.update_equipped_skill_data(player)
local player_skill_list = get_player_skill_list_method:call(player);
if player_skill_list == nil then
error_handler.report("skills.update_equipped_skill_data", "Failed to access Data: player_skill_list");
return;
end
for skill_key, skill_data in pairs(skill_data_list) do
local has_skill = has_skill_method:call(player_skill_list, skill_data.id, 1);
if has_skill == nil then
error_handler.report("skills.update_equipped_skill_data", string.format("Failed to access Data: %s -> has_skill", skill_key));
goto continue;
end
skill_data.is_equipped = has_skill;
::continue::
end
end
function this.update_generic_timer(skill_key, timer_owner, timer_field, is_infinite)
if is_infinite == nil then is_infinite = false; end
local skill_data = skill_data_list[skill_key];
if skill_data ~= nil and not skill_data.is_equipped then
return;
end
local timer = nil;
if timer_field ~= nil then
timer = timer_field:get_data(timer_owner);
if timer == nil then
error_handler.report("skills.update_generic_timer", string.format("Failed to access Data: %s_timer", skill_key));
return;
end
if timer == 0 then
this.list[skill_key] = nil;
return;
end
if is_infinite then
timer = nil;
else
timer = timer / 60;
end
end
this.update_generic(skill_key, 1, timer);
end
function this.update_generic_number_value_field(skill_key, timer_owner, value_field, timer_field, is_infinite, minimal_value, breakpoint)
if minimal_value == nil then minimal_value = 1; end
breakpoint = breakpoint or 1000000;
if is_infinite == nil then is_infinite = false; end
local skill_data = skill_data_list[skill_key];
if skill_data ~= nil and not skill_data.is_equipped then
return;
end
local level = 1;
if value_field ~= nil then
local value = value_field:get_data(timer_owner);
if value == nil then
error_handler.report("skills.update_generic", string.format("Failed to access Data: %s_value", skill_key));
error_handler.report("skills.update_generic_number_value_field", string.format("Failed to access Data: %s_value", skill_key));
return;
end
@@ -193,11 +278,11 @@ function this.update_generic(skill_key, timer_owner, value_field, timer_field, m
end
end
local timer;
local timer = nil;
if timer_field ~= nil then
timer = timer_field:get_data(timer_owner);
if timer == nil then
error_handler.report("skills.update_generic", string.format("Failed to access Data: %s_timer", skill_key));
error_handler.report("skills.update_generic_number_value_field", string.format("Failed to access Data: %s_timer", skill_key));
return;
end
@@ -206,23 +291,172 @@ function this.update_generic(skill_key, timer_owner, value_field, timer_field, m
return;
end
timer = timer / 60;
if is_infinite then
timer = nil;
else
timer = timer / 60;
end
end
local skill = this.list[skill_key];
if skill == nil then
local name = language.current_language.skills[skill_key];
this.update_generic(skill_key, level, timer);
end
function this.update_generic_boolean_value_field(skill_key, timer_owner, value_field, timer_field, is_infinite, minimal_value)
if minimal_value == nil then minimal_value = true; end
if is_infinite == nil then is_infinite = false; end
local skill_data = skill_data_list[skill_key];
if skill_data ~= nil and not skill_data.is_equipped then
return;
end
if value_field ~= nil then
local value = value_field:get_data(timer_owner);
if value == nil then
error_handler.report("skills.update_generic_boolean_value_field", string.format("Failed to access Data: %s_value", skill_key));
return;
end
if value < minimal_value then
this.list[skill_key] = nil;
return;
end
end
local timer = nil;
if timer_field ~= nil then
timer = timer_field:get_data(timer_owner);
if timer == nil then
error_handler.report("skills.update_generic_boolean_value_field", string.format("Failed to access Data: %s_timer", skill_key));
return;
end
if value_field == nil and timer == 0 then
this.list[skill_key] = nil;
return;
end
if is_infinite then
timer = nil;
else
timer = timer / 60;
end
end
this.update_generic(skill_key, 1, timer);
end
function this.update_generic_number_value_method(skill_key, timer_owner, value_method, timer_field, is_infinite, minimal_value, breakpoint)
if minimal_value == nil then minimal_value = 1; end
breakpoint = breakpoint or 1000000;
if is_infinite == nil then is_infinite = false; end
local skill_data = skill_data_list[skill_key];
if skill_data ~= nil and not skill_data.is_equipped then
return;
end
local level = 1;
if value_method ~= nil then
local value = value_method:call(timer_owner);
if value == nil then
error_handler.report("skills.update_generic_number_value_method", string.format("Failed to access Data: %s_value", skill_key));
return;
end
if value < minimal_value then
this.list[skill_key] = nil;
return;
end
if value >= breakpoint then
level = 2;
end
end
local timer = nil;
if timer_field ~= nil then
timer = timer_field:get_data(timer_owner);
if timer == nil then
error_handler.report("skills.update_generic_number_value_method", string.format("Failed to access Data: %s_timer", skill_key));
return;
end
if value_method == nil and timer == 0 then
this.list[skill_key] = nil;
return;
end
if is_infinite then
timer = nil;
else
timer = timer / 60;
end
end
this.update_generic(skill_key, level, timer);
end
function this.update_generic_boolean_value_method(skill_key, timer_owner, value_method, timer_field, is_infinite, minimal_value)
if minimal_value == nil then minimal_value = true; end
if is_infinite == nil then is_infinite = false; end
local skill_data = skill_data_list[skill_key];
if skill_data ~= nil and not skill_data.is_equipped then
return;
end
if value_method ~= nil then
local value = value_method:call(timer_owner);
if value == nil then
error_handler.report("skills.update_generic_boolean_value_method", string.format("Failed to access Data: %s_value", skill_key));
return;
end
if value ~= minimal_value then
this.list[skill_key] = nil;
return;
end
end
local timer = nil;
if timer_field ~= nil then
timer = timer_field:get_data(timer_owner);
if timer == nil then
error_handler.report("skills.update_generic_boolean_value_method", string.format("Failed to access Data: %s_timer", skill_key));
return;
end
if value_method == nil and timer == 0 then
this.list[skill_key] = nil;
return;
end
if is_infinite then
timer = nil;
else
timer = timer / 60;
end
end
this.update_generic(skill_key, 1, timer);
end
function this.update_generic(skill_key, level, timer)
local skill = this.list[skill_key];
if skill == nil then
local name = language.current_language.skills[skill_key];
skill = buffs.new(buffs.types.skill, skill_key, name, level, timer);
this.list[skill_key] = skill;
else
skill.level = level;
if not is_infinite then
if timer ~= nil then
buffs.update_timer(skill, timer);
end
end
@@ -311,30 +545,15 @@ function this.update_wind_mantle(player)
end
end
function this.update_heaven_sent(player)
local is_heaven_sent_active = is_active_equip_skill_230_method:call(player);
if is_heaven_sent_active == nil then
error_handler.report("skills.update_heaven_sent", "Failed to access Data: is_heaven_sent_active");
return;
end
if not is_heaven_sent_active then
this.list.heaven_sent = nil;
return;
end
local buff = this.list.heaven_sent;
if buff == nil then
local name = language.current_language.skills.heaven_sent;
buff = buffs.new(buffs.types.skill, "heaven_sent", name, 1);
this.list.heaven_sent = buff;
end
end
function this.init_names()
for key, buff in pairs(this.list) do
buff.name = language.current_language.skills[key];
for skill_key, skill in pairs(this.list) do
local name = language.current_language.skills[skill_key];
if name == nil then
name = skill_key;
end
skill.name = name;
end
end

View File

@@ -175,8 +175,9 @@ this.default_language = {
blast = "Blast",
exhaust = "Exhaust",
ride = "Wyvern Riding",
waterblight = "Waterblight",
fireblight = "Fireblight",
waterblight = "Waterblight",
iceblight = "Iceblight",
thunderblight = "Thunderblight",
@@ -187,7 +188,29 @@ this.default_language = {
steel_fang = "Steel Fang",
quick_sand = "Quick Sand",
fall_otomo_trap = "Fall Buddy Trap",
shock_otomo_trap = "Shock Buddy Trap"
shock_otomo_trap = "Shock Buddy Trap",
dragonblight = "Dragonblight",
blastblight = "Blastblight",
bubbleblight = "Bubbleblight",
hellfireblight = "Hellfireblight",
bloodblight = "Bloodblight",
frostblight = "Frostblight",
defense_down = "Defense Down",
resistance_down = "Resistance Down",
tremor = "Tremor",
roar = "Roar",
webbed = "Webbed",
stench = "Stench",
leeched = "Leeched",
bleeding = "Bleeding",
engulfed = "Engulfed",
muck = "Muck",
frenzy = "Frenzy",
frenzy_infection = "Frenzy Infection",
frenzy_overcome = "Frenzy Overcome"
},
consumables = {
@@ -253,7 +276,9 @@ this.default_language = {
offensive_guard = "Offensive Guard",
hellfire_cloak = "Hellfire Cloak",
agitator = "Agitator",
furious = "Furious"
furious = "Furious",
heroics = "Heroics",
resuscitate = "Resuscitate"
},
dangos = {

View File

@@ -120,7 +120,6 @@ function this.blast_proc(blast_param)
local blast_damage = blast_damage_method:call(blast_param);
local blast_adjust_rate = blast_adjust_rate_method:call(blast_param);
ailments.apply_ailment_damage(monster, ailments.blast_id, blast_damage * blast_adjust_rate);
ailments.clear_ailment_contribution(monster, ailments.blast_id);
end

View File

@@ -542,6 +542,10 @@ function this.update_poison(monster, poison_param)
return;
end
if not is_damage then
return;
end
local poison_damage = poison_damage_field:get_data(poison_param);
if poison_damage == nil then
error_handler.report("ailments.update_poison", "Failed to access Data: poison_damage");

View File

@@ -11,6 +11,7 @@ local utils;
local error_handler;
local skills;
local dangos;
local abnormal_statuses;
local sdk = sdk;
local tostring = tostring;
@@ -102,6 +103,17 @@ function this.draw()
::continue5::
end
for key, abnormal_status in pairs(abnormal_statuses.list) do
if not abnormal_status.is_active then
goto continue5;
end
table.insert(displayed_buffs, abnormal_status);
::continue5::
end
-- sort
if cached_config.sorting.type == "Name" then
if cached_config.sorting.reversed_order then
@@ -175,6 +187,7 @@ function this.init_dependencies()
endemic_life_buff = require("MHR_Overlay.Buffs.endemic_life_buffs");
skills = require("MHR_Overlay.Buffs.skills");
dangos = require("MHR_Overlay.Buffs.dangos");
abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
end
function this.init_module()

View File

@@ -18,25 +18,44 @@
},
"ailments": {
"blast": "Blast",
"blastblight": "Blastblight",
"bleeding": "Bleeding",
"bloodblight": "Bloodblight",
"bubbleblight": "Bubbleblight",
"defense_down": "Defense Down",
"dragonblight": "Dragonblight",
"dung_bomb": "Dung Bomb",
"engulfed": "Engulfed",
"exhaust": "Exhaust",
"fall_otomo_trap": "Fall Buddy Trap",
"fall_trap": "Fall Trap",
"fireblight": "Fireblight",
"flash": "Flash",
"frenzy": "Frenzy",
"frenzy_infection": "Frenzy Infection",
"frenzy_overcome": "Frenzy Overcome",
"frostblight": "Frostblight",
"hellfireblight": "Hellfireblight",
"iceblight": "Iceblight",
"leeched": "Leeched",
"muck": "Muck",
"paralysis": "Paralysis",
"poison": "Poison",
"quick_sand": "Quick Sand",
"resistance_down": "Resistance Down",
"ride": "Wyvern Riding",
"roar": "Roar",
"shock_otomo_trap": "Shock Buddy Trap",
"shock_trap": "Shock Trap",
"sleep": "Sleep",
"steel_fang": "Steel Fang",
"stench": "Stench",
"stun": "Stun",
"thunderblight": "Thunderblight",
"tranq_bomb": "Tranq Bomb",
"waterblight": "Waterblight"
"tremor": "Tremor",
"waterblight": "Waterblight",
"webbed": "Webbed"
},
"consumables": {
"adamant_seed": "Adamant Seed",
@@ -455,11 +474,13 @@
"grinder_s": "Grinder (S)",
"heaven_sent": "Heaven-Sent",
"hellfire_cloak": "Hellfire Cloak",
"heroics": "Heroics",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul",
"latent_power": "Latent Power",
"offensive_guard": "Offensive Guard",
"protective_polish": "Protective Polish",
"resuscitate": "Resuscitate",
"wall_runner": "Wall Runner",
"wind_mantle": "Wind Mantle"
},

View File

@@ -18,25 +18,44 @@
},
"ailments": {
"blast": "爆破",
"blastblight": "Blastblight",
"bleeding": "Bleeding",
"bloodblight": "Bloodblight",
"bubbleblight": "Bubbleblight",
"defense_down": "Defense Down",
"dragonblight": "Dragonblight",
"dung_bomb": "悪臭",
"engulfed": "Engulfed",
"exhaust": "疲労",
"fall_otomo_trap": "オトモ落とし穴",
"fall_trap": "落とし穴",
"fireblight": "火属性やられ",
"flash": "目くらまし",
"frenzy": "Frenzy",
"frenzy_infection": "Frenzy Infection",
"frenzy_overcome": "Frenzy Overcome",
"frostblight": "Frostblight",
"hellfireblight": "Hellfireblight",
"iceblight": "氷属性やられ",
"leeched": "Leeched",
"muck": "Muck",
"paralysis": "麻痺",
"poison": "毒",
"quick_sand": "流砂",
"resistance_down": "Resistance Down",
"ride": "操竜",
"roar": "Roar",
"shock_otomo_trap": "オトモしびれ罠",
"shock_trap": "しびれ罠",
"sleep": "睡眠",
"steel_fang": "ガルク噛み付き",
"stench": "Stench",
"stun": "スタン",
"thunderblight": "雷属性やられ",
"tranq_bomb": "捕獲用麻酔玉",
"waterblight": "水属性やられ"
"tremor": "Tremor",
"waterblight": "水属性やられ",
"webbed": "Webbed"
},
"consumables": {
"adamant_seed": "Adamant Seed",
@@ -455,11 +474,13 @@
"grinder_s": "Grinder (S)",
"heaven_sent": "Heaven-Sent",
"hellfire_cloak": "Hellfire Cloak",
"heroics": "Heroics",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul",
"latent_power": "Latent Power",
"offensive_guard": "Offensive Guard",
"protective_polish": "Protective Polish",
"resuscitate": "Resuscitate",
"wall_runner": "Wall Runner",
"wind_mantle": "Wind Mantle"
},

View File

@@ -18,25 +18,44 @@
},
"ailments": {
"blast": "폭파",
"blastblight": "Blastblight",
"bleeding": "Bleeding",
"bloodblight": "Bloodblight",
"bubbleblight": "Bubbleblight",
"defense_down": "Defense Down",
"dragonblight": "Dragonblight",
"dung_bomb": "거름탄",
"engulfed": "Engulfed",
"exhaust": "탈진",
"fall_otomo_trap": "동반자 구멍 함정",
"fall_trap": "구멍 함정",
"fireblight": "불바위구리",
"flash": "섬광",
"frenzy": "Frenzy",
"frenzy_infection": "Frenzy Infection",
"frenzy_overcome": "Frenzy Overcome",
"frostblight": "Frostblight",
"hellfireblight": "Hellfireblight",
"iceblight": "진흙구리",
"leeched": "Leeched",
"muck": "Muck",
"paralysis": "마비",
"poison": "독",
"quick_sand": "유사(모래함정)",
"resistance_down": "Resistance Down",
"ride": "용조종",
"roar": "Roar",
"shock_otomo_trap": "동반자 마비덫",
"shock_trap": "마비덫",
"sleep": "수면",
"steel_fang": "강철아",
"stench": "Stench",
"stun": "기절",
"thunderblight": "번개털구리",
"tranq_bomb": "포획용마취옥",
"waterblight": "진흙구리"
"tremor": "Tremor",
"waterblight": "진흙구리",
"webbed": "Webbed"
},
"consumables": {
"adamant_seed": "Adamant Seed",
@@ -456,11 +475,13 @@
"grinder_s": "Grinder (S)",
"heaven_sent": "Heaven-Sent",
"hellfire_cloak": "Hellfire Cloak",
"heroics": "Heroics",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul",
"latent_power": "Latent Power",
"offensive_guard": "Offensive Guard",
"protective_polish": "Protective Polish",
"resuscitate": "Resuscitate",
"wall_runner": "Wall Runner",
"wind_mantle": "Wind Mantle"
},

View File

@@ -18,25 +18,44 @@
},
"ailments": {
"blast": "Взрыв",
"blastblight": "Blastblight",
"bleeding": "Bleeding",
"bloodblight": "Bloodblight",
"bubbleblight": "Bubbleblight",
"defense_down": "Defense Down",
"dragonblight": "Dragonblight",
"dung_bomb": "Навозная бомба",
"engulfed": "Engulfed",
"exhaust": "Усталость",
"fall_otomo_trap": "Волчья яма спутника",
"fall_trap": "Волчья яма",
"fireblight": "Огненная порча",
"flash": "Оглушение",
"frenzy": "Frenzy",
"frenzy_infection": "Frenzy Infection",
"frenzy_overcome": "Frenzy Overcome",
"frostblight": "Frostblight",
"hellfireblight": "Hellfireblight",
"iceblight": "Ледяная порча",
"leeched": "Leeched",
"muck": "Muck",
"paralysis": "Паралич",
"poison": "Отравление",
"quick_sand": "Зыбучий песок",
"resistance_down": "Resistance Down",
"ride": "Езда на виверне",
"roar": "Roar",
"shock_otomo_trap": "Шоковая ловушка спутника",
"shock_trap": "Шоковая ловушка",
"sleep": "Сон",
"steel_fang": "Стальной клык",
"stench": "Stench",
"stun": "Оглушение",
"thunderblight": "Грозовая порча",
"tranq_bomb": "Снотворная порча",
"waterblight": "Водяная порча"
"tremor": "Tremor",
"waterblight": "Водяная порча",
"webbed": "Webbed"
},
"consumables": {
"adamant_seed": "Adamant Seed",
@@ -456,11 +475,13 @@
"grinder_s": "Grinder (S)",
"heaven_sent": "Heaven-Sent",
"hellfire_cloak": "Hellfire Cloak",
"heroics": "Heroics",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul",
"latent_power": "Latent Power",
"offensive_guard": "Offensive Guard",
"protective_polish": "Protective Polish",
"resuscitate": "Resuscitate",
"wall_runner": "Wall Runner",
"wind_mantle": "Wind Mantle"
},

View File

@@ -18,25 +18,44 @@
},
"ailments": {
"blast": "爆破",
"blastblight": "Blastblight",
"bleeding": "Bleeding",
"bloodblight": "Bloodblight",
"bubbleblight": "Bubbleblight",
"defense_down": "Defense Down",
"dragonblight": "Dragonblight",
"dung_bomb": "异臭球",
"engulfed": "Engulfed",
"exhaust": "减气",
"fall_otomo_trap": "随从落穴陷阱",
"fall_trap": "落穴陷阱",
"fireblight": "火异常状态",
"flash": "闪光",
"frenzy": "Frenzy",
"frenzy_infection": "Frenzy Infection",
"frenzy_overcome": "Frenzy Overcome",
"frostblight": "Frostblight",
"hellfireblight": "Hellfireblight",
"iceblight": "冰异常状态",
"leeched": "Leeched",
"muck": "Muck",
"paralysis": "麻痹",
"poison": "中毒",
"quick_sand": "流沙",
"resistance_down": "Resistance Down",
"ride": "御龙",
"roar": "Roar",
"shock_otomo_trap": "随从麻痹陷阱",
"shock_trap": "麻痹陷阱",
"sleep": "睡眠",
"steel_fang": "双刃锁镰",
"stench": "Stench",
"stun": "昏厥",
"thunderblight": "雷异常状态",
"tranq_bomb": "捕获用麻醉球",
"waterblight": "水异常状态"
"tremor": "Tremor",
"waterblight": "水异常状态",
"webbed": "Webbed"
},
"consumables": {
"adamant_seed": "Adamant Seed",
@@ -456,11 +475,13 @@
"grinder_s": "Grinder (S)",
"heaven_sent": "Heaven-Sent",
"hellfire_cloak": "Hellfire Cloak",
"heroics": "Heroics",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul",
"latent_power": "Latent Power",
"offensive_guard": "Offensive Guard",
"protective_polish": "Protective Polish",
"resuscitate": "Resuscitate",
"wall_runner": "Wall Runner",
"wind_mantle": "Wind Mantle"
},

View File

@@ -18,25 +18,44 @@
},
"ailments": {
"blast": "爆破",
"blastblight": "Blastblight",
"bleeding": "Bleeding",
"bloodblight": "Bloodblight",
"bubbleblight": "Bubbleblight",
"defense_down": "Defense Down",
"dragonblight": "Dragonblight",
"dung_bomb": "異臭",
"engulfed": "Engulfed",
"exhaust": "疲勞",
"fall_otomo_trap": "隨從地洞陷阱",
"fall_trap": "地洞陷阱",
"fireblight": "火屬性異常",
"flash": "失明",
"frenzy": "Frenzy",
"frenzy_infection": "Frenzy Infection",
"frenzy_overcome": "Frenzy Overcome",
"frostblight": "Frostblight",
"hellfireblight": "Hellfireblight",
"iceblight": "冰屬性異常",
"leeched": "Leeched",
"muck": "Muck",
"paralysis": "麻痺",
"poison": "毒",
"quick_sand": "流沙",
"resistance_down": "Resistance Down",
"ride": "操龍",
"roar": "Roar",
"shock_otomo_trap": "隨從麻痺陷阱",
"shock_trap": "麻痺陷阱",
"sleep": "睡眠",
"steel_fang": "獵犬鋼牙",
"stench": "Stench",
"stun": "暈眩",
"thunderblight": "雷屬性異常",
"tranq_bomb": "麻醉",
"waterblight": "水屬性異常"
"tremor": "Tremor",
"waterblight": "水屬性異常",
"webbed": "Webbed"
},
"consumables": {
"adamant_seed": "Adamant Seed",
@@ -456,11 +475,13 @@
"grinder_s": "Grinder (S)",
"heaven_sent": "Heaven-Sent",
"hellfire_cloak": "Hellfire Cloak",
"heroics": "Heroics",
"intrepid_heart": "Intrepid Heart",
"kushala_daora_soul": "Kushala Daora Soul",
"latent_power": "Latent Power",
"offensive_guard": "Offensive Guard",
"protective_polish": "Protective Polish",
"resuscitate": "Resuscitate",
"wall_runner": "Wall Runner",
"wind_mantle": "Wind Mantle"
},