|
|
@ -2329,17 +2329,11 @@ public enum PowersManager { |
|
|
|
ChatManager.chatSystemInfo(pc, smsg); |
|
|
|
ChatManager.chatSystemInfo(pc, smsg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int chance; |
|
|
|
float constant = (atr+defense)*0.315f; |
|
|
|
|
|
|
|
float atrChance = atr - constant; |
|
|
|
if (atr > defense || defense == 0) |
|
|
|
float defChance = defense - constant + atrChance; |
|
|
|
chance = 94; |
|
|
|
float smallChance = atrChance/defChance; |
|
|
|
else { |
|
|
|
int chance = (int)(smallChance * 100); |
|
|
|
float dif = atr / defense; |
|
|
|
|
|
|
|
if (dif <= 0.8f) |
|
|
|
|
|
|
|
chance = 4; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
chance = ((int) (450 * (dif - 0.8f)) + 4); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// calculate hit/miss
|
|
|
|
// calculate hit/miss
|
|
|
|
int roll = ThreadLocalRandom.current().nextInt(100); |
|
|
|
int roll = ThreadLocalRandom.current().nextInt(100); |
|
|
|