Skip to content

Read the Act 4 and Act 5 event spots from a parser-filled table - #3899

Merged
erwan-joly merged 1 commit into
masterfrom
claude/project-thread-0i4hvp-act4-spots
Dec 1, 2026
Merged

erwan-joly merged 1 commit into
masterfrom
claude/project-thread-0i4hvp-act4-spots

Conversation

@erwan-joly

@erwan-joly erwan-joly commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Erwan · project thread

Four services had map coordinates written into their code: the Act 4 ship, the Act 5 ship, the faction war and the Act 4 raid. They now read them from a new MapSpot table that the parser fills, with one row per MapSpotType:

Spot Map Cell Was in
Act4ShipLandingAngel / Act4ShipLandingDemon 130 / 131 10, 36 Act4ShipService.Landing
Act4RaidGate 134 139, 99 FactionWarService.RaidGate*
Act4RaidReturn 134 139, 100 Act4RaidService.Return*
Act4GuardianAngel / Act4GuardianDemon 132 / 133 114, 92 / 20, 95 FactionWarService sides
Act5ShipLanding 170 127, 47 Act5ShipService.Landing
  • MapSpotParser writes the rows from MapSpots during the map-types import and skips any map missing from the data. It upserts on the spot type, so running the parser again rewrites the same rows. On a full import, two runs in a row each wrote the same 7 rows.
  • IMapSpotCatalog serves the rows to the services.
  • A missing row turns off that part of the event instead of throwing:
    • no landing row: the ship puts passengers back ashore where they boarded;
    • no gate row: no raid entrance and no gp;
    • no camp row: no guardian;
    • no return row: raiders go back to their saved map.
  • Migration AddMapSpots only adds one table. It was regenerated on top of the current master.

The values are the ones the services used before, so behaviour is unchanged.

Tests

  • MapSpotParserTests: every spot is written on its map, and spots on maps missing from the data are skipped.
  • TestWorld serves the same spots through the real catalog. The Act 4 ship, faction war and Act 4 raid tests pass; the only test change is that they now read the gate from the catalog.
  • The E2E world seeds the two citadel landing spots. Act4Tests.TheShipTakesAPassengerToGlacernonForTheFare passes and still lands on the angels' citadel.
  • Client check: in the comment below, master and this branch both land the angel in the Citadel beside Leika Passage.

Manual checks (documentation/manual-test-plan.md)

From "Lord Mukraju and the Glacernon raids":

  • The angels' 100th kill: Lord Mukraju (556) stands in the angel camp (map 132, 114/92)
  • Killing Mukraju: on map 134 an angel sees a raid gate at 139/99, a demon does not
  • Killing the boss: everyone inside is sent back to map 134 at 139/100

From "The ship to the Mortaz Desert":

  • Once the anchor is raised you land at the Mortaz Desert Port near (127, 47).

Act 4 ship (no section yet): board at Port Alveus, let it sail. You land on map 130 (angel) or 131 (demon) around 10, 36. This one was checked in the client.

🤖 Generated with Claude Code

https://claude.ai/code/session_014gSmkU1QMrwn5KkbAzJtw9

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 24b2c72 and bb1f608.

Files ignored due to path filters: 1

  • src/NosCore.Database/Migrations/20261201120815_AddMapSpots.Designer.cs is excluded by !**/*.Designer.cs
Files selected for processing: 19

  • src/NosCore.Data/Enumerations/I18N/LanguageKey.cs
  • src/NosCore.Data/Enumerations/Map/MapSpotType.cs
  • src/NosCore.Data/Resource/LocalizedResources.resx
  • src/NosCore.Database/Entities/MapSpot.cs
  • src/NosCore.Database/Migrations/20261201120815_AddMapSpots.cs
  • src/NosCore.Database/Migrations/NosCoreContextModelSnapshot.cs
  • src/NosCore.Database/NosCoreContext.cs
  • src/NosCore.GameObject/Services/Act4RaidService/Act4RaidService.cs
  • src/NosCore.GameObject/Services/Act4ShipService/Act4ShipService.cs
  • src/NosCore.GameObject/Services/Act5ShipService/Act5ShipService.cs
  • src/NosCore.GameObject/Services/FactionWarService/FactionWarService.cs
  • src/NosCore.GameObject/Services/MapSpotService/MapSpotCatalog.cs
  • src/NosCore.Parser/ImportFactory.cs
  • src/NosCore.Parser/Parsers/MapSpotParser.cs
  • src/NosCore.Parser/Parsers/MapSpots.cs
  • test/NosCore.EndToEnd.Tests/Infrastructure/WorldData.cs
  • test/NosCore.GameObject.Tests/Services/Act4RaidService/Act4RaidServiceTests.cs
  • test/NosCore.Parser.Tests/MapSpotParserTests.cs
  • test/NosCore.Tests.Shared/TestWorld.cs

Walkthrough

The change adds map spot types and database records, imports configured locations into the catalog, and updates Act 4 and Act 5 ship services, raid handling, and faction-war services to use catalog locations.

Changes

Map Spot Data and Routing

Layer / File(s) Summary
Map spot model and database mapping
src/NosCore.Data/Enumerations/Map/MapSpotType.cs, src/NosCore.Database/Entities/MapSpot.cs, src/NosCore.Database/NosCoreContext.cs, src/NosCore.Database/Migrations/*
Adds the MapSpot entity and MapSpotType enum. The database mapping and migration add the table, map relationship, index, and PostgreSQL enum.
Map spot definitions and import
src/NosCore.Data/Enumerations/I18N/LanguageKey.cs, src/NosCore.Data/Resource/LocalizedResources.resx, src/NosCore.Parser/Parsers/MapSpots.cs, src/NosCore.Parser/Parsers/MapSpotParser.cs, src/NosCore.Parser/ImportFactory.cs, src/NosCore.GameObject/Services/MapSpotService/MapSpotCatalog.cs, test/NosCore.Parser.Tests/MapSpotParserTests.cs
Defines the configured locations, imports spots for loaded maps, and logs the imported count. The catalog provides lookups by spot type. Parser tests cover imported locations and filtering by available maps.
Act 4 ship and raid locations
src/NosCore.GameObject/Services/Act4RaidService/Act4RaidService.cs, src/NosCore.GameObject/Services/Act4ShipService/Act4ShipService.cs, test/NosCore.EndToEnd.Tests/Infrastructure/WorldData.cs, test/NosCore.GameObject.Tests/Services/Act4RaidService/Act4RaidServiceTests.cs, test/NosCore.Tests.Shared/TestWorld.cs
Act 4 ship and raid services resolve locations through the catalog. Test fixtures and raid tests use map spot records.
Act 5 ship landing
src/NosCore.GameObject/Services/Act5ShipService/Act5ShipService.cs
The service uses the catalog landing spot after a successful sailing. If sailing fails or the spot is absent, passengers remain at their current map coordinates.
Faction-war gates and guardians
src/NosCore.GameObject/Services/FactionWarService/FactionWarService.cs
The service uses catalog locations for raid gates and guardian camps. It does not generate a gate or summon a guardian when the required location is unavailable.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Possibly related issues

  • Issue 3532: The PR changes the location sources used by the listed event services, but retains the existing coordinates. The issue’s captured-data objective remains open.

Suggested reviewers: claude, 0lucifer0

Merge Risk: Minimal · previous review 24b2c · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Act 4 and Act 5 event spots are read from a table filled by a parser. The changeset adds a MapSpot table, a MapSpotParser that fills it during import, and an IMapSpotC…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: Act 4 and Act 5 event spots are read from a table filled by a parser. The changeset adds a MapSpot table, a MapSpotParser that fills it during import, and an IMapSpotCatalog that the Act 4 ship, Act 5 ship, and faction war services use in place of hard-coded coordinates. The title is specific and accurate, and it reflects the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copy link
Copy Markdown
Collaborator Author

Review: OK in substance. The AddMapSpots migration conflicts with master on NosCoreContextModelSnapshot.cs. Regenerate it with dotnet ef migrations add once the migrations queued ahead of it have landed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CUfJ46iekh4rbiCyoTamtn


Generated by Claude Code

@erwan-joly
erwan-joly force-pushed the claude/project-thread-0i4hvp-act4-spots branch from b420a6f to 2bf9b3e Compare November 29, 2026 10:12
@erwan-joly erwan-joly changed the title Read the Act 4 event spots from a parser-filled table Read the Act 4 and Act 5 event spots from a parser-filled table Nov 29, 2026
erwan-joly pushed a commit that referenced this pull request Nov 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkVYHFq6wdFRBtmzrW5
@erwan-joly

Copy link
Copy Markdown
Collaborator Author

Client check (cloud client, Tester taking the Act 4 ship from Port Alveus)

The behaviour must not change, and it doesn't: on master and on the branch the ship sails and lands the passenger on the angels' citadel next to Leika Passage.

Boarding at Port Alveus (branch):

branch: Leika Passage offers to board the ship

Master Branch
On the ship's deck master: on deck branch: on deck
Landed in the Citadel master: landed branch: landed, from the parser-filled spot

Generated by Claude Code

@erwan-joly
erwan-joly force-pushed the claude/project-thread-0i4hvp-act4-spots branch from 2bf9b3e to 24b2c72 Compare November 29, 2026 11:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments: 1

src/NosCore.GameObject/Services/FactionWarService/FactionWarService.cs: 1

279-279: Trivial · Functional Correctness

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Manual verification handover

Run the relevant checks in documentation/manual-test-plan.md:

  • Confirm “Lord Mukraju (556) stands in the angel camp” at map 132, cell 114/92.
  • Confirm “an angel sees a raid gate at 139/99, a demon does not”.
  • Confirm the gate becomes disabled after the raid hour. (raw.githubusercontent.com)

Based on learnings, “Read documentation/manual-test-plan.md whenever a change touches gameplay” and quote the relevant checks when handing over.

Source: Learnings

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 441d2fb and 24b2c72.

Files ignored due to path filters: 1

  • src/NosCore.Database/Migrations/20261129100537_AddMapSpots.Designer.cs is excluded by !**/*.Designer.cs
