forked from github/server
CATAPULT_STRUCTURAL_DAMAGE was broken.
check for PDCURSES, not WIN32
This commit is contained in:
parent
e4aa8f505e
commit
7b01581302
5 changed files with 12 additions and 10 deletions
|
@ -86,7 +86,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#define TACTICS_MODIFIER 1 /* modifier for generals in the front/rear */
|
#define TACTICS_MODIFIER 1 /* modifier for generals in the front/rear */
|
||||||
|
|
||||||
#define CATAPULT_INITIAL_RELOAD 4 /* erster schuss in runde 1 + rng_int() % INITIAL */
|
#define CATAPULT_INITIAL_RELOAD 4 /* erster schuss in runde 1 + rng_int() % INITIAL */
|
||||||
#define CATAPULT_STRUCTURAL_DAMAGE
|
|
||||||
|
|
||||||
#define BASE_CHANCE 70 /* 70% Basis-<2D>berlebenschance */
|
#define BASE_CHANCE 70 /* 70% Basis-<2D>berlebenschance */
|
||||||
#define TDIFF_CHANGE 5 /* 5% h<>her pro Stufe */
|
#define TDIFF_CHANGE 5 /* 5% h<>her pro Stufe */
|
||||||
|
|
11
src/gmtool.c
11
src/gmtool.c
|
@ -144,7 +144,7 @@ static void init_curses(void)
|
||||||
short bcol = COLOR_BLACK;
|
short bcol = COLOR_BLACK;
|
||||||
short hcol = COLOR_MAGENTA;
|
short hcol = COLOR_MAGENTA;
|
||||||
start_color();
|
start_color();
|
||||||
#ifdef WIN32
|
#ifdef __PDCURSES__
|
||||||
/* looks crap on putty with TERM=linux */
|
/* looks crap on putty with TERM=linux */
|
||||||
if (can_change_color()) {
|
if (can_change_color()) {
|
||||||
init_color(COLOR_YELLOW, 1000, 1000, 0);
|
init_color(COLOR_YELLOW, 1000, 1000, 0);
|
||||||
|
@ -422,6 +422,15 @@ static bool handle_info_region(window * wnd, state * st, int c)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wxborder(WINDOW *win)
|
||||||
|
{
|
||||||
|
#ifdef __PDCURSES__
|
||||||
|
return wborder(win, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
#else
|
||||||
|
return wborder(win, '|', '|', '-', '-', '+', '+', '+', '+');
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void paint_info_region(window * wnd, const state * st)
|
static void paint_info_region(window * wnd, const state * st)
|
||||||
{
|
{
|
||||||
WINDOW *win = wnd->handle;
|
WINDOW *win = wnd->handle;
|
||||||
|
|
|
@ -41,6 +41,8 @@ extern "C" {
|
||||||
void make_block(int x, int y, int radius, const struct terrain_type *terrain);
|
void make_block(int x, int y, int radius, const struct terrain_type *terrain);
|
||||||
void seed_players(struct newfaction **players, bool new_island);
|
void seed_players(struct newfaction **players, bool new_island);
|
||||||
|
|
||||||
|
int wxborder(WINDOW *win);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -90,12 +90,6 @@ extern "C" {
|
||||||
#define TWIDTH 2 /* width of tile */
|
#define TWIDTH 2 /* width of tile */
|
||||||
#define THEIGHT 1 /* height of tile */
|
#define THEIGHT 1 /* height of tile */
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#define wxborder(win) wborder(win, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
||||||
#else
|
|
||||||
#define wxborder(win) wborder(win, '|', '|', '-', '-', '+', '+', '+', '+')
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -138,7 +138,6 @@ int *casualties)
|
||||||
/* If battle succeeds */
|
/* If battle succeeds */
|
||||||
if (hits(*at, dt, wp)) {
|
if (hits(*at, dt, wp)) {
|
||||||
d += terminate(dt, *at, AT_STANDARD, wp->type->damage[0], true);
|
d += terminate(dt, *at, AT_STANDARD, wp->type->damage[0], true);
|
||||||
#ifdef CATAPULT_STRUCTURAL_DAMAGE
|
|
||||||
if (dt.fighter->unit->building && rng_int() % 100 < 5) {
|
if (dt.fighter->unit->building && rng_int() % 100 < 5) {
|
||||||
double dmg = config_get_flt("rules.building.damage.catapult", 1);
|
double dmg = config_get_flt("rules.building.damage.catapult", 1);
|
||||||
damage_building(b, dt.fighter->unit->building, dmg);
|
damage_building(b, dt.fighter->unit->building, dmg);
|
||||||
|
@ -147,7 +146,6 @@ int *casualties)
|
||||||
double dmg = config_get_flt("rules.ship.damage.catapult", 0.01);
|
double dmg = config_get_flt("rules.ship.damage.catapult", 0.01);
|
||||||
damage_ship(dt.fighter->unit->ship, dmg)
|
damage_ship(dt.fighter->unit->ship, dmg)
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue