document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #--------------------------------------------
  2. # Just for a coffee, don\'t read this, read on
  3. Array::sum = (property = null) ->
  4.   if (property)
  5.     this.reduce(((a, b) -> a + b[property]), 0)
  6.   else
  7.     this.reduce(((a, b) -> a + b), 0)
  8. #-------------------------------------------
  9. # module RPG
  10. # Basics
  11. # RPG::BaseItem
  12. class BaseItem
  13.   constructor: (@id,@name,@icon_index,@features,@note,@description) ->
  14.  
  15. # RPG::BaseItem::Feature
  16. class Feature
  17.   constructor: (@code,@data_id,@value) ->
  18.    
  19. class EquipItem extends BaseItem
  20.   constructor: (@price,@etype_id,@params=[]) ->
  21.    
  22. # Database
  23. # RPG::Actor
  24. class Actor extends BaseItem
  25.   constructor: (@nickname,@class_id,@initiale_level,@max_level,@character_name,@character_index,@face_name,@equips) ->
  26.    
  27. # RPG::Animation
  28. class Animation
  29.   constructor: (@id,@name,@animation1_name,@animation1_hue,@animation2_name,@animation_hue,@position,@frame_max,@frames,@timings) ->
  30.   to_screen_b: ->
  31.     -> true if @position==3
  32.     false
  33.  
  34. # RPG::Animation::Frame
  35. class Frame
  36.   constructor: (@cell_max,@cell_data) ->
  37.    
  38. # RPG::Animation::Timing
  39. class Timing
  40.   constructor: (@frame,@se,@flash_scope,@flash_color,@flash_duration) ->
  41.  
  42. # RPG::Armor
  43. class Armor extends EquipItem
  44.   constructor: (@atype_id) ->
  45.    
  46.   performance: ->
  47.     @params[3]+@params[5]+@params.sum
');