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

Map Util functions #19

Open
awi2d opened this issue Nov 2, 2023 · 0 comments
Open

Map Util functions #19

awi2d opened this issue Nov 2, 2023 · 0 comments
Assignees

Comments

@awi2d
Copy link
Contributor

awi2d commented Nov 2, 2023

All util functions about interaction with the main board.

  • get/set Political/religius control.
    • getPoliticalControl(cityId): Power
    • setPoliticalControl(cityId, power): void
    • getReligion(cityId): ReligionIDs
    • setReligion(cityid, ReligionIDs): void
  • get city state
    • cityIsFortified(cityId): boolean
    • cityInUnrest(cityId) : boolean
    • cityIsSieged(cityId) : boolean
  • add/remove/get units. (adding land units is already implemented in Tokens::addLandunits move that function from Tokens to Map)
    • addUnits(cityId, Power, count, type): void
    • removeUnity(cityid, Power, count, type): void
    • getUnits(cityId, Power, type): void // all units of that power
    • getEnemyUnits(cityId, Power, type): void // all units of powers that are at war with Power)
  • add/get/capture Leader
    • getLeader(cityId, Power) : tokenIDs_LEADER
    • addLeader(cityId, tokenIDs_LEADER) : void // when leader gets added into play or returns from prission/turn track
    • removeLeader(tokenIDs_LEADER) : void // when leader is permanently removed from game
    • captureLeaders(cityId, Power) : void //there are no situations where only certain leaders on a field are captured, I think.
  • move formation. (incomplete implementation exists somewhere
    • moveFormation(Formation, cityId) : void
    • getPossibleMoves(Formation) : list of cityIds
    • getPossibleMoves(cityId startField, Power) : list of cityIds
  • ships
    • moveShips(Seazone start, Seazone target, int count, Power) : void //TODO loaned and minor power ships
    • maybe make add/remove LandUnits and add/remove Ships functions instead of generall add/remove Units?
@awi2d awi2d self-assigned this Nov 22, 2023
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

No branches or pull requests

1 participant