Commit 578e1498 authored by Sofia Aicha Delijaj's avatar Sofia Aicha Delijaj
Browse files

Merge branch 'master' of gitlab.unige.ch:Manish.Kumar/webpoke

parents e3b53ce5 db7fa39d
......@@ -195,7 +195,7 @@ export class BattleComponent implements OnInit {
calculeDmg(eff, power){
console.log(eff, power);
console.log(this.enemyDef + " " + this.atk);
let dmg = ((((0.4*this.level+2)*this.atk*power)/(50*this.enemyDef))+2)*(eff/100)*(Math.random()*(1 - 0.85)+ 0.85)
let dmg = Math.round(((((0.4*this.level+2)*this.atk*power)/(50*this.enemyDef))+2)*(eff/100)*(Math.random()*(1 - 0.85)+ 0.85));
this.applyDamageOpponent(dmg);
console.log(dmg + " " + this.enemyCurHealth);
return dmg;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment