Combat - Laschion/Escape- GitHub Wiki

Combat

Use random.util to decide what event happens based on the number given 0-10. Each battle that you take place in will assign a value to each weapon that you are carrying. Ex: a sword against a bunny will definitely have a value of 10 as you can instakill as in the table below, however that sword against a rock troll of something may only have a value of 6. Just because a weapon has a value of 10, however, does in no way guarantee an instant kill it simply grants the chance to. A weapon with 10 value has a 2 in 10 chance to instakill while the weapon with a value of 6 has a 2 in 6 chance to simply minorly nick the opponent

0 Opponent insta kills player

1-2 Opponent Fatally Wound player

3-4 Opponent Minor Nicks player

5-6 Minor Nick (opponent)

7-8 Fatally wound (opponent)

9-10 Insta Kill (opponent)

In terms of damage: Each monster will have a set amount of health, so will the player so say the troll has a health of 100 a fatal wound would do maybe 70 damage while a minor nick might do 20 (will probably find percentages of each creature's max health later and base damage on that) however that also goes for the player. The insta death will simply remove the amount of damage a player has exactly so VariablePlayerHealth = VariablePlayerHealth - VariablePlayerHealth And vice versa for the insta kill condition. If the weapon has a condition of sharp (added to make certain weapons better maybe find a grinding stone or whatever to add condition of sharp) a weapon with the condition sharp will add a static +10 damage to ANY hit so say you roll a 5-6 on a troll and do 23 damage to it because of the sharpness modifier you will end up doing 33 damage total.