Class: RPG::Item

Inherits:
UsableItem show all
Defined in:
lib/R3EXS/RGSS3.rb

Instance Attribute Summary collapse

Attributes inherited from UsableItem

#animation_id, #damage, #effects, #hit_type, #occasion, #repeats, #scope, #speed, #success_rate, #tp_gain

Attributes inherited from BaseItem

#description, #features, #icon_index, #id, #name, #note

Instance Method Summary collapse

Methods inherited from UsableItem

#battle_ok?, #certain?, #for_all?, #for_dead_friend?, #for_friend?, #for_one?, #for_opponent?, #for_random?, #for_user?, #magical?, #menu_ok?, #need_selection?, #number_of_targets, #physical?

Constructor Details

#initializeItem

Returns a new instance of Item.



831
832
833
834
835
836
837
# File 'lib/R3EXS/RGSS3.rb', line 831

def initialize
    super
    @scope      = 7
    @itype_id   = 1
    @price      = 0
    @consumable = true
end

Instance Attribute Details

#consumableObject

Returns the value of attribute consumable.



845
846
847
# File 'lib/R3EXS/RGSS3.rb', line 845

def consumable
  @consumable
end

#itype_idObject

Returns the value of attribute itype_id.



843
844
845
# File 'lib/R3EXS/RGSS3.rb', line 843

def itype_id
  @itype_id
end

#priceObject

Returns the value of attribute price.



844
845
846
# File 'lib/R3EXS/RGSS3.rb', line 844

def price
  @price
end

Instance Method Details

#key_item?Boolean

Returns:

  • (Boolean)


839
840
841
# File 'lib/R3EXS/RGSS3.rb', line 839

def key_item?
    @itype_id == 2
end