Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SIZE_LOOKUP_TABLE={9=>[290,1,0],
- 109=>[300,1,10],
- 309=>[400,2,110],
- 709=>[500,4,310],
- 2709=>[600,20,710],
- 7709=>[700,50,2710],
- 17709=>[800,100,7710],
- 32709=>[900,150,17710],
- 47709=>[1000,150,32710],
- 57709=>[1100,100,47710],
- 62709=>[1200,50,57710],
- 64709=>[1300,20,62710],
- 65209=>[1400,5,64710],
- 65409=>[1500,2,65210],
- 65535=>[1700,1,65510],
- }
- def size
- p1=@personalID%256
- p2=((@personalID/256)%256).floor
- ivlow=@iv
- for i in PBStats::HP..PBStats::SPDEF
- ivlow[i]=ivlow[i]%16
- end
- s=(((ivlow[PBStats::ATTACK]^ivlow[PBStats::DEFENSE])*ivlow[PBStats::HP])^p1)*256+
- (((ivlow[PBStats::SPATK]^ivlow[PBStats::SPDEF])*ivlow[PBStats::SPEED])^p2)
- smax=SIZE_LOOKUP_TABLE.keys.sort
- i=0
- while s>=smax[i]
- i+=1
- end
- x,y,z=SIZE_LOOKUP_TABLE[smax[i]]
- ret=(((((s-z)/y)+x)*self.height)/10).floor
- return ret
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement