Example #1
0
void GAMECONTROLLER::startround()
{
	resetgame();
	
	round_start_tick = server_tick();
	sudden_death = 0;
	game_over_tick = -1;
	game.world.paused = false;
	teamscore[0] = 0;
	teamscore[1] = 0;
	unbalanced_tick = -1;
	force_balanced = false;
	for(int i = 0; i < 16; i++) {
		set_door(i, true);
	}
	dbg_msg("game","start round type='%s' teamplay='%d'", gametype, game_flags&GAMEFLAG_TEAMS);
}
Example #2
0
void create() {
::create();
set_short("End of a tunnel");
set_long("You have come to the end of a tunnel that goes back south.  To the east and west of you there are rooms and to the north there is a massive wooden door with thick iron hinges.");
set_items(([
"tunnel" : "The tunnel is dark and cool.  Who knows where it might lead.",
"door": "The door stands nearly eight feet tall and has thick iron hinges.  There is a keyhole beneath the handle.",
"keyhole" : "Looks like a key might fit in it.  What do you think?",
]));
set_properties((["light" : 2, "night light" : 2,]));
set_exits(([
"east": MJUNGLE "tomb17.c",
"north": MJUNGLE "tomb20.c",
"south": MJUNGLE "tomb9.c",
"west": MJUNGLE "tomb19.c",
]));
set_door("door", MJUNGLE "tomb20.c", "north", "crypt key");
set_string("door", "open", "A rush of warm air and the stench of death flood the room as you open the door.");
}
Example #3
0
void create() {
    ::create();
    set_properties((["light" : 1, "indoors" : 1]));
    set("short", "Eastern chamber in the cave");
    set("long",
	"This is the eastern chamber in the part of the cave just below the "
	"ground level. A thick steel door has been set up in the doorway west, "
	"giving this room some degree of privacy from the rest of the cave."
    );
    set_items(([
        "door 1" : (: look_door() :),
	"chamber" : "It has been carved into the depths of the cave.",
	"privacy" : "Just a little.."
    ]));
    set_exits(([
        "west" : ROOMS"cult/cave3",
    ]));
   set_door("door", ROOMS"cult/wchamber", "west", "key ring");
}       
Example #4
0
void create() {
  ::create();
  set_property("indoors",1);
  set_property("light",1);
  set("short","Palace");
  set("long","This room explains why this hall is well kept, yet mostly "
    "unused.  On the east wall is a large set of double doors, engraved with intricate "
    "symbols.  The decorations abruptly end here, while the hall continues north.  "
    "The red carpet leads right up to the doors.  This room must belong to royalty.");
  set_smell("default","There is a fresh breeze in this part of the palace.");
  set_listen("default","It is fairly quiet here.");
  set_items((["wall":"The wall is quite plain here on the second floor.",
    "doors":"The immense doors have been carved with great care.",
    "decorations":"They stop abruptly after the room to the east.",
    "carpet":"The %^RED%^crimson carpet%^RESET%^ covers the ground."]));
  set_door("door", ROOMS "palace27.c", "enter", "bedroom key");
  set_open("door", 1);
  set_locked("door", 0);
  set_exits((["north":ROOMS "palace26.c","south":ROOMS "palace24.c","enter":ROOMS "palace27.c"]));
}
Example #5
0
void GAMECONTROLLER::init_doors()
{
	dbg_msg("door", "i inits nao!");

	for(int doorno = 0; doorno < 16; doorno++) {
		if(doorno <10) {
			doors[doorno].team = -1;
		} else if(doorno >=10 && doorno < 13) {
			doors[doorno].team = 0; //red door
		} else {
			doors[doorno].team = 1; //blue door
		}
		if(!doors[doorno].valid) 
			continue;
		doors[doorno].pos[0] = doors[doorno].tmpstart;
		for(int i = 0; i < doors[doorno].pos_count; i++) {
			//dbg_msg("door", "i has a door %f:%f", doors[doorno].pos[i].x, doors[doorno].pos[i].y);
			int dist = -1;
			for(int j = 0; j < doors[doorno].pos_count; j++) {
				if(doors[doorno].mark[j])
					continue;
				if(dist < 0)
					dist = j;
				else {
					float olddist = distance(doors[doorno].tmppos[dist], doors[doorno].pos[i]);
					float newdist = distance(doors[doorno].tmppos[j], doors[doorno].pos[i]);
					if(newdist < olddist) dist = j;
				}
			}
			doors[doorno].pos[i+1] = doors[doorno].tmppos[dist];
			doors[doorno].mark[dist] = true;
		}
			
		doors[doorno].pos_count += 2;
		doors[doorno].pos[doors[doorno].pos_count-1] = doors[doorno].tmpend;
	}
	dbg_msg("door","i s dun!");
	init_lights();
	for(int i = 0; i < 16; i++)
		set_door(i, true);
}