maybe, you should make some kind of function for what you want, then you need only to add (call on) the function name for~to the rooms' descriptions (or whatever else).
<function name="check_and_set_light_dark_levels">
if (room.dark = true) {
if (player.holding_torch and torch.switchedon = true) {
room.light_dark_level = weak_light
room.description = weak_light
}
else {
room.description = dark
}
}
else {
if (room.light = true) {
room.description = light
}
}
and you'd have to add in the:
if (room.description.light = true) {
msg (???)
}
if (room.description.dark = true) {
msg (???)
}
if (room.description.weak_light = true) {
msg (???)
}
as well, for what room description gets shown.