Skip to content

Commit

Permalink
fix sofr ai
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Jan 24, 2024
1 parent 4e1db91 commit f317aef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rs/src/aieval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,9 @@ fn estimate_damage(ctx: &Game, id: i16, freedom: i32, wall: &mut Wall) -> i32 {
}
}
}
momatk *= PREC;
if momentum {
atk = momatk * PREC;
atk = momatk;
}
if freedom != 0 && ctx.get(id, Flag::airborne) {
atk = atk * (PREC - freedom)
Expand Down Expand Up @@ -1161,10 +1162,10 @@ pub fn eval(ctx: &Game) -> i32 {
.into_iter()
.filter(|&pr| (pr != 0 && ctx.hasskill(pr, Event::Attack, Skill::freedom)))
.count();
[0, 15, 27, 36, 43, 48, 52, 55, 57, 59, 60, 61, 62, 63, 63, 63]
[0, 15, 27, 36, 43, 48, 52, 55, 57, 59, 60, 61, 62]
.get(sofrs)
.cloned()
.unwrap_or(64u8) as i32
.unwrap_or(63u8) as i32
} else {
player
.permanents
Expand Down

0 comments on commit f317aef

Please sign in to comment.