Files selected for processing: 19

  • src/NosCore.Data/Enumerations/I18N/LanguageKey.cs
  • src/NosCore.Data/Enumerations/Map/MapSpotType.cs
  • src/NosCore.Data/Resource/LocalizedResources.resx
  • src/NosCore.Database/Entities/MapSpot.cs
  • src/NosCore.Database/Migrations/20261129100537_AddMapSpots.cs
  • src/NosCore.Database/Migrations/NosCoreContextModelSnapshot.cs
  • src/NosCore.Database/NosCoreContext.cs
  • src/NosCore.GameObject/Services/Act4RaidService/Act4RaidService.cs
  • src/NosCore.GameObject/Services/Act4ShipService/Act4ShipService.cs
  • src/NosCore.GameObject/Services/Act5ShipService/Act5ShipService.cs
  • src/NosCore.GameObject/Services/FactionWarService/FactionWarService.cs
  • src/NosCore.GameObject/Services/MapSpotService/MapSpotCatalog.cs
  • src/NosCore.Parser/ImportFactory.cs
  • src/NosCore.Parser/Parsers/MapSpotParser.cs
  • src/NosCore.Parser/Parsers/MapSpots.cs
  • test/NosCore.EndToEnd.Tests/Infrastructure/WorldData.cs
  • test/NosCore.GameObject.Tests/Services/Act4RaidService/Act4RaidServiceTests.cs
  • test/NosCore.Parser.Tests/MapSpotParserTests.cs
  • test/NosCore.Tests.Shared/TestWorld.cs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

The Act 4 ship's landing cells, the Act 4 raid gate and return cell,
the cells Lord Mukraju appears on and the Act 5 ship's landing cell move
out of the services into a new MapSpot table, one row per MapSpotType,
written by the parser alongside the respawn map types. A spot whose row
is missing turns its part of the event off instead of failing: a ship
with no landing puts passengers ashore, no gate means no raid entrance,
and no camp means no guardian.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkU1QMrwn5KkbAzJtw9
@erwan-joly
erwan-joly force-pushed the claude/project-thread-0i4hvp-act4-spots branch from 99dc2a5 to bb1f608 Compare December 1, 2026 12:20
@erwan-joly
erwan-joly merged commit 015f469 into master Dec 1, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants