forked from github/server
- Attribut at_aggressive für die vinya-NPCs.
- User-Makefiles jetzt mit Hostnamen.
This commit is contained in:
parent
86c7efc792
commit
4ebdb69508
|
@ -42,7 +42,7 @@ MSG_SUBDIR = "--> Making $@ in $$subdir"
|
||||||
## user-defined makefiles
|
## user-defined makefiles
|
||||||
##
|
##
|
||||||
|
|
||||||
MKFILES = $(wildcard $(ERESSEA_SRC)/$(USER).mk $(ERESSEA_SRC)/$(OSTYPE).mk $(ERESSEA_SRC)/$(HOSTTYPE).mk $(ERESSEA_SRC)/$(ARCH).mk)
|
MKFILES = $(wildcard $(ERESSEA_SRC)/$(USER)@$(HOST).mk $(ERESSEA_SRC)/$(OSTYPE).mk $(ERESSEA_SRC)/$(HOSTTYPE).mk $(ERESSEA_SRC)/$(ARCH).mk)
|
||||||
ifeq ($(MKFILES), )
|
ifeq ($(MKFILES), )
|
||||||
else
|
else
|
||||||
include $(MKFILES)
|
include $(MKFILES)
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
/* vi: set ts=2:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
* Henning Peters (faroul@beyond.kn-bremen.de)
|
||||||
|
* Enno Rehling (enno@eressea-pbem.de)
|
||||||
|
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
|
||||||
|
*
|
||||||
|
* This program may not be used, modified or distributed without
|
||||||
|
* prior permission by the authors of Eressea.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
#include "aggressive.h"
|
||||||
|
|
||||||
|
#include <attrib.h>
|
||||||
|
|
||||||
|
attrib_type at_aggressive = {
|
||||||
|
"aggressive",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
attrib *
|
||||||
|
make_aggressive(int chance)
|
||||||
|
{
|
||||||
|
attrib * a = a_new(&at_aggressive);
|
||||||
|
a->data.i = chance;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
init_aggressive(void)
|
||||||
|
{
|
||||||
|
at_register(&at_aggressive);
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
/* vi: set ts=2:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
* Henning Peters (faroul@beyond.kn-bremen.de)
|
||||||
|
* Enno Rehling (enno@eressea-pbem.de)
|
||||||
|
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
|
||||||
|
*
|
||||||
|
* This program may not be used, modified or distributed without
|
||||||
|
* prior permission by the authors of Eressea.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern struct attrib_type at_aggressive;
|
||||||
|
extern struct attrib * make_aggressive(int chance);
|
||||||
|
extern void init_aggressive(void);
|
|
@ -38,6 +38,7 @@
|
||||||
# include "option.h"
|
# include "option.h"
|
||||||
#endif
|
#endif
|
||||||
#include "moved.h"
|
#include "moved.h"
|
||||||
|
#include "aggressive.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <attrib.h>
|
#include <attrib.h>
|
||||||
|
@ -72,4 +73,5 @@ init_attributes(void)
|
||||||
#ifdef USE_UGROUPS
|
#ifdef USE_UGROUPS
|
||||||
init_ugroup();
|
init_ugroup();
|
||||||
#endif
|
#endif
|
||||||
|
init_aggressive();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
/* attributes includes */
|
/* attributes includes */
|
||||||
#include <attributes/targetregion.h>
|
#include <attributes/targetregion.h>
|
||||||
#include <attributes/hate.h>
|
#include <attributes/hate.h>
|
||||||
|
#include <attributes/aggressive.h>
|
||||||
|
|
||||||
/* spezialmonster */
|
/* spezialmonster */
|
||||||
#include <spells/alp.h>
|
#include <spells/alp.h>
|
||||||
|
@ -990,12 +991,21 @@ plan_monsters(void)
|
||||||
move_monster(r, u);
|
move_monster(r, u);
|
||||||
} else {
|
} else {
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
if((u->race->flags & RCF_ATTACKRANDOM)
|
if((u->race->flags & RCF_ATTACKRANDOM) && is_moving == false)
|
||||||
&& rand()%100<MONSTERATTACK
|
|
||||||
&& is_moving == false)
|
|
||||||
{
|
{
|
||||||
|
int chance;
|
||||||
|
attrib *a = a_find(u->attribs, &at_aggressive);
|
||||||
|
|
||||||
|
if(a) {
|
||||||
|
chance = a->data.i;
|
||||||
|
} else {
|
||||||
|
chance = MONSTERATTACK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(rand()%100 < chance) {
|
||||||
done = random_attack_by_monster(r, u);
|
done = random_attack_by_monster(r, u);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!done) {
|
if (!done) {
|
||||||
if(u->race == new_race[RC_SEASERPENT]) {
|
if(u->race == new_race[RC_SEASERPENT]) {
|
||||||
set_string(&u->thisorder, locale_string(u->faction->locale, keywords[K_PIRACY]));
|
set_string(&u->thisorder, locale_string(u->faction->locale, keywords[K_PIRACY]));
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
|
||||||
|
ifndef ERESSEA
|
||||||
|
export ERESSEA=$(PWD)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Hier definieren, damit nicht '@gcc'
|
||||||
|
CC = gcc-3.2 -D_GNU_SOURCE -ansi -pedantic
|
||||||
|
DEPEND = @gcc-3.2 -MM -MG -r
|
||||||
|
# CC = gcc -D_GNU_SOURCE
|
||||||
|
AR = ar
|
||||||
|
CTAGS = ctags-exuberant
|
||||||
|
LD = gcc-3.2
|
||||||
|
INSTALL = cp
|
||||||
|
CFLAGS += -march=athlon -minline-all-stringops
|
||||||
|
|
||||||
|
# Ps = 0 -> Normal (default)
|
||||||
|
# Ps = 1 -> Bold
|
||||||
|
# Ps = 4 -> Underlined
|
||||||
|
# Ps = 5 -> Blink (appears as Bold)
|
||||||
|
# Ps = 7 -> Inverse
|
||||||
|
# Ps = 8 -> Invisible (hidden)
|
||||||
|
# Ps = 2 2 -> Normal (neither bold nor faint)
|
||||||
|
# Ps = 2 4 -> Not underlined
|
||||||
|
# Ps = 2 5 -> Steady (not blinking)
|
||||||
|
# Ps = 2 7 -> Positive (not inverse)
|
||||||
|
# Ps = 2 8 -> Visible (not hidden)
|
||||||
|
# Ps = 3 0 -> Set foreground color to Black
|
||||||
|
# Ps = 3 1 -> Set foreground color to Red
|
||||||
|
# Ps = 3 2 -> Set foreground color to Green
|
||||||
|
# Ps = 3 3 -> Set foreground color to Yellow
|
||||||
|
# Ps = 3 4 -> Set foreground color to Blue
|
||||||
|
# Ps = 3 5 -> Set foreground color to Magenta
|
||||||
|
# Ps = 3 6 -> Set foreground color to Cyan
|
||||||
|
# Ps = 3 7 -> Set foreground color to White
|
||||||
|
# Ps = 3 9 -> Set foreground color to default (original)
|
||||||
|
# Ps = 4 0 -> Set background color to Black
|
||||||
|
# Ps = 4 1 -> Set background color to Red
|
||||||
|
# Ps = 4 2 -> Set background color to Green
|
||||||
|
# Ps = 4 3 -> Set background color to Yellow
|
||||||
|
# Ps = 4 4 -> Set background color to Blue
|
||||||
|
# Ps = 4 5 -> Set background color to Magenta
|
||||||
|
# Ps = 4 6 -> Set background color to Cyan
|
||||||
|
# Ps = 4 7 -> Set background color to White
|
||||||
|
# Ps = 4 9 -> Set background color to default (original).
|
||||||
|
|
||||||
|
MSG_COMPILE = "[1m[33m\#\#\#\#\# Compiling $@ \#\#\#\#\#[0m"
|
||||||
|
MSG_SUBDIR = "[1m[36m\#\#\#\#\# Making $@ in $$subdir \#\#\#\#\#[0m"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
|
||||||
|
ifndef ERESSEA
|
||||||
|
export ERESSEA=$(PWD)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Hier definieren, damit nicht '@gcc'
|
||||||
|
CC = gcc -D_GNU_SOURCE -ansi -pedantic
|
||||||
|
DEPEND = @gcc -MM -MG -r
|
||||||
|
# CC = gcc -D_GNU_SOURCE
|
||||||
|
AR = ar
|
||||||
|
CTAGS = ctags-exuberant
|
||||||
|
LD = gcc
|
||||||
|
INSTALL = cp
|
||||||
|
# CFLAGS += -march=athlon -minline-all-stringops
|
||||||
|
|
||||||
|
# Ps = 0 -> Normal (default)
|
||||||
|
# Ps = 1 -> Bold
|
||||||
|
# Ps = 4 -> Underlined
|
||||||
|
# Ps = 5 -> Blink (appears as Bold)
|
||||||
|
# Ps = 7 -> Inverse
|
||||||
|
# Ps = 8 -> Invisible (hidden)
|
||||||
|
# Ps = 2 2 -> Normal (neither bold nor faint)
|
||||||
|
# Ps = 2 4 -> Not underlined
|
||||||
|
# Ps = 2 5 -> Steady (not blinking)
|
||||||
|
# Ps = 2 7 -> Positive (not inverse)
|
||||||
|
# Ps = 2 8 -> Visible (not hidden)
|
||||||
|
# Ps = 3 0 -> Set foreground color to Black
|
||||||
|
# Ps = 3 1 -> Set foreground color to Red
|
||||||
|
# Ps = 3 2 -> Set foreground color to Green
|
||||||
|
# Ps = 3 3 -> Set foreground color to Yellow
|
||||||
|
# Ps = 3 4 -> Set foreground color to Blue
|
||||||
|
# Ps = 3 5 -> Set foreground color to Magenta
|
||||||
|
# Ps = 3 6 -> Set foreground color to Cyan
|
||||||
|
# Ps = 3 7 -> Set foreground color to White
|
||||||
|
# Ps = 3 9 -> Set foreground color to default (original)
|
||||||
|
# Ps = 4 0 -> Set background color to Black
|
||||||
|
# Ps = 4 1 -> Set background color to Red
|
||||||
|
# Ps = 4 2 -> Set background color to Green
|
||||||
|
# Ps = 4 3 -> Set background color to Yellow
|
||||||
|
# Ps = 4 4 -> Set background color to Blue
|
||||||
|
# Ps = 4 5 -> Set background color to Magenta
|
||||||
|
# Ps = 4 6 -> Set background color to Cyan
|
||||||
|
# Ps = 4 7 -> Set background color to White
|
||||||
|
# Ps = 4 9 -> Set background color to default (original).
|
||||||
|
|
||||||
|
MSG_COMPILE = "[1m[33m\#\#\#\#\# Compiling $@ \#\#\#\#\#[0m"
|
||||||
|
MSG_SUBDIR = "[1m[36m\#\#\#\#\# Making $@ in $$subdir \#\#\#\#\#[0m"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue