Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Scaling magic damage with opponents stats?


Wilauzaz
 Share

Recommended Posts

EDIT2: Now that i think of it, i might have posted in the wrong sub forum ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sad.png) Dang it, im so distracted…

Hello Eclipse community ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) I've been on forums for quite some time, just checking and trying to learn some basic stuff. Right now i am working with a balancig system, and i find troubles with it :|

I would really like to make the ammout of damage done by a spell to be calculated by base damage (spell.Vital), casters int and **enemys** agility (for e.g.). Like, base damage + casters int in %'s and - defenders agility in %'s. I was able to make a pretty nice balance in armour/meele weapons, but spells just wont work. I can't seem to find the code for how is magic damage calculated :/ Is there anyone who can help?

EDIT: I can make the first two, but i cant seem to find a way to create code for calculating victims agility.

Also, is there a way to create different "types" of spells. So some of them would be calculated by formula 1 and the other category, by formula 2 ? ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Im only learning coding, and it's kinda hard for me to create a certain code from scratch :|

Anyways, thanks in advance! and sorry for mistakes i may have made - English is not my mother tongue :|
Link to comment
Share on other sites

> How do i bump the thread without double posting? :| Cant seem to find delete post button :/

You're not supposed to bump threads unless 1 day has passed (3 is best).

For spell damage, check out Sub CastSpell. Especially important is this line:

```

Vital = Spell(spellnum).Vital

```

index is the caster's index. Also see: Case SPELL_TYPE_DAMAGEHP, where it decides whether the target is a player or NPC, and work from there to change the vital.

To add categories, check out how the existing things are saved, used, sent, and displayed in the spell editor. This may sound like a lot, but if you just choose one thing to copy (like the Vital, for example) you can figure it out.

Of course, you are free to post if you need more help.
Link to comment
Share on other sites

Thanks for the help, sorry for bumping. I already know how to change the damage formula - like how to make it Vital * players int and stuff like that.

What I am really asking for is how to take the victims (the defenders) stat (like agility) into calclulations? ://
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...