Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Class Mechanics » Druids

Closed Thread
 
LinkBack Thread Tools
Old 10/04/08, 10:28 PM   #2731
Jone
Piston Honda
 
Jone's Avatar
 
Night Elf Druid
 
Proudmoore
What is the base AP of level 83 bosses? We won't need to cover the bonus AP of CoR because FFF is better, so if bosses are similar to vanilla, 2/5 FA ought to cover the full 30% damage reduction.

United States Offline
Old 10/04/08, 11:01 PM   #2732
Promethius
Von Kaiser
 
Tauren Druid
 
Bonechewer
Posted on the beta forums:

I'd hope that the crit damage change is not intentional. Yellow crittable attacks follow the following damage table:

(1-avoided)(1-crit+crit*critmod)

If you were to change crit mod from 2.26 to 2.06, the ratio of the change simplifies to:

(1.06*crit+1)/(1.26*crit+1)

@30% crit, ratio = .9565 => 4.35% dmg nerf
@40% crit, ratio = .9468 => 5.32% dmg nerf
@50% crit, ratio = .9387 => 6.13% dmg nerf
@99% crit, ratio = .9119 => 8.81% dmg nerf

At 44% crit, point for point, on attacks capable of critting, PI is as strong as naturalist. Higher crit rates make PI even more valuable. Pretty much all of a tanking bear's attacks constitute yellow damage and only the lacerate bleed is incapable of critting. Taking away PI from bear is removing a considerable scaling portion of bear threat. Another repercussion is that the talent scales our aoe tanking similarly to a paladin's 1h spec (again point for point). If bear threat is truly considered to be too high, figure out the breakdown of threat in a bear's standard rotation, and reduce mangle and maul threat modifiers/additions instead of trying to gut bear dps/scaling.

I'd find it very ironic that mangle's threat multiplier was increased and PI is deemed to be the overpowering factor (if this is intended) when Blizzard has said that they themselves would prefer that DPS and gear be what scales threat instead of threat modifiers.
Threat's really not a valid reason to nerf the crit bonus portion for bear as increasing the mangle threat modifier to 1.5x then nerfing DPS scaling is completely contradictory to statements Blizzard has made in regards to scaling of threat for other tanks.

The 30% aoe damage reduction, however, is understandably probably too powerful for a tank to have, even if it's only for situational encounters. Thus, I proposed that PI also give a reduction of cooldown on barkskin. The death knight PI equivalent, Guile of Gorefiend, increases Icebound Fortitude duration, a much more powerful ability on the same cooldown length as barkskin, by 50%. A 6/12/18 sec cooldown reduction puts barkskin at a potential 5.7% average damage mitigation at best in comparison to the 4% currently (~43% buff to the ability), which still isn't quite as powerful as the extra 50% duration of IBF (50% buff to a stronger base ability). This makes barkskin a little more like a warrior's shield block or a death knight's anti magic shell rather than a crappy shield wall or divine protection. I don't see how a 42 sec barkskin cooldown would overpower a feral in pvp either, but I could be wrong.

Also, has there been any mention of removing barkskin, shield wall or divine protection from the gcd like IBF, anti magic shell, and shield block? Or is that a discrepancy Blizzard isn't very concerned about?

Offline
Old 10/04/08, 11:06 PM   #2733
teiglin
Piston Honda
 
Human Warrior
 
Eldre'Thalas
Originally Posted by nightcrowler View Post
Who said that I'll go for a 0/71/0 build? I'll probably go for a 0/60/11 build basically taking all needed tanking talents and skipping only imp-mangle and MS as dps talent going for a good HYBRID build. But a 0/60/11 build is what I call an hybrid build not a full bear build. I can dps at 92% of the efficency and tank 98% of the efficiency, I don't call it a "Bear Build".
I guess I misunderstood what you meant when you said "Bear Build" then. However, I certainly don't think a 71 feral build is *better* for bear than the build you linked. Setting aside FA/IW, since their utility depends raid comp, the only useful tanking talent you're missing is imp. mangle, and aside from Primal Tenacity, which is relevant for one fight in sunwell and none I can think of in Naxx (though I could be missing something), there are no talents you could pick up to increase your survivability. Clearly moving points out of Naturalist/OoC and picking up imp. mangle would reduce your threat in all situations, especially in low-rage situations. So your build is better for tanking than any 71-feral "Bear Build" I could come up with. Just because it's also better for cat than that 71 point bear build doesn't mean it's not what I'd call a tanking build.

Offline
Old 10/05/08, 12:54 AM   #2734
tlbj6142
Piston Honda
 
Tauren Druid
 
Steamwheedle Cartel
I'm going to level from 70 to 80 as a mostly solo cat build, but I'm willing to put 3 points into PotP or NR to help with pre-80 5-man tanking. Which one (PotP or NR) provides the most benefit to bear mitigation? 6% dodge or 12% damage reduction?

Offline
Old 10/05/08, 1:21 AM   #2735
halmmar
Piston Honda
 
Tauren Druid
 
<Zen>
Xavius (EU)
Originally Posted by tlbj6142 View Post
Which one (PotP or NR) provides the most benefit to bear mitigation? 6% dodge or 12% damage reduction?
Only PotP offers mitigation. (If damage taken is 100% and dodge without NR is 34%, total damage taken is 58% PotP vs. 60% NR)

Offline
Old 10/05/08, 1:23 AM   #2736
tangedyn
Piston Honda
 
Tauren Druid
 
Thaurissan
Originally Posted by sadris View Post
Quite impressive! I find it interesting, however, that http://elitistjerks.com/918674-post2556.html varies so differently (2800dps). Although, 5000dps in cat form did seem over the top.

Could you please add support for +dmg (sharpening stone, etc)?
I haven't implemented Berserk and Tiger's Fury yet, that is likely to change things around.
I will also implement a combat logger soon so that the results can be audited, also helps with debugging custom written strategies.

There could, of course, be errors in the code for either Nightcrowler's or my simulator. My source code is available for review

+dmg added to my TODO list (it's needed anyway to implement Tiger's Fury)

______
Cat DPS Simulator with customizable strategy

Offline
Old 10/05/08, 2:40 AM   #2737
nightcrowler
Don Flamenco
 
nightcrowler's Avatar
 
Night Elf Druid
 
Runetotem (EU)
Here is my code updated at 9038 build:

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;


/*Set RNG (0,1)*/
double randnum(){
	double r;
	r=(double)rand() / (double)RAND_MAX;
return r;}

/*Create a class for special attacks, Yes I know, It's only to give variables cool names :P*/
class attack{
public:
	int energy; //energy use of ability
	double adamage; //attack power scaling component of damage
	double acritdamage; //attack power scaling component of damage (critical damage)
	double bdamage; //fixed component of damage
	double bcritdamage; //fixed component of damage (critical damage)
	double miss; //miss chance of the ability
	double hit; //hit chance of the ability
	double crit; //crit chance of the ability
	double glance; //glancing blow for the ability
};

class bearattack{
public:
	int rage; //rage use of ability
	int ragec; //rage for crits
	double adamage; //attack power scaling component of damage
	double acritdamage; //attack power scaling component of damage (critical damage)
	double bdamage; //fixed component of damage
	double bcritdamage; //fixed component of damage (critical damage)
	double miss; //miss chance of the ability
	double hit; //hit chance of the ability
	double crit; //crit chance of the ability
	double glance; //glancing blow for the ability

};

class bossattack{
public:
	double damage; //Boss special damage total if istant or x tick if is a dot
	double cd; //boss physical special damage cooldown in seconds.
	double tick_numb; //set 0 if it's an istant or set to the total number of ticks otherwise
	double tick_time; // set to 1 if is an istant, set to the number of ticks otherwise
	double bleed; // set to 1 if it's a bleed.
	double magic; //set to 1 if it's magic.
	double crit; //crit chance of the ability
	double miss; //miss chance of the ability
	double hit; //hit chance of the ability	
};


/*/
 /*main*/

