Battle stat recovery?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Battle stat recovery?

Post by Foxley »

A couple questions about how buffs and debuffs to stats that aren't HP or MP work in battle. Is there any sort of built-in recovery mechanic in the battle engine so they'll gradually normalize back to their default value as the battle progresses?

If not, I had questions about using elemental counters to accomplish this. If a hefty delay was set on a stat recovery self-targeted counterattack (e.g. using Slow damages Speed by 50% of current stat, the counterattack sets Speed to default maximum), would that delay halt the enemy's regular attack logic until the counterattack occurred?
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

That works fine, but there is a bitset on the attack that you will need to turn on to make sure the attack's delay does not block other actions.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Rather than counterattacks, another option is to make the stat-restore attack a long-delay chain from the stat-damaging attack itself.

As long as it has that "don't block other attacks" bitset, it will work just as well as the counterattacks.

The advantage to this method, is that it works for attacks that target heroes too.

EDIT: looks like we were typing replies at the same time! :)
Last edited by Bob the Hamster on Wed Mar 30, 2016 2:34 pm, edited 1 time in total.
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

D'oh. I just realized, implementing that wouldn't work on gradually normalizing hero buffs or debuffs, since heroes can't counterattack. I think I might have to scrap the idea. But I can figure something else out design-wise, maybe have a stat restoration spell later in the game. Something kind of like Dispel, I guess.

Buffs and debuffs are pretty overpowered in RPGs, especially late in the game. But they're excellent as far as game mechanics go because having them adds a much needed strategic element to gameplay that's often just attack-attack-heal-attack-attack-heal-etc. So of course you want to have them in the game anyways.

EDIT:
James, you just ninja'd me so hard. I'll experiment with the idea you just posted, thanks!
Last edited by Foxley on Wed Mar 30, 2016 2:34 pm, edited 1 time in total.
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

Post by guo »

Hey, how would that work in turn based battles? Eg could I have an attack that debuffs a stat with a chain to another attack that restores the stat to normal 2 turns later, without blocking further actions?

Regards
vvight.wordpress.com
Post Reply