Title: Damage Post by: Peter van Dalen on August 25, 2008, 02:11:33 pm For Dark Resurrection I have the following formula for calculating damage:
----------------------------------------------------- random = random modifier between 1 to 5 Damage = (( Att + W_Att ) - ( Def + W_Def )) + random ----------------------------------------------------- It's possible to modify the damage further when you have a ring in your inventory. Att = Attacker's Attack value W_Att = Attacker's Weapon Attack Modifier Def = Defender's Defense value W_Def = Defender's Weapon Defense Modifier ------------------------------------------------------------------------ For example: - A Dark Sword has a -5 defense modifier - A Demon Rod has a -10 defense modifier - A Holy Lance had a +5 defense modifier FYI: There are 85 weapons in Sf2 , only 5 of them have defense modifiers ------------------------------------------------------------------------ Miscellaneous: -------------- Take a random number between 1 to 100 Double Attack = random => 91 and <=100 Critical Hit = random => 80 and <= 90 Normal Hit = random => 10 and <= 79 Miss = random => 0 and <= 9 Any suggestions ? ;D Title: Re: Damage Post by: Elvenfyre on August 27, 2008, 02:23:54 am Definitely.
The random modifier needs to be smaller early on in the game. If you plan on starting with similar HP's to shining force a random of 5 would be unbalanced. Title: Re: Damage Post by: Ty on August 27, 2008, 02:50:33 pm As Elv said, the random number of 5 is a little high. Using a percentage of the final value might be better.
There's also a few other things to take into account: * Land Effect (increases defender's defence) * Attack, Support and Slow spells * Status effects such as paralysis - means defender less likely to dodge or counter Possible other things: * Weapon "alignment" - Holy swords/rods would be more effective against demons * Weapon types - Shining Force 3 did this quite well. Arrows are good against flying enemies, as an example Other than that, it looks good :) For random damage, you could use a percentage of the defender's defence or attacker's attack. One tip is to add two random numbers, so you get a curve of values. For example: Code: (Rand(-2, 4) + Rand(-2, 4)) / 2 This will give more values around 1 and 0, with the occasional high number (and also a few negatives to keep things interesting). It's a bit like rolling two dice instead of one - you get more middle numbers and only a few extremes. Hope that helps :) Title: Re: Damage Post by: Peter van Dalen on September 02, 2008, 01:01:00 pm Thanks Ty, this will sure come in handy.
btw if you run this code in Blitz3D , you will see how many times a certain number is generated. Code: Graphics 800,600,16,1 and Ty, I may need your expertise again with calculating EXP. I'll come to that later :) Thank you so far. :) Title: Re: Damage Post by: Elvenfyre on September 02, 2008, 11:45:46 pm I'll also chime in here on something I missed the first time reading your post.
I think misses and double attacks are based on agility stats(possibly with terrain effect modifier). Making the chance to dodge equal for everyone doesn't seem right. Title: Re: Damage Post by: Peter van Dalen on September 04, 2008, 11:08:02 am Right. :)
I could program in such a way that it depends on AGI, or LUCK , or maybe both. If Attacker's LUCK is high enough and Attacker's AGI is higher than Defender's AGI then activate Double Attack or else a Normal Attack We could do something like this for Miss: If LUCK is low (or lowest) AND random number is between 0 & 9 AND Defender's AGI is higher than Attacker's AGI then you have a missed attack. Well, ......... whaddayasay ? :D Title: Re: Damage Post by: Elvenfyre on September 05, 2008, 09:24:31 pm Sounds like you have a good basis there, remember to keep a random factor involved too though : ) Otherwise Amon and Balbory become both longer lasting and more devastating than Gort along with that awesome move speed.
//example, A is attacker, D is defender temp=rand(5); if( (A.agility+rand(10)-temp) > (D.agility+rand(10)+temp) ) { double attack } if( (A.agility+rand(10)+temp) < (D.agility+rand(10)-temp) ) { miss } It really depends on the range of stats you have and how often you want misses etc to crop up. I have absolutely no idea how luck works though, if it cycles over time then maybe it's already sweet as. Title: Re: Damage Post by: Peter van Dalen on September 09, 2008, 02:50:34 pm If you run this code in Blitz, you'll see how LUCK is calculated over time.
Code: Graphics 800,600,16,1 Of course , luck-calculation takes a longer period of time. This is just a demo. :) Title: Re: Damage Post by: Elvenfyre on September 13, 2008, 06:26:30 am What about an individual spike cycle?
ie: build luck as it isn't triggered, on triggering something considered lucky, some luck is released. Title: Re: Damage Post by: Peter van Dalen on September 15, 2008, 01:33:53 pm The above mentioned example is a generalization. :D
I can assure you that each member of the Force has his own LUCK-variable. So, no problems there. Cheers ;D Oh wait, ... here's a list of items you can USE , along with the effect: Suggestions and/or additions are welcome. :) (I really have no idea how much damage these items do. :-\ ) grand cannon / giant knuckles - muddle 1 heat axe / mage staff - blaze 2 atlas axe - blaze 3 rune axe - detox 1 misty knuckles / indra staff / supply staff - drains mp wish staff - boost holy staff - +2 hp/per round goddess staff - aura 2 freeze staff - freeze 3 mystery staff - +2 mp/per round critical sword - increase critical hit counter sword - increase counter attack gisarme - split in 2 levanter - blaze 3 black ring - blaze 2 evil ring - bolt 2 power ring - attack 1 protect ring - boost 1 white ring - aura 2 All help is appreciated . Thanks in advance. ;D Title: Re: Damage Post by: Elvenfyre on September 16, 2008, 12:19:54 am I'm guessing you're not including general items like angel wings, medical herbs etc : )
Some here from SF1 speed ring: egress white ring SF1: aura 1 sword of light: bolt 2 sword of darkness: desoul 1 chaos breaker: freeze 3 halberd: bolt 1 valkyrie: boost attack As for strength gains, you can find those details out in any decent guide. Here's a good example from SF1 where I got some of these: http://www.gamefaqs.com/console/genesis/file/563340/2838 Code: Short Sword SDMN, WARR, BDMN +5 - |