diff --git a/README.md b/README.md index 083ea8a..592053e 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,22 @@ My focus is a bit more limited: I want the player to control a single Hero chara See the 'Issues' of this repository for some more information on the direction of Gameplay. -## Current Status +## Screenshots +Main Screen Setup Screen -It's sort of playable, but the UI is not greatâ„¢ and you'll never actually be attacked. +## Changelog & Current Status -## Screenshots -Main Screen +It's sort of playable, but the UI is not greatâ„¢. + +### v0.2 +- Added a setup screen to choose your civilisation and starting province +- More enemies, & enemies can attack you (though you can auto-win). +- Handle difficulty less rudimentarily so AI can actually be dangerous. +- Allow scrolling around the map via the map edges. +- Add city icons to inhabited provinces. +### v0.1 +Initial reveal - sorta playable, but not really. ## Structure diff --git a/gui/campaigns/grand_strategy/game/GameData.js b/gui/campaigns/grand_strategy/game/GameData.js index b9295aa..fc8f2a1 100644 --- a/gui/campaigns/grand_strategy/game/GameData.js +++ b/gui/campaigns/grand_strategy/game/GameData.js @@ -321,12 +321,9 @@ class GameData if (pv.garrison < 2) pv.garrison++; for (let pot of pv.getLinks()) - { - if (pv.ownerTribe !== code) + if (g_GameData.provinces[pot].ownerTribe !== code) targets.add(pot); - } } - if (randBool(0.5) && targets.size) { let target = pickRandom(Array.from(targets)); diff --git a/gui/campaigns/grand_strategy/game/MapTypes.js b/gui/campaigns/grand_strategy/game/MapTypes.js index 83c4974..fa546ea 100644 --- a/gui/campaigns/grand_strategy/game/MapTypes.js +++ b/gui/campaigns/grand_strategy/game/MapTypes.js @@ -27,13 +27,18 @@ class MapTypes let maps = []; let sp = spec; let nextToken = sp.search(/\+/); + if (nextToken === -1) + nextToken = sp.length; while (sp.length) { const token = sp.substring(0, nextToken); - sp = sp.substring(nextToken+1); + sp = sp.substring(nextToken + 1); + nextToken = sp.search(/\+/); + if (nextToken === -1) + nextToken = sp.length; if (!(token in this.mapTypes)) { - warn("Unknow map type " + token); + warn("Unknow map type '" + token + "'"); break; } biomes = biomes.concat(this.mapTypes[token].data.biomes ?? []); diff --git a/mod.json b/mod.json index bb25f16..0b61813 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,6 @@ { "name": "grand_strat", - "version": "0.1.0", + "version": "0.2.0", "label": "Grand Strategy", "url": "github.com/wraitii/0ad_grand_strat", "description": "Some UX improvements tests",