I'm making a cover state that allow a enemy tank to cover a boss, but I wanted to make it to only work 75% of the time, and in 25% it should fail and the tank shound't cover.
I did this in the code
What line I have to add to include a chance of 75% for the enemy to cover instead of 100%?
I did this in the code
Code:
def check_substitute(target, item)
target.hp < target.mhp / 3 && (!item || !item.certain?)
end
What line I have to add to include a chance of 75% for the enemy to cover instead of 100%?