Browse Source

fix escape algorithm (might still be wrong)

Wei Mingzhi 6 years ago
parent
commit
d0d765cf96
1 changed files with 3 additions and 3 deletions
  1. 3 3
      fight.c

+ 3 - 3
fight.c

@@ -3843,8 +3843,8 @@ PAL_BattlePlayerPerformAction(
             continue;
          }
 
-         def += (SHORT)(g_Battle.rgEnemy[i].e.wFleeRate);
-         def += (g_Battle.rgEnemy[i].e.wLevel + 6) * 2;
+         def += (SHORT)(g_Battle.rgEnemy[i].e.wDexterity);
+         def += (g_Battle.rgEnemy[i].e.wLevel + 6) * 4;
       }
 
       if ((SHORT)def < 0)
@@ -3852,7 +3852,7 @@ PAL_BattlePlayerPerformAction(
          def = 0;
       }
 
-      if (RandomLong(0, str) >= RandomLong(0, def) && !g_Battle.fIsBoss)
+      if (str >= RandomLong(0, def) && !g_Battle.fIsBoss)
       {
          //
          // Successful escape