In the beta version, removing traits works but adding them (or toggling them on) doesn’t (this does work in the regular version):
######################################
# Adventuron #
######################################
start_at = my_location
######################################
# Locations #
######################################
locations {
my_location : location "You are in a room." ;
}
######################################
# Connections #
######################################
connections {
from, direction, to = [
]
}
traits {
ripe_t : trait;
}
######################################
# Objects #
######################################
objects {
banana : object "a banana" {traits= [ripe_t]};
}
######################################
# On Command #
######################################
on_command {
: match "ripen _" {
: if (has_trait {subject="banana" trait="ripe_t"}){
: print "It is already ripe. You unripen it." ;
: remove_trait subject="banana" trait="ripe_t";
}
: else {
: print "By the power of thought, you ripen the banana." ;
: add_trait subject="banana" trait="ripe_t";
}
}
}