#### Archived

This topic is now archived and is closed to further replies.

# MoP beta discussion

## 176 posts in this topic

I said a while ago that I'd throw together some means to display Havoc's formula graphically, but I soon realized that there are too many variables to produce diagrams that would help in most fights. If someone is interested, I'll attach my Matlab files. They aren't meant to produce only one type of output though, for example you can turn any of the initial variables into a vector. It's fun to play around, especially since even minor things like the number of Manatides or the delay between Rapture procs swings the outcome one way or the other (in a fight where you can stand and spam without interruption).

By the way, in case I'm not the last person to realize this: PW:S actually costs more than Rapture returns until pretty high amounts of spirit (4067@lvl85 and over 12400@lvl90).

This is the initial function that can be used to do individual calculations (OUTPUT FOR SCALAR VARIABLES) or for checking how a single variable influences the result (by changing that variable into a vector and plotting it vs the result using OUTPUT FOR VECTOR VARIABLES)

```
function priest_solace_mb

%Calculating the difference between PW:Solace and Mindbender

%initial variables

spirit                  =10000; %total spirit on charscreen

haste                   =0.1; %haste in %/100

basemana                =306000; %basemana (306000 for lvl90)

mana_avg                =4; %average mana cost of all spells cast

casttime_avg            =2.1; %average cast time of all spells cast

fightlength             =[2:0.01:15].*60; %fightlength in seconds

time_between_rapture    =20; %time between two procs of Rapture in seconds

number_manatides        =2; %number of Mana Tides available in the raid

%mana regeneration per 5 seconds with the assumption that the Shamans who drop the Mana

%Tides have the same amount of spirit as the Priest. This skewers the

%numbers for high and low amounts of spirit.

regen_base=0.02*basemana+(spirit*1.1287*0.5)*(1-number_manatides*16/180)+3*(spirit*1.1287*0.5)*(number_manatides*16/180);

regen_rapture=spirit*1.5*(60/time_between_rapture)/12;

regen_mana_depletion=306000./fightlength*5; %assuming we end the fight on 0 mana

regen_total=regen_base+regen_rapture+regen_mana_depletion;

%number of casts we can cast per minute without PW:Solace or MB

number_casts_base=regen_total*12/basemana/mana_avg*100;

%number of casts we need to be able to cast without PW:Solace or MB until

%PW:Solace is better than MB

%####   OUTPUT FOR SCALAR VARIABLES

%number of casts per minute (other than PW:Solace) that using PW:Solace instead of MB

%allows us to cast more per minute:

%Positiv means PW:Solace is better

%Negative means MB is better

%disp(['Number of casts per minute additional by using Solace: ', num2str(result)])

%####   OUTPUT FOR VECTOR VARIABLES

%example plot with variable fightlength, for a different output set

%fightlenght to scalar, another variables to vector and substitute that

%variable in the next line

%plot(fightlength, result)

function [N]=calc(H,M,T,FL)

sf=(fix(FL/60/3+0.5)*9*3)/(FL/60);

mb=(fix(FL/60+0.5)*11*4/3)/(FL/60);

N=(60*(1+H)-(2.143+T/M)*(mb-sf-0.7/1.5*(1+H)))/T;

end

end

```
The other file uses the Symbolic Math Toolbox and the calculation of the first file mashed together in one formula to display stuff. There are a lot of possibilities, I've provided two examples (notice that the first example uses only haste and spirit as variables and the rest as parameters) that have to run independently. Simple uncomment and comment the other part to switch.
```%#### example useage:

%plots haste vs spirit in regard to the question whether MB or Solace is

%better for this fight:

%along the line PW:Solace = MB

%above the line PW:Solace < MB

%below the line PW:Solace > MB

% syms H S

% f=(60*(1+H)-(2.143+T/M)*((fix(FL/60+0.5)*11*4/3)/(FL/60)-(fix(FL/60/3+0.5)*9*3)/(FL/60)-0.7/1.5*(1+H)))/T-(0.02*306000+(S*1.1287*0.5)*(1-number_manatides*16/180)+3*(S*1.1287*0.5)*(number_manatides*16/180)+S*1.5*(60/time_between_rapture)/12+basemana./FL*5)*12/basemana/M*100

% M=4; %average mana cost of all spells cast

% T=2.1; %average cast time of all spells cast

% FL=6.*60; %fightlength in seconds

% number_manatides=1; %number of Mana Tides available in the raid

% time_between_rapture=20; %time between two procs of Rapture in seconds

% basemana=306000; %basemana (306000 for lvl90)

% ezplot(f, [0,0.5], [5000,20000]);

% hold on

% title('PW:Solace vs MB, above line MB > Solace');

% grid on

% hold off

%#### other uses:

%you can use solve(f, S) to find the formula S(H)=x, where f(x)=0 (the

%break even point between MB and Solace) and plot stuff regarding this

%formula

%this example uses fightlength. It shows the amount of spirit where Solace

%and MB break even. More spirit = above the line = MB is better

syms H S M T FL number_manatides time_between_rapture basemana

f=(60*(1+H)-(2.143+T/M)*((fix(FL/60+0.5)*11*4/3)/(FL/60)-(fix(FL/60/3+0.5)*9*3)/(FL/60)-0.7/1.5*(1+H)))/T-(0.02*306000+(S*1.1287*0.5)*(1-number_manatides*16/180)+3*(S*1.1287*0.5)*(number_manatides*16/180)+S*1.5*(60/time_between_rapture)/12+basemana./FL*5)*12/basemana/M*100;

f_S=solve(f, S);

f_S_sub=subs(f_S, {H, M, T, number_manatides, time_between_rapture, basemana}, {0.1, 4, 2.1, 1, 20, 306000})

FL=[2:0.01:10].*60;

ezplot(f_S_sub, FL)```