- Joined
- Oct 17, 2012
- Messages
- 394
- Reaction score
- 98
- First Language
- Español
- Primarily Uses
- RMVXA
Hello, I have a trouble with Victor Custom hit formula script which you can find here
You'll see, I tried this formula for magical based attacks like this one
rand < 1 * [[((255 - b.mev * 2) + 1), 1].max, 255].min / 256.0
The problem is, I'm trying to make when the user has the state number 20, the formula works like this
rand < 0.2 * [[((255 - b.mev * 2) + 1), 1].max, 255].min / 256.0
I even tried to create a script line for this
class Game_Battler < Game_BattlerBase
def magic_acc(a, b, base)
x1 = base
if a.state?(20) then x1 *= 0.2 end
acc = rand < x1 * [[((255 - b.mev * 2) + 1), 1].max, 255].min / 256.0
return acc
end
end
And I put this in the <hit formula> tags
Physical formula is this one, the same Victor uses as an example
I'm having some troubles, it's not checking the state to make the attack fails, it's not considering the target's magic evasion either, with physical based formula, it's not checking hit rate and target's evasion, the attack always hits
Can someone please help me to fix those troubles? Thank you
You'll see, I tried this formula for magical based attacks like this one
rand < 1 * [[((255 - b.mev * 2) + 1), 1].max, 255].min / 256.0
The problem is, I'm trying to make when the user has the state number 20, the formula works like this
rand < 0.2 * [[((255 - b.mev * 2) + 1), 1].max, 255].min / 256.0
I even tried to create a script line for this
class Game_Battler < Game_BattlerBase
def magic_acc(a, b, base)
x1 = base
if a.state?(20) then x1 *= 0.2 end
acc = rand < x1 * [[((255 - b.mev * 2) + 1), 1].max, 255].min / 256.0
return acc
end
end
And I put this in the <hit formula> tags
Code:
<hit formula>
a.magic_acc(a, b, base)
</hit formula>
Code:
rand < hit * ([[((255 - eva * 2) + 1), 1].max, 255].min / 256.0)
I'm having some troubles, it's not checking the state to make the attack fails, it's not considering the target's magic evasion either, with physical based formula, it's not checking hit rate and target's evasion, the attack always hits
Can someone please help me to fix those troubles? Thank you
Last edited by a moderator:

