- Joined
- Mar 13, 2013
- Messages
- 69
- Reaction score
- 11
- First Language
- English
- Primarily Uses
- N/A
I have the script
def magic_evade?( a, b )
c = rand(100000) / 100000.0
if c < b.mev
return true
else
return false
end
end
I'm trying to emulate Breath Weapons from Dungeons and Dragons, which did half damage instead of none when magic resist was in effect.
example damage formula: ( magic_evade?( a, b ) ) ? x : 2x
But calling this seems to make the skill do absolutely nothing regardless of the target's MEV. I have no idea what's causing this.
def magic_evade?( a, b )
c = rand(100000) / 100000.0
if c < b.mev
return true
else
return false
end
end
I'm trying to emulate Breath Weapons from Dungeons and Dragons, which did half damage instead of none when magic resist was in effect.
example damage formula: ( magic_evade?( a, b ) ) ? x : 2x
But calling this seems to make the skill do absolutely nothing regardless of the target's MEV. I have no idea what's causing this.
