 |
|
moseslei
|
|
Falls Church VA USA
May 2000 time: 05:14
|
|
I haven't looked far enough into the code, I guess... what happens when a civilization has no capital? Palace sold, or captured by another player? I guess my question is, how are things like bribe cost and corruption calculated when there is no palace?
Moses
|
|
|  |
 |
|  |
 |
|
CapTVK
|
 |
Voorburg, the Netherlands, Europe
Jan 1970 time: 05:14
|
|
Thanks Thue,
I found the bribing part, here it is:
code:
/ **************************************************
************************
232 calculate how expensive it is to bribe the unit
233 depends on distance to the capital, and government form
234 settlers are half price
235
236 Plus, the damage to the unit reduces the price.
237
238 **************************************************
************************/
239 int unit_bribe_cost(struct unit *punit)240 {
241 struct government *g = get_gov_iplayer(punit->owner);242 int cost;
243 struct city *capital;244 int dist;
245 int default_hp = get_unit_type(punit->type)->hp;246
247 cost = (&game.players[punit->owner])->economic.gold+750;
248 capital=find_palace(&game.players[punit->owner]);249 if (capital) {
250 int tmp = map_distance(capital->x, capital->y, punit->x, punit->y);
251 dist=MIN(32, tmp);252 }253 else254 dist=32;
255 if (g->fixed_corruption_distance)
256 dist = MIN(g->fixed_corruption_distance, dist);
257 cost=(cost/(dist+2))*(get_unit_type(punit->type)->build_cost/10);
258 /* FIXME: This is a weird one - should be replaced */
259 if (unit_flag(punit->type, F_CITIES)) 260 cost/=2;261
262 /* Cost now contains the basic bribe cost. We now reduce it by:263
264 cost = basecost/2 + basecost/2 * damage/hp265 266 */267
268 cost = (int)((float)cost/(float)2 + ((float)punit->hp/(float)default_hp) * ((float)cost/(float)2));
269
270 return cost;
271 }
272
Seems very similar to the original bribing in Civ1 (+750 in the formula, dist to capital etc..) But why are settlers only half price? Wouldn't those units be very vulnerable this way?
[This message has been edited by CapTVK (edited May 13, 2000).]
|
|
|  |
 |
|
Thue
|
|
Copenhagen, Denmark
Jan 1970 time: 06:14
|
|
That mailing list is a pain to search, you have to search it 3 months at a time...
|
|
|  |
 |
|
taw
|
|
Reason why settlers has discount is that
bribing settlers shouldn't be
much more expensive than bribing small city
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|