<URL: http://bugs.freeciv.org/Ticket/Display.html?id=34032 >
On 1/19/07, Daniel Markstedt <[EMAIL PROTECTED]> wrote:
> I suggest we cripple "novice" further so that it becomes what players
> expect it to be: something that even a novice can stand a chance
> against. It should build sparser empires, expand less overseas and be
> less militarily aggressive.
We want it to perform badly, not to have rules changed against it. Or?
About changing rules, attached is untested patch that halves
firepower for novice AI.
- ML
diff -Nurd -X.diff_ignore freeciv/common/combat.c freeciv/common/combat.c
--- freeciv/common/combat.c 2007-01-19 03:51:15.000000000 +0200
+++ freeciv/common/combat.c 2007-01-19 04:49:38.000000000 +0200
@@ -245,6 +245,8 @@
int *att_fp, int *def_fp)
{
struct city *pcity = tile_get_city(defender->tile);
+ struct player *att_owner;
+ struct player *def_owner;
*att_fp = unit_type(attacker)->firepower;
*def_fp = unit_type(defender)->firepower;
@@ -283,6 +285,20 @@
*att_fp = 1;
*def_fp = 1;
}
+
+ att_owner = unit_owner(attacker);
+ def_owner = unit_owner(defender);
+
+ if (*att_fp > 1
+ && att_owner->ai.control
+ && ai_handicap(att_owner, H_FIREPOWER)) {
+ *att_fp /= 2;
+ }
+ if (*def_fp > 1
+ && def_owner->ai.control
+ && ai_handicap(def_owner, H_FIREPOWER)) {
+ *def_fp /= 2;
+ }
}
/**************************************************************************
diff -Nurd -X.diff_ignore freeciv/common/player.h freeciv/common/player.h
--- freeciv/common/player.h 2006-07-17 23:56:46.000000000 +0300
+++ freeciv/common/player.h 2007-01-19 04:48:16.000000000 +0200
@@ -55,7 +55,8 @@
H_MAP = 1024, /* Only knows map_is_known tiles */
H_DIPLOMACY = 2048, /* Not very good at diplomacy */
H_REVOLUTION = 4096, /* Cannot skip anarchy */
- H_EXPANSION = 8192 /* Don't like being much larger than human */
+ H_EXPANSION = 8192, /* Don't like being much larger than human */
+ H_FIREPOWER = 16384 /* Reduced firepower */
};
BV_DEFINE(bv_player, MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS);
diff -Nurd -X.diff_ignore freeciv/server/stdinhand.c freeciv/server/stdinhand.c
--- freeciv/server/stdinhand.c 2007-01-17 13:38:21.000000000 +0200
+++ freeciv/server/stdinhand.c 2007-01-19 04:46:51.000000000 +0200
@@ -682,7 +682,8 @@
| H_REVOLUTION,
/* novice */ H_RATES | H_TARGETS | H_HUTS | H_NOPLANES
| H_DIPLOMAT | H_LIMITEDHUTS | H_DEFENSIVE
- | H_DIPLOMACY | H_REVOLUTION | H_EXPANSION,
+ | H_DIPLOMACY | H_REVOLUTION | H_EXPANSION
+ | H_FIREPOWER,
/* easy */ H_RATES | H_TARGETS | H_HUTS | H_NOPLANES
| H_DIPLOMAT | H_LIMITEDHUTS | H_DEFENSIVE
| H_REVOLUTION | H_EXPANSION,
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev