Basic combat

This commit is contained in:
Jakub 2026-05-24 00:17:34 +08:00
parent 31a0bd9a34
commit 0b164302c4
7 changed files with 636 additions and 55 deletions

View file

@ -15,61 +15,31 @@ Once both of those dependencies are installed, run:
./bitter-duel
#+end_src
* Design & Gameplay
* How To Play
First to 3 hits wins.
In Bitter Duel, you control a single character on a 5 by 5 grid. There is a single opponent facing off against you.
You are blue.
Each character has a stance and hand position, and can move, attack, or assume a stance on their turn.
Each character has 3 health.
Each unit on the board has a stance and a hand position.
The stance can be high, mid, or low. You can change your stance each turn.
Hand position can be high-right, high-left, mid-right, mid-left, low-right, low-left --- forming a circle.
Each turn you can choose to attack from your current hand position, or from an adjacent one on the circle.
For example, from high-right, you can attack from high-right, high-left, or mid-right.
After the attack, your hand moves to the opposite position.
For example, attacking from high-right, your hand becomes low-left.
You can move 1 square on each turn.
Build your order: move, change stance, and attack.
Orders are submitted simultaneously and then resolved: movement first, then stance change, then attack if in range (neighboring squares).
** Stances
Stances are initial striking positions, and provide some intrinsic bonus offense and defense on the turn that the stance is assumed.
Your chance to hit is higher if your attack matches your stance. A mid-right attack has a lower chance of hidding from a high stance than a high-right attack.
After attacking or moving, your stance is broken until you next assume it.
There are 4 stances:
- High (Up-Left/Up-Right)
- The High stance has a higher defense (70) against High and (60) Stab attacks, but low defense against Low attacks (30).
- The High stance adds additional offense to your High attacks (80).
- Low (Down-Left/Down-Right)
- The Low stance has higher defense (70) against Low and (60) Stab attacks, but low defense against High attacks (30).
- The low stance adds additional offense to your Low attacks (70).
- Side (Mid-Left/Mid-Right)
- The Side stance has higher defense (70) against swing attacks, but low defense (30) against High and Low attacks.
- The Side stance adds additional offense to your Swing attacks (70)
** Hand Position
Your hand position adds defense against attacks coming from that direction (60) and dictates what next attacks you can perform.
The hand positions are:
- Up-left:
- Defense against top and right attacks.
- Up-right
- Defense against top and left attacks.
- Mid-right
- Defense against mid and left attacks.
- Mid-left
- Defense against mid and right attacks.
- Down-left
- Defense against bottom and right attacks.
- Down-right
- Defense against bottom and left attacks.
** Attacks
Each of the hand positions is also a type of attack. You may perform an attack from the 3 positions near the hand position.
For example, Up-Left can attack from Up-Left, Up-Right, or Mid-Left.
After an attack, your hand position changes to the opposite of the attack. So Up-Left becomes Down-Right.
** Attacking and Turns
Both players lock in their actions, then the turn is resolved like so:
1. Handle any stance changes
2. Handle any movement.
3. Resolve attacks.
To resolve an attack, get the offense of the attack and defense for that attack from the defender.
Subtract Defense from Offense, divide by 10, and add 5. Call this the "target number".
Roll a number between 1 and 10. If the roll is lower than the target number, the attack goes through and the defender takes a hit.
Characters always attack and defend from the hand position they start in at the beginning of the turn.
* Credits
- https://sethbb.itch.io/32rogues
Your stance also determines your defense.
A high stance has bonus defense against high attacks, but weak defense against low attacks.
A low stance is the opposite.
A mid stance has bonus defense against mid attacks, but weak defense against high and low.