if( isPlayerEvil( entering_player ) ) {
'''
do here whatever you mean by "a pit opens". if that means they should "fall" through into another room or whatever. if
you want functionality regarding number of players then you have to count players and track the number of them that are evil
in the room and maybe have an exit trigger that decrease the count too.
'''
teleport_to( pit, player ); '''could be move_to(…), just depends on what you call it'''
}
It's not that JSON wouldn't work, it just seems to me very much overkill, and if you're using C/C++, another translation layer you'll have to go through. I personally recommend using strong tags on fairly small data blocks, with only identifying information for the particular block you're working on. Examples of a data block might be a 'block of integers' or 'a list of extra descriptions', or 'a list of objects'.
The vast majority of the information in AA is stored in 1) numerical format, 2) single strings, 3) lists of extra descriptions, 4) numerical tables, and 5) objects. We've got primitives for loading and saving these, and that takes care of most everything, without the overhead of having to save every variable name to the already hundreds of megabytes of data files. The cost is that you have to add a couple lines of code into the load and save routines and possibly handle file version updates. With a gigabyte of data files, I'm ok with that cost.
Alter Aeon MUD
http://www.alteraeon.com