Skip to content

Commit

Permalink
Merge pull request #27 from jurerotar/develop
Browse files Browse the repository at this point in the history
feat: improved building UI, added tile modal, added building timers, enabled oasis variation support
  • Loading branch information
jurerotar authored Sep 16, 2024
2 parents d21d350 + 42ab884 commit 50d77ae
Show file tree
Hide file tree
Showing 90 changed files with 2,619 additions and 38,850 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true
[*]
ij_html_space_inside_empty_tag = true
max_line_length = 140
end_of_line = crlf
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jurerotar/echoes-of-travian/master-ci.yml?branch=master&logo=github&label=master%20ci)](https://echoes-of-travian.netlify.app)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jurerotar/echoes-of-travian/master-ci.yml?branch=develop&logo=github&label=develop%20ci)](https://develop--echoes-of-travian.netlify.app)
![Netlify](https://img.shields.io/netlify/d5146a5a-0a15-4619-bf86-a5c7552b406f?logo=netlify)
[![GitHub discussions](https://img.shields.io/badge/GitHub%20discussions-Chat%20now!-blue)](https://github.com/jurerotar/Echoes-of-Travian/discussions/new/choose)
![Static Badge](https://img.shields.io/badge/Contributions-welcome-limegreen)
[![Discord](https://img.shields.io/discord/1282804642807283842?logo=discord&logoColor=white&label=Discord)](https://discord.gg/KZsWW3Z8)

Echoes of Travian is a single-player, real-time, browser-based strategy game, inspired by Travian. It requires no download or account creation.
The game leverages browser-native technologies to save your progress and data between sessions, offering an experience akin to an online game.
Expand All @@ -21,6 +20,7 @@ The game leverages browser-native technologies to save your progress and data be
✅ Culture points removal. Make as many villages as you want, whenever you can afford them.<br>
✅ NPC factions, reputation system which determines trading options & hostility.<br>
✅ Natars & nature as playable tribes.<br>
✅ New buildings.<br>

## Development guide

Expand Down
49 changes: 48 additions & 1 deletion __mocks__/game/event-mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,60 @@ import { type GameEvent, GameEventType } from 'interfaces/models/events/game-eve
import { villageMock } from 'mocks/game/village/village-mock';

const cranny = getBuildingData('CRANNY');
const clayPit = getBuildingData('CLAY_PIT');
const mainBuilding = getBuildingData('MAIN_BUILDING');

export const buildingConstructionEventMock: GameEvent<GameEventType.BUILDING_CONSTRUCTION> = {
id: 'id',
type: GameEventType.BUILDING_CONSTRUCTION,
resolvesAt: Date.now(),
resolvesAt: 0,
villageId: villageMock.id,
building: cranny,
buildingFieldId: 38,
resourceCost: cranny.buildingCost[0],
level: 0,
};

export const clayPitUpgradeLevel1EventMock: GameEvent<GameEventType.BUILDING_LEVEL_CHANGE> = {
id: 'id',
type: GameEventType.BUILDING_LEVEL_CHANGE,
resolvesAt: clayPit.buildingDuration[0],
villageId: villageMock.id,
building: clayPit,
buildingFieldId: 5,
resourceCost: clayPit.buildingCost[1],
level: 1,
};

export const clayPitUpgradeLevel2EventMock: GameEvent<GameEventType.BUILDING_LEVEL_CHANGE> = {
id: 'id',
type: GameEventType.BUILDING_LEVEL_CHANGE,
resolvesAt: clayPit.buildingDuration[1],
villageId: villageMock.id,
building: clayPit,
buildingFieldId: 5,
resourceCost: clayPit.buildingCost[2],
level: 2,
};

export const mainBuildingUpgradeLevel1EventMock: GameEvent<GameEventType.BUILDING_LEVEL_CHANGE> = {
id: 'id',
type: GameEventType.BUILDING_LEVEL_CHANGE,
resolvesAt: mainBuilding.buildingDuration[0],
villageId: villageMock.id,
building: mainBuilding,
buildingFieldId: 38,
resourceCost: mainBuilding.buildingCost[2],
level: 1,
};

export const mainBuildingUpgradeLevel2EventMock: GameEvent<GameEventType.BUILDING_LEVEL_CHANGE> = {
id: 'id',
type: GameEventType.BUILDING_LEVEL_CHANGE,
resolvesAt: mainBuilding.buildingDuration[1],
villageId: villageMock.id,
building: mainBuilding,
buildingFieldId: 38,
resourceCost: mainBuilding.buildingCost[2],
level: 2,
};
2 changes: 1 addition & 1 deletion __mocks__/game/village/village-mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { resourceFields4446Mock } from './resource-fields-mock';
const { id: playerId } = playerMock;

export const villageMock: Village = {
id: '9ab89c67-8903-4d63-b67a-8b8cbe6597de',
id: '0-0',
name: 'player-950bbc85d18046cbc1a87cd58ca03e24f2b0f72e',
slug: 'v-1',
coordinates: {
Expand Down
4 changes: 2 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lineEnding": "lf",
"lineWidth": 140,
"attributePosition": "multiline",
"ignore": ["./build", "./coverage", "./dist", "./out", "./public", "./.husky", "./.github", "./docs"]
"ignore": ["dist"]
},
"organizeImports": { "enabled": true },
"linter": {
Expand All @@ -26,7 +26,7 @@
"noNonNullAssertion": "off"
}
},
"ignore": ["node_modules/"]
"ignore": ["dist"]
},
"javascript": {
"formatter": {
Expand Down
1 change: 1 addition & 0 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ graph TD
F --> G[React Query Notifies Subscribers]
G --> H[Persist State to OPFS]
H --> F[Wait for New State Changes]
```
Loading

0 comments on commit 50d77ae

Please sign in to comment.