Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class StatInfo
- def initialize
- @stats = {}
- end
- def method_missing(methid,*args)
- name = methid.id2name
- return @stats[name.chop] = args[0] if name =~ /=$/
- return @stats[name] if @stats.has_key?(name)
- raise "Bad Stat Name: #{name}"
- end
- end
- class StatLogic
- def initialize
- base = StatInfo.new
- end
- def method_missing(name,*args)
- return base.method(name)[*args]
- end
- def ap
- ((str * ap_per_str + agi * ap_per_agi + base.ap)*ap_mult).floor
- end
- end
Add Comment
Please, Sign In to add comment