Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411493 Posts in 69377 Topics- by 58433 Members - Latest Member: graysonsolis

April 29, 2024, 10:31:57 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignKnockback and Stun
Pages: [1]
Print
Author Topic: Knockback and Stun  (Read 1138 times)
st33d
Guest
« on: September 20, 2011, 12:10:22 AM »

About to introduce knockback and stun into my combat system.

Since it's an rpg, the current system is a bit D&D like:

Code:
/* Determine if we have hit another character */
public function hit(character:Character):int{
attackCount = 0;
var attackRoll:Number = Math.random();
if(attackRoll >= CRITICAL_HIT)
return CRITICAL;
else if(attackRoll <= CRITICAL_MISS)
return MISS
else if(attack + attackRoll + (weapon ? weapon.attack : 0) > character.defense + (character.armour ? character.armour.defense : 0))
return HIT;
return MISS;
}

So a critical attack roll (like rolling a 20) will automatically hit doing double damage. A standard attack is a a roll combining their attack stat plus their weapon attack bonus.

This goes up against the defender's defence stat plus their armour defence bonus.

Knockback I could easily throw in as an addition to the damage - or should I?

Stun I'm a bit more confused on how to implement, because not only is there a chance to stun, but a stun duration. I'd like to boil stun down to a simple stat that I can have as a racial bonus or a weapon bonus. And then have armour or races that counteract that stun advantage.

Any thoughts?
Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #1 on: September 20, 2011, 03:23:33 AM »

I'd suggest giving each weapon or two a distinct effect, like stun, or knockback, or takedown. Just a small pool of effects that you can associate with weapon types (staves, blades, blunts) without a whole lot of fuss should do this well, and provide a variety of experiences for the players to enjoy.
Logged

st33d
Guest
« Reply #2 on: September 20, 2011, 04:28:39 AM »

That doesn't answer the issue of frequency, duration and power I'm afraid. And I've already decided on knockback and stun as stats that can be stacked with racial bonuses (an Orc hitting you with a hammer should do more stun than a kobold hitting you with a hammer).

My questions are:

What qualifies as a successful stun attack?
What determines how long stun lasts and can we reduce it to one stat?
Is knockback consistent or does that require a successful roll too?

Suggesting that a weapon always stuns doesn't work. It results in a constant stun-lock, giving the player or enemy an unfair advantage and making the game boring.
Logged
s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #3 on: September 20, 2011, 05:05:22 AM »

This is a tough question to answer and it's probably something you can only really find out via playtesting and fiddling around until it feels "right."

That said, I like it when the strength of the knockback effect is tied to damage (possibly the ratio of damage vs enemy defense depending on what system you're using).
Logged
st33d
Guest
« Reply #4 on: September 20, 2011, 06:52:17 AM »

I'm considering having a stun percentage at the moment, so you add or subtract from that stun percentage.

And if the result is over zero on a successful strike, then you roll again for stun and the duration is the same percentage of the maximum stun duration.

With modifiers for criticals of course.
Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #5 on: September 20, 2011, 03:14:22 PM »

Okay... so what I'm thinking is that the effect should certainly depend on what weapon you're using. But using that critical hit system, it should take into consideration attacking power and defense of whoever recieves it.

So if your total attack power (base + weapon) > their defense (base + armor) + 19 for instance, it incurs the special stun/reaction (you can divide that by say, 4; for an effect multiplier, too). Naturally, this will occur much more frequently in highly imbalanced battles - AS IT SHOULD. A takedown/stall should occur only when they're precisely equal, as a bonus - considering that means the two of you are already balanced in those respective areas.

I'd say "stun" should keep you from attacking, but not from moving. This clearly indicates that you're outmatched a bit, and should be running/retreating since that's all you can do momentarily. Knockback or launching is another good option because unless you're corner trapped already, this will create some breathing space for you to recover and escape if need be, and it will cost you ground/space should you stand your ground. Especially one that's 8 or 12 points above your defense stats (or theirs).
Logged

st33d
Guest
« Reply #6 on: September 21, 2011, 12:50:55 AM »

I'd say "stun" should keep you from attacking, but not from moving.

I practice martial arts. I've been on the receiving end of a few "stuns". You definitely can't move when you're stunned, and I think it may be confusing to others considering that stun in most other games is a form of temporary paralysis.

I like the idea that the resistance should be more tied into the defence stat though. Armour with low defence and high knockback resistance is silly. I might just have a sturdiness stat to express how grounded you are, and defence can remain for blocking attacks.
Logged
Falmil
Level 6
*


View Profile
« Reply #7 on: September 22, 2011, 02:04:04 PM »

I would think a move/no attack would be a "disarm" or something.

Having more stats seems almost inevitable.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic