/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* move.c: Misc. move routines
- *
+ *
* Known contributors to this file:
- *
+ * Markus Armbruster, 2006
*/
#include <config.h>
#include "misc.h"
-#include "xy.h"
-#include "sect.h"
-#include "path.h"
#include "nat.h"
-#include "common.h"
+#include "path.h"
+#include "sect.h"
+#include "xy.h"
double
sector_mcost(struct sctstr *sp, int mobtype)
{
double base, cost;
- base = dchr[sp->sct_type].d_mcst;
- if (base <= 0)
+ base = dchr[sp->sct_type].d_mob0;
+ if (base < 0)
return -1.0;
- /* linear function in eff, d_mcst at 0%, d_emcst at 100% */
- base += (dchr[sp->sct_type].d_emcst - base) * sp->sct_effic / 100;
- base /= 5;
+ /* linear function in eff, d_mob0 at 0%, d_mob1 at 100% */
+ base += (dchr[sp->sct_type].d_mob1 - base) * sp->sct_effic / 100;
if (CANT_HAPPEN(base < 0))
base = 0;