i am thinking that is because the statuses are flags, they are either on (1) or off (0), so inputting a value of 80 (which is a byte value) into a bit value will cause it to actually change other values, and not necessarily the one you intended. a value of 80 will change two statuses if you were to do a self.berserk <- 80, it would give you Dual Drain and resist statuses, not the berserk status (why you had the manipulate status, the one below berserk activate i don't know, it could be because you added the berserk's own amount back to itself, why i do not know :/). look at it in bit form, each bit is worth a certain value when activated in a byte, and you add all of the active bits together to get the total for that byte, like so:
active bit worth:
bit 0 = 1
bit 1 = 2
bit 2 = 4
bit 3 = 8
bit 4 = 16
bit 5 = 32
bit 6 = 64
bit 7 = 128
and to get the value of 80, you activate bit 6 and bit 4 because 64+16=80. bit 0 is where berserk is, since that is where you are starting the pointing from, so compare the above bot list to this list:
4017|Status:Berserk (bit 0, which is inactive)
4018|Status:Peerless
4019|Status:Paralysis
401A|Status:Darkness
401B|Status:DualDrain (bit 4 activates this)
401C|Status:DeathForce
401D|Status:Resist (bit 6 activates this)
401E|Status:"LuckyGirl"
you can see how the bits match up to the different statuses. when you deal with flags (one bit values), you only ever want to use bit one, so only a 0 for off, or 1 for on should be used, or things you didn't expect can and will happen
. as for it activating the manipulation status, it could be due to how you set up the setting of the berserk stat, you have it as self.berserk <- self.berserk + 80, while if you wanted to just activate/disable the stat, you would only do self.berserk <- 1 or 0 (or 80 in your case
), having the self.berserk in there makes it add it's own value to itself, which isn't needed for flags (other stats it can be needed if you want to not just set the stat, if you wanted to heal X amount of hp, you would go self.hp <- self.hp +x, if you just went self.hp <- x, you would only have x life then, which can be bad depending on what you were aiming for
).
if your code was:
12 2060
10 4017
80
12 2060 //bad, you would be trying to add a pointer to a pointer instead of a value to a pointer
10 4017
80
60 50 //50 is 80 in hex :P
30
90
instead of:
12 2060
10 4017
80
02 2060
00 4017
80
60 50
30
90
then you could have unforeseen things happen, because i do not know how that particular piece of code would cause your status infliction to react, it could very well cause the manip stat to activate, i don't know
. it could even be what you have the berserk flag's type as, 10 is for bit (flags) values, 11 for bytes, etc., so having the wrong one for what you are trying to do can cause issues as well, if you have it as 10, which it should be, it has to try and fit the value of 80, which is outside of it's range, into that bit value, which isn't good... i can't say for sure the exact cause of it having manip activated, but i do know that you are not getting what you aimed for because you are trying to place the wrong sized value into the berserk flag
.
and so ends another long post by me <_<. or does it? XD
[offtopicz]
this will be off topic, but i have been working on my leveling AI, and i have got it pretty much perfect now, the most total size of the AI that can be used up if all three enemies in a scene raise EVERY stat (with my equations i am using
), would be just under 31%, and for the most part it will not take up too much space for the bigger battles, since they are usually in a scene by themselves (like ruby/emerald), so they will have ~10% taken up by leveling, and the rest would be free to make them uber XD. i was trying to test out that berserk issue, and got raped because i forgot i still had the MP enemy to be from cloud's level to cloud's level +64... so i was getting 1hko'ed a little bit
. oh well, maybe now i can finally start back up my hard mod again, now that the roadblock is out of the way (and i have made an awesome excel spreadsheet to calculate the exact stats they will have, including the critical chance, base damage, damage resisted (in %, just a basic idea of the damage that enemy will resist with their defense/m.def, and it has two graphs to show their stat growth's all together, and more >:3), i am still somewhat working on another game though, so my progress will likely be slower, not to mention i still need to do my AI compression mod along with it
.[/offtopicz]