Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #864356

closed

Don't fight units with 0 defense

Added by Alexandro Ignatiev over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

A behaviour known in Civ3: whatever number of units is in an attacked city, if not a single one of them can actually defend, workers surrender and planes/ships perish in a moment as soon as the first single unit bothers to conquer the site. We already can capture any number of caravans at time, but a single diplomat "protects" them. A number of diplomats put in a city steal several moves from an attacker to deal with them when actually neither of them can fight anything.

Make a switch in rulesets to prevent defense 0 units interrupting conquerors. (Probably, make a separate one in another ticket to move a capturer on the tile of the captured).


Files

0038-Add-Action-Wipe-Units.patch (33.3 KB) 0038-Add-Action-Wipe-Units.patch Marko Lindqvist, 2021-03-15 07:50 AM
0035-Add-Action-Wipe-Units.patch (33.3 KB) 0035-Add-Action-Wipe-Units.patch Marko Lindqvist, 2021-03-15 04:22 PM
0008-Add-Action-Wipe-Units.patch (33.3 KB) 0008-Add-Action-Wipe-Units.patch Marko Lindqvist, 2021-03-23 09:57 PM
Actions #1

Updated by Marko Lindqvist over 3 years ago

Attached patch adds Action "Wipe Units" that wipes all the units from the target tile at once, even if stack death usually would not apply. There's a hard requirement that none of the units has positive defense strength.

Actions #2

Updated by Marko Lindqvist over 3 years ago

The occupying part comes in Feature #922859

Actions #3

Updated by Sveinung Kvilhaugsvik over 3 years ago

I really like this solution. I noticed that you used "_" rather than " " for the action result name. Do you think all action results should switch from space to underscore?

Actions #4

Updated by Marko Lindqvist over 3 years ago

  • Status changed from Resolved to In Progress

Sveinung Kvilhaugsvik wrote:

I really like this solution. I noticed that you used "_" rather than " " for the action result name.

That was a mistake. Will fix to match current practice in next version.

Actions #5

Updated by Marko Lindqvist over 3 years ago

- Rebased against current git HEAD
- Action result name renamed to match the practice

Actions #6

Updated by Marko Lindqvist over 3 years ago

  • Status changed from In Progress to Resolved
Actions #7

Updated by Alexandro Ignatiev over 3 years ago

Shouldn't we check defense strength after modifiers? (Civ3: fighters do have defense in air combats but are wiped in cities.)

(Also, not exactly what I wanted, diplo still can protect caravan from being captured, but, well, good for its own.)

Actions #8

Updated by Marko Lindqvist over 3 years ago

- Check total defense power instead of base defense_strength

Actions #9

Updated by Marko Lindqvist over 3 years ago

Alexandro Ignatiev wrote:

(Also, not exactly what I wanted, diplo still can protect caravan from being captured, but, well, good for its own.)

Yeah, I were mainly thinking about the "capturing a city with no real defenders" case.

Now I'm bit worried If we want different approach for capturing units (that themselves have non-zero defense) in the future, this may conflict with such plans. Of course, until S3_2 d3f we can freely readjust this...

Actions #10

Updated by Sveinung Kvilhaugsvik over 3 years ago

Marko Lindqvist wrote:

Now I'm bit worried If we want different approach for capturing units (that themselves have non-zero defense) in the future, this may conflict with such plans.

There is room for more than one capture action, wipe action etc.

Actions #11

Updated by Marko Lindqvist over 3 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist
Actions #12

Updated by Marko Lindqvist over 3 years ago

Alexandro Ignatiev wrote:

(Also, not exactly what I wanted, diplo still can protect caravan from being captured, but, well, good for its own.)

Opened -> Feature #924536

Also available in: Atom PDF