bugFreeciv - Bugs: bug #20544, Sea units benefitting from City...

 
 
Show feedback again

bug #20544: Sea units benefitting from City Walls

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Wed 20 Feb 2013 03:16:57 PM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 10 Mar 2013 11:57:06 AM UTC, SVN revision 22505:

Added unit class property "non_native_def_pct", defaulting to 100%.
Units defending on non-native terrain get only that percentage of
their defense power applied. Currently the only way for unit to defend
on non-native terrain is that it's in a city built on such a terrain.

See bug #20544

(Browse SVN revision 22505)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 07 Mar 2013 07:53:33 AM UTC, comment #4:

- Some comment typos fixed

(file #17402)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 01 Mar 2013 09:13:14 AM UTC, comment #3:

Attached patch adds unit class property "non_native_def_pct", defaulting to 100%. Units defending on non-native terrain (ships in harbour in classic rulesets) get only that percentage of their defense power applied.

(file #17381)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 20 Feb 2013 07:53:44 PM UTC, comment #2:

> When a unit is not in their natural element [a ship in dock or a
> plane on the ground] they should be considered essentially
> defenseless and automatically eliminated, IMHO.


Yes, from realism point of view it doesn't make sense that ship in the harbour manages to defend entire city against attack from inland. Maybe it's the crew acting as infantry up in the mountains?

BadCityDefender turned out to be much less severe modification than I had thought. It just reduces defender firepower to 1 (that has no effect until ships are so powerful that they have greater firepower to begin with) and doubles attacker firepower.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 20 Feb 2013 07:35:40 PM UTC, comment #1:

I haven't actually surveyed layouts of real life cities for this, but it seems reasonable that in many cases the wall might well be built right to the water's edge. So if a ship in a harbor gets attacked by infantry, it could well be behind a wall.

Surely the routine that finds a city's defender takes BadCityDefender into account [i'm not finding it right now]? Perhaps BadCityDefender should modify the Defense value and/or Hitpoints alongside the Attack value. When a unit is not in their natural element [a ship in dock or a plane on the ground] they should be considered essentially defenseless and automatically eliminated, IMHO.

Anyway, to me that was the lesson of Pearl Harbor.

David Lowe <doctorjlowe>
Wed 20 Feb 2013 03:16:57 PM UTC, original submission:

Old bug (was discussed in RT age, but I found not ticket from gna). As only one unit can be used as effect requirement, and that's attacking unit in case of defense bonus effect, it doesn't matter what unit is the defending one. This means that ships in harbour get benefit from city walls when land unit attacks. This might be bug in our default rulesets (civ2 ruleset), but the worst part is that you cannot create ruleset where this is not true. With the defense values and hitpoints of the sea units, they are often the best city defenders available despite BadCityDefender (Pearl Harbor) flag when they get the same City Walls bonus land unit defenders get.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #17402:  NonNatDefPct-2.patch added by cazfi (10kB - text/x-diff)
file #17381:  NonNatDefPct.patch added by cazfi (10kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by doctorjlowe (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 10 Mar 2013 11:57:18 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 07 Mar 2013 07:53:33 AM UTCcazfiAttached File-=>Added NonNatDefPct-2.patch, #17402
    Fri 01 Mar 2013 09:13:14 AM UTCcazfiAttached File-=>Added NonNatDefPct.patch, #17381
      CategoryNone=>general
      StatusNone=>Ready For Test
      Planned Release=>2.5.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup