orzosavo

Newbie
Apr 11, 2020
25
15
11 divided by half is around 5 or 6.

Not sure how I'm messing up but I have to be proud of how creative it is. If it didn't land on 0 sometimes I would keep it and just let it spout off random numbers.
could try Math.ceil() or Math.floor() to round up or down depending on what you want with the rounded value
 

Solid Snekk

Well-Known Member
Game Developer
May 5, 2017
1,116
1,232
I fixed the math.floor() issue.

It was my crit system, seems to work now.

It was also the fact that I reused the same $tempdamage variable for all of combat.

I also broke the enemy detection as well and do have issues with armor, thus I have another question:

Should armor negate damage entirely and should armor raise your chance to not be hit?

For example, the spell Ice Armor gives 5 armor. Damage that is equal to or less than 5 is negated, currently. If the enemy does 6 damage then the player would take 1 damage that rolls over the armor value.

In QSP the armor system added to the to-hit and then they dealt damage.
 

doujinftw

Active Member
Nov 26, 2020
824
1,085
I fixed the math.floor() issue.

It was my crit system, seems to work now.

It was also the fact that I reused the same $tempdamage variable for all of combat.

I also broke the enemy detection as well and do have issues with armor, thus I have another question:

Should armor negate damage entirely and should armor raise your chance to not be hit?

For example, the spell Ice Armor gives 5 armor. Damage that is equal to or less than 5 is negated, currently. If the enemy does 6 damage then the player would take 1 damage that rolls over the armor value.

In QSP the armor system added to the to-hit and then they dealt damage.
yeh armor should reduce damage, but have different type of armor, armor that give more defenses come with the weight penalty that lower evade that have chance to negate damage, while lower weight armor less defense but less penalty to dodge chance, make it to category of heavy,medium,and light weight armor. If you just make the evade chance base off the speed stat it be much simpler by having the armor weight giving negative speed penalty.
Another suggestion for armor is having magical defense which is separate from physical defense, this way you can use clothing that are enchanted that more effective to ward off magic attacks than regular armor.
 
Last edited:
Mar 23, 2022
428
120
I fixed the math.floor() issue.

It was my crit system, seems to work now.

It was also the fact that I reused the same $tempdamage variable for all of combat.

I also broke the enemy detection as well and do have issues with armor, thus I have another question:

Should armor negate damage entirely and should armor raise your chance to not be hit?

For example, the spell Ice Armor gives 5 armor. Damage that is equal to or less than 5 is negated, currently. If the enemy does 6 damage then the player would take 1 damage that rolls over the armor value.

In QSP the armor system added to the to-hit and then they dealt damage.
Why would you want to block damage at a 1-1? Unless damage doesn't go above 100 that seems pointless. You could turn it to have it so it blocks a percentage of damage that increases the more armour you have. For example 10 points of armour is 15% block. 20 points for 30% etc. Then after 50% you'd put a soft cap meaning instead of needing 10 points for 15% you'd need 30 armour points to get the same effect. Then at about 80-90% put a hard cap meaning it can't go above it.

Because standard armour is for blocking physical damage while less/no armour is for dodging attacks.
 

kopeiko

Newbie
Dec 20, 2019
22
0
I fixed the math.floor() issue.

It was my crit system, seems to work now.

It was also the fact that I reused the same $tempdamage variable for all of combat.

I also broke the enemy detection as well and do have issues with armor, thus I have another question:

Should armor negate damage entirely and should armor raise your chance to not be hit?

For example, the spell Ice Armor gives 5 armor. Damage that is equal to or less than 5 is negated, currently. If the enemy does 6 damage then the player would take 1 damage that rolls over the armor value.

In QSP the armor system added to the to-hit and then they dealt damage.
About armor, maybe make this like a Path of exile?
There the armor works like this, the damage reduction cap is 90, but the more damage you get, the less the armor protects, and to completely block damage, armor requires x times more damage than damage.
Rule of thumb
  • To prevent one third of damage (33%), you need armour 2.5 times the damage (e.g. 250 armour for 100 damage)
  • To prevent half of damage (50%), you need armour 5 times the damage (e.g. 500 armour for 100 damage)
  • To prevent two thirds of damage (66%), you need armour 10 times the damage (e.g. 1000 armour for 100 damage)
  • To prevent three quarters of damage (75%), you need armour 15 times the damage (e.g. 1500 armour for 100 damage)
  • To prevent 90% of damage, you need armour 45 times the damage (e.g. 4500 armour for 100 damage)
  • Armour will never prevent more damage than its value divided by 5 (e.g. 1000 armour will never prevent more than 200 damage)
1727154576820.png
 

Laughingfox

Well-Known Member
Apr 2, 2017
1,023
931
Math make Fox go sleepy time, but evasion builds should hopefully be a thing too, for swag swordsmen, battlemagus types, lurid dancing bards and of course monks.

The extends to enemy types or races that are annoyingly difficult to hit, like fey, farie (almost the same, but I'm thinking more of a size issue), ghosts, lubed up dark elves fighting in bondage gear, whatever.
 
  • Like
Reactions: Serpream

Solid Snekk

Well-Known Member
Game Developer
May 5, 2017
1,116
1,232
Alright, I'll math up some damage reduction fractions when I get to adding the armor and their values. Currently working on weapons.

Should there be enemy attacks that auto hit? Magic just hits enemies with no save so should the same happen to the player?

This isn't really relevant to Avedon but I want the framework in so when the player starts fighting naga shaman types I don't have to redo the combat system weeks/months down the line and forget how it works.
 
Mar 23, 2022
428
120
Alright, I'll math up some damage reduction fractions when I get to adding the armor and their values. Currently working on weapons.

Should there be enemy attacks that auto hit? Magic just hits enemies with no save so should the same happen to the player?

This isn't really relevant to Avedon but I want the framework in so when the player starts fighting naga shaman types I don't have to redo the combat system weeks/months down the line and forget how it works.
I personally think you should. But even if you set it up in the code and it's never used what's the worse that could happen? Nothing.
 

doujinftw

Active Member
Nov 26, 2020
824
1,085
Alright, I'll math up some damage reduction fractions when I get to adding the armor and their values. Currently working on weapons.

Should there be enemy attacks that auto hit? Magic just hits enemies with no save so should the same happen to the player?

This isn't really relevant to Avedon but I want the framework in so when the player starts fighting naga shaman types I don't have to redo the combat system weeks/months down the line and forget how it works.
some magic only, causes like firebolt should still consider to be a projectile that u can move out of the way to not get hit, guarantee hit magic should be something really cover wide area like a thunderstorm spell or instantaneous spell like smite, of course you should only give those type of magic for really strong enemies or bosses not for regular mob.
 

hellfire8100

Newbie
Aug 26, 2017
20
2
I'd also like to add the idea of the Wisdom stat (or whatever the magic stat is, haven't played in a while) should give some reduction to magical damage, making it a bit more worthwhile for non-spellcasters. (if it doesnt Already)
 
4.30 star(s) 15 Votes