class PBMove attr_reader(:id) attr_accessor(:pp) attr_accessor(:ppup) attr_reader(:type) def totalpp return @totalpp+(@totalpp*@ppup/5).floor end def initialize(moveid) movedata=File.open("PBS/rsattacks.dat","rb") movedata.pos=moveid*9+4 @totalpp=movedata.fgetb movedata.pos=moveid*9+2 @type=movedata.fgetb movedata.close @pp=@totalpp @id=moveid @ppup=0 end end