-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtcweapons.cc
More file actions
80 lines (69 loc) · 2.32 KB
/
tcweapons.cc
File metadata and controls
80 lines (69 loc) · 2.32 KB
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
#include "tcweapons.h"
void Thunderfury::calc_proc()
{
float procThreat = 270.0+92.0+149.0;
float nrTPS = ((float(hasNrdmg)*((16+30)/2.0))/1.9)*modifier;
float rotTPS = (((float(hasSlam)*2)+float(hasRev))*(1/6.0))
*(procThreat*procRate*modifier);
//TPS from rotation procs, SS -> RV -> SA -> SS, rot time is 6 sec
/*
cout << "procThreat: " << procThreat << endl;
cout << "procRate: " << procRate << endl;
cout << "rotTPS: " << rotTPS << endl;
cout << "nrTPS: " << nrTPS << endl;
cout << "hasNR: " << hasNrdmg << endl;
cout << "hasRev: " << hasRev<< endl;
cout << "hasSlam: " << hasSlam << endl;
*/
procTPS = (((procThreat*procRate)*modifier)/speed)
+ nrTPS + rotTPS;
//cout << "procTPS: " << procTPS << endl;
}
void Ironfoe::calc_proc()
{
//extra hits needs to consider crit/AP (NOTE, ONLY extra hits. Otherwise
//consider crit and AP for everything).
float extraHits = 2.0;
float hitDmg = ((73+136)/2.0);
float rotHits = ((((float(hasSlam)*2)+float(hasRev))*(1/6.0))
*procRate*extraHits);
float rotTPS = (rotHits*hitDmg)*modifier;
/*cout << "extraHits: " << extraHits << endl;
cout << "procRate: " << procRate << endl;
cout << "hasRev: " << hasRev<< endl;
cout << "hasSlam: " << hasSlam << endl;
cout << "rotHits: " << rotHits << endl;
*/
procTPS = (((hitDmg*procRate*extraHits)*modifier)/speed)
+ rotTPS;
//cout << "procTPS: " << procTPS << endl;
}
void Viskag::calc_proc()
{
float procDmg = 240.0;
float rotHits = (((float(hasSlam)*2)+float(hasRev))*(1/6.0))
*procRate;
float rotTPS = rotHits*procDmg*modifier;
procTPS = ((procRate*procDmg*modifier)/speed)+rotTPS;
//cout << "procTPS: " << procTPS << endl;
}
void Weapon::calculate_ranges(const vector<int> range)
{
if (range.size() == 0) {
cerr << "Error_calculate_range(): range vector is empty." << endl;
return;
}
pair<int, pair<float,float>> val;
pair<float,float> sec;
calc_proc();
for ( auto it = range.rbegin() ; it != range.rend(); ++it) {
int ra = *it;
float r8 = (((hs8*modifier)/speed)*(ra/100.0))+(dps*modifier)+procTPS;
float r9 = (((hs9*modifier)/speed)*(ra/100.0))+(dps*modifier)+procTPS;
sec.first = r8;
sec.second = r9;
val.first = ra;
val.second = sec;
tpsVec.push_back(val);
}
}