yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.26k stars 1.55k forks source link

Feature request: Smarter adventurers #10622

Closed hackedpassword closed 1 month ago

hackedpassword commented 9 months ago

Before creating

Problem Description

AI does not appear to consider tile damage. For example, when allowed to pass, the AI disregards damage consideration of impassable tiles, leading to dumb damage or unit deaths. This may be less about impassable tiles and more about the simple consideration of tile applied damage.

Related Issue Links

No response

Desired Solution

Tiles that apply damage have a weight that makes them less desirable to use, unless the purpose and destination, and/or survivability of the damage, warrants ending the units' turn on the damage-inflicting tile.

Alternative Approaches

Most simple-est logic would be to allow ending the turn on the damaging tile if it won't kill the unit next turn, otherwise don't go/be there.

Additional Context

Adventurer promotion "uniques": [ "Can pass through impassable tiles", ...

Tile damage "Units ending their turn on this terrain take [50] damage <with [80]% chance>", // get in get out

To explain some example rationale used in my mod, why this matters (to me) - mountains are used as normal movement blockers, partitioning the map. Gaining one of the palace natural wonders grants a promotion that opens up terrain accessibility, making owning these wonders valuable. To facilitate production resources, in this static map, mines can be freely constructed on mountains, requiring balance of watching unit health vs construction progression. The AI can do it, but usually losing a unit or two per mine since it doesn't factor damage. Other mods may have various other uses of tile damage.

Overall, factoring tile damage (or even healing as I hacked in would be beneficial to AI gameplay.

SeventhM commented 8 months ago

"Units ending their turn on this terrain take [50] damage <with [80]% chance>"

I suspect AIs may need to look at chance based uniques differently than they currently do. As it currently stands, I think there was some work to make the AI consider tile damage, but chance based uniques throws a wrench in it as it may not see the unique in the list when checking

yairm210 commented 8 months ago

OH DAMN that's probably it!

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

yairm210 commented 5 months ago

Still a problem, unstale

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 5 days with no activity.