Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int getFlailDmg(int,int);
- void displayFlailHPRanges(int,int);
- int main(){
- int LOW_MAXHP = 70, HIGH_MAXHP = 95;
- displayFlailHPRanges(LOW_MAXHP, HIGH_MAXHP);
- }
- void displayFlailHPRanges(int LOW_MAXHP, int HIGH_MAXHP)
- {
- int oldDmg = 200;
- printf("[BP] [200] [150] [100] [80] [40] [20]");
- for(int maxHP = LOW_MAXHP; maxHP <= HIGH_MAXHP; maxHP++){
- printf("\n%3d : %d", maxHP, 1);
- for(int currHP = 1; currHP <= maxHP; currHP++){
- int dmg = getFlailDmg(currHP, maxHP);
- if(dmg != oldDmg){
- oldDmg = dmg;
- printf("-%2d, %2d", currHP -1, currHP);
- }
- }
- printf("-%2d", maxHP);
- oldDmg = 200;
- }
- }
- int getFlailDmg(int currHP, int maxHP){
- int px = currHP * 48 / maxHP;
- if (px < 1) px = 1;
- int dmg;
- if(px <= 1) dmg = 200;
- else if (px <= 4) dmg = 150;
- else if (px <= 9) dmg = 100;
- else if (px <=16) dmg = 80;
- else if (px <=32) dmg = 40;
- else dmg = 20;
- return dmg;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement