kp420 Posted December 28, 2017 Posted December 28, 2017 can some tell me how to get damage to randomly show (exa min 1-max 10)
Talikan Posted December 28, 2017 Posted December 28, 2017 Hello, Â <PhysicalDamage>Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * 1.075, ((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * 1.925) * (100 / (100 + V_Defense))</PhysicalDamage> Â <MagicDamage>Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * 1.075, ((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * 1.925) * (100 / (100 + V_MagicResist))</MagicDamage> <TrueDamage>Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * 1.075, ((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * 1.925)</TrueDamage> Â Change this and test in game. It's my formulas for my game.
Khaikaa Posted January 1, 2018 Posted January 1, 2018 I have a question, a math question actually. This is the curren formula I'm using on my test project: Â <PhysicalDamage>Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * .975 / (V_Defense * 1.5), ((BaseDamage + (ScalingStat * ScaleFactor))) * CritFactor * 1.025 / (V_Defense * 1.25))</PhysicalDamage> Â The issue is that, when using the victim's defense as the divider, this defense may be 0 after using weaken defense skills, and this probably(didn't tested it) will throw some kind of math exception. Is there any mathematical way to avoiding this and keep the victim's defense on the divider? I could do this by using conditional branches, but don't know if I can use them on there.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now