STATE COUNT IN DAMAGE FORMULA
Posts
Pages:
1
I am having an issue with a battle damage formula that involves counting the amount of a states the target has that are also found in a pre-defined array.
I am not formally trained in programming, so I really am just making guesses from what I've experienced over the years of using VX/VXA. This formula does not determine the damage, statecount is just appended to the actual damage formula for its effect.
Pretty much, I'm trying to increase statecount by 1 for each state in the good states array that the target has been affected by in that use. How would I (better) go about this? Thank you!
def determine_states(y)
$good_states = [1, 2, 3, 4, 5]
if y == 0 # look for good states
for $good_states.each in self.states
statecount += 1
end
elsif y == 1 # look for bad states
elsif y == 2 # look for all states
end
end
I am not formally trained in programming, so I really am just making guesses from what I've experienced over the years of using VX/VXA. This formula does not determine the damage, statecount is just appended to the actual damage formula for its effect.
Pretty much, I'm trying to increase statecount by 1 for each state in the good states array that the target has been affected by in that use. How would I (better) go about this? Thank you!
states & $good_states
Pages:
1