mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Add Weapon Skills (Great Sword, Switch Axe, Long Sword)
This commit is contained in:
@@ -52,6 +52,7 @@ local skills = require("MHR_Overlay.Buffs.skills");
|
||||
local dangos = require("MHR_Overlay.Buffs.dangos");
|
||||
local abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
|
||||
local otomo_moves = require("MHR_Overlay.Buffs.otomo_moves");
|
||||
local weapon_skills = require("MHR_Overlay.Buffs.weapon_skills");
|
||||
|
||||
local players = require("MHR_Overlay.Damage_Meter.players");
|
||||
local non_players = require("MHR_Overlay.Damage_Meter.non_players");
|
||||
@@ -133,6 +134,7 @@ skills.init_dependencies();
|
||||
dangos.init_dependencies();
|
||||
abnormal_statuses.init_dependencies();
|
||||
otomo_moves.init_dependencies();
|
||||
weapon_skills.init_dependencies();
|
||||
|
||||
damage_hook.init_dependencies();
|
||||
players.init_dependencies();
|
||||
@@ -209,6 +211,7 @@ skills.init_module();
|
||||
dangos.init_module();
|
||||
abnormal_statuses.init_module();
|
||||
otomo_moves.init_module();
|
||||
weapon_skills.init_module();
|
||||
|
||||
damage_hook.init_module();
|
||||
players.init_module();
|
||||
|
||||
@@ -16,6 +16,7 @@ local skills;
|
||||
local dangos;
|
||||
local abnormal_statuses;
|
||||
local otomo_moves;
|
||||
local weapon_skills;
|
||||
|
||||
local sdk = sdk;
|
||||
local tostring = tostring;
|
||||
@@ -49,14 +50,6 @@ local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
this.types = {
|
||||
consumable = 0,
|
||||
melody_effect = 1,
|
||||
dango = 2,
|
||||
skill = 4,
|
||||
debuff = 8
|
||||
};
|
||||
|
||||
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
|
||||
local get_player_method = player_manager_type_def:get_method("getPlayer");
|
||||
local find_master_player_method = player_manager_type_def:get_method("findMasterPlayer");
|
||||
@@ -66,6 +59,9 @@ local get_player_data_method = player_base_type_def:get_method("get_PlayerData")
|
||||
|
||||
local player_lobby_base_type_def = sdk.find_type_definition("snow.player.PlayerLobbyBase");
|
||||
|
||||
local player_base_type_def = sdk.find_type_definition("snow.player.PlayerBase");
|
||||
local player_weapon_type_field = player_base_type_def:get_field("_playerWeaponType");
|
||||
|
||||
function this.new(type, key, name, level, duration)
|
||||
local is_infinite = false;
|
||||
|
||||
@@ -149,33 +145,47 @@ function this.update()
|
||||
return;
|
||||
end
|
||||
|
||||
local is_player_lobby_base = master_player:get_type_definition() == player_lobby_base_type_def;
|
||||
melody_effects.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);
|
||||
otomo_moves.update(master_player_data);
|
||||
|
||||
if not is_player_lobby_base then
|
||||
skills.update(master_player, master_player_data);
|
||||
dangos.update(master_player, master_player_data);
|
||||
endemic_life_buffs.update(master_player, master_player_data);
|
||||
abnormal_statuses.update(master_player, master_player_data);
|
||||
end
|
||||
else
|
||||
if master_player_data == nil then
|
||||
error_handler.report("buffs.update", "Failed to access Data: master_player_data");
|
||||
return;
|
||||
end
|
||||
|
||||
melody_effects.update(master_player);
|
||||
local weapon_type = player_weapon_type_field:get_data(master_player);
|
||||
if weapon_type == nil then
|
||||
error_handler.report("skills.update", "Failed to access Data: weapon_type");
|
||||
return;
|
||||
end
|
||||
|
||||
local is_player_lobby_base = master_player:get_type_definition() == player_lobby_base_type_def;
|
||||
|
||||
consumables.update(master_player_data);
|
||||
otomo_moves.update(master_player_data);
|
||||
|
||||
if not is_player_lobby_base then
|
||||
skills.update(master_player, master_player_data, weapon_type);
|
||||
dangos.update(master_player, master_player_data);
|
||||
endemic_life_buffs.update(master_player, master_player_data);
|
||||
abnormal_statuses.update(master_player, master_player_data);
|
||||
weapon_skills.update(master_player, master_player_data, weapon_type);
|
||||
end
|
||||
end
|
||||
|
||||
function this.update_timer(buff, timer)
|
||||
function this.update_timer(buff, timer, duration)
|
||||
if timer == nil then
|
||||
return;
|
||||
end
|
||||
|
||||
if timer < 0 then
|
||||
timer = 0;
|
||||
end
|
||||
|
||||
if timer > buff.duration then
|
||||
buff.duration = timer;
|
||||
duration = duration or timer;
|
||||
|
||||
if duration > buff.duration then
|
||||
buff.duration = duration;
|
||||
end
|
||||
|
||||
local minutes_left = math.floor(timer / 60);
|
||||
@@ -189,11 +199,118 @@ function this.update_timer(buff, timer)
|
||||
end
|
||||
end
|
||||
|
||||
function this.update_generic_buff(buff_list, buff_type, buff_key,
|
||||
value_owner, value_holder,
|
||||
timer_owner, timer_holder,
|
||||
duration_owner, duration_holder,
|
||||
is_infinite, minimal_value, level_breakpoints)
|
||||
|
||||
if timer_owner == nil then timer_owner = value_owner; end
|
||||
if duration_owner == nil then duration_owner = value_owner; end
|
||||
if minimal_value == nil then minimal_value = 1; end
|
||||
|
||||
local level = 1;
|
||||
|
||||
if value_holder ~= nil then
|
||||
local value;
|
||||
if utils.type.is_REField(value_holder) then
|
||||
value = value_holder:get_data(value_owner);
|
||||
else
|
||||
value = value_holder:call(value_owner);
|
||||
end
|
||||
|
||||
if value == nil then
|
||||
error_handler.report("buffs.update_generic_number", string.format("Failed to access Data: %s_value", buff_key));
|
||||
return;
|
||||
end
|
||||
|
||||
if utils.type.is_boolean(value) then
|
||||
if not value then
|
||||
buff_list[buff_key] = nil;
|
||||
return;
|
||||
end
|
||||
else
|
||||
if value < minimal_value then
|
||||
buff_list[buff_key] = nil;
|
||||
return;
|
||||
end
|
||||
|
||||
if level_breakpoints ~= nil then
|
||||
local level_breakpoints_count = #level_breakpoints;
|
||||
for index, breakpoint in ipairs(level_breakpoints) do
|
||||
if value >= breakpoint then
|
||||
level = 2 + level_breakpoints_count - index;
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local timer = nil;
|
||||
if timer_holder ~= nil then
|
||||
if utils.type.is_REField(timer_holder) then
|
||||
timer = timer_holder:get_data(timer_owner);
|
||||
else
|
||||
timer = timer_holder:call(timer_owner);
|
||||
end
|
||||
|
||||
if timer == nil then
|
||||
error_handler.report("buffs.update_generic_number", string.format("Failed to access Data: %s_timer", buff_key));
|
||||
return;
|
||||
end
|
||||
|
||||
if value_holder == nil and utils.number.is_equal(timer, 0) then
|
||||
buff_list[buff_key] = nil;
|
||||
return;
|
||||
end
|
||||
|
||||
if is_infinite then
|
||||
timer = nil;
|
||||
else
|
||||
timer = timer / 60;
|
||||
end
|
||||
end
|
||||
|
||||
local duration = nil;
|
||||
if duration_holder ~= nil then
|
||||
if utils.type.is_REField(duration_holder) then
|
||||
duration = duration_holder:get_data(duration_owner);
|
||||
else
|
||||
duration = duration_holder:call(duration_owner);
|
||||
end
|
||||
|
||||
if duration == nil then
|
||||
error_handler.report("buffs.update_generic_number", string.format("Failed to access Data: %s_duration", buff_key));
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
return this.update_generic(buff_list, buff_type, buff_key, level, timer, duration);
|
||||
end
|
||||
|
||||
function this.update_generic(buff_list, buff_type, buff_key, level, timer, duration)
|
||||
duration = duration or timer;
|
||||
level = level or 1;
|
||||
|
||||
local buff = buff_list[buff_key];
|
||||
if buff == nil then
|
||||
local name = language.current_language[buff_type][buff_key];
|
||||
|
||||
buff = this.new(buff_type, buff_key, name, level, duration);
|
||||
buff_list[buff_key] = buff;
|
||||
else
|
||||
buff.level = level;
|
||||
this.update_timer(buff, timer, duration);
|
||||
end
|
||||
|
||||
return buff;
|
||||
end
|
||||
|
||||
function this.draw(buff, buff_UI, position_on_screen, opacity_scale)
|
||||
buff_UI_entity.draw(buff, buff_UI, position_on_screen, opacity_scale);
|
||||
end
|
||||
|
||||
|
||||
function this.init_dependencies()
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
|
||||
@@ -211,6 +328,7 @@ function this.init_dependencies()
|
||||
dangos = require("MHR_Overlay.Buffs.dangos");
|
||||
abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
|
||||
otomo_moves = require("MHR_Overlay.Buffs.otomo_moves");
|
||||
weapon_skills = require("MHR_Overlay.Buffs.weapon_skills");
|
||||
end
|
||||
|
||||
function this.init_module()
|
||||
|
||||
345
reframework/autorun/MHR_Overlay/Buffs/weapon_skills.lua
Normal file
345
reframework/autorun/MHR_Overlay/Buffs/weapon_skills.lua
Normal file
@@ -0,0 +1,345 @@
|
||||
local this = {};
|
||||
|
||||
local buffs;
|
||||
local buff_UI_entity;
|
||||
local config;
|
||||
local singletons;
|
||||
local players;
|
||||
local utils;
|
||||
local language;
|
||||
local error_handler;
|
||||
local env_creature;
|
||||
local player_info;
|
||||
local time;
|
||||
local abnormal_statuses;
|
||||
|
||||
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 = {
|
||||
|
||||
};
|
||||
|
||||
this.weapon_types = {
|
||||
nil, -- 0 Great Sword
|
||||
nil, -- 1 Switch Axe
|
||||
nil, -- 2 Long Sword
|
||||
nil, -- 3 Light Bowgun
|
||||
nil, -- 4 Heavy Bowgun
|
||||
nil, -- 5 Hammer
|
||||
nil, -- 6 Gunlance
|
||||
nil, -- 7 Lance
|
||||
nil, -- 8 Sword and Shield
|
||||
nil, -- 9 Dual Blades
|
||||
nil, -- 10 Hunting Horn
|
||||
nil, -- 11 Charge Blade
|
||||
nil, -- 12 Insect Glaive
|
||||
nil, -- 13 Bow
|
||||
};
|
||||
|
||||
local weapon_skills_type_name = "weapon_skills";
|
||||
local previous_weapon_type = -1;
|
||||
|
||||
local spirit_gauge_breakpoints = {3, 2};
|
||||
|
||||
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
|
||||
local get_player_data_method = player_manager_type_def:get_method("get_PlayerData");
|
||||
|
||||
local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData");
|
||||
|
||||
-- Great Sword
|
||||
|
||||
local great_sword_type_def = sdk.find_type_definition("snow.player.GreatSword");
|
||||
-- Power Sheathe
|
||||
local move_wp_off_buff_great_sword_timer_field = great_sword_type_def:get_field("MoveWpOffBuffGreatSwordTimer");
|
||||
local move_wp_off_buff_set_time_field = great_sword_type_def:get_field("_MoveWpOffBuffSetTime");
|
||||
|
||||
-- Switch Axe
|
||||
|
||||
local slash_axe_type_def = sdk.find_type_definition("snow.player.SlashAxe");
|
||||
-- Amped State
|
||||
local get_bottle_awake_duration_timer_method = slash_axe_type_def:get_method("get_BottleAwakeDurationTimer");
|
||||
local bottle_awake_duration_time_field = slash_axe_type_def:get_field("_BottleAwakeDurationTime");
|
||||
-- Switch Charger
|
||||
local no_use_slash_gauge_timer_field = slash_axe_type_def:get_field("_NoUseSlashGaugeTimer");
|
||||
-- Axe: Heavy Slam
|
||||
local bottle_awake_assist_timer_field = slash_axe_type_def:get_field("_BottleAwakeAssistTimer");
|
||||
|
||||
-- Long Sword
|
||||
|
||||
local long_sword_type_def = sdk.find_type_definition("snow.player.LongSword");
|
||||
-- Spirit Gauge Autofill (Soaring Kick, Iai Slash)
|
||||
local get_long_sword_gauge_powerup_time_method = long_sword_type_def:get_method("get_LongSwordGaugePowerUpTime");
|
||||
-- Spirit Gauge
|
||||
local get_long_sword_gauge_lv_method = long_sword_type_def:get_method("get_LongSwordGaugeLv");
|
||||
local long_sword_gauge_lv_time_field = long_sword_type_def:get_field("_LongSwordGaugeLvTime");
|
||||
local get_long_sword_gauge_lv_timer_method = long_sword_type_def:get_method("get_LongSwordGaugeLvTimer");
|
||||
|
||||
-- Harvest Moon
|
||||
local long_sword_shell_manager_type_def = sdk.find_type_definition("snow.shell.LongSwordShellManager");
|
||||
local get_master_long_sword_shell_010s_method = long_sword_shell_manager_type_def:get_method("getMaseterLongSwordShell010s");
|
||||
|
||||
local system_array_type_def = sdk.find_type_definition("System.Array");
|
||||
local get_length_method = system_array_type_def:get_method("get_Length");
|
||||
local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)");
|
||||
|
||||
local long_sword_shell_010_list_type_def = sdk.find_type_definition("System.Collections.Generic.List`1<snow.shell.LongSwordShell010>");
|
||||
local get_count_method = long_sword_shell_010_list_type_def:get_method("get_Count");
|
||||
local get_item_method = long_sword_shell_010_list_type_def:get_method("get_Item");
|
||||
|
||||
local long_sword_shell_010_type_def = sdk.find_type_definition("snow.shell.LongSwordShell010");
|
||||
local life_timer_field = long_sword_shell_010_type_def:get_field("_lifeTimer");
|
||||
|
||||
local single_type_def = sdk.find_type_definition("System.Single");
|
||||
local mvalue_field = single_type_def:get_field("mValue");
|
||||
|
||||
function this.update(player, player_data, weapon_type)
|
||||
if weapon_type ~= previous_weapon_type then
|
||||
this.list = {};
|
||||
end
|
||||
|
||||
previous_weapon_type = weapon_type;
|
||||
|
||||
if weapon_type == 0 then
|
||||
this.update_great_sword_skills(player);
|
||||
|
||||
elseif weapon_type == 1 then
|
||||
this.update_switch_axe_skills(player);
|
||||
|
||||
elseif weapon_type == 2 then
|
||||
this.update_long_sword_skills(player);
|
||||
|
||||
elseif weapon_type == 3 then
|
||||
this.update_light_bowgun_skills(player);
|
||||
|
||||
elseif weapon_type == 4 then
|
||||
this.update_heavy_bowgun_skills(player);
|
||||
|
||||
elseif weapon_type == 5 then
|
||||
this.update_hammer_skills(player);
|
||||
|
||||
elseif weapon_type == 6 then
|
||||
this.update_gunlance_skills(player);
|
||||
|
||||
elseif weapon_type == 7 then
|
||||
this.update_lance_skills(player);
|
||||
|
||||
elseif weapon_type == 8 then
|
||||
this.update_sword_and_shield_skills(player);
|
||||
|
||||
elseif weapon_type == 9 then
|
||||
this.update_dual_blades_skills(player);
|
||||
|
||||
elseif weapon_type == 10 then
|
||||
this.update_hunting_horn_skills(player);
|
||||
|
||||
elseif weapon_type == 11 then
|
||||
this.update_charge_blade_skills(player);
|
||||
|
||||
elseif weapon_type == 12 then
|
||||
this.update_insect_glaive_skills(player);
|
||||
|
||||
else
|
||||
this.update_bow_skills(player);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function this.update_great_sword_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "power_sheathe", nil, nil,
|
||||
player, move_wp_off_buff_set_time_field, player, move_wp_off_buff_set_time_field);
|
||||
end
|
||||
|
||||
function this.update_switch_axe_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "amped_state", nil, nil,
|
||||
player, get_bottle_awake_duration_timer_method, player, bottle_awake_duration_time_field);
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "switch_charger", nil, nil,
|
||||
player, no_use_slash_gauge_timer_field);
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "axe_heavy_slam", nil, nil,
|
||||
player, bottle_awake_assist_timer_field);
|
||||
end
|
||||
|
||||
function this.update_long_sword_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge_autofill", nil, nil,
|
||||
player, get_long_sword_gauge_powerup_time_method);
|
||||
|
||||
this.update_spirit_gauge(player);
|
||||
this.update_harvest_moon();
|
||||
end
|
||||
|
||||
function this.update_spirit_gauge(player)
|
||||
local weapon_skill = buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge",
|
||||
player, get_long_sword_gauge_lv_method, player, get_long_sword_gauge_lv_timer_method, nil, nil, false, nil, spirit_gauge_breakpoints);
|
||||
|
||||
if weapon_skill == nil then
|
||||
return;
|
||||
end
|
||||
|
||||
local long_sword_gauge_lv_time_array = long_sword_gauge_lv_time_field:get_data(player);
|
||||
if long_sword_gauge_lv_time_array == nil then
|
||||
error_handler.report("weapon_skills.update_spirit_gauge", "Failed to access Data: long_sword_gauge_lv_time_array");
|
||||
return;
|
||||
end
|
||||
|
||||
local long_sword_gauge_lv_time_array_length = get_length_method:call(long_sword_gauge_lv_time_array);
|
||||
if long_sword_gauge_lv_time_array_length == nil then
|
||||
error_handler.report("weapon_skills.update_spirit_gauge", "Failed to access Data: long_sword_gauge_lv_time_array_length");
|
||||
return;
|
||||
end
|
||||
|
||||
if weapon_skill.level >= long_sword_gauge_lv_time_array_length then
|
||||
return;
|
||||
end
|
||||
|
||||
local long_sword_gauge_lv_time_single_valtype = get_value_method:call(long_sword_gauge_lv_time_array, weapon_skill.level);
|
||||
if long_sword_gauge_lv_time_single_valtype == nil then
|
||||
error_handler.report("weapon_skills.update_spirit_gauge", "Failed to access Data: long_sword_gauge_lv_time_single_valtype");
|
||||
return;
|
||||
end
|
||||
|
||||
local long_sword_gauge_lv_time = mvalue_field:get_data(long_sword_gauge_lv_time_single_valtype);
|
||||
if long_sword_gauge_lv_time == nil then
|
||||
error_handler.report("weapon_skills.update_spirit_gauge", "Failed to access Data: long_sword_gauge_lv_time");
|
||||
return;
|
||||
end
|
||||
|
||||
weapon_skill.duration = long_sword_gauge_lv_time / 60;
|
||||
end
|
||||
|
||||
function this.update_harvest_moon()
|
||||
if singletons.long_sword_shell_manager == nil then
|
||||
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: long_sword_shell_manager");
|
||||
return;
|
||||
end
|
||||
|
||||
local master_long_sword_shell_010_list = get_master_long_sword_shell_010s_method:call(singletons.long_sword_shell_manager, players.myself.id);
|
||||
if master_long_sword_shell_010_list == nil then
|
||||
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: master_long_sword_shell_010_list");
|
||||
return;
|
||||
end
|
||||
|
||||
local master_long_sword_shell_010_list_count = get_count_method:call(master_long_sword_shell_010_list);
|
||||
if master_long_sword_shell_010_list_count == nil then
|
||||
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: master_long_sword_shell_010_list_count");
|
||||
return;
|
||||
end
|
||||
|
||||
if master_long_sword_shell_010_list_count == 0 then
|
||||
return;
|
||||
end
|
||||
|
||||
local master_long_sword_shell_010 = get_item_method:call(master_long_sword_shell_010_list, 0);
|
||||
if master_long_sword_shell_010 == nil then
|
||||
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: master_long_sword_shell_010");
|
||||
return;
|
||||
end
|
||||
|
||||
local life_timer = life_timer_field:get_data(master_long_sword_shell_010);
|
||||
if life_timer == nil then
|
||||
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: life_timer");
|
||||
return;
|
||||
end
|
||||
|
||||
if utils.number.is_equal(life_timer, 0) then
|
||||
this.list.harvest_moon = nil;
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "harvest_moon", 1, life_timer);
|
||||
end
|
||||
|
||||
function this.update_light_bowgun_skills(player)
|
||||
end
|
||||
|
||||
function this.update_heavy_bowgun_skills(player)
|
||||
end
|
||||
|
||||
function this.update_hammer_skills(player)
|
||||
end
|
||||
|
||||
function this.update_gunlance_skills(player)
|
||||
end
|
||||
|
||||
function this.update_lance_skills(player)
|
||||
end
|
||||
|
||||
function this.update_sword_and_shield_skills(player)
|
||||
end
|
||||
|
||||
function this.update_dual_blades_skills(player)
|
||||
end
|
||||
|
||||
function this.update_hunting_horn_skills(player)
|
||||
end
|
||||
|
||||
function this.update_charge_blade_skills(player)
|
||||
end
|
||||
|
||||
function this.update_insect_glaive_skills(player)
|
||||
end
|
||||
|
||||
function this.update_bow_skills(player)
|
||||
end
|
||||
|
||||
function this.init_names()
|
||||
for weapon_skill_key, weapon_skill in pairs(this.list) do
|
||||
local name = language.current_language.weapon_skills[weapon_skill_key];
|
||||
|
||||
if name == nil then
|
||||
name = weapon_skill_key;
|
||||
end
|
||||
|
||||
weapon_skill.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");
|
||||
env_creature = require("MHR_Overlay.Endemic_Life.env_creature");
|
||||
player_info = require("MHR_Overlay.Misc.player_info");
|
||||
time = require("MHR_Overlay.Game_Handler.time");
|
||||
abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
|
||||
end
|
||||
|
||||
function this.init_module()
|
||||
end
|
||||
|
||||
return this;
|
||||
@@ -62,6 +62,7 @@ function this.init()
|
||||
this.init_game_manager();
|
||||
this.init_servant_manager();
|
||||
this.init_otomo_manager();
|
||||
this.init_long_sword_shell_manager();
|
||||
end
|
||||
|
||||
function this.init_message_manager()
|
||||
@@ -183,6 +184,17 @@ function this.init_otomo_manager()
|
||||
return this.otomo_manager;
|
||||
end
|
||||
|
||||
function this.init_long_sword_shell_manager()
|
||||
this.long_sword_shell_manager = sdk.get_managed_singleton("snow.shell.LongSwordShellManager");
|
||||
if this.long_sword_shell_manager == nil then
|
||||
error_handler.report("singletons.init_long_sword_shell_manager", "Failed to access Data: long_sword_shell_manager");
|
||||
end
|
||||
|
||||
return this.long_sword_shell_manager;
|
||||
end
|
||||
|
||||
|
||||
|
||||
function this.init_dependencies()
|
||||
time = require("MHR_Overlay.Game_Handler.time");
|
||||
utils = require("MHR_Overlay.Misc.utils");
|
||||
|
||||
@@ -469,6 +469,19 @@ this.default_language = {
|
||||
go_fight_win = "Go, Fight, Win"
|
||||
},
|
||||
|
||||
weapon_skills = {
|
||||
-- Great Sword
|
||||
power_sheathe = "Power Sheathe",
|
||||
-- Switch Axe
|
||||
amped_state = "Amped State",
|
||||
switch_charger = "Switch Charger",
|
||||
axe_heavy_slam = "Axe: Heavy Slam",
|
||||
-- Long Sword
|
||||
spirit_gauge_autofill = "Spirit Gauge Autofill", -- Soaring Kick, Iai Slash
|
||||
spirit_gauge = "Spirit Gauge",
|
||||
harvest_moon = "Harvest Moon"
|
||||
},
|
||||
|
||||
UI = {
|
||||
HP = "HP:",
|
||||
stamina = "Stamina:",
|
||||
|
||||
@@ -13,6 +13,7 @@ local skills;
|
||||
local dangos;
|
||||
local abnormal_statuses;
|
||||
local otomo_moves;
|
||||
local weapon_skills;
|
||||
|
||||
local sdk = sdk;
|
||||
local tostring = tostring;
|
||||
@@ -117,12 +118,22 @@ function this.update()
|
||||
|
||||
for key, otomo_move in pairs(otomo_moves.list) do
|
||||
if not otomo_move.is_active then
|
||||
goto continue6;
|
||||
goto continue7;
|
||||
end
|
||||
|
||||
table.insert(_displayed_buffs, otomo_move);
|
||||
|
||||
::continue6::
|
||||
::continue7::
|
||||
end
|
||||
|
||||
for key, weapon_skill in pairs(weapon_skills.list) do
|
||||
if not weapon_skill.is_active then
|
||||
goto continue8;
|
||||
end
|
||||
|
||||
table.insert(_displayed_buffs, weapon_skill);
|
||||
|
||||
::continue8::
|
||||
end
|
||||
|
||||
displayed_buffs = this.sort_buffs(_displayed_buffs, cached_config);
|
||||
@@ -208,6 +219,7 @@ function this.init_dependencies()
|
||||
dangos = require("MHR_Overlay.Buffs.dangos");
|
||||
abnormal_statuses = require("MHR_Overlay.Buffs.abnormal_statuses");
|
||||
otomo_moves = require("MHR_Overlay.Buffs.otomo_moves");
|
||||
weapon_skills = require("MHR_Overlay.Buffs.weapon_skills");
|
||||
end
|
||||
|
||||
function this.init_module()
|
||||
|
||||
@@ -572,5 +572,14 @@
|
||||
},
|
||||
"unicode_glyph_ranges": [
|
||||
0
|
||||
]
|
||||
],
|
||||
"weapon_skills": {
|
||||
"amped_state": "Amped State",
|
||||
"axe_heavy_slam": "Axe: Heavy Slam",
|
||||
"harvest_moon": "Harvest Moon",
|
||||
"power_sheathe": "Power Sheathe",
|
||||
"spirit_gauge": "Spirit Gauge",
|
||||
"spirit_gauge_autofill": "Spirit Gauge Autofill",
|
||||
"switch_charger": "Switch Charger"
|
||||
}
|
||||
}
|
||||
@@ -585,5 +585,16 @@
|
||||
65280,
|
||||
65519,
|
||||
0
|
||||
]
|
||||
],
|
||||
"weapon_skills": {
|
||||
"amped_state": "Amped State",
|
||||
"axe_heavy_slam": "Axe: Heavy Slam",
|
||||
"harvest_moon": "Harvest Moon",
|
||||
"iai_slash": "Iai Slash",
|
||||
"power_sheathe": "Power Sheathe",
|
||||
"soaring_kick": "Soaring Kick",
|
||||
"spirit_gauge": "Spirit Gauge",
|
||||
"spirit_gauge_autofill": "Spirit Gauge Autofill",
|
||||
"switch_charger": "Switch Charger"
|
||||
}
|
||||
}
|
||||
@@ -586,5 +586,16 @@
|
||||
65280,
|
||||
65519,
|
||||
0
|
||||
]
|
||||
],
|
||||
"weapon_skills": {
|
||||
"amped_state": "Amped State",
|
||||
"axe_heavy_slam": "Axe: Heavy Slam",
|
||||
"harvest_moon": "Harvest Moon",
|
||||
"iai_slash": "Iai Slash",
|
||||
"power_sheathe": "Power Sheathe",
|
||||
"soaring_kick": "Soaring Kick",
|
||||
"spirit_gauge": "Spirit Gauge",
|
||||
"spirit_gauge_autofill": "Spirit Gauge Autofill",
|
||||
"switch_charger": "Switch Charger"
|
||||
}
|
||||
}
|
||||
@@ -582,5 +582,16 @@
|
||||
65280,
|
||||
65519,
|
||||
0
|
||||
]
|
||||
],
|
||||
"weapon_skills": {
|
||||
"amped_state": "Amped State",
|
||||
"axe_heavy_slam": "Axe: Heavy Slam",
|
||||
"harvest_moon": "Harvest Moon",
|
||||
"iai_slash": "Iai Slash",
|
||||
"power_sheathe": "Power Sheathe",
|
||||
"soaring_kick": "Soaring Kick",
|
||||
"spirit_gauge": "Spirit Gauge",
|
||||
"spirit_gauge_autofill": "Spirit Gauge Autofill",
|
||||
"switch_charger": "Switch Charger"
|
||||
}
|
||||
}
|
||||
@@ -586,5 +586,16 @@
|
||||
65280,
|
||||
65519,
|
||||
0
|
||||
]
|
||||
],
|
||||
"weapon_skills": {
|
||||
"amped_state": "Amped State",
|
||||
"axe_heavy_slam": "Axe: Heavy Slam",
|
||||
"harvest_moon": "Harvest Moon",
|
||||
"iai_slash": "Iai Slash",
|
||||
"power_sheathe": "Power Sheathe",
|
||||
"soaring_kick": "Soaring Kick",
|
||||
"spirit_gauge": "Spirit Gauge",
|
||||
"spirit_gauge_autofill": "Spirit Gauge Autofill",
|
||||
"switch_charger": "Switch Charger"
|
||||
}
|
||||
}
|
||||
@@ -586,5 +586,16 @@
|
||||
65280,
|
||||
65519,
|
||||
0
|
||||
]
|
||||
],
|
||||
"weapon_skills": {
|
||||
"amped_state": "Amped State",
|
||||
"axe_heavy_slam": "Axe: Heavy Slam",
|
||||
"harvest_moon": "Harvest Moon",
|
||||
"iai_slash": "Iai Slash",
|
||||
"power_sheathe": "Power Sheathe",
|
||||
"soaring_kick": "Soaring Kick",
|
||||
"spirit_gauge": "Spirit Gauge",
|
||||
"spirit_gauge_autofill": "Spirit Gauge Autofill",
|
||||
"switch_charger": "Switch Charger"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user