this determines your opponents attack
this is on c++, and it has to have util.h. paste this code in.
#include "util.h"
int main(){
int defence=readDouble("Your defence: ");
double power=readDouble("Oponent's move power: ");
double mod=readDouble("Oponent's modifiers: ");
double damage=readDouble("Damage dealt: ");
double attack2=(42/power*50+2)*mod*defence/damage;
double attack1=(42/power*50*0.85+2)*mod*defence/damage;
cout<<"Your opponents minimum possible attack is about "<<attack1<<endl;
cout<<"Your opponents maximum possible attack is about "<<attack2;
return 0;}
the first number is the lowest possible attack, and the second number is the highest possible attack. i probobly could remove the decimals, but i dont feel like it.
this is on c++, and it has to have util.h. paste this code in.
#include "util.h"
int main(){
int defence=readDouble("Your defence: ");
double power=readDouble("Oponent's move power: ");
double mod=readDouble("Oponent's modifiers: ");
double damage=readDouble("Damage dealt: ");
double attack2=(42/power*50+2)*mod*defence/damage;
double attack1=(42/power*50*0.85+2)*mod*defence/damage;
cout<<"Your opponents minimum possible attack is about "<<attack1<<endl;
cout<<"Your opponents maximum possible attack is about "<<attack2;
return 0;}
the first number is the lowest possible attack, and the second number is the highest possible attack. i probobly could remove the decimals, but i dont feel like it.
Last edited: