h-dong / slash-dash-rpg

Built this RPG for fun, built with React uses xState to manage inventory, combat, stats and etc state.
https://slash-dash.netlify.app/
1 stars 1 forks source link

Feature/attack modes #6

Open MatthiasGu opened 4 years ago

MatthiasGu commented 4 years ago

Changes

The values still need to be adjusted, the PR is opened to allow for feedback on the logic, etc and to allow to test the values.

1) Adding four different attack types:

Monsters always attack using a random attack type - in the future, perhaps we can add an algorithm that would allow monsters to choose more appropriate attack types based on battle situation, e.g. if player is low on health, monsters should use strong attacks to attempt to finish the fight.

Player chooses attack type by clicking on one of 4 buttons.

2) Readjusted some combat mechanics. For example, defence is more valuable as it both reduces damage and increases block chance. Also implemented a basic attack table to compute attack outcomes. There is now one roll to determine the outcome of the attack, instead of multiple rolls to determine hit, block, crit, etc.

If the combatant who attacks first kills the opponent, the opponent should not be able to retaliate.

3) Added a bit more information in the logs, I am not 100% sure how game engine works, so I added an additional action to allow that.

Known issues (will be fixed)

h-dong commented 4 years ago
Screenshot 2020-01-28 at 19 28 37

What?

MatthiasGu commented 4 years ago
Screenshot 2020-01-28 at 19 28 37

What?

Yes, the values probably need tuning and testing :)

h-dong commented 4 years ago
Screenshot 2020-01-28 at 19 28 37

What?

Yes, the values probably need tuning and testing :)

I don't mind hitting 0 all the time, but prob should fix this negative damage. Because it is effectively healing the enemy which is very broken.