Skip to content

Commit

Permalink
Change avoid calc to speed + luck/2 from 2*speed+luck/2
Browse files Browse the repository at this point in the history
  • Loading branch information
HamaIndustries committed Aug 26, 2021
1 parent 7561681 commit a0870fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/net/fe/fightStage/CombatCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,16 @@ public void addAttack(String effect){
/**
* Attack. Does most of the heavy lifting in this class, calculates the damage dealt and damage healed, if any.
*
* <pre>
*<pre>
*Combat Calculations:
*
*a is attacker, d is defender.
*
*crit: true if [RNG.get(This returns a number 1-100) < a.crit() - d.dodge()] and not miss.
*
*hit = weapon.hit + [2 * Skl + Lck / 2] + tempMods.get("Hit") {<- normally hit, unless a skill augments that.}
*hit = weapon.hit + avoid + tempMods.get("Hit") {<- normally hit, unless a skill augments that.}
*
*avoid = 2 * Spd + Lck / 2 + tempMods.get("Avo"){0 unless a skill etc} + TerrainAvoidBonus
*avoid = Spd + Lck / 2 + tempMods.get("Avo"){0 unless a skill etc} + TerrainAvoidBonus
*
*hit rate = a.hit() - d.avoid() + a.getWeapon().triMod(d.getWeapon()) * 15}
*
Expand Down
2 changes: 1 addition & 1 deletion src/net/fe/unit/Unit.java
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ public int hit() {
* @return the int
*/
public int avoid() {
return 2 * getStats().spd + getStats().lck / 2
return getStats().spd + getStats().lck / 2
+ (tempMods.get("Avo") != null ? tempMods.get("Avo") : 0)
+ getTerrain().getAvoidBonus(this);
}
Expand Down

0 comments on commit a0870fb

Please sign in to comment.