forked from github/server
parent
7009eb0a33
commit
14f50e3b3d
|
@ -1,107 +0,0 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
*
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2003
|
||||
* 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 <eressea.h>
|
||||
#include "xmas2000.h"
|
||||
|
||||
/* modules includes */
|
||||
#include "xmas.h"
|
||||
|
||||
/* kernel includes */
|
||||
#include <plane.h>
|
||||
#include <item.h>
|
||||
#include <unit.h>
|
||||
#include <region.h>
|
||||
#include <building.h>
|
||||
#include <movement.h>
|
||||
#include <event.h>
|
||||
#include <faction.h>
|
||||
#include <race.h>
|
||||
|
||||
/* util includes */
|
||||
#include <goodies.h>
|
||||
#include <resolve.h>
|
||||
#include <base36.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static void
|
||||
make_gates(region * r)
|
||||
{
|
||||
const building_type * btype = bt_find("xmas_exit");
|
||||
building * b;
|
||||
if (btype==NULL)
|
||||
btype = bt_make("xmas_exit", BTF_NOBUILD | BTF_INDESTRUCTIBLE, -1, 2, 10);
|
||||
else {
|
||||
b = r->buildings;
|
||||
while (b!=NULL && b->type!=btype) b = b->next;
|
||||
if (b!=NULL) return; /* gibt schon einen */
|
||||
}
|
||||
|
||||
b = new_building(btype, r, NULL);
|
||||
b->size = btype->maxsize;
|
||||
b->name = strdup("Der Weg nach Hause");
|
||||
b->display = strdup("Achtung, hier gibt es die Geschenke!");
|
||||
add_trigger(&b->attribs, "timer", trigger_xmasgate(b));
|
||||
}
|
||||
|
||||
void
|
||||
create_xmas2000(int x, int y)
|
||||
{
|
||||
const int prefixes = 18;
|
||||
const char *prefix[] = {
|
||||
"Artige", "Brave", "Liebe", "Nette", "Anständige",
|
||||
"Rechtschaffene", "Tugendhafte", "Sittsame", "Ehrbare", "Keusche",
|
||||
"Tugendsame", "Züchtige", "Fromme", "Musterhafte", "Manierliche",
|
||||
"Tadellose", "Unverdorbene", "Höfliche"
|
||||
};
|
||||
plane * xmas = getplanebyname("Nordpol");
|
||||
faction * f;
|
||||
region * r = findregion(x, y);
|
||||
direction_t dir;
|
||||
|
||||
if (r!=NULL) {
|
||||
make_santa(r);
|
||||
return;
|
||||
}
|
||||
if (xmas==NULL) xmas = create_new_plane(2000, "Nordpol", x-1, x+1, y-1, y+1, PFL_NORECRUITS|PFL_NOALLIANCES|PFL_LOWSTEALING|PFL_NOGIVE|PFL_NOATTACK|PFL_NOMAGIC|PFL_NOSTEALTH|PFL_NOTEACH|PFL_NOBUILD|PFL_NOFEED|PFL_FRIENDLY);
|
||||
r = new_region(x, y);
|
||||
terraform(r, T_PLAIN);
|
||||
set_string(&r->land->name, "Weihnachtsinsel");
|
||||
#if GROWING_TREES
|
||||
rsettrees(r, 2, 1000);
|
||||
#else
|
||||
rsettrees(r, 1000);
|
||||
#endif
|
||||
rsetpeasants(r, 0);
|
||||
rsetmoney(r, 0);
|
||||
for (dir=0;dir!=MAXDIRECTIONS;++dir) {
|
||||
region * n = findregion(x + delta_x[dir], y + delta_y[dir]);
|
||||
if (n==NULL) n = new_region(x + delta_x[dir], y + delta_y[dir]);
|
||||
terraform(n, T_OCEAN);
|
||||
}
|
||||
santa_comes_to_town(r, make_santa(r), NULL);
|
||||
for (f = factions; f != NULL; f = f->next) if (f->alive && f->units) {
|
||||
char zText[128];
|
||||
unit * u;
|
||||
|
||||
u = createunit(r, f, 2, f->race);
|
||||
if (f->race==new_race[RC_DAEMON]) u->irace = new_race[RC_HUMAN];
|
||||
sprintf(zText, "%s %s", prefix[rand()%prefixes], LOC(u->faction->locale, rc_name(u->irace, 1)));
|
||||
fset(u, UFL_PARTEITARNUNG);
|
||||
set_string(&u->name, zText);
|
||||
}
|
||||
make_gates(r);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
#ifndef XMAS2000_H
|
||||
#define XMAS2000_H
|
||||
|
||||
extern void create_xmas2000(int x, int y);
|
||||
|
||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||
/* vi: set ts=2:
|
||||
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
| | Enno Rehling <enno@eressea-pbem.de>
|
||||
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
||||
| (c) 1998 - 2001 | Henning Peters <faroul@beyond.kn-bremen.de>
|
||||
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
||||
+-------------------+ Stefan Reich <reich@halbling.de>
|
||||
|
||||
This program may not be used, modified or distributed
|
||||
without prior permission by the authors of Eressea.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <eressea.h>
|
||||
#include "xmas2001.h"
|
||||
|
||||
/* kernel includes */
|
||||
#include <item.h>
|
||||
#include <unit.h>
|
||||
#include <region.h>
|
||||
|
||||
/* gamecode includes */
|
||||
#include "xmas.h"
|
||||
|
||||
/* util includes */
|
||||
#include <goodies.h>
|
||||
#include <resolve.h>
|
||||
#include <base36.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static void
|
||||
presents(unit * senior)
|
||||
{
|
||||
/* Ein Mistelzweig für alle Anführer */
|
||||
static const item_type * itype = NULL;
|
||||
if (itype==NULL) itype = it_find("mistletoe");
|
||||
assert(itype!=NULL);
|
||||
i_change(&senior->items, itype, 1);
|
||||
}
|
||||
|
||||
int
|
||||
xmas2001(void)
|
||||
{
|
||||
region * r = findregion(0, 0);
|
||||
unit * santa = make_santa(r);
|
||||
|
||||
santa_comes_to_town(r, santa, presents);
|
||||
return 0;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
/* vi: set ts=2:
|
||||
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
| | Enno Rehling <enno@eressea-pbem.de>
|
||||
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
||||
| (c) 1998 - 2001 | Henning Peters <faroul@beyond.kn-bremen.de>
|
||||
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
||||
+-------------------+ Stefan Reich <reich@halbling.de>
|
||||
|
||||
This program may not be used, modified or distributed
|
||||
without prior permission by the authors of Eressea.
|
||||
*/
|
||||
|
||||
#ifndef XMAS2001_H
|
||||
#define XMAS2001_H
|
||||
|
||||
extern int xmas2001(void);
|
||||
|
||||
#endif
|
|
@ -1,57 +0,0 @@
|
|||
/* vi: set ts=2:
|
||||
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
| | Enno Rehling <enno@eressea-pbem.de>
|
||||
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
||||
| (c) 1998 - 2001 | Henning Peters <faroul@beyond.kn-bremen.de>
|
||||
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
||||
+-------------------+ Stefan Reich <reich@halbling.de>
|
||||
|
||||
This program may not be used, modified or distributed
|
||||
without prior permission by the authors of Eressea.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <eressea.h>
|
||||
#include "xmas2002.h"
|
||||
|
||||
/* kernel includes */
|
||||
#include <item.h>
|
||||
#include <unit.h>
|
||||
#include <region.h>
|
||||
|
||||
/* gamecode includes */
|
||||
#include "xmas.h"
|
||||
|
||||
/* util includes */
|
||||
#include <goodies.h>
|
||||
#include <resolve.h>
|
||||
#include <base36.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static void
|
||||
presents(unit * senior)
|
||||
{
|
||||
item_type * itype;
|
||||
/* Geschenke für alle */
|
||||
/* itype = olditemtype[(rand() % 4) + I_KEKS]; */
|
||||
if (rand () % 4){
|
||||
itype = it_find("snowball");
|
||||
} else {
|
||||
itype = it_find("snowman");
|
||||
}
|
||||
assert(itype!=NULL);
|
||||
i_change(&senior->items, itype, 1);
|
||||
}
|
||||
|
||||
int
|
||||
xmas2002(void)
|
||||
{
|
||||
region * r = findregion(0, 0);
|
||||
unit * santa;
|
||||
if (r==NULL) r = regions;
|
||||
santa = make_santa(r);
|
||||
|
||||
santa_comes_to_town(r, santa, presents);
|
||||
return 0;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
/* vi: set ts=2:
|
||||
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
| | Enno Rehling <enno@eressea-pbem.de>
|
||||
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
||||
| (c) 1998 - 2001 | Henning Peters <faroul@beyond.kn-bremen.de>
|
||||
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
||||
+-------------------+ Stefan Reich <reich@halbling.de>
|
||||
|
||||
This program may not be used, modified or distributed
|
||||
without prior permission by the authors of Eressea.
|
||||
*/
|
||||
|
||||
#ifndef XMAS2002_H
|
||||
#define XMAS2002_H
|
||||
|
||||
extern int xmas2002(void);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0"?>
|
||||
<prefixes>
|
||||
<prefix>Dunkel</prefix>
|
||||
<prefix>Licht</prefix>
|
||||
<prefix>Klein</prefix>
|
||||
<prefix>Hoch</prefix>
|
||||
<prefix>Huegel</prefix>
|
||||
<prefix>Berg</prefix>
|
||||
<prefix>Wald</prefix>
|
||||
<prefix>Sumpf</prefix>
|
||||
<prefix>Schnee</prefix>
|
||||
<prefix>Sonnen</prefix>
|
||||
<prefix>Mond</prefix>
|
||||
<prefix>See</prefix>
|
||||
<prefix>Tal</prefix>
|
||||
<prefix>Schatten</prefix>
|
||||
<prefix>Hoehlen</prefix>
|
||||
<prefix>Blut</prefix>
|
||||
<prefix>Wild</prefix>
|
||||
<prefix>Chaos</prefix>
|
||||
<prefix>Nacht</prefix>
|
||||
<prefix>Nebel</prefix>
|
||||
<prefix>Grau</prefix>
|
||||
<prefix>Frost</prefix>
|
||||
<prefix>Finster</prefix>
|
||||
<prefix>Duester</prefix>
|
||||
<prefix>flame</prefix>
|
||||
<prefix>ice</prefix>
|
||||
<prefix>star</prefix>
|
||||
</prefixes>
|
Loading…
Reference in New Issue