forked from github/server
http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000251 http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000213 - Die 10% Regel war noch aktiv. defines vor den includes, boese!
This commit is contained in:
parent
e135dc7728
commit
bcca725608
1 changed files with 21 additions and 46 deletions
|
@ -12,28 +12,6 @@
|
||||||
* prior permission by the authors of Eressea.
|
* prior permission by the authors of Eressea.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SHOW_KILLS
|
|
||||||
#undef DELAYED_OFFENSE /* non-guarding factions cannot attack after moving */
|
|
||||||
|
|
||||||
#define TACTICS_RANDOM 5 /* define this as 1 to deactivate */
|
|
||||||
#define CATAPULT_INITIAL_RELOAD 4 /* erster schuss in runde 1 + rand() % INITIAL */
|
|
||||||
#define CATAPULT_STRUCTURAL_DAMAGE
|
|
||||||
|
|
||||||
#define BASE_CHANCE 70 /* 70% Basis-Überlebenschance */
|
|
||||||
#ifdef NEW_COMBATSKILLS_RULE
|
|
||||||
#define TDIFF_CHANGE 5 /* 5% höher pro Stufe */
|
|
||||||
#define DAMAGE_QUOTIENT 2 /* damage += skilldiff/DAMAGE_QUOTIENT */
|
|
||||||
#else
|
|
||||||
#define TDIFF_CHANGE 10
|
|
||||||
# define DAMAGE_QUOTIENT 1 /* damage += skilldiff/DAMAGE_QUOTIENT */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum combatmagic {
|
|
||||||
DO_PRECOMBATSPELL,
|
|
||||||
DO_POSTCOMBATSPELL
|
|
||||||
} combatmagic_t;
|
|
||||||
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "eressea.h"
|
#include "eressea.h"
|
||||||
#include "battle.h"
|
#include "battle.h"
|
||||||
|
@ -87,19 +65,30 @@ typedef enum combatmagic {
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
#define dbgprintf(a) fprintf a;
|
||||||
# include <zlib.h>
|
static FILE *bdebug;
|
||||||
# define dbgprintf(a) gzprintf a;
|
|
||||||
gzFile bdebug;
|
#define SHOW_KILLS
|
||||||
#elif HAVE_BZ2LIB
|
#undef DELAYED_OFFENSE /* non-guarding factions cannot attack after moving */
|
||||||
# include <bzlib.h>
|
|
||||||
# define dbgprintf(a) bz2printf a;
|
#define TACTICS_RANDOM 5 /* define this as 1 to deactivate */
|
||||||
BZFILE *bdebug;
|
#define CATAPULT_INITIAL_RELOAD 4 /* erster schuss in runde 1 + rand() % INITIAL */
|
||||||
|
#define CATAPULT_STRUCTURAL_DAMAGE
|
||||||
|
|
||||||
|
#define BASE_CHANCE 70 /* 70% Basis-Überlebenschance */
|
||||||
|
#ifdef NEW_COMBATSKILLS_RULE
|
||||||
|
#define TDIFF_CHANGE 5 /* 5% höher pro Stufe */
|
||||||
|
#define DAMAGE_QUOTIENT 2 /* damage += skilldiff/DAMAGE_QUOTIENT */
|
||||||
#else
|
#else
|
||||||
# define dbgprintf(a) fprintf a;
|
#define TDIFF_CHANGE 10
|
||||||
FILE *bdebug;
|
# define DAMAGE_QUOTIENT 1 /* damage += skilldiff/DAMAGE_QUOTIENT */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef enum combatmagic {
|
||||||
|
DO_PRECOMBATSPELL,
|
||||||
|
DO_POSTCOMBATSPELL
|
||||||
|
} combatmagic_t;
|
||||||
|
|
||||||
/* external variables */
|
/* external variables */
|
||||||
boolean nobattledebug = false;
|
boolean nobattledebug = false;
|
||||||
|
|
||||||
|
@ -3171,16 +3160,8 @@ make_battle(region * r)
|
||||||
char zFilename[MAX_PATH];
|
char zFilename[MAX_PATH];
|
||||||
sprintf(zText, "%s/battles", basepath());
|
sprintf(zText, "%s/battles", basepath());
|
||||||
makedir(zText, 0700);
|
makedir(zText, 0700);
|
||||||
#ifdef HAVE_ZLIB
|
|
||||||
sprintf(zFilename, "%s/battle-%d-%s.log.gz", zText, obs_count, simplename(r));
|
|
||||||
bdebug = gzopen(zFilename, "w");
|
|
||||||
#elif HAVE_BZ2LIB
|
|
||||||
sprintf(zFilename, "%s/battle-%d-%s.log.bz2", zText, obs_count, simplename(r));
|
|
||||||
bdebug = BZ2_bzopen(zFilename, "w");+
|
|
||||||
#else
|
|
||||||
sprintf(zFilename, "%s/battle-%d-%s.log", zText, obs_count, simplename(r));
|
sprintf(zFilename, "%s/battle-%d-%s.log", zText, obs_count, simplename(r));
|
||||||
bdebug = fopen(zFilename, "w");
|
bdebug = fopen(zFilename, "w");
|
||||||
#endif
|
|
||||||
if (!bdebug) log_error(("battles können nicht debugged werden\n"));
|
if (!bdebug) log_error(("battles können nicht debugged werden\n"));
|
||||||
else {
|
else {
|
||||||
dbgprintf((bdebug, "In %s findet ein Kampf statt:\n", rname(r, NULL)));
|
dbgprintf((bdebug, "In %s findet ein Kampf statt:\n", rname(r, NULL)));
|
||||||
|
@ -3240,13 +3221,7 @@ free_battle(battle * b)
|
||||||
int max_fac_no = 0;
|
int max_fac_no = 0;
|
||||||
|
|
||||||
if (bdebug) {
|
if (bdebug) {
|
||||||
#ifdef HAVE_ZLIB
|
|
||||||
gzclose(bdebug);
|
|
||||||
#elif HAVE_BZ2LIB
|
|
||||||
BZ2_bzclose(bdebug);
|
|
||||||
#else
|
|
||||||
fclose(bdebug);
|
fclose(bdebug);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (bf=b->factions;bf;bf=bf->next) {
|
for (bf=b->factions;bf;bf=bf->next) {
|
||||||
|
|
Loading…
Reference in a new issue