Users browsing this thread: 1 Guest(s)
Changing physical damage calculations?

#16
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(05-12-2012, 12:20 PM)Marketa Lazarova Wrote: I think I understand. For each bit I want to check, I double the value of the number by the 89, starting with 01 (0 MP=Death), then on to 02, 03, 08, 10, 20, 40 and 80. So if I wanted to make the Man Eater weapon do double damage to undead enemies, I would change the BIT #$10 (checks for Human) into BIT#$80. I think I have the desired effect, here, because double damage to undead enemies is exactly what is happening. Thank you!

Without a long explanation, a bit set is like a binary number which is a number in base 2, so yeah you double every time. if we take 00000100, it equals 32 in base 10 (the base we use). then you have to convert in hex (base 16) that number, which is 0x20 or $20 or #$20. Usually we go from binary to hex, but converting in base 10 help people to get the idea, which is the case with you.
  Find
Quote  



Messages In This Thread
RE: Changing physical damage calculations? - by madsiur - 05-12-2012, 09:02 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite