Hi,

First of all, don't misuse instance variables to pass values to methods. 
This makes the code obscure and fragile -- and it's simply bad design. 
Use method parameters instead (that's what they're for). The purpose of 
instance variables is to hold the state of an object.

It your case it cannot even work, because you're in different object. 
The dragon object cannot access the instance variables from the top 
level object.

So the fix for this would be to simply add a parameter to the "effect" 
method for the opponent:

def effect(opponent)

And maybe further parameters for other values.

-- 
Posted via http://www.ruby-forum.com/.