%% Script for graphing the Chi generation of different Monk talents
EPS_reg=12.5; % regular energy per second unbuffed, including haste, excluding Ascension
maxLength=12*60;
minLength=1*60;
fightLength=(minLength:maxLength)';
% PS and CB proc times
timePS = [0 11:20:maxLength]; %up at fight start, then on avg. 10 sec after
timeCB = 1:90:maxLength;
%Calculate Ascendance Chi generation
timeEPS=1:maxLength+1;
energyPerSecond=EPS_reg*ones(1,40)*1.3; %BL taken into account
if(maxLength>40)
energyPerSecond=[energyPerSecond EPS_reg*ones(1,maxLength+1-40)];
end
AscEPSGain=0.15*energyPerSecond;
AscEnergyGain=zeros(1, numel(AscEPSGain));
for k=1:numel(AscEnergyGain)
AscEnergyGain(k)=sum(AscEPSGain(1:k));
end
AscJabGain=floor(AscEnergyGain/40);
%Compute gained Chi
chiGained=zeros(numel(fightLength),3);
for i=1:numel(fightLength)
chiGained(i,1) = numel(find(timePS<fightLength(i)-2)); %2 sec to make use of PS
chiGained(i,2) = 4*numel(find(timeCB<fightLength(i)-5)); %5 sec to make use of CB
chiGained(i,3) = AscJabGain(find(timeEPS<fightLength(i),1,'last'));
end
chiPerSecond=chiGained./repmat(fightLength, [1 3]);
%Uncomment for filtered lines (looks nicer)
% B=fir1(30,0.01);
% chiPerSecond=filtfilt(B,1,chiPerSecond);
plot(fightLength/60, 60*chiPerSecond);
legend('Power Strikes', 'Chi Brew', ['Ascendance (' num2str(EPS_reg) ' energy per second)']);
xlabel('Fight length [min]')
ylabel('Avg Chi per min')
title('Chi generation talent comparison')
axis([min(fightLength)/60 max(fightLength)/60 2 4]);