On Sun, 13 Jul 2014 11:35:17 -0600
William Astle <l...@l-w.ca> wrote:
> That seems pretty conclusive: Artillery attacking a village or colony 
> does not get penalized for being in the open.

Cool.  Col1-confirmation is always welcome.  Welcome enough to drag me
away from a really deep struggle with the internals of the AI
anyway:-).

So I tried attacking a native village with artillery.  The first
thing I noticed is that there is a crash in the animation handling.
This may have confused matters if it caused client to become derailed
before it could process updates in which the settlement loses units.
Were there crashes in your logs?  Either way, this should be fixed in
git.7a5ff41.

The next problem is that the pre-combat dialog is unfairly
uninformative.  It can not identify the defender unit (the client does
not have this information), but omits static non-unit defence bonuses
which you could reasonably expect the player to know.  So I tried to
add those in, only to find that the defender settlement bonuses were
not present in the client-side settlement used in the pre-combat
dialog.  This was a serialization bug, in a piece of code that is now
on its 3rd attempt to get right in git.f996ba1.

Meanwhile I am reminded by the comments in SimpleCombatModel that the
difference between the pre-combat dialog and the actual combat is that
because the client-side dialog does not have the defender unit, it
uses the settlement itself as the defender, whereas the actual
server-side combat is between the attacker and the actual defender
unit.  Finding the right piece of code, sure enough, you are right,
the conditions for applying the artillery-in-the-open penalty are too
generous and need to be tightened so that it does not apply if the
defender is in a settlement.  Done in git.b1e1abc.  I can now see an
artillery attack on a vanilla colony containing artillery has a
probability of success of 0.583, which seems reasonable.

Finally, you should now be able to see tile and settlement defence
bonuses in the pre-combat dialog, git.f06c054.

Give that lot a try.  Back to the AI.

Cheers,
Mike Pope

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck&#174;
Code Sight&#153; - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to