@ aazimon:
Thank you, I'm going to change this in the next update. I thought that it would be interesting to see what actually went on "behind the scenes" alomst like playing a tabletop or D&D-kind of game. But I realised myself that sooner or later you just spam "1." again and again till the fight is over
@ Rebirth:
These are good ideas. Much appreciated

- show chance to win on every turn
Although I'm not sure how to do that, I'll try to come up with a solution.
Overall, I really like the battle system where you use dice to determine the chance (guess that char's stats affect number required to some actions right???)
Indeed. Basically it works somewhat like the Warhammer tabletop rules.
First Strike:Whoever has the highest Initiative strikes first each turn - If the Initiatives are equal a die decides the outcome).
Chance to Hit:This decides if the attack hits the target. Therefore both the player's and the mob's Weapon Skill are compared based on
the following rules.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
if(attWS == defWS) { neededToHit = 3; } else if(attWS >= (defWS + 1) && attWS < (defWS + 5)) { neededToHit = 2; } else if(attWS >= (defWS + 5)) { neededToHit = 1; } else if(attWS <= (defWS - 1)) { neededToHit = 3; } else if(attWS <= (defWS - 2) && attWS > (defWS - 5)) { neededToHit = 4; } else if(attWS <= (defWS - 5)) { neededToHit = 5; } |
After that a die is thrown and the total is compared to neededToHit. If the total >= neededToHit the attack hits.
Damage:The damage is based on the attacker's strength (and luck of course

).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| rnd = dice.rollDice(1, 6); System.out.println("> The die comes up with " + rnd + "."); System.out.println(""); if(rnd == 1) { System.out.println("Weak hit."); damage = (int) (attStr/2); } else if(rnd == 2 || rnd == 3 || rnd == 4 || rnd == 5) { System.out.println("Normal hit."); damage = (int) (attStr); } else if(rnd == 6) { System.out.println("Critical hit."); damage = (int) (attStr + attStr/2); } |
Block Damage:And last but not least the damage can be blocked. This is decided by comparing the defender's resistance
and the attacker's strength:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| if(defRes == attStr) { neededToBlock = 5; } else if(defRes >= (attStr + 1) && defRes < (attStr + 5)) { neededToBlock = 4; } else if(defRes >= (attStr + 5)) { neededToBlock = 3; } else if(defRes <= (attStr - 1)) { neededToBlock = 5; } else if(defRes <= (attStr - 2) && defRes > (attStr - 5)) { neededToBlock = 6; } else if(defRes <= (attStr - 5)) { neededToBlock = 6; } |
@ Bonbon-Chan:
I'm just starting on GUIs but I'm not sure if I already try to use them ... yet. Especially as I'm still struggling with objects (super, subclasses, where to use them, how to use them, etc...)

.
Greetings,
EatenByAGrue