Hello again!
Time for another update of my progress so far with the project
lately i've been focusing on the combat mechanics of the game
Last week I finished implementing the core of the combat system, and everything is now fully functional.
Here’s a breakdown of the main combat features that are now complete:
- Damage Calculation system
- Hitbox properties
- The Poise System
- Back Attacks
- Cooldown Manager
- Azalea’s MP Mechanic
I would like to give some insight for each one of these topics:
Damage Calculation System
I previously showed you the attribute system, and I’m glad to say it’s now 100% complete and fully integrated into all characters.
The damage calculation system is now fully implemented and works for every entity in the game that has attributes, a hitbox, and a hurtbox.
Here’s how it works:
- Attacks are divided into Physical or Magical.
- Physical attacks use the attacker’s final ATK vs the target’s final DEF.
- Magical attacks use the attacker’s final MATK vs the target’s final MDEF.
- Every hitbox has a property called Hitbox Attack Ratio, which determines the strength of that specific attack or skill.
- There’s also a final multiplier that can further increase the damage based on the character’s Physical or Magical Damage Multiplier attribute.
The basic formula looks like this:
(ATK - DEF) × Hitbox Attack Ratio × Final Multiplier
Additionally, both attacks and targets can have critical hits enabled. If the hitbox allows critical hits and the hurtbox can receive them, the critical chance calculation will trigger.
Critical Hits
If the conditions are met, an attack has a chance to cause critical damage.
The critical chance calculation is a bit more complex as it takes several parameters into account:
Critical Chance Formula:
Attacker Crit Rate + Attack Extra Crit Rate - Target Crit Defense / 100
The result is how much % chance the attack has to crit
and if its a critical damage the damage formula changes:
Critical Damage Formula:
Critical hits bypass part of the target’s defense based on your Critical Damage attribute and the target’s Critical Defense.
They always deal more damage than a regular hit ,even if the target has very high critical defense.
Here's how it works:
Base Critical Damage is calculated with a modified defense:
- Base Crit Damage = ATK - max(1, DEF - Attacker Crit Damage + Target Crit Defense) × Attack Ratio x Final Damage multiplier
Then a Final Critical Multiplier is applied:
- Final Crit Multiplier = 1.2 + (Attacker Crit Damage - Target Crit Defense) / 50
Minimum Critical Damage (guaranteed to be stronger than normal):
- Minimum Crit Damage = Normal Damage + (Attacker Crit Damage / 2)
The final critical damage is the result of Base Crit Damage × Final Crit Multiplier, and it will never go below the minimum shown above.
You can see the critical hits in this post gif , they are indicated by having a diferent color than the regular hits and have a "✧" Alongside the damage number, enemies can also apply critical hits to the player so be careful
Hitbox Properties
Alongside the new damage system, I also expanded the hitbox system with several new properties so every attack can work smoothly with the new damage calculation system.
Each hitbox now controls:
- Whether the attack is Physical or Magical
- The main resource it damages: HP, MP, Poise, or even increase Arousal / Desire
- Attack Ratio a multiplier that determines how strong the attack is (heavier attacks can have higher ratios for example)
- Whether the attack can deal Critical Damage
- Whether the attack can trigger Back Attacks
It also supports additional bonuses:
- Extra Critical Rate (flat bonus or multiplier, or both)
- Extra Back Attack bonuses
- Other damage multipliers
Extra Resource Damage:
Many attacks can damage more than one resource at the same time.
For example, most physical attacks deal HP damage + Poise damage together.
This extra damage can be a flat amount or a percentage of the main damage.
This system gives a lot of flexibility.
In the future I can create interesting enemy attacks that drain MP, heavily break Poise, or even increase Arousal on hit.
The Poise System
You might have noticed a attribute called "Poise" alongside HP and MP in the previous posts.
The Poise system allows characters to tank hits without flinching ,getting interrupted or knockbacked as long as their Poise holds.
Not every character will have the Poise protection
You’ll mostly see it on melee ground units and bosses.
By design, most attacks in the game deal some amount of Poise damage in addition to their regular damage.
- While Poise is above 0, the character can take hits without staggering or getting knockbacked.
- Poise slowly regenerates over time while active.
- When Poise reaches 0, the character becomes vulnerable to stagger from attacks that have the stagger property enabled.
- Once Poise hits 0, it stops taking further Poise damage and begins regenerating for a few seconds.
- When it fully regenerates back to maximum, the Poise protection becomes active again.
On the gif of this post i placed a bar that on the capra demon that represents her current poise, on the momment it goes 0 you can see the "Poise Break" thats when the capra demon becomes vulnerable to being staggered and knockbacked.
Back Attacks
As mentioned earlier, the Back Attack mechanic has been fully implemented alongside the new damage system.
A Back Attack triggers when:
- The hitbox has Back Attack enabled, and
- The target’s hurtbox allows Back Attacks.
If both conditions are met, you can trigger a Back Attack by hitting the target from behind (the opposite direction they are facing).
Back Attack Effects:
- Increases final damage by +30% + hitbox extra Back Attack bonus, this adds to the final damage multiplier
- Increases critical chance by +50% + hitbox extra back critical rate
- Bypasses the target’s Poise protection on the first hit (if the target is not yet in aggro), allowing you to stagger or knockback them even while their Poise is still up.
After the first hit, the target usually becomes alert and Poise protection returns.
The Back Attack mechanic works both ways, enemies can also Back Attack you. So be careful with your positioning !
Cooldown System
I’ve added a new Cooldown System component to properly handle action cooldowns for both Azalea and all NPCs.
In previous previews, the Capra Demon would attack non-stop as long as she was close to the target.
Now, after finishing her attack combo, she will enter a short cooldown before she can chase and attack again.
The length of this cooldown is influenced by the Attack Speed attribute.
Attack Speed reduces the delay between attacks for both Azalea and enemies and make attack animations slightly faster.
This system is relatively new i'm also going to use it to handle the cooldown of the Capra demon Grab move and Azalea Dash, and in the future for new skills that Azalea will have
Azalea's MP Mechanic
Azalea’s spells now properly consume MP
MP Regeneration
- MP regenerates passively over time.
- The amount regenerated per second is based on your maximum MP (higher maximum MP = faster passive regeneration).
Melee MP Recovery
- You can also recover MP by landing successful melee attacks on enemies.
- This recovery gets an slightly additional bonus based on your INT attribute.
Balancing it will be a challange, but i hope that in the future i can work alongside player feedback to tweak the formulas and make the game as fun and fair as possible while being a bit challenging