Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arcane Sanctuary Grid, remove excess log attack.go #607

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions internal/action/step/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package step
import (
"errors"
"fmt"
"log/slog"
"math"
"time"

Expand Down Expand Up @@ -127,9 +126,6 @@ func isValidEnemy(monster data.Monster, ctx *context.Status) bool {

// Skip monsters in invalid positions
if !ctx.Data.AreaData.IsWalkable(monster.Position) {
ctx.Logger.Debug("Skipping monster in unwalkable position",
slog.Any("monster", monster.Name),
slog.Any("position", monster.Position))
return false
}

Expand Down
11 changes: 11 additions & 0 deletions internal/pather/path_finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ func (pf *PathFinder) GetPathFrom(from, to data.Position) (Path, int, bool) {
// We don't want to modify the original grid
grid := a.Grid.Copy()

// Special handling for Arcane Sanctuary (to allow pathing with platforms)
if pf.data.PlayerUnit.Area == area.ArcaneSanctuary && pf.data.CanTeleport() {
// Make all non-walkable tiles into low priority tiles for teleport pathing
for y := 0; y < len(grid.CollisionGrid); y++ {
for x := 0; x < len(grid.CollisionGrid[y]); x++ {
if grid.CollisionGrid[y][x] == game.CollisionTypeNonWalkable {
grid.CollisionGrid[y][x] = game.CollisionTypeLowPriority
}
}
}
}
// Lut Gholein map is a bit bugged, we should close this fake path to avoid pathing issues
if a.Area == area.LutGholein {
a.CollisionGrid[13][210] = game.CollisionTypeNonWalkable
Expand Down