i dont really understand something about some of the code you gave as a example.

int traps[]={0,1,0,0,0,0,0}; // 1=bottomless pit

ok so on 2 there will be a pit. but how does the game know that the pit is on 2. and what the stats are for the trap. say we make 2= a arrow trap. and we do this.

int traps[]={0,1,0,2,0,0,0}; // 1=bottomless and pit 2= arrow trap

so on 4 there will be an arrow trap, right? so would i go.

if traps[] =2{
health=health-3//to do 3 damage or what ever
somthing like that?