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

Terminal rather than storage decides whether a room is established. #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 2 additions & 2 deletions lib/services/warpath/battledetect.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ class BattleDetect {
if (roomLevel < 6) {
return ROOM_DEVELOPING
}
if (!roomObjects.storage && !roomObjects.terminal) {
if (!roomObjects.terminal) {
return ROOM_DEVELOPING
}
const towers = roomObjects.tower.length
if (towers.length < 2) {
return ROOM_DEVELOPING
}
if (roomLevel < 8 || roomObjects.tower.length < 5) {
if (roomLevel < 8 || roomObjects.tower.length < 5 || !roomObjects.storage) {
return ROOM_ESTABLISHED
}
return ROOM_FORTIFIED
Expand Down
8 changes: 4 additions & 4 deletions warpath-classifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Any classification is automatically upgraded to the next level (including from 5
* Neutral - No Owners or Reservers
* Undefended - Room has no towers.
* Developing - Is less than RCL6, or does not have at least two towers or storage.
* Established - At least RCL6 with at least two towers and storage (or terminal).
* Fortified - At least RCL8 with at least five towers and storage (or terminal).
* Developing - Is less than RCL6, or does not have at least two towers and terminal.
* Established - At least RCL6 with at least two towers and terminal.
* Fortified - At least RCL8 with at least five towers, storage and terminal.
## Class 5
Expand Down Expand Up @@ -68,4 +68,4 @@ OR
## Class 0
* Any PVP actions that do not meet above qualifications
* Any PVP actions that do not meet above qualifications