public class Character{
int baseHp;
String name;
int baseAtk;
int baseDef;
int baseSpd;
public Character(String name, int baseHp, int baseAtk, int baseDef, int baseSpd){
this.name = name;
this.baseHp = baseHp;
this.baseAtk = baseAtk;
this.baseDef = baseDef;
this.baseSpd = baseSpd;
}
public String getName(){
return name;
}
public long getMaxHp(long MaxHp,int level){
MaxHp = Math.round(baseHp*Math.pow(level,1.2));
return MaxHp;
}
public long getAttack(long Attack, int level){
Attack = Math.round(baseAtk*Math.pow(level,1.2));
return Attack;
}
public long getDefince(int level, long Define ){
Define = Math.round(baseDef*Math.pow(level,1.2));
return Define;
}
public long getSpeed(int baseSpd, int level, long Speed){
Speed = Math.round(baseSpd*Math.pow(level,1.2));
return Speed;
}
public long getTargetEP(long EP, int level){
EP = Math.round(10 * Math.pow(level,1.2));
return EP;
}
long currentHP;
long currentEP;
public long getHP(){
return currentHP;
}
public long getEP(){
return currentEP;
}
public void increaseHP(int amount){
if (currentHP + amount<= 0) {
this.currentHP = 0;
} else if (currentHP + amount> this.getMaxHp()){
this.currentHP = this.getMaxHp();
} else {
this.currentHP = currentHP;
}
}
}