Class: RPG::Item
- Inherits:
-
UsableItem
- Object
- BaseItem
- UsableItem
- RPG::Item
- Defined in:
- lib/rpg/item.rb
Instance Attribute Summary (collapse)
-
- (Object) consumable
Returns the value of attribute consumable.
-
- (Object) itype_id
Returns the value of attribute itype_id.
-
- (Object) price
Returns the value of attribute price.
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)
-
- (Item) initialize
constructor
A new instance of Item.
- - (Boolean) key_item?
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
- (Item) initialize
Returns a new instance of Item
3 4 5 6 7 8 9 |
# File 'lib/rpg/item.rb', line 3 def initialize super @scope = 7 @itype_id = 1 @price = 0 @consumable = true end |
Instance Attribute Details
- (Object) consumable
Returns the value of attribute consumable
15 16 17 |
# File 'lib/rpg/item.rb', line 15 def consumable @consumable end |
- (Object) itype_id
Returns the value of attribute itype_id
13 14 15 |
# File 'lib/rpg/item.rb', line 13 def itype_id @itype_id end |
- (Object) price
Returns the value of attribute price
14 15 16 |
# File 'lib/rpg/item.rb', line 14 def price @price end |
Instance Method Details
- (Boolean) key_item?
10 11 12 |
# File 'lib/rpg/item.rb', line 10 def key_item? @itype_id == 2 end |