click little thumbnail
This is done using a total of five randomizers.
On the player's side, there are two randomizers that are activated depending on which type of shot the player decides to take.
Let's say that
M is a miss,
H is a hit, and
C is a crit.
It goes like this:Easy shot
HHCMHard Shot
HCMMThose two randomizers apply to the enemy as well, however the enemy side has a third randomizer that selects which type of shot it wants to take before running one of the "hit chance" randomizers.
If
E is an easy shot, and
H is a hard shot, then
the attack selector looks like this:EEHEach ship has 20hp, but due to the printCountUnderflow system I'm using, the ship's HP needs to go BELOW 0 for it to be destroyed. This is fine since it applies to both sides, and can be easily explained to whoever's playing.
Currently, easy hits do 1hp damage, easy crits and hard hits do 3hp damage, and hard crits do 5hp damage.
These will probably be tweaked.
I'm planning on doing a singleplayer gamemode in which the player advances through randomized encounters to reach the end, but this can also work for a competitive mode. All you would need to do for that is to remove the attack selection randomizer and have the two hit chance randomizers activated by a second control panel where player 2 would be. Then you just have them take turns.
I'll likely host this for people to try out.