int main (int argc, char * const argv[]) {
	
	
	//Set ability-cycle----------------------------
	
	int cat_bear=1; //set to 1 for cat, to 0 for bear.
	
	int lag=10; //Latency in 0.01 seconds
	int powershift=0;//Switch to 1 to enable powershifting, 0 otherwise.
	int mana_cost=0; //Switch to 1 if you want to care of mana cost for powershifting, set to 0 otherwise.
	
	int sr_t=4; //Savage Roar combo points, set to 10 if you don't use it
	int rip_t=5; //Rip combo points, set to 10 if you don't use it.
	int fb_t=5; //Ferocious Bite combo points, set to 10 if you don't use it.
	int rk=1; //set to 1 if you use rake to keep the target bleeding.
	
	int doublecycle=1; //set to 1 if you want to use SR every 2 cycle, set to 0 if you want to use it every cycle.
	
	int shred_num=1; //minimum number of attacks before SR
	
	int infinite_rage=1; //set to 1 for infinite rage scenario
	
	int mangle_only=0; //set to 1 if you don't want to use shred.
	
	int bleeding=0; //The target is bleeding.
	int manglebot=0; //Switch to 1 if you have a mangle bot taking mangle always up.
	
	int pw_t=11+(int)(lag/10.0); //powershift ts for shred
	
	double BEHIND=cat_bear; //put to 1 if you are attacking from behind.
	
	//-----------------------------------------------
	
	//Simulation timer----------------------
	int sim_time=60000; //each step is 0.01 seconds.
	int sample_fight=1000; //number of fights to sample.

	//----------------------------------
	
	//Set Equipment-------------------------------------
	
	int equip=cat_bear; //1 for cat equip, 0 for bear equip
	int talents=cat_bear; //1 for cat equip, 0 for bear equip
	
	int m_g=1; //set to 1 if you have the mangle glyph, 0 otherwise.
	int rip_g=1; //set to 1 if you have rip glyph, 0 otherwise.
	int twoT7=1; //Your Rip lasts for an additional 3 seconds, and your Lacerate deals an additional 5% damage.
	int fourT7=1; // Increases the duration of Berserk by 3 seconds.
	
	//Ratings
	double haste_rating=149;
	double crit_rating=654;
	double hit_rating=293;
	double expertise_rating=245;
	//double armor_pen_rating=0;
	double armor_pen_rating=58;
	double agi=955;
	double str=282;
	double attack_power=1596+111+166; //manually added trinkets bonuses.
	double feral_ap=2084;
	double wep_dmg=14; //weapon damage
	
	double defense_rating=0;
	double dodge_rating=0;
	double myarmor=3394;  //armor contribution from items
	double armor_bonus=0; //bonus armor from patch, etc..
	double stamina=1081;
	double mybasehp=4513;
	double bonus_hp=0;
	
	double spirit=175;
	double intellect=159;
	
	int META=1;//+3% crit damage metagem
	int META_ARMOR=0; // +2% armor contribution from items meta-gem
	int IDOL_WS=0; //+21 to rip
	int IDOL_SHRED=1; //+203 damage to shred
	
	////Trinkets
	int trinket1=0;
	int trinket1_on_use=1;
	int trinket1_ap=670;
	int trinket1_cd=120*100;
	int trinket1_cd_timer=0;
	int trinket1_timer_cd=20*100;
	int trinket1_timer=0;
	int trinket1_proc_perc_att=0;
	int trinket1_proc_perc_crit=0;
	
	int trinket2=0;
	int trinket2_on_use=0;
	int trinket2_ap=1000;
	int trinket2_cd=45*100;
	int trinket2_cd_timer=0;
	int trinket2_timer_cd=10*100;
	int trinket2_timer=0;
	int trinket2_proc_perc_att=0;
	int trinket2_proc_perc_crit=0.1;	
	
	
	
	/*Talents*/
	
	double ferocity_t = 5; //ferocity 0-5
	int s_att_t = 2; //shreding attack 0-2
	double precision_t = 2; //precision 0-2
	double fury_t = 2; //fury 0-2
	double pistinct_t = 3; //predatory istinct 0-3
	int impmangle_t= 3; //improved mangle 0-3
	double ret_t = 5; // Rend & Tear 0-5
	double mss_t = 2; // Master ShapeShifter 0-2
	double sof_t=3; // Survival of the fitness 0-3
	double naturalist_t=5; // Naturalist 0-5
	int omen=1; //Omen of clarity
	
	double feral_inst_t=0; //Feral Instinct 0-3
	double th_t=0; //Thick Hide 0-3
	double pop_t=0; //Protector of the Pack 0-3
	double fw_t=2; //Feral Swiftness 0-2
	double nr_t=0; //Natural Reaction 0-3
	
	if(equip==0){
		//Ratings
		haste_rating=130;
		crit_rating=326;
		hit_rating=52;
		expertise_rating=135;
		armor_pen_rating=83;
		agi=842;
		str=359;
		attack_power=1058;
		feral_ap=1845;
		wep_dmg=14; //weapon damage
		
		defense_rating=62;
		dodge_rating=53;
		myarmor=6040;  //armor contribution from items
		armor_bonus=440; //bonus armor from patch, etc..
		stamina=1581;
		mybasehp=4513;
		bonus_hp=650;
		
		spirit=175;
		intellect=159;
		
		META=0;//+3% crit damage metagem
		META_ARMOR=1; // +2% armor contribution from items meta-gem
		twoT7=1; //Your Rip lasts for an additional 3 seconds, and your Lacerate deals an additional 5% damage.
		fourT7=1; // Increases the duration of Barkskin by 3 seconds.
	}
	if(talents==0){
		
		/*Talents*/
		
		ferocity_t = 0;//0; //ferocity 0-5
		s_att_t = 2; //shreding attack 0-2
		precision_t = 2; //precision 0-2
		fury_t = 2; //fury 0-2
		pistinct_t = 3; //predatory istinct 0-3
		impmangle_t= 0; //improved mangle 0-3
		ret_t = 5; // Rend & Tear 0-5
		mss_t = 0; // Master ShapeShifter 0-2
		sof_t=3; // Survival of the fitness 0-3
		naturalist_t=5; // Naturalist 0-5
		omen=1; //Omen of clarity
		
		
		feral_inst_t=3; //Feral Instinct 0-3
		th_t=3; //Thick Hide 0-3
		pop_t=3; //Protector of the Pack 0-3
		fw_t=2; //Feral Swiftness 0-2
		nr_t=3; //Natural Reaction 0-3
		
		m_g=0; //set to 1 if you have the mangle glyph, 0 otherwise.
		rip_g=1; //set to 1 if you have rip glyph, 0 otherwise.
	}
	
	
	//--------------Other goodies---------------------------------
	
	//Racials & Base stats.
	double base_crit = 0.054+0.05+0.06; // Base crit chance + Leader of the Pack + Sharpened Claws.
	double base_dodge = 0.04951; //Base dodge.
	double NE=1; //turn to 0 if you are a tauren
	double base_agi = 87; //Base agility NightElf Value

	
	//Glyphs
	int mangle_glyph=6; //increase duration of mangle debuff by 6 seconds.
	int rip_glyph=4; //Increse duration of rip by 3 seconds, additional damage not yet implemented.
	
	
	
	
	
	//Boss Stats---------------------------------------
	double armor=10900; //boss base armor: 10900 high armored bosses, 9000 low armored bosses;
	/*Base Combat Table*/
	double miss=0.09; /*Base miss chance vs lvl 83 mobs*/
	double dodge=0.065; /*Base dodge chance of a lvl 83 mobs*/
	double parry=0.1375; /*Supposed boss parry chance is 10.6%*/
	double glance=0.2335773; /*Glancing Blow Chance, afflicts only white attacks*/
	double glance_red=0.70; //glancing damage multiplier
	double crit_red=0.042; //Crit reduction against bosses
	double dodge_red=0.006; //Tank dodge reduction vs. a boss.
	
	double boss_swing=2.0; //Boss swing time in seconds	
		
	parry=parry*(1-BEHIND);
	
	//Raid buffs--------------------------------------------
	
	
	int wf_haste=20; //+20% haste by windfury
	int wf=1; // set to 1 if there is windfury, set to 0 otherwise.
	int moonkin_haste=2;
	int moonkin=1;
	
	int bloodlust=1;
	int bloodlust_haste=30;
	int bloodlust_cd=30000;
	int bloodlust_cd_timer=4000;
	int bloodlust_timer=0;
	int bloodlust_up=0;
	
	
	int BOK=1; //Blessing of Kings
	int TSA=1; //True shoot aura
	int BS=1; //Battle Shout
	int BOW=1;//Blessing of Wisdom
	int SOE=1; //strenght of earth totem
	int MOW=1; // mark of the wild
	int AI=1; //Arcane Intellect
	int DS=1; //Divine Spirit
	int RA=1; //Retribution Aura
	int TOW=1; //Totem of Wrath
	int INSECT=1; //Insect Swarm
	int FORTITUDO=1; // Powerword Fortitudo
	int BATTERY=1; //Hunting Party mana battery.
	int CS=1; //Commanding Shout
	int SANCTUARY=1; //Blessing of sanctuary +3% dmg reduction
	int INSPIRATION=0; //+25% armor for 15 sec.
	double INSP_UP_TIME=0.5; //Inspiration average up_time
	int DA=1; // devotion aura
	
	int DRUMS_HASTE=1; //If you use drums haste
	int drums_haste_rating=95;
	int drums_cd=12000;
	int drums_timer=0;
	int drums_cd_timer=4000;
	
	int FF=1; //Using fairie fire
	int SA=1; //using 5 sunder armor
	
	
	//Setting Initial Value for the simulation----------------------------------------
	
	
	/*RNG seed*/
	srand((unsigned)time(0));
	
	
	/*Standard Value*/
	double base_paw=54.857+wep_dmg; /*Base Paw Damage*/
	
	/*Haste*/
	double haste=haste_rating/32.78998947/100; //Round the value. Value in 1/100 of seconds.
	
	
	vector <double> dps_vector;
	
	double dmg=0; //damage
	double wdamage=0; //white damage
	double wdamage_sr=0;
	double ydamage=0; //yellow damage
	double damage2=0;
	double wdamage2=0;
	double ydamage2=0;
	double damagemax=0;
	double damagemin=1.e30;
	double mangle_damage=0;
	double mangle_damage_tot=0;
	double shred_damage=0;
	double shred_damage_tot=0;
	double rip_damage=0;
	double rip_damage_tot=0;
	double fb_damage=0;
	double fb_damage_tot=0;
	double rake_damage=0;
	double rake_damage_tot=0;
	double sr_damage=0;
	double mangle_damage2=0;
	double mangle_damage_tot2=0;
	double shred_damage2=0;
	double shred_damage_tot2=0;
	double rip_damage2=0;
	double rip_damage_tot2=0;
	double sr_damage2=0;
	double fb_damage2=0;
	double fb_damage_tot2=0;
	double rake_damage2=0;
	double rake_damage_tot2=0;
	double wdamage_sr2=0;
	double wbdamage=0;
	double wbdamage2=0;
	double mangleb_damage=0;
	double mangleb_damage2=0;
	double maul_damage=0;
	double maul_damage2=0;
	double lacerate_damage=0;
	double lacerate_damage2=0;
	double swipe_damage=0;
	double swipe_damage2=0;
	double bear_damage=0;
	double bear_damage2=0;
	double ybdamage=0;
	double ybdamage2=0;
	
	int shrednum=0;
	double shredxcycle=0;
	double avshred=0;
	int manglenum=0;
	double manglexcycle=0;
	double avmangle=0;
	int rakenum=0;
	double rakexcycle=0;
	double avrake=0;
	int fbnum=0;
	double fbxcycle=0;
	double avfb=0;
	int ripnum=0;
	double ripxcycle=0;
	double avrip=0;
	
	int manglebnum=0;
	double manglebxcycle=0;
	double avmangleb=0;
	int laceratenum=0;
	double laceratexcycle=0;
	double avlacerate=0;
	int maulnum=0;
	double maulxcycle=0;
	double avmaul=0;
	int swipenum=0;
	double swipexcycle=0;
	double avswipe=0;
	
	int avgfbenergy=0;
	
	
	
	
	double th_m=0.01+th_t*0.03;
	
	double naturalist_m=0.02*naturalist_t;
	double sof_m=0.02*sof_t;
	double pop_m=0.04*pop_t;
	double pop_m2=0.02*pop_t;
	double fw_m=0.02*fw_t;
	double nr_m=0.02*nr_t;
	
	
	//--------------Stats computing-------------------------
	
	agi=(int)((agi+SOE*178+MOW*52)*(1+BOK*0.1)*(1+sof_m)); // Blessing of King + Strengh of Earth + Gift of the wild + Survival of the fitness.
	str=(int)((str+SOE*178+MOW*52)*(1+BOK*0.1)*(1+sof_m)); // Blessing of King + Strengh of Earth + Gift of the wild + Survival of the fitness.
	spirit=(int)((1+BOK*0.1)*(1+sof_m)*(spirit+DS*80+MOW*52)); //Blessing of king + Gift of the Wild + Divine Spirit + Survival of the fitness.
	intellect=(int)((1+BOK*0.1)*(1+sof_m)*1.2*(intellect+AI*60+MOW*52)); //Blessing of king + Gift of the Wild + Arcane Intellect + Survival of the fitness.
	stamina=(int)((1+BOK*0.1)*(1+sof_m)*(stamina+MOW*52+215*FORTITUDO)); //Blessing of king + Gift of the Wild + Power Word: Fortitudo + Survival of the fitness.
	
	
	int speed=(int)(100.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste))); //autoattack speed
	
	/*compute talent modifier to ability*/
	
	double ferocity_m = 0.03*ferocity_t;
	int s_att_m=9*s_att_t;
	double precision_m1=5*precision_t;
	double precision_m2=0.4*precision_t;
	double fury_m = 0.1*fury_t;
	double pistinct_m=0.01+0.03*pistinct_t;
	int impmangle_m=2*impmangle_t;
	double ret_m1 = 0.04*ret_t;
	double ret_m2 = 0.1*ret_t;
	double mss_m = 0.02*mss_t;
	
	int s_att_m2=2*s_att_t;
	double impmangle_m2=0.5*impmangle_t;
	double feral_inst_m=0.1*feral_inst_t;
	
	
	
	/*Base Stats*/
	int apbase=(120+140+(attack_power+feral_ap*1.2+688*BS)+(agi+2*str))*(1+naturalist_m)*(1+TSA*0.1); /*Attack Power*/
	double mana=(double)((int)(3430+intellect*10)); /*Mana*/
	double mp5= BOW*91+0.0125*mana*BATTERY; // Blessing of Wisdom + 1 mana battery
	double shifting_cost=(int)(3430*0.35*0.70); //base mana + shifting cost + talents
	double mp5_out=mp5+((0.001+spirit*0.005575*(sqrt(intellect)))*5); /*Mana regeneration*/
	double mp5_in=mp5; /*Mana regeneration*/
	
	
	double crit=base_crit+(crit_rating/45.90598679/100) + (agi/83.33333333/100) +mss_m +TOW*0.03; /*Critical hit chance with Master Shapeshifter*/
	double hit=(hit_rating / 32.78998947 / 100); /*Hit percent*/
	double expertise=precision_m1+(int)(4*(expertise_rating / 32.78998947)); /*Expertise value*/
	double weapon=base_paw; /*Weapon*/
	double dumb_armor=armor;
	double oom2=0;
	
	
	double armor_pen=(armor_pen_rating/(100*15.3952999));
	armor=(1-armor_pen)*(armor-1260.0*FF-3925.0*SA);
	
	double red=(armor / (armor + 15232.5)); /*Boss damage reduction based on boss armor (30% is about the usual numbers after 5 sunder and Fairie Fire)*/
	
	//cout << mana << endl;
	
	/*Initial values and timers*/
	int bdebuff_up=0; //bleed debuff uptime
	int mdebuff_up=0; //mangle debuff uptime
	int pw=0; //numbers of powershifts
	double ap = apbase; //attack power value
	int timer2=0;
	int timer=0; //time
	int en=80; //initial energy
	int cp=sr_t; //combo points
	double mdebuff=0; //mangle debuff switch
	int mdebuff_timer=0; //mangle debuff timer
	int mdebuff_cd=12+mangle_glyph*m_g; //mangle debuff initial timer value
	double att; //dumb variable with the attack roll value
	double damage; //total damage
	double bdebuff=0; //bleed debuff switch
	int bdebuff_timer=0; //bleed debuff timer
	int rip_timer=0; //rip timer
	int rake_timer=0;
	double ooc_rate=3.5/60; // Omen of clarity proc chanche (6%)
	double ooc_bear_rate=3.5*2.5/60; // Omen of clarity proc chanche (bear, 14.5%)
	int ooc_proc=0; // omen of clarity switch (1 = proccing)
	int koj_timer=0; // tiger fury timer
	int koj_cd=30; // tiger fury cooldown
	int koj_step=6; // tiger fury timer
	double koj_damage=131.0; //tiger fury added damage
	double koj=0; // tiger fury switch
	int sr=0; // savage roar switch
	int sr_timer=0; // savage roar timer
	int gcd=0; //Global cooldown
	int sr_up=0; //Savage Roar Up-Time
	int cycle=cat_bear; //ability switch
	int cycle_time=0; //cycle time counter
	int outfivesec=0;
	int bmana=mana; //initial mana value
	int rage_tot=0; //total rage
	
	int ap_rip=ap;
	int ap_rake=ap;
	int cp_rip=cp;
	int rem=0;
	int lem=0;
	int rkem=0;
	
	int mang_rip=0;
	
	
	int l_stack=0;
	int l_timer=0;
	int l_cd=15;
	int enrage_cd=60;
	int enrage_step=10; //+20 rage over 10 seconds.
	int enrage_timer=0;
	int enrage_buff=0;
	int enraged_l=0;
	double enrage_mod=0.15;
	
	double threat=0;
	double threat2=0;
	int lacerate_aggro=809;
	double lacerate_aggro_mod=0.5;
	int maul_aggro=644;
	double mangleb_aggro_mod=1.5;
	double bear_aggro_mod=2.071428571;
	double cat_aggro_mod=0.71;
	double swipe_aggro_mod=1.0;
	
	double bmangle_cd=(6-impmangle_m2);
	

	//Modified combat table white damage-----------------------------------
	
	crit-=crit_red;
	
	miss-=hit;
	if(miss<0){
		miss=0;
	}
	dodge-=expertise*0.0025;
	if(dodge<0){
		dodge=0;
	}
	
	parry-=expertise*0.0025;
	if(parry<0){
		parry=0;
	}
	
	
	
	double wcrit=crit;
	double wmiss=miss+dodge+parry;
	double wglance=glance;
	double wnhit=1-crit-wmiss-wglance;
	if(wnhit<=0){
		wnhit=0;
	}
	
	/*Modified combat table yellow damage, 2 roll system pre-calculated to avoid using 2 RNG*/
	double ymiss=miss+dodge+parry;
	double yhitted=1-ymiss;
	double ycrit=yhitted*crit;
	double yhit=yhitted-ycrit;
	
	
	//Ability damage----------------------------------------
	
	attack paw, mangle, shred, rake, rip, fb;
	/*paw*/
	paw.energy=0;
	paw.adamage=(1-red)*(ap/14)*(1+naturalist_m);
	paw.bdamage=(1-red)*(weapon)*(1+naturalist_m);
	paw.acritdamage=paw.adamage*2*(1+pistinct_m)*(1+META*0.03);
	paw.bcritdamage=paw.bdamage*2*(1+pistinct_m)*(1+META*0.03);
	paw.miss=wmiss;
	paw.hit=wnhit;
	paw.crit=wcrit;
	paw.glance=wglance;
	
	//mangle
	mangle.energy=40-impmangle_m;
	mangle.adamage=(1-red)*((ap/14)*2.0)*(1+fury_m)*(1+naturalist_m);
	mangle.acritdamage=mangle.adamage*2*(1+pistinct_m)*(1+META*0.03);
	mangle.bdamage=(1-red)*((weapon)*2.0+634)*(1+fury_m)*(1+naturalist_m);
	mangle.bcritdamage=mangle.bdamage*2*(1+pistinct_m)*(1+META*0.03);
	mangle.miss=ymiss;
	mangle.crit=ycrit;
	mangle.hit=yhit;
	mangle.glance=0;
	
	//shred
	
	shred.energy=60-s_att_m;
	shred.adamage=(1-red)*((ap/14)*2.25)*(1+naturalist_m);//*(1+mdebuff*0.3)*(1+bdebuff*ret_m1);
	shred.acritdamage=shred.adamage*2*(1+pistinct_m)*(1+META*0.03);
	shred.bdamage=(1-red)*((weapon)*2.25+742.5+IDOL_SHRED*203.0)*(1+naturalist_m);//*(1+mdebuff*0.3)*(1+bdebuff*ret_m1);
	shred.bcritdamage=shred.bdamage*2*(1+pistinct_m)*(1+META*0.03);
	shred.miss=ymiss;
	shred.crit=ycrit;
	shred.hit=yhit;
	shred.glance=0;

	
	//rake
	
	rake.energy=35;
	rake.adamage=((ap*0.01))*(1+fury_m)*(1+naturalist_m);//*(1+mdebuff*0.3);
	rake.acritdamage=(2*(1+pistinct_m)*(1+META*0.03)*((ap*0.01))*(1+fury_m)*(1+naturalist_m));//*(1+mdebuff*0.3);
	rake.bdamage=(190)*(1+fury_m)*(1+naturalist_m);//*(1+mdebuff*0.3);
	rake.bcritdamage=(2*(1+pistinct_m)*(1+META*0.03)*(190)*(1+fury_m)*(1+naturalist_m));//*(1+mdebuff*0.3);
	rake.miss=ymiss;
	rake.crit=ycrit;
	rake.hit=yhit;	
	shred.glance=0;

	
	
	//RIP
	rip.energy=30;
	rip.adamage=((ap)*0.01*cp)*6*(1+naturalist_m);//*(1+mdebuff*0.3);
	rip.acritdamage=rip.adamage;
	rip.bdamage=(39+IDOL_WS*21.0+99*cp)*6*(1+naturalist_m);//*(1+mdebuff*0.3);
	rip.bcritdamage=rip.bdamage;
	rip.crit=0;
	rip.hit=yhitted;
	rip.miss=ymiss;
	rip.glance=0;


	
	//fb
	
	fb.energy=35;
	fb.adamage=(1-red)*((0.07*ap)*cp+(ap*0.002439)*(en-fb.energy))*(1+naturalist_m)*(1+ferocity_m);
	fb.acritdamage=fb.adamage*2*(1+pistinct_m)*(1+META*0.03);
	fb.bdamage=(1-red)*(190+290*cp+(9.4)*(en-fb.energy))*(1+naturalist_m)*(1+ferocity_m);
	fb.bcritdamage=fb.bdamage*2*(1+pistinct_m)*(1+META*0.03);
		
	fb.crit=yhitted*(crit+ret_m2);
	fb.hit=yhitted-fb.crit;
	
	if((crit+ret_m2)>=1){
		fb.crit=yhitted;
		fb.hit=0;
	}
	
	fb.miss=ymiss;
	fb.glance=0;
	
	//Savage Roar
	int sr_energy=25;
	double src=0.40; //Savage Roar Coefficient

	
	
	int 	wait_energy=mangle.energy+(shred.energy-(shred.energy-rake.energy)*rk)+sr_energy-20-2*((int)(lag/10.0));//initial energy
	
	/*Bear Attacks*/
	int ap_bear=(120+240+(attack_power+feral_ap*1.2+688*BS)+(2*str))*(1+TSA*0.1)*(1+pop_m2);
	//cout << ap_bear << endl;
	double hit_factor=3.5;
	double hit_factor_c=7;
	double rage_conv=0.0091107836*80*80 +3.225598133*80+4.2652911;
	int claw_speed=(int)(250.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste)));
	
	bearattack mangleb, maul, swipe, lacerate, claw;
	
	wcrit-=mss_m;
	mangleb.rage=15;
	mangleb.ragec=10;
	mangleb.adamage=(1-red)*((ap_bear/14)*2.5*1.15)*(1+fury_m)*(1+naturalist_m)*(1+mss_m);
	mangleb.acritdamage=mangleb.adamage*2*(1+META*0.03);
	mangleb.bdamage=(1-red)*((weapon)*2.5*1.15+299)*(1+fury_m)*(1+naturalist_m)*(1+mss_m);
	mangleb.bcritdamage=mangleb.bdamage*2*(1+META*0.03);
	mangleb.miss=ymiss;
	mangleb.crit=ycrit;
	mangleb.hit=yhit;
	mangleb.glance=0;
	
	////cout << mangleb.adamage+mangleb.bdamage << endl;
	////cout << mangleb.acritdamage+mangleb.bcritdamage << endl;
	
	maul.rage=10;
	maul.ragec=5;
	maul.adamage=(1-red)*((ap_bear/14)*2.5)*(1+fury_m)*(1+naturalist_m)*(1+mss_m);//(1+bdebuff*ret_m1)
	maul.acritdamage=maul.adamage*2*(1+META*0.03);
	maul.bdamage=(1-red)*((weapon)*2.5+578)*(1+fury_m)*(1+naturalist_m)*(1+mss_m);//(1+bdebuff*ret_m1)
	maul.bcritdamage=maul.bdamage*2*(1+META*0.03);
	maul.miss=ymiss;
	maul.crit=ycrit;
	maul.hit=yhit;
	maul.glance=0;
	
	////cout << maul.adamage+maul.bdamage << endl;
	////cout << maul.acritdamage+maul.bcritdamage << endl;
	
	swipe.rage=15;
	swipe.ragec=10;
	swipe.adamage=(1-red)*(ap_bear*0.07)*(1+naturalist_m)*(1+mss_m)*(1+feral_inst_m);
	swipe.acritdamage=swipe.adamage*2*(1+META*0.03);
	swipe.bdamage=(1-red)*(108)*(1+naturalist_m)*(1+mss_m)*(1+feral_inst_m);
	swipe.bcritdamage=swipe.bdamage*2*(1+META*0.03);
	swipe.miss=ymiss;
	swipe.crit=ycrit;
	swipe.hit=yhit;
	swipe.glance=0;
	
	////cout << swipe.adamage+swipe.bdamage << endl;
	////cout << swipe.acritdamage+swipe.bcritdamage << endl;
	////l_stack=1;
	
	lacerate.rage=15-s_att_m2;
	lacerate.ragec=10-s_att_m2;
	lacerate.adamage=(1+twoT7*0.05)*(ap_bear*0.05)*(1+naturalist_m)*(l_stack)*(1+mss_m);
	lacerate.acritdamage=lacerate.adamage;
	lacerate.bdamage=(1+twoT7*0.05)*(88)*(1+naturalist_m)*(1+mss_m)+320*(1+naturalist_m)*(l_stack)*(1+mss_m);
	lacerate.bcritdamage=(1+twoT7*0.05)*(88)*(1+naturalist_m)*(1+mss_m)*2*(1+META*0.03)*(1+mss_m)+320*(1+naturalist_m)*(1+mss_m)*(l_stack);
	lacerate.miss=ymiss;
	lacerate.crit=ycrit;
	lacerate.hit=yhit;
	lacerate.glance=0;
	
	////cout << lacerate.adamage+lacerate.bdamage << endl;
	////cout << lacerate.acritdamage+lacerate.bcritdamage << endl;
	
	claw.adamage=(1-red)*((ap_bear/14)*2.5)*(1+naturalist_m)*(1+mss_m);
	claw.acritdamage=claw.adamage*2*(1+META*0.03);
	claw.bdamage=(1-red)*((weapon)*2.5)*(1+naturalist_m)*(1+mss_m);
	claw.bcritdamage=claw.bdamage*2*(1+META*0.03);
	
	claw.rage=(int)(-(7.5*((claw.adamage+claw.bdamage)/rage_conv)+hit_factor*2.5)/2);
	claw.ragec=(int)(-(7.5*((claw.acritdamage+claw.bcritdamage)/rage_conv)+hit_factor_c*2.5+5)/2);
	
	claw.miss=wmiss;
	claw.hit=wnhit;
	claw.crit=wcrit;
	claw.glance=wglance;
	
	
	////cout << claw_speed << endl;
	////cout << rage_conv << endl;
	////cout << claw.rage << endl;
	////cout << claw.ragec << endl;
	
	////cout << claw.adamage+claw.bdamage << endl;
	////cout << claw.acritdamage+claw.bcritdamage << endl;
	
	
	infinite_rage=infinite_rage*(1-cat_bear);
	
	
	
	/*Defencive stats*/
	int myarmor_caster=2*agi+myarmor*(1+0.02*META_ARMOR)+armor_bonus+DA*1015+MOW*1050;
	int myarmor_bear=2*agi+myarmor*(1+0.02*META_ARMOR)*4.7*(1+th_m)+armor_bonus+DA*1015+MOW*1050;
	double defense=400+(double)((int)(defense_rating/4.918498039));
	double dodge_app_base_agi= (base_agi/41.66666667);
	double dodge_app = (dodge_rating/39.34798813) +((defense-400)/25) + ((agi-base_agi)/41.66666667);;
	double dodge_fact = 116.890707;
	double dodge_from_rat= dodge_app_base_agi + (1/( 1/dodge_fact + 0.972/dodge_app));
	double mydodge=-dodge_red+base_dodge+0.01*(dodge_from_rat)+fw_m;
	double mydodge_bear=-dodge_red+base_dodge+0.01*(dodge_from_rat)+fw_m+nr_m;
	double mymiss=0.01*((defense-400)/25)+0.02*NE+0.03*INSECT+0.044;
	double tobecrit=0.056-((defense-400)/25)-sof_m;
	if(tobecrit<=0){
		tobecrit=0;
	}
	double mydr= 1-(1-0.03*SANCTUARY)*(1-(((myarmor_caster / (myarmor_caster + 400 + 85 * (83 + 4.5 * (83 - 59)))))*(1-INSP_UP_TIME)+((((1+0.25*INSPIRATION)*myarmor_caster) / (((1+0.25*INSPIRATION)*myarmor_caster) + 400 + 85 * (83 + 4.5 * (83 - 59)))))*(INSP_UP_TIME)));
	double mydr_bear= 1-(1-0.03*SANCTUARY)*(1-pop_m)*(1-(((myarmor_bear / (myarmor_bear + 400 + 85 * (83 + 4.5 * (83 - 59)))))*(1-INSP_UP_TIME)+((((1+0.25*INSPIRATION)*myarmor_bear) / (((1+0.25*INSPIRATION)*myarmor_bear) + 400 + 85 * (83 + 4.5 * (83 - 59)))))*(INSP_UP_TIME)));
	int myhp_caster=mybasehp+10*stamina+CS*2818+bonus_hp;
	int myhp_bear=mybasehp+10*stamina*1.25*1.20+CS*2818+bonus_hp;
	double avoidance=mymiss+mydodge;
	double avoidance_bear=mymiss+mydodge_bear;
	
	
	int ripvsfb=0;
	if(cat_bear==1){
	/*Ferocious Bite vs. RIP*/
	
	
	
	cout << endl << endl <<  "Ferocious Bite vs RIP, mob IS BLEEDING" << endl << endl;
	
	bdebuff=1;
	fb.crit=yhitted*(crit+ret_m2*bdebuff);
	fb.hit=yhitted-fb.crit;
	
	if((crit+ret_m2)>=1){
		fb.crit=yhitted;
		fb.hit=0;
	}
	
	
	for(int rip_ticker=1; rip_ticker<=((12+rip_g*rip_glyph+twoT7*3)/2); rip_ticker++){
		ripvsfb=fb.energy+((((rip.hit*(ap*0.39*(1+src)+4329)*(rip_ticker*2.0)/(12.0)))) + ((1.0*(fb.energy-rip.energy))*((1-red)*(((ap/14.0)*2.25)*(1+src)+(weapon*2.25+742.5))*(1+ret_m1*bdebuff)*1.3*(shred.hit+shred.crit*2*(1+pistinct_m)*(1+META*0.03)))/(1.0*shred.energy)) - ((1-red)*(1+ferocity_m)*(0.35*(1+src)*ap+ 1640)*(fb.hit+fb.crit*2*(1+pistinct_m)*(1+META*0.03)))) /(((1-red)*(1+ferocity_m)*(ap*(1+src)*0.002439+9.4)*(fb.hit+fb.crit*2*(1+pistinct_m)*(1+META*0.03)) - (((1-red)*(((ap/14.0)*2.25)*(1+src)+(weapon*2.25+742.5))*(1+ret_m1*bdebuff)*1.3*(shred.hit+shred.crit*2*(1+pistinct_m)*(1+META*0.03)))/(1.0*shred.energy))));
		if(ripvsfb>=100){
			cout << "Use Ferocious Bite for any energy value, Rip ticks: " << rip_ticker << ", Rip debuff counter: " << (12+rip_g*rip_glyph+twoT7*3)-rip_ticker*2 << endl;
		}
		else if(ripvsfb>=35){
			cout << "Use Ferocious Bite if you have less than: " << ripvsfb << " energy, Rip ticks: " << rip_ticker << ", Rip debuff counter: " << (12+rip_g*rip_glyph+twoT7*3)-rip_ticker*2 << endl;
		}
		else{
			cout << "Use RIP, ticks: " << rip_ticker << ", Rip debuff counter: " << (12+rip_g*rip_glyph+twoT7*3)-rip_ticker*2 << endl;
		}
		
	}
	
	
	cout << endl << endl <<"Ferocious Bite vs RIP, mob is NOT BLEEDING" << endl << endl;
	
	bdebuff=0;
	fb.crit=yhitted*(crit+ret_m2*bdebuff);
	fb.hit=yhitted-fb.crit;
	
	if((crit+ret_m2)>=1){
		fb.crit=yhitted;
		fb.hit=0;
	}

	for(int rip_ticker=1; rip_ticker<=((12+rip_g*rip_glyph+twoT7*3)/2); rip_ticker++){
	ripvsfb=fb.energy+((((rip.hit*(ap*0.39*(1+src)+4329)*(rip_ticker*2.0)/(12.0)))) + ((1.0*(fb.energy-rip.energy))*((1-red)*(((ap/14.0)*2.25)*(1+src)+(weapon*2.25+742.5))*(1+ret_m1*bdebuff)*1.3*(shred.hit+shred.crit*2*(1+pistinct_m)*(1+META*0.03)))/(1.0*shred.energy)) - ((1-red)*(1+ferocity_m)*(0.35*(1+src)*ap+ 1640)*(fb.hit+fb.crit*2*(1+pistinct_m)*(1+META*0.03)))) /(((1-red)*(1+ferocity_m)*(ap*(1+src)*0.002439+9.4)*(fb.hit+fb.crit*2*(1+pistinct_m)*(1+META*0.03)) - (((1-red)*(((ap/14.0)*2.25)*(1+src)+(weapon*2.25+742.5))*(1+ret_m1*bdebuff)*1.3*(shred.hit+shred.crit*2*(1+pistinct_m)*(1+META*0.03)))/(1.0*shred.energy))));
		if(ripvsfb>=100){
		cout << "Use Ferocious Bite for any energy value, Rip ticks: " << rip_ticker << ", Rip debuff counter: " << (12+rip_g*rip_glyph+twoT7*3)-rip_ticker*2 << endl;
		}
		else if(ripvsfb>=35){
			cout << "Use Ferocious Bite if you have less than: " << ripvsfb << " energy, Rip ticks: " << rip_ticker << ", Rip debuff counter: " << (12+rip_g*rip_glyph+twoT7*3)-rip_ticker*2 << endl;
		}
		else{
			cout << "Use RIP, ticks: " << rip_ticker << ", Rip debuff counter: " << (12+rip_g*rip_glyph+twoT7*3)-rip_ticker*2 << endl;
		}

	}
	
	cout << endl << endl;
	}
	
	/*Agressive Stats after the buffs*/
	
	
	cout << endl<<endl<<endl<<"Aggressive Stats after all the buffs (full stacked raid + Bloodlust used 2 times in a 10 min fight and haste drums used every 2 minute)" << endl << "_______________________" << endl << endl;
	
	cout << "Cat (crit% vs. a boss (-4.4% added)): " << (crit)*100 << "%" << endl;
	cout << "Bear (crit% vs. a boss (-4.4% added)): " << (crit-mss_m)*100 <<"%" << endl;
	cout << "Cat (AP): " << apbase << endl;
	cout << "Bear (AP): " << ap_bear << endl;
	cout << "Agility: " << (int)agi << endl;
	cout << "Strengh: " << (int)str << endl;
	cout << "Intellect: " << (int)intellect << endl;
	cout << "Spirit: " << (int)spirit << endl;
	cout << "Mana: " << mana << endl;
	cout << "Average MP5 In combat: " << (int)mp5_in << ", Average MP5 out of combat: " << (int)mp5_out << endl;
	cout << "Expertise: " << (int)expertise << endl;
	cout << "Hit: " << hit*100 << "%"<< endl;
	cout << "Armor Penetration: " << armor_pen*100 << "%"<< endl;
	cout << "Haste (from equipment): " << haste*100 <<"%" << endl;
	cout << "+weapon damage: " << wep_dmg << endl;
	
	cout << endl << endl;
	
	cout << "Boss base Armor (before penetration and debuff): " << dumb_armor << endl;
	cout << "Boss modified Armor (after penetration and debuff): " << armor << endl;
	cout << "Boss Damage Reduction (after debuff and penetration): " << red*100 << "%" << endl;
	cout << "Weapon Speed Reduction % (Total without Bloodlust): " << 100-speed << "%" << endl;
	cout << "Missed % (Total): " << miss*100 << "%"<< endl;
	cout << "Dodged %: " << dodge*100 << "%" << endl;
	cout << "Not normalized attacks parried by the boss: " << parry*100 << "%" << endl;
       cout << "_____________________________________" << endl << endl << endl << endl;
	

	
	
	////Boss damage--------------------------------------
	
	bossattack melee, special1, special2, special3, special4;
	melee.damage=40000; //Boss swing damage
	melee.cd=boss_swing;
	melee.tick_numb=0;
	melee.tick_time=1;
	melee.bleed=0;
	melee.magic=0;
	
	melee.crit=tobecrit;
	melee.miss=avoidance_bear;
	melee.hit=1-melee.miss-melee.crit;
	
	if (melee.hit<=0){
		melee.hit=0;
	}
	
	special1.damage=70000; //Boss special damage total if istant or x tick if is a dot
	special1.cd=10; //boss physical special damage cooldown in seconds.
	special1.tick_numb=0; //set 0 if it's an istant or set to the total number of ticks otherwise
	special1.tick_time=1; // set to 1 if is an istant, set to the number of ticks otherwise
	special1.bleed=0; // set to 1 if it's a bleed.
	special1.magic=0; //set to 1 if it's magic.
	special1.crit=0;
	special1.miss=avoidance_bear; //miss chance of the ability
	special1.hit=1-special1.miss-special1.crit; //hit chance of the ability
	if (special1.hit<=0){
		special1.hit=0;
	}
	
	
	int boss_hit=0;
	int boss_crit=0;
	int boss_parried=0;
	int boss_miss=0;
	double boss_damage=0;
	int dead=0;
	int hp_shot=myhp_bear;
	int silence=5;
	
	
	silence=silence*100;
	
	////--------------------------------------------------------
	
		
	for(timer2=0; timer2<sample_fight;timer2++){
		
		if((100*timer2)%sample_fight==0){
			cout << (100*timer2)/sample_fight << "%" << endl;
		}
		
		int pws=powershift;
		
		dmg=0; //damage
		wdamage=0; //white damage
		wdamage_sr=0;
		ydamage=0; //yellow damage
		mangle_damage=0;
		mangle_damage_tot=0;
		shred_damage=0;
		shred_damage_tot=0;
		rip_damage=0;
		rip_damage_tot=0;
		fb_damage=0;
		fb_damage_tot=0;
		rake_damage=0;
		rake_damage_tot=0;
		sr_damage=0;
		
		wbdamage=0;
		ybdamage=0;
		mangleb_damage=0;
		maul_damage=0;
		lacerate_damage=0;
		swipe_damage=0;
		bear_damage=0;
		
		threat=0;
		
		int init_en=wait_energy;
		en=init_en-1;
		cp=sr_t; //combo points
		cp_rip=0;
		ap_rip=ap;
		ap_rake=ap;
		mdebuff=manglebot; //mangle debuff switch
		mdebuff_timer=60000*manglebot; //mangle debuff timer
		mdebuff_cd=12+mangle_glyph*m_g; //mangle debuff initial timer value
		att=0; //dumb variable with the attack roll value
		damage=0; //total damage
		bdebuff=bleeding; //bleed debuff switch
		bdebuff_timer=bleeding*60000; //bleed debuff timer
		rip_timer=0; //rip timer
		rake_timer=0;
		ooc_rate=0.058333; // Omen of clarity proc chanche (5.83%)
		ooc_proc=0; // omen of clarity switch (1 = proccing)
		koj_timer=0; // tiger fury timer
		koj_cd=30; // tiger fury cooldown
		koj_step=6; // tiger fury timer
		koj_damage=131.0; //tiger fury added damage
		koj=0; // tiger fury switch
		sr=0; // savage roar switch
		sr_timer=0; // savage roar timer
		gcd=0; //Global cooldown
		mana=bmana;
		int berserk=0;
		int berserk_cd=18000;
		int berserk_timer=0;
		int berserk_cd_timer=0;
		int fivesec=0;
		int oom=sim_time;
		int s_count=0;
		int catbear=cat_bear; //0 for bear, 1 for cat
		rage_tot=0;
		if(cat_bear==0){
			rage_tot=10;
		}
		int bmangle_step=0; //keep track of bear mangle cooldown
		
		int swinger=0; //swing timer adjust between bear and cat form
		
		l_stack=0;
		l_timer=0;
		l_cd=15;
		enrage_cd=60;
		enrage_step=0; //+20 rage over 10 seconds.
		enrage_timer=0;
		enrage_buff=0;
		enraged_l=0;
		enrage_mod=0.15;
		int enraged=0;
		int bear_time=0;
		
		int mangleb_timer=0;
		
		bloodlust_cd_timer=4000;
		bloodlust_timer=0;
		bloodlust_up=0;
		drums_timer=0;
		drums_cd_timer=4000;
		
		int doublecycle_counter=0;
		cycle=cat_bear; //ability switch
		
		int boss_swinger=0; //the boss swinger.
		int parried=0;
		double wparried=wmiss-miss-dodge;
		double yparried=ymiss-miss-dodge;
		
		wparried=wparried/wmiss;
		yparried=yparried/ymiss;

		int boss_swing2=(int)(melee.cd*100);
		
		
		trinket1_cd_timer=0;
		trinket1_timer=0;
		trinket2_cd_timer=0;
		trinket2_timer=0;
		
		
		for(timer=0;timer<sim_time;timer++){
			//computing bleeds
			if(((rip_timer%200==0))&&(rip_timer>=0)&&(rip_timer<(12+rip_g*rip_glyph+twoT7*3)*100)&&(cat_bear==1)){
				dmg=(1+RA*0.02)*((ap_rip*0.01*cp_rip)+(39+21.0*IDOL_WS+99*cp_rip))*(1+naturalist_m)*(1+mdebuff*0.3);
				rem++;
				//cout << "Tick: " << rem << " Rip Timer " << rip_timer/100.0 <<"\n";
				damage+=dmg;
				ydamage+=dmg;
				rip_damage_tot+=dmg;
				rip_damage+=dmg-(1+RA*0.02)*((apbase*0.01*cp_rip)+(39+21.0*IDOL_WS+99*cp_rip))*(1+naturalist_m)*(1+mdebuff*0.3);
				//cout << ".......................rip (bleed " << rem <<"): " << dmg <<"\n";
				if(mdebuff==0){
					mang_rip+=1;
				}
			}
			
			
			if(((l_timer%300==0))&&(l_timer>=0)&&(l_timer<l_cd*100)){
				dmg=(1+twoT7*0.05)*(1+RA*0.02)*(64+(ap_bear*0.01))*(1+naturalist_m)*(l_stack)*(1+enraged_l*enrage_mod)*(1+mss_m)*(1+0.3*mdebuff);
				threat+=dmg*lacerate_aggro_mod;
				lem++;
				damage+=dmg;
				ybdamage+=dmg;
				lacerate_damage+=dmg;
				//l_damage+=dmg;
				//cout << ".......................Lacerate (bleed " << lem <<"): " << dmg <<"\n";
			}
			
			
			if(((rake_timer%300==0))&&(rake_timer>=0)&&(rake_timer<(9)*100)&&(cat_bear==1)){
				dmg=(1+RA*0.02)*(ap_rake*0.06+387)*(1+naturalist_m)*(1+mdebuff*0.3)*(1+fury_m);
				rkem++;
				//cout << "Tick: " << rkem << " Rip Timer " << rake_timer/100.0 <<"\n";
				damage+=dmg;
				ydamage+=dmg;
				rake_damage_tot+=dmg;
				rake_damage+=dmg-(1+RA*0.02)*(apbase*0.06+387)*(1+naturalist_m)*(1+mdebuff*0.3)*(1+fury_m);
				//cout << ".......................Rake (bleed " << rkem <<"): " << dmg <<"\n";
			}
			
			
			
			//ability counter time
			mdebuff_timer--;
			bdebuff_timer--;
			koj_step--;
			koj_timer--;
			sr_timer--;
			rip_timer--;
			rake_timer--;
			berserk_timer--;
			berserk_cd_timer--;
			
			gcd--;	
			fivesec--;
			
			l_timer--;
			enrage_timer--;
			enrage_step--;
			bmangle_step--;
			bear_time++;
			
			swinger++;
			
			bloodlust_cd_timer--;
			bloodlust_timer--;
			
			drums_timer--;
			drums_cd_timer--;		
			
			boss_swinger++;
			
			
			trinket1_cd_timer--;
			trinket1_timer--;
			trinket2_cd_timer--;
			trinket2_timer--;
			
			
			////-----------------BOSS DAMAGE-------------------------------------------
			
			if(cat_bear==0){
				
				if(hp_shot<=0){
					dead++;
					hp_shot=99999999;
					////cout << dead << endl;
				}
				
				if(timer%silence==0){
					////cout << timer << endl;
					hp_shot=myhp_bear;
				}

				
			if(parried==1){
				boss_parried++;
				if((((double)(boss_swing2-(boss_swinger%boss_swing2)))/((double)(claw_speed)))>=0.6){
				boss_swinger=boss_swing2-0.4*claw_speed;
				}
				if(((((double)(boss_swing2-(boss_swinger%boss_swing2)))/((double)(claw_speed)))<0.6)&&((((double)(boss_swing2-(boss_swinger%boss_swing2)))/((double)(claw_speed)))>=0.2)){
				boss_swinger=boss_swing2-0.2*claw_speed;
				}
					parried=0;
				}
					
					
			
			if(((boss_swinger%boss_swing2)==0)&&(boss_swinger!=0)){
				
				att=randnum();
				////cout << "Attack roll: " << att << "\n";
					if(att<melee.crit){
						dmg=2*melee.damage*(1-mydr_bear);
						hp_shot-=(int)dmg;
						boss_damage+=dmg;
						boss_crit++;
						boss_swinger=0;
					//	cout << "\nTime: " << (1.0*timer)/100.0<<"\n";
					//	cout << "Boss Melee (crit): " << dmg <<"\n";						
						
					}
					else if(att<(melee.crit+melee.hit)){
						dmg=melee.damage*(1-mydr_bear);
						hp_shot-=(int)dmg;
						boss_damage+=dmg;
						boss_hit++;
						boss_swinger=0;
					//	cout << "\nTime: " << (1.0*timer)/100.0<<"\n";
					//	cout << "Boss Melee (hit): " << dmg <<"\n";

					}
					else{
					//	cout << "\nTime: " << (1.0*timer)/100.0<<"\n";
					//	cout << "Boss Melee (miss)\n";
						boss_swinger=0;
						boss_miss++;
					}
			}
			}
			
			
			
			////-----------------------------------------------------------------------
			
			
			
			
			if(timer%10==0){
				en+=1; //energy regeneration
				if(en>100){
					en=100;
				}
				
				if(infinite_rage==1){
					rage_tot=100;
				}
				
				if(rage_tot>100){
					rage_tot=100;
				}
				
				if((bloodlust_timer<=0)&&(bloodlust_timer>-3)){
					bloodlust_up=0;
					speed=(int)(100.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste))); //autoattack speed
					claw_speed=(int)(250.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste)));
					//cout << timer/100.0 << "   Bloodlust off,    SPEED= " << speed/100.0 << endl;
				}
				
				if((bloodlust_cd_timer<=0)){
					bloodlust_up=1;
					bloodlust_timer=4000;
					bloodlust_cd_timer=bloodlust_cd;
					speed=(int)(100.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste))); //autoattack speed
					claw_speed=(int)(250.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste)));
					//cout << timer/100.0 << "   Bloodlust on,    SPEED= " << speed/100.0 << endl;
				}
				
				
				if((drums_timer<=0)&&(drums_timer>-3)){
					haste=haste_rating/32.78998947/100;
					speed=(int)(100.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste))); //autoattack speed
					claw_speed=(int)(250.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste)));
					//cout << timer/100.0 << "   Drums off,    SPEED= " << speed/100.0 << endl;
				}
				
				if((drums_cd_timer<=0)&&(DRUMS_HASTE==1)){
					haste=(haste_rating+drums_haste_rating)/32.78998947/100;
					drums_timer=3000;
					drums_cd_timer=drums_cd;
					speed=(int)(100.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste))); //autoattack speed
					claw_speed=(int)(250.0/((1+wf*wf_haste*0.01)*(1+bloodlust_up*bloodlust*bloodlust_haste*0.01)*(1+moonkin*moonkin_haste*0.01)*(1+haste)));
					//cout << timer/100.0 << "   Drums on,    SPEED= " << speed/100.0 << endl;
				}
				
				if(fivesec<0){
					outfivesec+=10;
					mana+=(1.0*mp5_out)/50.0;
				}
				else{
					mana+=(1.0*mp5_in)/50.0;
				}
				if((oom==sim_time)&&((mana_cost*mana)<=2*shifting_cost)){
					oom=timer;
				}
				
				if(mana>=bmana){
					mana=bmana;
				}
			}
			
			//debuff update
			if(mdebuff_timer<0){
				mdebuff=0;
			}
			
			if(bdebuff_timer<0){
				bdebuff=0;
			}
			
			if(enrage_step<0){
				enraged=0;
			}
			
			if((trinket1_cd_timer<0)&&(trinket1_on_use==1)&&(sr==1)){
				trinket1=1;
				trinket1_cd_timer=trinket1_cd;
				trinket1_timer=trinket1_timer_cd;
			}
			
			if((trinket2_cd_timer<0)&&(trinket2_on_use==1)&&(sr==1)){
				trinket2=1;
				trinket2_cd_timer=trinket2_cd;
				trinket2_timer=trinket2_timer_cd;
			}
			
			if(trinket1_timer<0){
				trinket1=0;
			}
			if(trinket2_timer<0){
				trinket2=0;
			}

			
			if((berserk_timer<0)&&(berserk_timer>-3)){
				berserk=0;
				mangle.energy=40-impmangle_m;
				shred.energy=60-s_att_m;
				rake.energy=35;
				rip.energy=30;
				fb.energy=35;
				sr_energy=25;
				init_en=wait_energy;
				bmangle_cd=(6-impmangle_m2);
			}
			
			if((koj_step<0)&&(koj_step>-3)){
				koj=0;
				weapon=base_paw;
				
				/*paw*/
				
				paw.bdamage=(1-red)*(weapon)*(1+naturalist_m);
				paw.bcritdamage=paw.bdamage*2*(1+pistinct_m)*(1+META*0.03);
				
				//mangle
				
				mangle.bdamage=(1-red)*((weapon)*1.6+507.2)*(1+fury_m)*(1+naturalist_m);
				mangle.bcritdamage=mangle.bdamage*2*(1+pistinct_m)*(1+META*0.03);
				
				//shred
				
				shred.bdamage=(1-red)*((weapon)*2.25+742.5+203.0*IDOL_SHRED)*(1+naturalist_m);//*(1+mdebuff*0.3)*(1+bdebuff*ret_m1);
				shred.bcritdamage=shred.bdamage*2*(1+pistinct_m)*(1+META*0.03);
			}
			
			if(sr_timer<0){
				sr=0;	
			}
			
			bdebuff_up+=bdebuff;
			mdebuff_up+=mdebuff;
			sr_up+=sr;
			
			//combo points
			if(cp>5){
				cp=5;
			}
			
			
			//when to use Tiger Fury / King of the Jungle
			
			if((koj_timer<=0)&&(berserk==0)&&(en<=(39-(int)(2*(lag/10.0)))&&(catbear==1))/*&&(ooc_proc==0)&&(cycle!=0)/*&&(cycle!=4)*/){
				//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
				////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
				//cout << "				King of the Jungle!\n";
				koj_timer=koj_cd*100;
				koj=1;
				koj_step=600;
				en+=60;
				weapon+=koj_damage;
				
				/*paw*/
				
				paw.bdamage=(1-red)*(weapon)*(1+naturalist_m);
				paw.bcritdamage=paw.bdamage*2*(1+pistinct_m)*(1+META*0.03);
				
				//mangle
				
				mangle.bdamage=(1-red)*((weapon)*1.6+507.2)*(1+fury_m)*(1+naturalist_m);
				mangle.bcritdamage=mangle.bdamage*2*(1+pistinct_m)*(1+META*0.03);
				
				//shred
				
				shred.bdamage=(1-red)*((weapon)*2.25+742.5+203.0*IDOL_SHRED)*(1+naturalist_m);//*(1+mdebuff*0.3)*(1+bdebuff*ret_m1);
				shred.bcritdamage=shred.bdamage*2*(1+pistinct_m)*(1+META*0.03);
			}
			
			if(((enrage_timer<=0)&&(catbear==0)&&(bear_time<200)&&(cat_bear==1))||((enrage_timer<=0)&&(catbear==0)&&(cat_bear==0))){
				enrage_timer=enrage_cd*100;
				enrage_step=10*100;
				enraged=1;
				threat+=16;
				//cout << "				Enrage!" << endl;
			}
			
			
			
			//using l'autoattack
			
			if(((swinger%speed)==0)&&(catbear==1)&&(swinger!=0)){
				
				att=randnum();
				////cout << "Attack roll: " << att << "\n";
				
				if(att>(1-paw.hit)){
					dmg=(1+RA*0.02)*(paw.adamage*(1+sr*src)+paw.bdamage);
					damage+=dmg;
					wdamage+=dmg;
					wdamage_sr+=(1+RA*0.02)*(paw.adamage*(sr*src));
					//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
					////cout << "Paw (normal): " << dmg <<"\n";
					if(ooc_rate>randnum()){
						ooc_proc=omen;
					
					}
				}
				else if(att>(paw.glance+paw.miss)){
					dmg=(1+RA*0.02)*((paw.acritdamage)*(1+sr*src)+paw.bcritdamage);
					damage+=dmg;
					wdamage+=dmg;
					wdamage_sr+=(1+RA*0.02)*(paw.acritdamage)*(sr*src);
					//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
					////cout << "Paw (crit): " << dmg <<"\n";
					if(ooc_rate>randnum()){
						ooc_proc=omen;
					}
				}
					
				else if(att>(paw.miss)){
					dmg=glance_red*(1+RA*0.02)*(paw.adamage*(1+sr*src)+paw.bdamage);
					damage+=dmg;
					wdamage+=dmg;
					wdamage_sr+=glance_red*(1+RA*0.02)*(paw.adamage*(sr*src));
					//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
					////cout << "Paw (glancing): " << dmg <<"\n";
					if(ooc_rate>randnum()){
						ooc_proc=omen;
					}
				}	
				else{
					//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
					////cout << "Paw (miss)" <<"\n";
				}
				
			}
			
			
			if(((swinger%claw_speed)==0)&&(catbear==0)&&(swinger!=0)){
				
				att=randnum();
				////cout << "Attack roll: " << att << "\n";
				if((rage_tot>=((mangleb.rage+maul.rage)))||((rage_tot>=maul.rage)&&(mdebuff_timer>=1650))){
					if(att<maul.crit){
						dmg=(1+RA*0.02)*(maul.acritdamage+maul.bcritdamage)*(1+enraged*enrage_mod)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
						damage+=dmg;
						ybdamage+=dmg;
						maul_damage+=dmg;
						maulnum++;
						threat+=dmg+maul_aggro;
						rage_tot-=maul.ragec;
						if(ooc_proc==1){
							//cout << "			USING OMEN!\n";
							ooc_proc=0;
							rage_tot+=maul.rage+5;
						}
						//cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						//cout << "maul (crit): " << dmg <<"\n";
						if(ooc_bear_rate>randnum()){
							ooc_proc=omen;
						}
						
						
					}
					else if(att<(maul.crit+maul.hit)){
						dmg=(1+RA*0.02)*(maul.adamage+maul.bdamage)*(1+enraged*enrage_mod)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
						damage+=dmg;
						ybdamage+=dmg;
						maul_damage+=dmg;
						maulnum++;
						threat+=dmg+maul_aggro;
						rage_tot-=maul.rage;
						//cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						//cout << "maul (crit): " << dmg <<"\n";
						if(ooc_proc==1){
							//cout << "			USING OMEN!\n";
							ooc_proc=0;
							rage_tot+=maul.rage;
						}
						if(ooc_bear_rate>randnum()){
							ooc_proc=omen;
						}
					}
					else{
						if(ooc_proc==1){
							//cout << "			USING OMEN!\n";
							ooc_proc=0;
						}
						if(yparried>randnum()){
							parried=1;
						}
						//cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						//cout << "maul (miss)" <<"\n";
					}
				}
				else{
					if(att>(1-claw.miss)){
						
						dmg=(1+RA*0.02)*(claw.adamage+claw.bdamage)*(1+enraged*enrage_mod);
						damage+=dmg;
						wbdamage+=dmg;
						rage_tot-=claw.rage;
						//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						////cout << "claw (normal): " << dmg <<"\n";
						if(ooc_bear_rate>randnum()){
							ooc_proc=omen;
						}
						
						
					}
					else if(att>(claw.miss+claw.glance)){
						dmg=glance_red*(1+RA*0.02)*(claw.adamage+claw.bdamage)*(1+enraged*enrage_mod);
						damage+=dmg;
						wbdamage+=dmg;
						rage_tot-=claw.rage;
						//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						////cout << "claw (glancing): " << dmg <<"\n";
						if(ooc_bear_rate>randnum()){
							ooc_proc=omen;
						}
					}
					else if(att>(claw.miss)){
						dmg=(1+RA*0.02)*(claw.acritdamage+claw.bcritdamage)*(1+enraged*enrage_mod);
						damage+=dmg;
						wbdamage+=dmg;
						rage_tot-=claw.ragec;
						//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						////cout << "claw (crit): " << dmg <<"\n";
						if(ooc_bear_rate>randnum()){
							ooc_proc=omen;
						}
						
					}
					else{
						if(wparried>randnum()){
							parried=1;
						}
						//////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						////cout << "claw (miss)" <<"\n";
					}
				}
			}
			
			// omen of clarity, when it proc I always shred.
			
			if(gcd<=0){
				if((ooc_proc==1)&&(catbear==1)){
					att=randnum();
					
					if(att<shred.crit){
						////cout << "     Shred\n";
						dmg=(1+RA*0.02)*((shred.acritdamage)*(1+sr*src)+shred.bcritdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
						damage+=dmg;
						ydamage+=dmg;
						shred_damage_tot+=dmg;
						shrednum++;
						shred_damage+=(1+RA*0.02)*((shred.acritdamage)*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
						cp+=2;
						////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						//cout << "			USING OMEN!\n";
						//cout << "	shred (crit): " << dmg <<"\n";
						ooc_proc=0;
						gcd=100+lag;
						
					}
					else if(att<(shred.crit+shred.hit)){
						////cout << "     Shred\n";
						dmg=(1+RA*0.02)*(shred.adamage*(1+sr*src)+shred.bdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
						damage+=dmg;
						ydamage+=dmg;						
						shred_damage_tot+=dmg;
						shrednum++;
						shred_damage+=(1+RA*0.02)*(shred.adamage*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
						cp++;
						////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						//cout << "			USING OMEN!\n";
						//cout << "	shred (normal): " << dmg <<"\n";
						ooc_proc=0;
						gcd=100+lag;
						
					}
					else{
						////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
						//cout << "			USING OMEN!\n";
						//cout << "	shred (miss)" <<"\n";
						ooc_proc=0;
						gcd=100+lag;
					}
					
					goto fine;
					
					
				}
				if(((berserk_cd_timer<=0)&&(en>=50)&&(timer>=2000)&&(catbear==1)&&(cat_bear==1))||((berserk_cd_timer<=0)&&(timer>=2000)&&(cat_bear==0))){
					berserk=1;
					berserk_cd_timer=berserk_cd;
					berserk_timer=(15)*100;
					init_en=(int)(0.5*init_en)+((int)(lag/10.0));
					mangle.energy=(int)(0.5*(40-impmangle_m));
					shred.energy=(int)(0.5*(60-s_att_m));
					rake.energy=(int)(0.5*35);
					rip.energy=(int)(0.5*30);
					fb.energy=(int)(0.5*35);
					sr_energy=(int)(0.5*sr_energy);
					bmangle_cd=0;
					//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
					//cout << "							BERSERK!!!!\n";
					gcd=100+lag;	
					goto fine;
				}
				
				
				
				switch (cycle){
					case 0:
						
						//mangle?
						if((((en>(85-(int)((double)lag/10)))||((en>(60-(int)((double)lag/10)))&&(mdebuff_timer>=1600)))&&(pws==1)&&((mana_cost*mana)>=(mana_cost*shifting_cost*2)))&&(cat_bear==1)){
							////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
							//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
							//cout << "		POWERSHIFTING, Lost " << en << " Energy\n";
							gcd=150+lag;
							pw+=1;
							mana-=shifting_cost;
							fivesec=500;
							cycle =1;
							catbear=1;
							swinger=0;
							mangleb_timer=0;
							goto fine;
						}
						
						if((rage_tot>=mangleb.rage)&&(bmangle_step<=0)&&(l_timer>=(150+lag))){
							mangleb_timer++;
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<mangleb.crit){
								////cout << "     mangleb\n";
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*((mangleb.acritdamage)+mangleb.bcritdamage)*(1+enraged*enrage_mod);
								damage+=dmg;
								ybdamage+=dmg;
								mangleb_damage+=dmg;
								manglebnum++;
								threat+=dmg*mangleb_aggro_mod;
								//bmangle_damage+=dmg;
								rage_tot-=mangleb.ragec;
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
									rage_tot+=mangleb.rage+5;
								}
								mdebuff=1;
								if (mdebuff_timer<=mdebuff_cd*100){
									mdebuff_timer=mdebuff_cd*100;
								}
								gcd=150+lag;
								bmangle_step=(int)(bmangle_cd*100);
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	mangleb (crit): " << dmg <<"\n";
							}
							else if(att<(mangleb.crit+mangleb.hit)){
								////cout << "     mangleb\n";
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*(mangleb.adamage+mangleb.bdamage)*(1+enraged*enrage_mod);
								damage+=dmg;
								ybdamage+=dmg;
								mangleb_damage+=dmg;
								manglebnum++;
								threat+=dmg*mangleb_aggro_mod;
								//bmangle_damage+=dmg;
								rage_tot-=mangleb.rage;
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
									rage_tot+=mangleb.rage;
								}
								mdebuff=1;
								if (mdebuff_timer<=mdebuff_cd*100){
									mdebuff_timer=mdebuff_cd*100;
								}
								gcd=150+lag;
								bmangle_step=(int)(bmangle_cd*100);
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	mangleb (normal): " << dmg <<"\n";
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								gcd=150+lag;
								bmangle_step=(int)(bmangle_cd*100);
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
								}
								if(yparried>randnum()){
									parried=1;
								}
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	mangleb (miss)" <<"\n";
							}
							
							
							goto fine;
							
						}
						
						
						
						
						//swipe?
						
						if((rage_tot>=swipe.rage)&&(((l_timer>=(l_cd*100-150-lag))&&(l_stack==5))||((cat_bear==0)&&(l_timer>=(2*(150+lag)))&&(l_stack==5)))){
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<(swipe.crit)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "swipe\n";
								dmg=(1+RA*0.02)*(1-red)*(swipe.acritdamage+swipe.bcritdamage)*(1+enraged*enrage_mod);
								damage+=dmg;
								ybdamage+=dmg;	
								swipe_damage+=dmg;
								swipenum++;
								threat+=dmg*swipe_aggro_mod;
								rage_tot-=swipe.ragec;	
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
									rage_tot+=swipe.rage+5;
								}
								gcd=150+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "swipe" << "\n";
							}
							else if(att<(swipe.crit+swipe.hit)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "swipe\n";
								dmg=(1+RA*0.02)*(1-red)*(swipe.adamage+swipe.bdamage)*(1+enraged*enrage_mod);
								damage+=dmg;
								ybdamage+=dmg;	
								swipe_damage+=dmg;
								swipenum++;
								threat+=dmg*swipe_aggro_mod;
								rage_tot-=swipe.rage;
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
									rage_tot+=swipe.rage;
								}
								
								gcd=150+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "swipe" << "\n";
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";								
								gcd=150+lag;
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
								}
								if(yparried>randnum()){
									parried=1;
								}
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "swipe (miss)" << "\n";
							}
							
							goto fine;
							
						}
						
						
						
						
						//lacerate?
						
						if((rage_tot>=lacerate.rage)){
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<(lacerate.crit)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "lacerate\n";
								dmg=(1+RA*0.02)*(1-red)*(1+twoT7*0.05)*(88+(ap_bear*0.01))*(1+naturalist_m)*(1+mss_m)*2*(1+META*0.03)*(1+enraged*enrage_mod*(1+0.3*mdebuff));
								enraged_l=0;
								if(enraged=1){
									enraged_l=1;
								}
								damage+=dmg;
								ybdamage+=dmg;	
								lacerate_damage+=dmg;
								laceratenum++;
								threat+=lacerate_aggro+dmg*lacerate_aggro_mod;
								rage_tot-=lacerate.ragec;	
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
									rage_tot+=lacerate.rage+5;
								}
								bdebuff=1;
								if(bdebuff_timer<(l_cd*100)){
									bdebuff_timer=l_cd*100;
								}
								l_timer=l_cd*100;
								l_stack++;
								if(l_stack>=5){
									l_stack=5;
								}
								gcd=150+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "lacerate" << "\n";
								lem=0;
							}
							else if(att<(lacerate.crit+lacerate.hit)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "lacerate\n";
								dmg=(1+RA*0.02)*(1-red)*(1+twoT7*0.05)*(88+(ap_bear*0.01))*(1+naturalist_m)*(1+mss_m)*(1+enraged*enrage_mod)*(1+0.3*mdebuff);
								damage+=dmg;
								ybdamage+=dmg;	
								lacerate_damage+=dmg;
								laceratenum++;
								threat+=lacerate_aggro+dmg*lacerate_aggro_mod;
								enraged_l=0;
								if(enraged=1){
									enraged_l=1;
								}
								rage_tot-=lacerate.rage;
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
									rage_tot+=lacerate.rage;
								}
								bdebuff=1;
								if(bdebuff_timer<(l_cd*100)){
									bdebuff_timer=l_cd*100;
								}
								l_timer=l_cd*100;
								l_stack++;
								if(l_stack>=5){
									l_stack=5;
								}
								gcd=150+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "lacerate" << "\n";
								lem=0;
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";								
								gcd=150+lag;
								if(ooc_proc==1){
									//cout << "			USING OMEN!\n";
									ooc_proc=0;
								}
								if(yparried>randnum()){
									parried=1;
								}
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "lacerate (miss)" << "\n";
							}
							
							goto fine;
							
						}
						
						
						break;
						
					case 1:
						
						//decision making cycle
						
						
						// savage roar?
						
						if((en>=sr_energy)&&(cp>=sr_t)){
							////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
							//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
							//cout << "SR\n";
							sr_timer=(9+cp*5)*100;
							en-=sr_energy;
							cp=0;
							sr=1;
							gcd=100+lag;
							cycle=2;
							cycle_time+=1;
							//	//cout << "mana: " << mana <<"\n";
							s_count=0;
							goto fine;
						}
						break;
						
						
						
					case 2:
						if ((cp>=rip_t)||((cp>=fb_t))){
							cycle=3;
							goto fine;
						}
						
						//rake?
						
						if(((en>=rake.energy)&&(rk==1)&&(rake_timer<0))||((en>=mangle.energy)&&(rk==1)&&(rake_timer<0))){
							att=randnum();
							//	////cout << "Attack roll: " << att << "\n";
							
							if((att<rake.crit)&&(en>=rake.energy)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*((rake.acritdamage)*(1+sr*src)+rake.bcritdamage)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;
								rake_damage_tot+=dmg;
								rakenum++;
								rkem=0;
								ap_rake=ap*(1+sr*src);
								rake_damage+=(1+RA*0.02)*((rake.acritdamage)*(sr*src))*(1+0.3*mdebuff);
								en-=rake.energy;
								
								bdebuff=1;
								if(bdebuff_timer<(9*100)){
									bdebuff_timer=9*100;
								}
								cp+=2;
								rake_timer=9*100;
								gcd=100+lag;
								//cout << "     Rake (crit); " << dmg << "\n";
								//	////cout << "rake (crit): " << dmg <<", Total damage: " << damage <<"\n";
							}
							else if((att<(rake.crit+rake.hit))&&(en>=rake.energy)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*(rake.adamage*(1+sr*src)+rake.bdamage)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;
								rake_damage_tot+=dmg;
								rakenum++;
								rkem=0;								
								ap_rake=ap*(1+sr*src);
								rake_damage+=(1+RA*0.02)*(rake.adamage*(sr*src))*(1+0.3*mdebuff);
								en-=rake.energy;
								
								bdebuff=1;
								if(bdebuff_timer<(9*100)){
									bdebuff_timer=9*100;
								}
								rake_timer=9*100;
								cp++;
								gcd=100+lag;
								//cout << "     Rake (normal); " << dmg << "\n";
								//	////cout << "rake (normal): " << dmg <<", Total damage: " << damage <<"\n";
							}
							else if (en>=rake.energy){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en-=(int)(rake.energy*0.8);
								
								gcd=100+lag;
								//cout << "     Rake (miss)\n";
								//	////cout << "rake (miss)" << ", Total damage: " << damage <<"\n";
							}
							
							else
							
							goto fine;
							
						}
						
						
						
						//mangle?
						
						if((en>=mangle.energy)&&((mdebuff_timer<=(200+2*lag))||(mangle_only==1))){
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<mangle.crit){
								////cout << "     Mangle\n";
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*(mangle.acritdamage)*(1+sr*src)+mangle.bcritdamage;
								damage+=dmg;
								ydamage+=dmg;						
								mangle_damage_tot+=dmg;
								manglenum++;
								mangle_damage+=(1+RA*0.02)*(mangle.acritdamage)*(sr*src);
								en-=mangle.energy;
								cp+=2;
								mdebuff=1;
								if (mdebuff_timer<=mdebuff_cd*100){
									mdebuff_timer=mdebuff_cd*100;
								}
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	Mangle (crit): " << dmg <<"\n";
							}
							else if(att<(mangle.crit+mangle.hit)){
								////cout << "     Mangle\n";
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*mangle.adamage*(1+sr*src)+mangle.bdamage;
								damage+=dmg;
								ydamage+=dmg;						
								mangle_damage_tot+=dmg;
								manglenum++;
								mangle_damage+=(1+RA*0.02)*(mangle.adamage)*(sr*src);
								en-=mangle.energy;
								cp++;
								mdebuff=1;
								if (mdebuff_timer<=mdebuff_cd*100){
									mdebuff_timer=mdebuff_cd*100;
								}
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	Mangle (normal): " << dmg <<"\n";
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en-=(int)(mangle.energy*0.8);
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	Mangle (miss)" <<"\n";
							}
							
							
							goto fine;
							
						}
						
						
						
												
						
						//shred?
						
						 if((en>=shred.energy)&&(mangle_only==0)){
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<shred.crit){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "     Shred\n";
								dmg=(1+RA*0.02)*((shred.acritdamage)*(1+sr*src)+shred.bcritdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;						
								shred_damage_tot+=dmg;
								shrednum++;
								shred_damage+=(1+RA*0.02)*((shred.acritdamage)*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								en-=shred.energy;
								
								cp+=2;
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	shred (crit): " << dmg  <<"\n";
							}
							else if(att<(shred.crit+shred.hit)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "     Shred\n";
								dmg=(1+RA*0.02)*(shred.adamage*(1+sr*src)+shred.bdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;						
								shred_damage_tot+=dmg;
								shrednum++;
								shred_damage+=(1+RA*0.02)*(shred.adamage*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								en-=shred.energy;
								
								cp++;
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	shred (normal): " << dmg <<"\n";
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en-=(int)(shred.energy*0.8);
								
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	shred (miss)" <<"\n";
							}
							
							goto fine;
							
						}
						break;
						
						
						
						
					case 3:
						
						if(fb_t<=5){
							fb.crit=yhitted*(crit+ret_m2*bdebuff);
							fb.hit=yhitted-fb.crit;
							
							if((crit+ret_m2)>=1){
								fb.crit=yhitted;
								fb.hit=0;
							}
						ripvsfb=fb.energy+((((rip.hit*(ap*0.39*(1+src)+4165.2)*(rem*2.0)/(12.0)))) + ((1.0*(fb.energy-rip.energy))*((1-red)*(((ap/14.0)*2.25)*(1+src)+(weapon*2.25+742.5))*(1+ret_m1*bdebuff)*1.3*(shred.hit+shred.crit*2*(1+pistinct_m)*(1+META*0.03)))/(1.0*shred.energy)) - ((1-red)*(1+ferocity_m)*(0.35*(1+src)*ap+ 1640)*(fb.hit+fb.crit*2*(1+pistinct_m)*(1+META*0.03)))) /(((1-red)*(1+ferocity_m)*(ap*(1+src)*0.002439+9.4)*(fb.hit+fb.crit*2*(1+pistinct_m)*(1+META*0.03)) - (((1-red)*(((ap/14.0)*2.25)*(1+src)+(weapon*2.25+742.5))*(1+ret_m1*bdebuff)*1.3*(shred.hit+shred.crit*2*(1+pistinct_m)*(1+META*0.03)))/(1.0*shred.energy))));
						}
						
						//ferocious bite?
						
						if((en>=fb.energy)&&(cp>=fb_t)&&(((bdebuff==1)&&(en<=(ripvsfb-(int)(lag/10))))||(rip_t>5))){
							
							att=randnum();
							//	////cout << "Attack roll: " << att << "\n";
							
							if(att<fb.crit){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								fb.adamage=(1-red)*((0.07*ap*(1+sr*src))*cp+(ap*(1+sr*src)*0.002439)*(en-fb.energy+(int)(lag/10.0)))*(1+naturalist_m)*(1+ferocity_m);
								fb.acritdamage=fb.adamage*2*(1+pistinct_m)*(1+META*0.03);
								fb.bdamage=(1-red)*(190+290*cp+(9.4)*(en-fb.energy+(int)(lag/10.0)))*(1+naturalist_m)*(1+ferocity_m);
								fb.bcritdamage=fb.bdamage*2*(1+pistinct_m)*(1+META*0.03);
								fb.hit=yhit-fb.crit;
								dmg=(1+RA*0.02)*((fb.acritdamage)*(1+sr*src)+fb.bcritdamage);
								damage+=dmg;
								ydamage+=dmg;						
								fb_damage_tot+=dmg;
								fbnum++;
								avgfbenergy+=en+(int)(lag/10.0);
								fb_damage+=(1+RA*0.02)*fb.acritdamage*(sr*src);
								en=-(int)(lag/10.0);
								cp=0;
								gcd=100+lag;	
								
								if(doublecycle==1){
									switch (doublecycle_counter){
										case 0:
											cycle=2;
											doublecycle_counter=1;
											break;
											
										case 1:
											cycle=4;
											doublecycle_counter=0;
											break;
									}
								}
								else{
									cycle=4;
								}
								
								//cout << "FB (crit): "<< dmg << "\n";
								//	////cout << "fb (crit): " << dmg <<", Total damage: " << damage <<"\n";
								
							}
							else if(att<(fb.crit+fb.hit)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								fb.adamage=(1-red)*((0.07*ap*(1+sr*src))*cp+(ap*(1+sr*src)*0.002439)*(en-fb.energy+(int)(lag/10.0)))*(1+naturalist_m)*(1+ferocity_m);
								fb.bdamage=(1-red)*(190+290*cp+(9.4)*(en-fb.energy+(int)(lag/10.0)))*(1+naturalist_m)*(1+ferocity_m);
								dmg=(1+RA*0.02)*(fb.adamage*(1+sr*src)+fb.bdamage);
								damage+=dmg;
								ydamage+=dmg;						
								fb_damage_tot+=dmg;
								fbnum++;
								avgfbenergy+=en+(int)(lag/10.0);
								fb_damage+=(1+RA*0.02)*fb.adamage*(sr*src);
								en=-(int)(lag/10.0);
								cp=0;
								gcd=100+lag;
								if(doublecycle==1){
									switch (doublecycle_counter){
										case 0:
											cycle=2;
											doublecycle_counter=1;
											break;
											
										case 1:
											cycle=4;
											doublecycle_counter=0;
											break;
									}
								}
								else{
									cycle=4;
								}
								
								
								//cout << "FB (normal): "<< dmg << "\n";
								//	////cout << "fb (normal): " << dmg <<", Total damage: " << damage <<"\n";
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en=(int)((precision_m2)*en);
								
								gcd=100+lag;				
								//cout << "FB (miss)\n";
								//	////cout << "fb (miss)" << ", Total damage: " << damage <<"\n";
							}
							
							goto fine;
							
						}
						
						//rip?
						
						if(((en>=rip.energy)&&(cp>=rip_t)&&(fb_t>5))||((en>=rip.energy)&&(cp>=rip_t)&&(en>(ripvsfb-(int)(lag/10)))&&(doublecycle_counter==1)&&(fb_t<=5))||((en>=(rip.energy+2*shred.energy-20-2*(int)(lag/10)))&&(doublecycle_counter==0)&&(cp>=rip_t)&&(fb_t<=5))||((en>=rip.energy)&&(cp>=rip_t)&&(fb_t<=5)&&(bdebuff==0))){
							
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<(rip.crit+rip.hit)){
								////cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "RIP\n";
								ap_rip=ap*(1+sr*src);
								cp_rip=cp;
								en-=rip.energy;
								ripnum++;
								bdebuff=1;
								if(bdebuff_timer<((12+rip_g*rip_glyph+twoT7*3)*100)){
									bdebuff_timer=(12+rip_g*rip_glyph+twoT7*3)*100;
								}
								rip_timer=(12+rip_g*rip_glyph+twoT7*3)*100;
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"Step: " << doublecycle_counter <<"\n";
								//cout << "RIP" << "\n";
								cp=0;
								rem=0;
								if(doublecycle==1){
									switch (doublecycle_counter){
										case 0:
											cycle=2;
											doublecycle_counter=1;
											break;
											
										case 1:
											cycle=4;
											doublecycle_counter=0;
											break;
									}
								}
								else{
									cycle=4;
								}							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en-=(int)((1-precision_m2)*rip.energy);
								
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "rip (miss)" << "\n";
							}
							
							goto fine;
							
						}
						
						
						
						
						
						break;
						
					case 4:
						if ((cp>=sr_t)&&(s_count>=shred_num)){
							
							if((pws==1)&&((mana_cost*mana)>=(mana_cost*shifting_cost*2))&&(en<=pw_t)&&(berserk==0)&&(cat_bear==1)){
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								//cout << "		POWERSHIFTING, Lost " << en << " Energy\n";
								gcd=150+lag;
								pw+=1;
								mana-=shifting_cost;
								fivesec=500;
								cycle =0;
								koj=0;
								sr=0;
								bear_time=0;
								catbear=0;
								rage_tot=10;
								swinger=0;
								goto fine;
								
							}
							
							if(((pws==1)&&((mana_cost*mana)>=(mana_cost*shifting_cost*2))&&(en>pw_t))&&(cat_bear==1)){
								if((en>=shred.energy)/*&&(bdebuff==1)*/){
									att=randnum();
									////cout << "Attack roll: " << att << "\n";
									
									if(att<shred.crit){
										//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
										////cout << "     Shred\n";
										dmg=(1+RA*0.02)*((shred.acritdamage)*(1+sr*src)+shred.bcritdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
										damage+=dmg;
										ydamage+=dmg;						
										shred_damage_tot+=dmg;
										shrednum++;
										shred_damage+=(1+RA*0.02)*((shred.acritdamage)*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
										en-=shred.energy;
										
										cp+=2;
										gcd=100+lag;
										s_count+=1;
										////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
										//cout << "	shred (crit): " << dmg  <<"\n";
									}
									else if(att<(shred.crit+shred.hit)){
										//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
										////cout << "     Shred\n";
										dmg=(1+RA*0.02)*(shred.adamage*(1+sr*src)+shred.bdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
										damage+=dmg;
										ydamage+=dmg;						
										shred_damage_tot+=dmg;
										shrednum++;
										shred_damage+=(1+RA*0.02)*(shred.adamage*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
										en-=shred.energy;
										
										cp++;
										gcd=100+lag;
										s_count+=1;
										////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
										//cout << "	shred (normal): " << dmg <<"\n";
									}
									else{
										//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
										en-=(int)(shred.energy*0.8);
										
										gcd=100+lag;
										s_count+=1;
										////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
										//cout << "	shred (miss)" <<"\n";
									}
									
									
								}
								
								goto fine;
								
							}
							
							cycle = 1;
							goto fine;
						}
						
						//rake?
						
						if(((en>=rake.energy)&&(rk==1)&&(rake_timer<0))||((en>=mangle.energy)&&(rk==1)&&(rake_timer<0))){
							att=randnum();
							//	////cout << "Attack roll: " << att << "\n";
							
							if((att<rake.crit)&&(en>=rake.energy)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*((rake.acritdamage)*(1+sr*src)+rake.bcritdamage)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;
								rake_damage_tot+=dmg;
								rakenum++;
								rkem=0;
								rake_damage+=(1+RA*0.02)*((rake.acritdamage)*(sr*src))*(1+0.3*mdebuff);
								en-=rake.energy;
								ap_rake=ap*(1+sr*src);
								bdebuff=1;
								if(bdebuff_timer<(9*100)){
									bdebuff_timer=9*100;
								}
								cp+=2;
								rake_timer=9*100;
								gcd=100+lag;
								s_count+=1;
								//cout << "     Rake (crit); " << dmg << "\n";
								//	////cout << "rake (crit): " << dmg <<", Total damage: " << damage <<"\n";
							}
							else if((att<(rake.crit+rake.hit))&&(en>=rake.energy)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*(rake.adamage*(1+sr*src)+rake.bdamage)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;
								rake_damage_tot+=dmg;
								rakenum++;
								rkem=0;
								rake_damage+=(1+RA*0.02)*(rake.adamage*(sr*src))*(1+0.3*mdebuff);
								en-=rake.energy;
								ap_rake=ap*(1+sr*src);
								bdebuff=1;
								if(bdebuff_timer<(9*100)){
									bdebuff_timer=9*100;
								}
								rake_timer=9*100;
								cp++;
								gcd=100+lag;
								s_count+=1;
								//cout << "     Rake (normal); " << dmg << "\n";
								//	////cout << "rake (normal): " << dmg <<", Total damage: " << damage <<"\n";
							}
							else if (en>=rake.energy){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en-=(int)(rake.energy*0.8);
								
								gcd=100+lag;
								//cout << "     Rake (miss)\n";
								//	////cout << "rake (miss)" << ", Total damage: " << damage <<"\n";
							}
							
							else
								
								goto fine;
							
						}
						
						
						
						
						//mangle?
						
						if((en>=mangle.energy)&&((mdebuff_timer<=(200+2*lag))||(mangle_only==1))){
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<mangle.crit){
								////cout << "     Mangle\n";
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*(mangle.acritdamage)*(1+sr*src)+mangle.bcritdamage;
								damage+=dmg;
								ydamage+=dmg;						
								mangle_damage_tot+=dmg;
								manglenum++;
								mangle_damage+=(1+RA*0.02)*(mangle.acritdamage)*(sr*src);
								en-=mangle.energy;
								cp+=2;
								mdebuff=1;
								if (mdebuff_timer<=mdebuff_cd*100){
									mdebuff_timer=mdebuff_cd*100;
								}
								gcd=100+lag;
								s_count+=1;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	Mangle (crit): " << dmg <<"\n";
							}
							else if(att<(mangle.crit+mangle.hit)){
								////cout << "     Mangle\n";
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								dmg=(1+RA*0.02)*mangle.adamage*(1+sr*src)+mangle.bdamage;
								damage+=dmg;
								ydamage+=dmg;						
								mangle_damage_tot+=dmg;
								manglenum++;
								mangle_damage+=(1+RA*0.02)*(mangle.adamage)*(sr*src);
								en-=mangle.energy;
								cp++;
								mdebuff=1;
								if (mdebuff_timer<=mdebuff_cd*100){
									mdebuff_timer=mdebuff_cd*100;
								}
								gcd=100+lag;
								s_count+=1;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	Mangle (normal): " << dmg <<"\n";
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en-=(int)(mangle.energy*0.8);
								gcd=100+lag;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	Mangle (miss)" <<"\n";
							}
							
							
							goto fine;
							
						}
						
						
						
						
						//shred?
						
						if((en>=shred.energy)&&(mangle_only==0)){
							att=randnum();
							////cout << "Attack roll: " << att << "\n";
							
							if(att<shred.crit){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "     Shred\n";
								dmg=(1+RA*0.02)*((shred.acritdamage)*(1+sr*src)+shred.bcritdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;						
								shred_damage_tot+=dmg;
								shrednum++;
								shred_damage+=(1+RA*0.02)*((shred.acritdamage)*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								en-=shred.energy;
								
								cp+=2;
								gcd=100+lag;
								s_count+=1;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	shred (crit): " << dmg  <<"\n";
							}
							else if(att<(shred.crit+shred.hit)){
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								////cout << "     Shred\n";
								dmg=(1+RA*0.02)*(shred.adamage*(1+sr*src)+shred.bdamage)*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								damage+=dmg;
								ydamage+=dmg;						
								shred_damage_tot+=dmg;
								shrednum++;
								shred_damage+=(1+RA*0.02)*(shred.adamage*(sr*src))*(1+ret_m1*bdebuff)*(1+0.3*mdebuff);
								en-=shred.energy;
								
								cp++;
								gcd=100+lag;
								s_count+=1;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	shred (normal): " << dmg <<"\n";
							}
							else{
								//cout << "Time: " << timer/100.0 << ", Energy: " << en <<"\n";
								en-=(int)(shred.energy*0.8);
								
								gcd=100+lag;
								s_count+=1;
								////cout << "\n" <<"Energy: " << en << ", Time: " << (1.0*timer)/100.0 << ", CP: " << cp <<"\n";
								//cout << "	shred (miss)" <<"\n";
							}
							
							goto fine;
							
						}
						break;
						
						
				}
				
			fine:;
				
			}
			
			
		}
		wdamage2+=wdamage;
		ydamage2+=ydamage;
		damage2=wdamage2+ydamage2;
		mangle_damage2+=mangle_damage;
		mangle_damage_tot2+=mangle_damage_tot;
		shred_damage2+=shred_damage;
		shred_damage_tot2+=shred_damage_tot;
		rip_damage2+=rip_damage;
		rip_damage_tot2+=rip_damage_tot;
		fb_damage2+=fb_damage;
		fb_damage_tot2+=fb_damage_tot;
		rake_damage2+=rake_damage;
		rake_damage_tot2+=rake_damage_tot;
		wdamage_sr2+=wdamage_sr;
		wbdamage2+=wbdamage;
		ybdamage2+=ybdamage;
		bear_damage2=wbdamage2+ybdamage2;
		mangleb_damage2+=mangleb_damage;
		lacerate_damage2+=lacerate_damage;
		maul_damage2+=maul_damage;
		swipe_damage2+=swipe_damage;
		threat2+=bear_aggro_mod*threat;
		oom2+=(oom/6000.0);
		
		if((wdamage+ydamage+wbdamage+ybdamage)>damagemax){
			damagemax= wdamage+ydamage+wbdamage+ybdamage;
		}
		
		if((wdamage+ydamage+wbdamage+ybdamage)<damagemin){
			damagemin= wdamage+ydamage+wbdamage+ybdamage;
		}
		
		dps_vector.push_back(100.0*((wdamage+ydamage+wbdamage+ybdamage)/(timer)));
		
		
		////cout << (int)(100.0*((wdamage+ydamage+wbdamage+ybdamage)/(timer))) << endl;

	}
	
	
	sr_damage2=mangle_damage2+shred_damage2+rip_damage2+fb_damage2+rake_damage2+wdamage_sr2;
	threat2+=damage2*cat_aggro_mod;
	
	double avgcycletime=(1.0*timer*(1.0*timer2))/(100.0*cycle_time);
	manglexcycle=((double)manglenum)/(1.0*cycle_time);
	shredxcycle=((double)shrednum)/(1.0*cycle_time);
	rakexcycle=((double)rakenum)/(1.0*cycle_time);
	ripxcycle=((double)ripnum)/(1.0*cycle_time);
	fbxcycle=((double)fbnum)/(1.0*cycle_time);
	manglebxcycle=((double)manglebnum)/(1.0*cycle_time);
	maulxcycle=((double)maulnum)/(1.0*cycle_time);
	laceratexcycle=((double)laceratenum)/(1.0*cycle_time);
	swipexcycle=((double)swipenum)/(1.0*cycle_time);
	
	avmangle=mangle_damage_tot2/((double)manglenum);
	avshred=shred_damage_tot2/((double)shrednum);
	avrake=rake_damage_tot2/((double)rakenum);
	avrip=rip_damage_tot2/((double)ripnum);
	avfb=fb_damage_tot2/((double)fbnum);
	avmangleb=mangleb_damage2/((double)manglebnum);
	avmaul=maul_damage2/((double)maulnum);
	avlacerate=lacerate_damage2/((double)laceratenum);
	avswipe=swipe_damage2/((double)swipenum);
	
	double  dps_average=100.0*((damage2+bear_damage2)/(1.0*timer*(1.0*timer2)));
	
	double sigma=0;
	double sigma2=0;

	
	sort( dps_vector.begin(), dps_vector.end() );
	int start_vector=(int)(0.40*dps_vector.size());
	int finish_vector=(int)(0.60*dps_vector.size());
	int size_vector=finish_vector-start_vector;
	
	//cout << endl << endl;
	//cout << start_vector << endl;
	//cout << finish_vector << endl;
	//cout << size_vector << endl;


	dps_average=0;
	
	for(int i=start_vector;i<finish_vector;i++){
		dps_average+=dps_vector[i];
	}
	
	dps_average=dps_average/size_vector;

	cout << endl << endl;

	for(int i=start_vector;i<finish_vector;i++){
		//cout<< dps_vector[i] << endl;
		sigma2+=((dps_vector[i]-dps_average)*(dps_vector[i]-dps_average))/(size_vector-1);
	}
	
	sigma=sqrt(sigma2);
	
	
	double parry_dps=(1-((1.0*timer*timer2)/(100.0*(boss_crit+boss_hit+boss_miss)))/boss_swing);
	
	//Writing DPS, White and Yellow components.
	
	cout << "\n" << "\n" << "DPS: " << dps_average << " +/- " << sigma <<", (Min-Max variance: " <<100.0*(damagemax-damagemin)/((damage2+bear_damage2)/(1.0*timer2))<<"%, Lower dps sample: " << 100.0*((damagemin)/(1.0*timer)) << ", Upper dps sample: " << 100.0*((damagemax)/(1.0*timer)) <<") , Cat: " << 100.0*damage2/(damage2+bear_damage2) <<"%, Bear: " << 100.0*bear_damage2/(damage2+bear_damage2) << "%, TPS: "<< ((threat2)*100.0)/(1.0*timer*(1.0*timer2)) <<"\n \n************************************** \n              CAT \n\n" << "White cat: " << (100.0*wdamage2)/(1.0*timer*(1.0*timer2)) <<", Yellow cat: " << (100.0*ydamage2)/(1.0*timer*(1.0*timer2)) << "\nWhite: " << (100.0*wdamage2)/(1.0*damage2) << "% (SR: " << 100.0*wdamage_sr2/(1.0*wdamage2) <<"%)\nMangle: " << (100.0*mangle_damage_tot2)/(1.0*damage2) <<"% (SR: " << 100.0*mangle_damage2/(1.0*mangle_damage_tot2) <<"%, Avg dmg: " << avmangle << ", #/cycle: " << manglexcycle << "), Shred: " << (100.0*shred_damage_tot2)/(1.0*damage2) << "%  (SR: " << 100.0*shred_damage2/(1.0*shred_damage_tot2) <<"%, Avg dmg: " << avshred << ", #/cycle: " << shredxcycle <<"), RIP: " << (100.0*rip_damage_tot2)/(1.0*damage2) <<"%  (SR: " << 100.0*rip_damage2/(1.0*rip_damage_tot2) <<"%, Avg dmg: " << avrip << ", #/cycle: " << ripxcycle <<")\nRake: " << (100.0*rake_damage_tot2)/(1.0*damage2) <<"%  (SR: " << 100.0*rake_damage2/(1.0*rake_damage_tot2) <<"%, Avg dmg: " << avrake << ", #/cycle: " << rakexcycle <<"), Ferocious Bite: " << (100.0*fb_damage_tot2)/(1.0*damage2) <<"%  (SR: " << 100.0*fb_damage2/(1.0*fb_damage_tot2) <<"%, Avg dmg: " << avfb << ", #/cycle: " << fbxcycle << ", Average Energy Usage: "<< avgfbenergy/(fbnum+1)<<")\nSR Total Value: " << (100.0*sr_damage2)/(1.0*damage2) << "%, (RIP Value without SR)/(SR Value): "<< (100.0*(rip_damage_tot2-rip_damage2))/(1.0*sr_damage2) <<"%, Savage Roar uptime: " << (100.0*sr_up)/(1.0*timer*(1.0*timer2)) <<"%\n \n************************************** \n              BEAR \n\n" << "White bear: " << (100.0*wbdamage2)/(1.0*timer*(1.0*timer2)) <<", Yellow bear: " << (100.0*ybdamage2)/(1.0*timer*(1.0*timer2)) << "\nWhite bear: " << (100.0*wbdamage2)/(1.0*bear_damage2) << "%\nMangle bear: " << (100.0*mangleb_damage2)/(1.0*bear_damage2) <<"%, Average Damage: " << avmangleb << ", Maul: " << (100.0*maul_damage2)/(1.0*bear_damage2) << "%, Average Damage: " << avmaul << ", Lacerate: " << (100.0*lacerate_damage2)/(1.0*bear_damage2) << "%, Average Damage: " << avlacerate << ", Swipe: " << (100.0*swipe_damage2)/(1.0*bear_damage2) << "% Average Damage: " << avswipe << "\n \n************************************** \n              OTHER INFOS \n\n" << "Bleed debuff uptime: " << (100.0*bdebuff_up)/(1.0*timer*(1.0*timer2)) <<"%" <<  ", Mangle debuff uptime: " << (100.0*mdebuff_up)/(1.0*timer*(1.0*timer2)) <<"%"  << ", Mangle-RIP debuff downtime: " << (100.0*mang_rip)/(1.0*timer*(1.0*timer2)) <<"%" << "\nAverage Cycle Time: "<<avgcycletime <<", Powershifts each " << (timer*1.0*(1.0*timer2))/(100.0*pw) << " seconds (average)" << ", Out five seconds rule time: " << (100.0*outfivesec)/(1.0*timer*(1.0*timer2)) << "%, Average time before oom: " << (oom2)/(1.0*timer2) <<" min\n" << "\n";
	
	if(cat_bear==0){
		cout << "\n" << "\n" << "Boss crit: " << (100.0*boss_crit)/((double)(boss_crit+boss_hit+boss_miss)) << "%, Boss hit: " << (100.0*boss_hit)/((double)(boss_crit+boss_hit+boss_miss)) << "%, Boss miss: " << (100.0*boss_miss)/((double)(boss_crit+boss_hit+boss_miss)) << "%, Boss white dps: " << 100.0*(boss_damage/(1.0*timer*timer2)) << ", Boss average weapon speed: " << (1.0*timer*timer2)/(100.0*(boss_crit+boss_hit+boss_miss)) << " sec." << ", Boss average parried attacks x sec: " << 100.0*(100.0*(boss_parried))/(1.0*timer*timer2) << "%, Average Boss White DPS increase due to parry: " << parry_dps*100.0<<"% " << "\nChance to die: " << ((1.0*silence)*100.0*dead)/(1.0*(timer)*1.0*timer2) << "% without heals in: " << silence/100.0 << " seconds, chance in a " << sim_time/6000.0 << " minute fight: " << (1-pow((1-(((1.0*silence)*100.0*dead)/(1.0*(timer)*1.0*timer2))), (sim_time/silence)))*100.0 <<"%\n\n";
			}
	
	/*Defensive Stats after the buffs (vs. a raid boss, full stacked raid)*/
	//Real HP
	int real_hp = (int)(myhp_caster/((1+parry_dps)*(1-mydr)*(1-avoidance)));
	int real_hp_bear = (int)(myhp_bear/((1+parry_dps)*(1-mydr_bear)*(1-avoidance_bear)));
	
	
	cout << "_____________________________________" << endl << endl;
	
	cout << "Defensive Stats after the buffs (vs. a raid boss, full stacked raid + Devotion Aura)" << endl << "_______________________" << endl << endl;
	cout << "Stamina (cat): " << (int)stamina << endl;
	cout << "Stamina (bear): " << (int)(stamina*1.25*1.20) << endl;
	cout << "Cat armor: " << myarmor_caster << endl;
	cout << "Bear armor: " << myarmor_bear << endl;
	cout << "Physical Damage Reduction Cat: " << mydr*100 << "%" << endl;
	cout << "Physical Damage Reduction Bear: " << mydr_bear*100 << "%" << endl;
	cout << "Defense: " << defense << endl;
	cout << "Chance to be critical hit: " << tobecrit*100 << "%" << endl;
	cout << "Dodge (cat): " << mydodge*100 << "%" << endl;
	cout << "Dodge (bear): " << mydodge_bear*100 << "%" << endl;
	cout << "Miss: " << mymiss*100 << "%" << endl;
	cout << "Total Avoidance (cat): " << (avoidance)*100 << "%" << endl;
	cout << "Total Avoidance (bear): " << (avoidance_bear)*100 << "%" << endl;
	cout << "Total HP (cat): " << myhp_caster << endl;
	cout << "Total HP (bear): " << myhp_bear << endl;
	cout << "Tank Points (hp equivalent with 0% avoidance, 0% Damage Reduction and without parry from the boss) (cat): " << real_hp << endl;
	cout << "Tank Points (hp equivalent with 0% avoidance, 0% Damage Reduction and without parry from the boss) (bear): " << real_hp_bear << endl;
	
       cout << "_____________________________________" << endl << endl;
	
	return 0;
}
I know it's heavy spaghettificated but actually I don't have much time to polish it.
To do:
implement boss special attack
implement boss magical attack
implement trinket usage

@coders: does anyone know a simple way to add an interface, I think it could work (to be quick) an html/java interface that write down stats in a file and starts the program. Any idea?

Last edited by nightcrowler : 10/05/08 at 2:46 AM.

Offline
Old 10/05/08, 4:01 AM   #2738
summlan
Von Kaiser
 
Tauren Druid
 
Kazzak (EU)
Originally Posted by nightcrowler View Post
Here is my code updated at 9038 build:

@coders: does anyone know a simple way to add an interface, I think it could work (to be quick) an html/java interface that write down stats in a file and starts the program. Any idea?
Why not use visual studio and make a real interface? Or do you want it on a webpage?

Something like

1. add the variables, saves that to a txt-file and run the program.
2. program saves the result to a file.
3. displays the results from that file.

Could probably work with flash, maybe even convert the program to actionscript.
If im not covered in work tomorrow il see if i can toy around with it.

monday edit: oh god, it may take a while to convert it to actionscript. The good thing is that im not that buzy at work, the bad thing is that i easily give up on things, il let you know how things work out.

monday afternoon edit: Hmm i really have to speed it up abit, think il have to rewrite the entire code from scratch. Removing bear, mana, mp5 and defense-stuff wasnt enough.
Maybe i should make a flashgame instead where you actually push mangle, rake, savage roar etc. with scrolling combat text. and a small omen/recount.

Last edited by summlan : 10/06/08 at 11:44 AM.

Offline
Old 10/05/08, 4:04 PM   #2739
Taudark
Von Kaiser
 
Tauren Druid
 
Kor'gall (EU)
Originally Posted by Brute View Post
Glyph of Maul 'works' now, in that its hitting 2 targets. Its too bad Blizzard never figured out/implemented a fix to allow cleave/frontal multitarget attacks to not break cc because the dmg output with mutlti target maul, berserk and swipe is quite amazingly fun right now....
Just turn your back to the CC'ed targets. Not that hard. :P

Offline
Old 10/06/08, 3:06 AM   #2740
kameelyan
Von Kaiser
 
Tauren Druid
 
Kil'Jaeden
I have to admit I have not read every post in here, as that would take a lot of time. But has anyone talked about where TF is going to fit into the cat dps rotation? I know that rake is an awesome combo point generator, so I was thinking something along the lines of:

Mangle
Rake
Shred to 5CP
Savage Roar
Mangle
Rake
Shred to 5CP
Rip
Mangle
Rake
Shred to 5CP

Here is where it gets iffy. How much time is left on SR is huge here. Could I FB? And if I do, I think that would be the time to use TF because of 3/3 KotJ. So I gain 60 energy, which helps generate 5 CBs quicker, and then SR and rinse and repeat?

I'm thinking that TF is most useful after a FB is that's what you're using instead of rip. I'm also thinking RIP > FB for energy efficiency unless you use TF right after it with 3/3 KotJ.

Thoughts?

Offline
Old 10/06/08, 4:40 AM   #2741
nightcrowler
Don Flamenco
 
nightcrowler's Avatar
 
Night Elf Druid
 
Runetotem (EU)
4 cp SR, 5 cp RIP, 5 cp FB (if you have only 2 ticks left).

basically you RIP about 60% of the time and FB 40% of the time.

mangle: keep it always up
rake: keep it always up
Shred: when you don't mangle or rake

Tiger's Fury when you have less than 40 energy and it's not on CD.

The average cycle with full t7.10 gear takes about 30-31 seconds.

You will have 1-2 seconds without SR up but you will regenerate energy in that time so basically it's always up when you use your specials.

Offline
Old 10/06/08, 6:53 AM   #2742
tangedyn
Piston Honda
 
Tauren Druid
 
Thaurissan
From the looks of things, it seems that to really maximize your DPS, you can no longer follow a fixed DPS rotation or cycle anymore. We'll have to play a lot more like warlocks watching their DoT timers and keeping up their DoTs. We have 3 things that need to be kept up 100% of the time in order to maximize our dps. And because of misses/dodges/crits, we cannot predict exactly when we need to put them up in a particular cycle.

From testing around with my DPS Simulator I have determined a few things:
1. Whenever Savage Roar fades, it is better to cast Savage Roar with how ever many Combo Points you have already accumulated (even if it's only 1 CP), than to continue to accumulated up to at least 2, 3, 4 or 5 Combo Points before casting Savage Roar.
2. Anytime that Rake debuff is not up is a major loss of DPS. It is therefore important to accumulated until 90 CPs (not more than that in case OoC procs and you waste energy) before using Rip or Shred (or Mangle if you are using Mangle Spam strategy). This is to avoid draining yourself of energy just before Rake debuff fades.
3. Mangle must always stay up as long as Rake is ticking.
4. Ripping with anything less than 5 CPs is a nett loss of DPS
5. Rip always does more damage than Ferocious Bite, unless you do not have the Rip glyph, in which case Ferocious Bite with 5/5 RnT and 5/5 Feral Aggression wins.

Therefore in order to maximize DPS, it seems that the strategy would not be to follow a fixed DPS cycle, but to follow the following set of logical rules at every point of time. This will require a lot of concentration, watching 2 DoT timers, 3 buff timers, combo points and energy bar. Oh, let's not forget environmental effects and moving targets...

1. If Savage Roar is down and Combo Points >= 1, cast Savage Roar
2. If Combo Points = 5, cast Rip
3. If Rake is down, cast Rake
4. If Mangle is down, cast Mangle
5. If Omen of Clarity is up OR Energy >= 90, cast Shred (or Mangle if you have 2x T6)

I'll post some logs of what happens with this strategy soon, but pretty much the Savage Roar / Rip cycles end up quite random. Sometimes there are 2 rips for every 1 savage roar, sometimes there are 2 savage roars for each rip, and sometimes it simply alternates between the two. The number of combo points on Savage Roar is quite random too, but biased towards 1 point and 5 points, followed by 2 points.

_____
Cat DPS Simulator with customizable strategy

Last edited by tangedyn : 10/06/08 at 7:00 AM.

Offline
Old 10/06/08, 7:21 AM   #2743
Beace
Von Kaiser
 
Orc Hunter
 
Zenedar (EU)
From the sounds of things, doing optimal dps as a cat is gonna be pretty damn hard. Which mostly is a good thing. Is there any other class that ends up with rotations of similar difficulty?

Offline
Old 10/06/08, 7:52 AM   #2744
nightcrowler
Don Flamenco
 
nightcrowler's Avatar
 
Night Elf Druid
 
Runetotem (EU)
@tangedyn

1. I need to test if SR always up is a good strategy, I've tryed it some patch ago and it didn't worked good, I'll try it again.
2. It seems reasonable, I'll implement it soon and see the result.
3. yes obviosly.
4. same as 3.
5. Not true, expecially with glyph and 2t7 you will have 19 seconds of rip. In 19 seconds you will gain usually more than 5 cp. if you scroll up the post you will see a formula made by me to calculate RIP vs FB, because if you have for example 7-8 seconds left on rip you will go better with FB or you'll waist some rip ticks.

Offline
Old 10/06/08, 7:59 AM   #2745
tangedyn
Piston Honda
 
Tauren Druid
 
Thaurissan
Originally Posted by Beace View Post
From the sounds of things, doing optimal dps as a cat is gonna be pretty damn hard. Which mostly is a good thing. Is there any other class that ends up with rotations of similar difficulty?
Maybe we'll need a mod that helps determines your optimal move to make... displays it on the screen with a countdown timer. "In 2.7 seconds, cast RAKE"

_____
wowcatsim - Google Code

Offline
Closed Thread

Go Back   Elitist Jerks » Class Mechanics » Druids

Thread Tools