"why the lucky stiff" <ruby-talk / whytheluckystiff.net> tootled: > $$$ DWEMTHY_S ARRAY ^!^ A RUBY MINI_DUNGEON ^!^ CODE TO KILL BY $$$ > > Here, try this: http://poignantguide.net/dwemthy/ I have a couple of things to share with the crazy Ruby meta-dungeon-programmeering community. First, I found this cheat code on the internet: class Rabbit # you can defeat enemies easily with the # secret cheater's laser gun def =~( enemy ) fight( enemy, 2691 ) end end It reminds me of the little laser soldiers in Age of Empires. It allows the Rabbit to laser things to death like this: > r=~ Dragon.new [You hit with 2181 points of damage!] [Dragon has died.] #<Dragon:0x2ac8dc8 @life=-841, @weapon=939, @charisma=1020, @strength=451> And sometimes like this, which isn't as good for the Rabbit: > r =~ Dragon.new [You hit with 368 points of damage!] #<Dragon:0x2abf288 @life=972, @weapon=939, @charisma=1020, @strength=451> [Your enemy hit with 699 points of damage!] [Rabbit has died.] Secondly, I put together this strategy that any Rabbit can use to defeat DwemthysArray 1.0, without using lasers or anything dodgy like that. # requires Patrick Hurley's [Quit flogging my dead monsters!] patch # to DwemthysArray to work properly class Rabbit def battle( enemy ) stats = Hash.new(0) while enemy.life > 0 || self.life <= 0 weapon = if self.life <= 0 then :% elsif enemy.life % 10 >= 5 then :/ elsif bombs and rand < (0.1) then :* else :^ end send weapon, enemy stats[weapon] += 1 end total = 0 stats.each_pair do |weapon, uses| puts "[#{ self.class } used #{weapon} #{uses} times]" total += uses end puts "[#{ self.class } attacked a total of #{total} times in that battle.]" end end Output: > r.battle DwemthysArray.new .... [Rabbit is too dead to fight!] [Healthy lettuce gives you 42 life points!!] [You hit with 1 points of damage!] [Dragon has died.] [Whoa. You decimated Dwemthy's Array!] #<DwemthysArray[]> [Quit flogging my dead monsters!] [Quit flogging my dead monsters!] [Rabbit used / 79 times] [Rabbit used % 101007 times] [Rabbit used * 3 times] [Rabbit used ^ 89 times] [Rabbit attacked a total of 101178 times in that battle.] => nil irb(main):012:0> r => #<Rabbit:0x2ab9b88 @life=4, @weapon=4, @bombs=2, @charisma=44, @strength=2> And finally, I would also propose the following patch, to stop the Rabbit's ability to eat when he or she is dead, but it makes the game too difficult: --- rabbit.rb +++ rabbit.rb @@ -18,6 +18,10 @@ # lettuce will build your strength and extra ruffage # will fly in the face of your opponent!! def %( enemy ) + if life <= 0 + puts "[You are beyond the help of the healthy lettuce.]" + return + end lettuce = rand( charisma ) puts "[Healthy lettuce gives you #{ lettuce } life points!!]" @life += lettuce Happy meta-dungeon-programmeering! Cheers, Dave