Relative Content

Tag Archive for javaarraysclassobjectmethods

How come I’m running into an error after all the enemies are defeated, shouldn’t it have ended?

I’m making a program using java, and the particular issue I ran into was in the battle method, where the program runs into an error after all the enemies are defeated. I tried to alter it a couple time already, but unable to come up with a proper solution. The terminal states that the error is in the calculation of
**dmg = (skill[i][0] * charList.get(i).getSTR()) / enemyList.get(0).getDEF();**