Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #--------------------------------------------
- # Just for a coffee, don't read this, read on
- Array::sum = (property = null) ->
- if (property)
- this.reduce(((a, b) -> a + b[property]), 0)
- else
- this.reduce(((a, b) -> a + b), 0)
- #-------------------------------------------
- # module RPG
- # Basics
- # RPG::BaseItem
- class BaseItem
- constructor: (@id,@name,@icon_index,@features,@note,@description) ->
- # RPG::BaseItem::Feature
- class Feature
- constructor: (@code,@data_id,@value) ->
- class EquipItem extends BaseItem
- constructor: (@price,@etype_id,@params=[]) ->
- # Database
- # RPG::Actor
- class Actor extends BaseItem
- constructor: (@nickname,@class_id,@initiale_level,@max_level,@character_name,@character_index,@face_name,@equips) ->
- # RPG::Animation
- class Animation
- constructor: (@id,@name,@animation1_name,@animation1_hue,@animation2_name,@animation_hue,@position,@frame_max,@frames,@timings) ->
- to_screen_b: ->
- -> true if @position==3
- false
- # RPG::Animation::Frame
- class Frame
- constructor: (@cell_max,@cell_data) ->
- # RPG::Animation::Timing
- class Timing
- constructor: (@frame,@se,@flash_scope,@flash_color,@flash_duration) ->
- # RPG::Armor
- class Armor extends EquipItem
- constructor: (@atype_id) ->
- performance: ->
- @params[3]+@params[5]+@params.sum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement