Skip to content

Let players capture or raze enemy cities - #1135

Open
zack-the-coding-actuary wants to merge 2 commits into
C7-Game:Developmentfrom
zack-the-coding-actuary:capture_cities
Open

zack-the-coding-actuary wants to merge 2 commits into
C7-Game:Developmentfrom
zack-the-coding-actuary:capture_cities

Conversation

@zack-the-coding-actuary

Copy link
Copy Markdown
Contributor

In response to issue #1120

Previously any non-barbarian unit entering an enemy city destroyed it outright. Human players now choose between capturing and razing, and the AI captures.

  • Add MsgCityCaptureOrDestroy and a Military Advisor options pop-up that asks the attacker to capture or raze, with a notice for the victim when the attacker is the winner
  • Add MsgDoCaptureCity and MsgDoRazeCity engine messages so the pop-up choices run on the engine side
  • Rework CityInteractions.CaptureCity to transfer the city: gold, citizens, city lists, culture, palace removal, border ownership, trade network, civ destruction check, capital relocation and corruption
  • Add CityInteractions.RazeCity, which transfers gold, destroys the city and notifies a human victim through the existing MsgCityRaised pop-up
  • Treat capturing a size 1 city as a raze, skip the question for human attackers there, and send them the MsgCityRaised winner notice
  • Compute MsgCityRaised.goldTaken from City.goldOnDestruction instead of taking it as a constructor argument
  • Branch OnEnterTile on barbarian, human and AI attackers

Everything matches typical base game logic between what I wrote and what I tested in game, let me know if y'all have notes or changes. Thanks!

Previously any non-barbarian unit entering an enemy city destroyed it outright. Human players now choose between capturing and razing, and the AI captures.

- Add MsgCityCaptureOrDestroy and a Military Advisor options pop-up that asks the attacker to capture or raze, with a notice for the victim when the attacker is the winner
- Add MsgDoCaptureCity and MsgDoRazeCity engine messages so the pop-up choices run on the engine side
- Rework CityInteractions.CaptureCity to transfer the city: gold, citizens, city lists, culture, palace removal, border ownership, trade network, civ destruction check, capital relocation and corruption
- Add CityInteractions.RazeCity, which transfers gold, destroys the city and notifies a human victim through the existing MsgCityRaised pop-up
- Treat capturing a size 1 city as a raze, skip the question for human attackers there, and send them the MsgCityRaised winner notice
- Compute MsgCityRaised.goldTaken from City.goldOnDestruction instead of taking it as a constructor argument
- Branch OnEnterTile on barbarian, human and AI attackers
…r chose producible before recalculating trade network
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.

1 participant