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

Forts & Citadels #1856

Closed
wants to merge 5 commits into from
Closed

Forts & Citadels #1856

wants to merge 5 commits into from

Conversation

r3versi
Copy link
Contributor

@r3versi r3versi commented Feb 5, 2020

New tile sprite for Fort and Citadel by @GeneralWadaling

Copy link
Owner

@yairm210 yairm210 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add you've probably seen, there's a pr that's been waiting for months regarding forts.
The reason it wasn't merged is primarily because this is to big of a human cheat.
The AI needs to know how to handle forts and citadels, at the very least, and for bonus points where and when to place them.

core/src/com/unciv/logic/battle/BattleDamage.kt Outdated Show resolved Hide resolved
core/src/com/unciv/logic/map/MapUnit.kt Outdated Show resolved Hide resolved
core/src/com/unciv/logic/battle/BattleDamage.kt Outdated Show resolved Hide resolved
@r3versi
Copy link
Contributor Author

r3versi commented Feb 5, 2020

I added a method TileInfo.isFriendlyTerritory(civInfo: CivInfo) that performs the same checks that were performed in rankTileForHealing.

Add you've probably seen, there's a pr that's been waiting for months regarding forts.
The reason it wasn't merged is primarily because this is to big of a human cheat.
The AI needs to know how to handle forts and citadels, at the very least, and for bonus points where and when to place them.

Now I remember why I had this PR on standby for weeks.. 😆
I'll keep you updated if I can come up with an idea.

@JackRainy
Copy link
Collaborator

I would suggest the next algorithm:
Forts
The range of 2 tiles is chosen to be able to attack it by city, in case the enemies have captured the fort, and far enough to be the last line of defence, not allowing catapults and artillery reach closer.

@JackRainy
Copy link
Collaborator

A note to be mentioned: "Forts can be constructed on Bananas without removing the jungle." Did we take that into account?
https://civilization.fandom.com/wiki/Bananas_(Civ5)

@RobertGine
Copy link
Contributor

Correct me if I'm wrong but by Jack's algorithm, the AI will build as many Forts as possible next to the closest city to the enemy, but will not defend other cities (that might also be vulnerable)?

@JackRainy
Copy link
Collaborator

@RobertGine, it depends what you mean by "the closest city to the enemy".
If the enemy approaches to a city, it builds the defence, if the enemy goes to another city, they build the defence there.

@RobertGine
Copy link
Contributor

Oh. So the AI will throw workers in front of an attacking army?

@JackRainy
Copy link
Collaborator

I understand what you mean :)
That's why they should start building it a bit earlier - while relations only become bad. Same time when AI decides to build army.

@yairm210
Copy link
Owner

yairm210 commented Apr 3, 2020

#2325 adds this, with AI =)

@yairm210 yairm210 closed this Apr 3, 2020
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.

4 participants