From: erik blas Date: 2005-12-27T15:47:38+09:00 Subject: Re: can't figure out what's wrong here is the code for rabbit.rb: class Rabbit < Creature traits :bobs life 10 strength 2 charisma 44 weapon 4 bombs 3 # little boomerang def ^( enemy ) fight( enemy, 13 ) end # the hero's sword is unlimited def /( enemy ) fight( enemy, rand( 4+ ( ( enemy.life % 10 ) ** 2 ) ) ) end # lettuce will build your strength and extra ruffage # will fly in the face of your opponent def %( enemy ) lettuce = rand( chairsma ) puts "[Healthy lettuce gives you#( lettuce ) life points!!]" @life += lettuce fight( enemy, 0 ) end # bombs, but you have only threee def *( enemy ) if @bombs.zero? puts '[Out of bombs!]' return end @bombs -= 1 fight( enemy, 86 ) end end -- Posted via http://www.ruby-forum.com/.