@@ -7,8 +7,8 @@ import math
7
7
import array
8
8
9
9
# Global variables
10
- hit_positions = ["Head" , "Body" , "Arms" , "Legs" , "Hands/Feet" ]
11
- gear_rarity = ["Junk (Dark Gray)" , "Poor (Gray)" , "Common (White)" , "Uncommon (Green)" , "Rare (Blue)" , "Epic (Purple)" , "Legendary (Orange)" , "Unique (Yellow)" ]
10
+ hit_positions : array = ["Head" , "Body" , "Arms" , "Legs" , "Hands/Feet" ]
11
+ gear_rarity : array = ["Junk (Dark Gray)" , "Poor (Gray)" , "Common (White)" , "Uncommon (Green)" , "Rare (Blue)" , "Epic (Purple)" , "Legendary (Orange)" , "Unique (Yellow)" ]
12
12
13
13
phys_damage_weapon_damage : int = 0
14
14
phys_damage_phys_power : float = 0
@@ -77,7 +77,7 @@ def main():
77
77
# Tell imgui to start a new frame
78
78
imgui .new_frame ()
79
79
# Get variables for creating the buttons
80
- window_size = glfw .get_window_size (window )
80
+ window_size : tuple = glfw .get_window_size (window )
81
81
button_width : float = window_size [0 ] / 5 - 10
82
82
83
83
# Render stuff for application
@@ -210,10 +210,10 @@ def phys_damage_window():
210
210
phys_damage_hit_part_selection = hit_part_combo (phys_damage_hit_part_selection )
211
211
imgui .pop_item_width ()
212
212
213
- phys_damage_hit_part_multi = get_hit_part_multiplier (phys_damage_hit_part_selection )
214
- phys_damage_phys_power_perc = phys_damage_phys_power / 100.0
215
- phys_damage_target_pdr_perc = phys_damage_target_pdr / 100.0
216
- phys_damage_armor_pen_perc = phys_damage_armor_pen / 100.0
213
+ phys_damage_hit_part_multi : float = get_hit_part_multiplier (phys_damage_hit_part_selection )
214
+ phys_damage_phys_power_perc : float = phys_damage_phys_power / 100.0
215
+ phys_damage_target_pdr_perc : float = phys_damage_target_pdr / 100.0
216
+ phys_damage_armor_pen_perc : float = phys_damage_armor_pen / 100.0
217
217
218
218
# https://darkanddarker.wiki.spellsandguns.com/Damage_Calculation#Damage_Formula
219
219
phys_damage : float = ( (
@@ -266,10 +266,10 @@ def magic_damage_window():
266
266
magic_damage_hit_part_selection = hit_part_combo (magic_damage_hit_part_selection )
267
267
imgui .pop_item_width ()
268
268
269
- magic_damage_hit_part_multi = get_hit_part_multiplier (magic_damage_hit_part_selection )
270
- magic_damage_magic_power_perc = magic_damage_magic_power / 100.0
271
- magic_damage_target_mdr_perc = magic_damage_target_mdr / 100.0
272
- magic_damage_magic_pen_perc = magic_damage_magic_pen / 100.0
269
+ magic_damage_hit_part_multi : float = get_hit_part_multiplier (magic_damage_hit_part_selection )
270
+ magic_damage_magic_power_perc : float = magic_damage_magic_power / 100.0
271
+ magic_damage_target_mdr_perc : float = magic_damage_target_mdr / 100.0
272
+ magic_damage_magic_pen_perc : float = magic_damage_magic_pen / 100.0
273
273
274
274
# https://darkanddarker.wiki.spellsandguns.com/Damage_Calculation#Damage_Formula
275
275
magic_damage : float = ( (
@@ -442,7 +442,7 @@ def get_total_health(strength: int, vigor: int, max_health_bonus: float, added_h
442
442
443
443
# https://darkanddarker.wiki.spellsandguns.com/Stats#Health_Recovery
444
444
def get_total_health_recovery_bonus (vigor : int ):
445
- health_recovery_bonus = - 55
445
+ health_recovery_bonus : int = - 55
446
446
447
447
while vigor > 86 :
448
448
health_recovery_bonus += 2
@@ -474,7 +474,7 @@ def get_total_health_recovery_bonus(vigor: int):
474
474
# https://darkanddarker.wiki.spellsandguns.com/Stats#Action_Speed
475
475
def get_total_action_speed (agility : int , dexterity : int , action_speed_bonus ):
476
476
action_speed_sum : float = agility * 0.25 + dexterity * 0.75
477
- base_action_speed = - 38.0
477
+ base_action_speed : float = - 38.0
478
478
while action_speed_sum > 50 :
479
479
base_action_speed += 0.5
480
480
action_speed_sum -= 1
@@ -636,7 +636,8 @@ def get_utility_gearscore(rarity: int):
636
636
637
637
638
638
def impl_glfw_init ():
639
- width , height = 520 , 385
639
+ width : int = 520
640
+ height : int = 385
640
641
window_name = "Dark and Darker Util"
641
642
642
643
if not glfw .init ():
0 commit comments