J
JWP
Guest
Yes, all of the probabilities can be changed, they are currently in the form of something like:
Code: [Select]
which means random number modulo 3 - this gives a random number between 0 and 2
and the test is == 0, which has a 1/3 chance of being triggered.
You can change both the numbers and the test: e.g.
Code: [Select]
gives a 3/4 chance of the code being executed.
You could then combine it with other tests to make it more likely in certain circumstances.
Thinking about it, I could change the syntax to something like [0..2] to make it easier to understand.
you can test to see if you have a status too, so you can easily stop enemies from casting the same spell over and over.
I might put in boolean expressions at some point, the main problem being that decompiling boolean or statements back from the byte code seems like it'd be a pain.
Code: [Select]
Code:
...if (rand() % 3 == 0) {...
and the test is == 0, which has a 1/3 chance of being triggered.
You can change both the numbers and the test: e.g.
Code: [Select]
Code:
...if (rand() % 4 < 3) {...
You could then combine it with other tests to make it more likely in certain circumstances.
Thinking about it, I could change the syntax to something like [0..2] to make it easier to understand.
you can test to see if you have a status too, so you can easily stop enemies from casting the same spell over and over.
I might put in boolean expressions at some point, the main problem being that decompiling boolean or statements back from the byte code seems like it'd be a pain.
Last edited: