[ Login | Register ]

The Shining Source

« previous next »
Pages: [1] Print
Damage   (Read 21649 times)
Old Post August 25, 2008, 02:11:33 pm
#1
Shining Something *

Posts: 142

Logged
Damage
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 ?  Grin

Love is Grand , Divorce ..... a hundred Grand


Old Post August 27, 2008, 02:23:54 am
#2
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: Damage
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.

~Elvenfyre


Old Post August 27, 2008, 02:50:33 pm
#3
Ty
Administrator
Shining Sideburns *

Posts: 836

Logged
Re: Damage
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 Smiley

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 Smiley


Old Post September 02, 2008, 01:01:00 pm
#4
Shining Something *

Posts: 142

Logged
Re: Damage
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
SetBuffer BackBuffer()

SeedRnd MilliSecs()

While Not KeyDown( 1)

Cls

sol = (Rand(-2,4) + Rand(-2,4)) / 2

num = num + 1

Select Sol
Case -2 times2a = times2a + 1
Case -1 times2b = times2b + 1
Case 0  times0  = times0 + 1
Case 1  times1  = times1 + 1
Case 2  times2  = times2 + 1
Case 3  times3  = times3 + 1
Case 4  times4  = times4 + 1
End Select

Text 10,  25 , "total generated ....: " + num
Text 10,  40 , "times -2 ...........: " + times2a
Text 10,  55 , "times -1 ...........: " + times2b
Text 10,  70 , "times 0  ...........: " + times0
Text 10,  85 , "times 1  ...........: " + times1
Text 10, 100 , "times 2  ...........: " + times2
Text 10, 115 , "times 3  ...........: " + times3
Text 10, 130 , "times 4  ...........: " + times4

Text 10, 200 , "used formula : (Rand(-2,4) + Rand(-2,4)) / 2"



Flip
Wend

and Ty, I may need your expertise again with calculating EXP. I'll come to that later Smiley
Thank you so far.

Smiley

Love is Grand , Divorce ..... a hundred Grand


Old Post September 02, 2008, 11:45:46 pm
#5
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: Damage
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.

~Elvenfyre


New Post September 04, 2008, 11:08:02 am
#6
Shining Something *

Posts: 142

Logged
Re: Damage
Right.   Smiley

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 ? Cheesy
 

Love is Grand , Divorce ..... a hundred Grand


New Post September 05, 2008, 09:24:31 pm
#7
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: Damage
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.

~Elvenfyre


New Post September 09, 2008, 02:50:34 pm
#8
Shining Something *

Posts: 142

Logged
Re: Damage
If you run this code in Blitz, you'll see how LUCK is calculated over time.

Code:
Graphics 800,600,16,1

SetBuffer BackBuffer()

Global Luck# = 5
Global AddLuck# = 0.1

time = MilliSecs()

While Not KeyDown(1)

Cls

If MilliSecs() > time + 500;180000

time = MilliSecs()

If Luck > 6 Or Luck < 1
AddLuck = -AddLuck
EndIf

Luck = Luck + AddLuck

EndIf

Text 10,15, "LUCK (integer): " + Int(Luck)
Text 10,30, "LUCK (float): " + Luck

Flip

Wend

End

Of course , luck-calculation takes a longer period of time. This is just a demo. Smiley   

Love is Grand , Divorce ..... a hundred Grand


New Post September 13, 2008, 06:26:30 am
#9
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: Damage
What about an individual spike cycle?

ie: build luck as it isn't triggered, on triggering something considered lucky, some luck is released.


~Elvenfyre


New Post September 15, 2008, 01:33:53 pm
#10
Shining Something *

Posts: 142

Logged
Re: Damage
The above mentioned example is a generalization.  Cheesy

I can assure you that each member of the Force has his own LUCK-variable.
So, no problems there.

Cheers  Grin

Oh wait, ...

here's a list of items you can USE , along with the effect:
Suggestions and/or additions are welcome. Smiley 

(I really have no idea how much damage these items do.  Undecided )

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.   Grin

Love is Grand , Divorce ..... a hundred Grand


New Post September 16, 2008, 12:19:54 am
#11
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: Damage
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              -

 Middle Sword         SDMN, WARR, BDMN          +8              -

 Long Sword           SDMN, BDMN                +12             -

 Steel Sword          HERO, NINJ, SKYW, SMR     +16             -

 Broad Sword          HERO, NINJ, SKYW, SMR     +20             -

 Doom Blade           HERO, NINJ, SKYW, SMR     +25             -

 Katana               HERO, NINJ, SKYW, SMR     +30             -

 Sword of Light       HERO                      +36           Bolt 2

 Sword of Darkness    HERO, SKYW                +40          Desoul 1

 Chaos Breaker        HERO                      +40          Freeze 3

~Elvenfyre


Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF 1.1.21 | SMF © 2013, Simple Machines