[RESOLVED] probely simple request (check what weapon equiped)

Started by Jackolas, February 28, 2009, 10:30:13 am

Previous topic - Next topic

Jackolas

I just wane know what to do to check for a weapon id when the damage is calculated.

an example:

if the player has a sword equipped the following calculation is used:
atk = [attacker.atk + (attacker.str) * (1 - (self.pdef/1000))
and with a bow this is used:
atk = [attacker.atk + (attacker.agi) * (1 - (self.pdef/1000))

my only problem is that he needs to check what weapon is equipped to see what dmg calculation is used.
but could not work it out (1 note.. it should work for multiple bows ets. so an array)

hope this explains enough. don't need whole code.. just how to do this little bid

winkio

first check to make sure that the attacker is an actor (as opposed to an enemy).  then, the weapon id is attacker.weapon_id

Jackolas

February 28, 2009, 10:45:51 am #2 Last Edit: February 28, 2009, 12:28:05 pm by Jackolas
whoo  :haha: that worked

now i only need to set up an array so it will work with multiple weapons.. any ideas?

EDIT: NVM already fixed it

Thanks m8..

note: Srry for the double post (thanks Starrodkirby for changing it to 1 post)

Doubleposting? No thanks m8...~Love, Starrodkirby86