-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdps.py
114 lines (109 loc) · 3.78 KB
/
dps.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
from items import white_items
from survivors import *
# class Survivor:
# def __init__(self,
# name,
# base_damage,
# damage_growth_per_level,
# hp,
# hp_growth,
# hp_regen,
# hp_regen_growth,
# armor,
# level,
# ms):
# self.base_damage = base_damage
# self.damage_growth_per_level= damage_growth_per_level
# self.hp = hp
# self.hp_growth = hp_growth
# self.hp_regen = hp_regen
# self.hp_regen_growth = hp_regen_growth
# self.armor = armor
# self.level = level
# self.ms = ms
# class Ability:
# def __init__(self,
# Survivor,
# ability_type,
# proc_coeffecient,
# attack_speed,
# damage_multiplier):
# self.survivor = Survivor
# self.ability_type = ability_type
# self.proc_coefficient = proc_coeffecient
# self.attack_speed = attack_speed
def getBaseDamage(ability, survivor, level):
dps = ability.attack_speed * (survivor.base_damage +
((level-1)*survivor.damage_growth_per_level))
dps = dps + (survivor.critical_chance*2*dps)
return dps
damage = getBaseDamage(commando_double_tap, commando, 2)
print(damage)
# class pc_item:
# def __init__(self,
# name,
# chance,
# stat_list,
# proc_coefficient,
# value,
# value_increase_per_stack,
# scaling_type,
# tag,
# number):
#
# self.name = name
# self.chance = chance
# self.stat_list = stat_list
# self.proc_cofficient = proc_coefficient
# self.value = value
# self.value_increase_per_stack = value_increase_per_stack
# self.scaling_type = scaling_type
# self.tag = tag
# self.number = number
# lens_makers_glasses = pc_item("Lens-Maker's Glasses",
# 'OnAttack',
# ['Critical Chance'],
# None,
# [0.10],
# [0.10],
# ['Linear'],
# ['Damage'])
white_items.lens_makers_glasses.count = 113
def compile_item(item,dps,survivor,ability):
# match item.scalingtype
i = 0
match item.scaling_type[i]:
case 'Linear':
chance = item.count * item.value_increase_per_stack[i]
print('Linear')
case 'Hyperbolic':
m1 = (item.value_increase_per_stack[i] * item.count)
chance = m1/(m1 + 1)
print('Hyperbolic')
case 'Reciprocal':
chance = item.value_increase_per_stack/item.count;
print('Reciprocal')
case 'Reciprocal2':
chance = item.value_increase_per_stack/(item.count+ 1);
print('Reciprocal2')
case 'Exponential':
chance = item.value_increase_per_stack ** item.count;
print('Exponential')
case 'Bandolier':
chance = ((1+item.count) ** 0.33) - 1
print('Bandolier')
match item.name:
case "Lens-Maker's Glasses":
dps = dps + chance * (dps)
print(chance)
print(dps)
case 'Soldier Syringe':
dps = dps * (1+chance)
case 'Tougher Times':
block_chance = chance
print("Block Chance:",block_chance)
return dps
test = compile_item(white_items.lens_makers_glasses, damage, commando, commando_double_tap)
print(test)
# if item.scaling_type == 'Hyperbolic':
# m1 = (item.value_increase_per_stack * item.number)