varargs static void create(int x, int y) { SetNoReplace(1); virt_land::create(); SetClimate("temperate"); SetAmbientLight(30); SetLong("A featureless void."); SetShort("an empty place"); AddExit("down", ROOM_START); }
create(){ ::create(); SetProp(P_INT_SHORT,"Das juengste Geruecht"); SetProp(P_INT_LONG, "Dies ist ein Raum, den die Spieler gerne und oft als \n" +"'das juengste Geruecht' bezeichnen. Hier werden naem-\n" +"lich wichtige Entscheidungen im Morgengrauen disku-\n" +"tiert und beschlossen. Demzufolge ist dies ein reiner\n" +"Magierraum. Man kann sich hier treffen, reden oder\n" +"einfach herumidlen.\n"); AddExit("unten", "/gilden/abenteurer"); SetProp(P_LIGHT,100); SetProp(P_INDOORS,1); }
void create() { room::create(); SetAmbientLight(30); SetClimate("indoors"); SetShort("an ammoshop"); SetLong("You stand in the burnt out remains of Bison & Kid's ammo shop. "+ "There are charred shelves all over the walls that once held packets "+ "of ammo. You heard about this: a short time ago Frank, the owner "+ "of the adjacent Tyson & Kid's ammo shop decided he was sick of Hank "+ "and his stupid non-metric ammo. He ordered a hit on this backward "+ "looking old fool. One molotov cocktail and a hell of a lot of "+ "exploding ammo later, this is all that remains.\n", 60); AddExit("west",ROOM+"boul5"); SetItems( ([ ({"remains","burnt out remains"}) : "There's not much left, it's all been torched.",
int dig() { if(!present("shovel", this_player()) && !present("spade", this_player())) { notify_fail("You have nothing to dig with!\n"); return 0; } if(dug) { notify_fail("Where are you going to dig?\n"); return 0; } write("You dig into the mound and uncover a hole."); say(this_player()->query_cap_name()+" digs into the mound " "and uncovers a hole.", this_player()); dug = 1; AddItem("hole", "A hole where someone just dug into the ground by the mound by the road."); AddExit( "down", "/domains/Praxis/hole"); call_other("/domains/Praxis/hole", "digging"); return 1; }
void Maze::Generate(unsigned size){ m_size = size; srand((unsigned)time(0)); m_wall_list.clear(); data.clear(); //black out whole maze. for (unsigned i = 0; i < (m_size*m_size); ++i) data.push_back(BLACK_SPACE); //add first wall and space data[at_(1, (m_size - 1))] = SPACE; AddWall(at_(1, (m_size - 2))); while (m_wall_list.size() != 0){ unsigned wall_index = (m_wall_list.size() == 1)? 0:rand() % (m_wall_list.size()-1); position wall_pos = m_wall_list[wall_index]; position opp_side = get_opp_side(wall_pos); if (opp_side == 0){ m_wall_list.erase(m_wall_list.begin() + wall_index); continue; } if (data[opp_side] == BLACK_SPACE && !In_wall_list(opp_side)){ data[wall_pos] = SPACE; m_wall_list.erase(m_wall_list.begin() + wall_index); AddSpace(opp_side); if (data[opp_side] == SPACE){ AddWall(opp_side + 1); AddWall(opp_side - 1); AddWall(opp_side + m_size); AddWall(opp_side - m_size); } } else m_wall_list.erase(m_wall_list.begin() + wall_index); } AddExit(); }