|
|
@ -645,7 +645,10 @@ public enum CombatManager { |
|
|
|
errorTrack = 4; |
|
|
|
errorTrack = 4; |
|
|
|
|
|
|
|
|
|
|
|
//Get hit chance
|
|
|
|
//Get hit chance
|
|
|
|
float smallChance = ((atr-((atr+defense)*0.33f))/((defense-((atr+defense)*0.33f))+(atr-((atr+defense)*0.33f)))); |
|
|
|
float constant = (atr+defense)*0.315f; |
|
|
|
|
|
|
|
float atrChance = atr - constant; |
|
|
|
|
|
|
|
float defChance = defense - constant + atrChance; |
|
|
|
|
|
|
|
float smallChance = atrChance/defChance; |
|
|
|
int chance = (int)(smallChance * 100); |
|
|
|
int chance = (int)(smallChance * 100); |
|
|
|
|
|
|
|
|
|
|
|
errorTrack = 5; |
|
|
|
errorTrack = 5; |
|
|
|