This is not really a huge release, but it's been a while and I thought it would be good to get some of these changes out there. The main additions are the TYPO, BUG, and IDEA commands, as well as a start on making reactions considerably easier to write.
Added:- BUG, TYPO, and IDEA commands
- init event for reactions
- take_damage event for reactions
- Delay reactions certain number of ticks
- Several methods for writing reactions
- Room#exits
Fixes:- Wrapping with ANSI should be much better
- Stats should not be less than zero
- Emotes match $me properly
- Logs are flushed when using ALOG
- Errors during reactions are logged
- Mobiles now die after getting hit, not before
Changes:- AINFO now requires '@' before properties
- Searching Garys should be a little more efficient
Downloads are available
here.
Important: There is a bug in later versions of Ruby 1.8.7 (patch level 160 and higher) that causes a segfault. I highly recommend using Ruby 1.9.1 or 1.8.7p72.
Here are some examples of the new reaction stuff:
#Do something with a given probability on the tick
!action
tick
!test
true
!reaction
with_prob 0.3 do
emote "yawns, not even trying to conceal #{pronoun(:possessive)} boredom."
end
#Pick a random action
!action
poke
!test
object_is_me? event
!reaction
random_act "emote glare at #{player.name}", "say hey!", "poke #{player.name}", ""
#Move randomly on the tick with a given probability
!action
tick
!test
true
!reaction
random_move 0.5
#Give someone a sword if they ask for it
!action
say
!test
object_is_me?(event) && said?(event, "sword")
!reaction
make_object Sword
act "give sword to #{player.name}"
sayto player, "There you go. Don't cut yourself."