Question on global_retcode

Posted by Toy on Sat 07 Feb 2004 01:04 AM — 3 posts, 14,978 views.

#0
I was messing around, attempting to get do_tail to work. GOt it in, fixed all problems, the command works fine now... here's the thing: whenever someone uses the "tail" attack, the battle message always shows as "brushes". What I'm looking to do is set it up that as you level higher, your attack will increase. I think I found there it computes the battle damage in this line:

global_retcode = damage( ch, victim, number_range( 1, ch->level ), gsn_tail );

Can someone help me to change this so it works more the way I want it to?

-Toy
USA #1
Change

global_retcode = damage( ch, victim, number_range( 1, ch->level ), gsn_tail );

to something like

global_retcode = damage( ch, victim, dice( 3, ch->level ), gsn_tail );


The more/larger dice you use the better the damage gets for tail attacks but remember this could do some nasty things to mob balance if you aren't careful. The existing code simply takes a random number between 1 and the level of the character using the tail attack. At higher levels better damage is possible but still quite weak even if maximum damage is scored. Changing to a diced damage formula will give you a higher average damage, higher minimum damages and much higher maximum damages at higher levels. If you wanted to tie in the skill level for damage it should be fairly easy.
Amended on Sat 07 Feb 2004 03:50 AM by Meerclar
#2
Well, I changed the number_range to dice and recomplied attempting to try it out. The damage ain't too great, but for a side attack for a mob, it'll work. Couldn't figure out why the damage was weak when I tried it out, then I realized Puff the Fractal Dragon is a tough mob. ;p Once I tried a weaker one, my tail damage starting maiming and devistating.. right where I want it. :)

Thanks for the help one that one Meerclar.

-Toy