Class: RPG::Item
- Inherits:
-
UsableItem
- Object
- BaseItem
- UsableItem
- RPG::Item
- Extended by:
- RgssDb::JsonableConstructor
- Includes:
- RgssDb::Jsonable
- Defined in:
- lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/item.rb
Overview
The data class for items.
Instance Attribute Summary collapse
-
#animation1_id ⇒ Object
Returns the value of attribute animation1_id.
-
#animation2_id ⇒ Object
Returns the value of attribute animation2_id.
-
#common_event_id ⇒ Object
Returns the value of attribute common_event_id.
-
#consumable ⇒ Object
Returns the value of attribute consumable.
-
#description ⇒ Object
Returns the value of attribute description.
-
#element_set ⇒ Object
Returns the value of attribute element_set.
-
#hit ⇒ Object
Returns the value of attribute hit.
-
#hp_recovery ⇒ Object
Returns the value of attribute hp_recovery.
-
#hp_recovery_rate ⇒ Object
Returns the value of attribute hp_recovery_rate.
-
#icon_name ⇒ Object
Returns the value of attribute icon_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#itype_id ⇒ Object
Returns the value of attribute itype_id.
-
#mdef_f ⇒ Object
Returns the value of attribute mdef_f.
-
#menu_se ⇒ Object
Returns the value of attribute menu_se.
-
#minus_state_set ⇒ Object
Returns the value of attribute minus_state_set.
-
#mp_recovery ⇒ Object
Returns the value of attribute mp_recovery.
-
#mp_recovery_rate ⇒ Object
Returns the value of attribute mp_recovery_rate.
-
#name ⇒ Object
Returns the value of attribute name.
-
#occasion ⇒ Object
Returns the value of attribute occasion.
-
#parameter_points ⇒ Object
Returns the value of attribute parameter_points.
-
#parameter_type ⇒ Object
Returns the value of attribute parameter_type.
-
#pdef_f ⇒ Object
Returns the value of attribute pdef_f.
-
#plus_state_set ⇒ Object
Returns the value of attribute plus_state_set.
-
#price ⇒ Object
Returns the value of attribute price.
-
#recover_hp ⇒ Object
Returns the value of attribute recover_hp.
-
#recover_hp_rate ⇒ Object
Returns the value of attribute recover_hp_rate.
-
#recover_sp ⇒ Object
Returns the value of attribute recover_sp.
-
#recover_sp_rate ⇒ Object
Returns the value of attribute recover_sp_rate.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#variance ⇒ Object
Returns the value of attribute variance.
Attributes inherited from UsableItem
#absorb_damage, #animation_id, #atk_f, #base_damage, #damage, #damage_to_mp, #effects, #hit_type, #ignore_defense, #physical_attack, #repeats, #speed, #spi_f, #success_rate, #tp_gain
Attributes inherited from BaseItem
Instance Method Summary collapse
-
#initialize ⇒ Item
constructor
A new instance of Item.
- #key_item? ⇒ Boolean
- #to_s ⇒ Object
Methods included from RgssDb::JsonableConstructor
Methods included from RgssDb::Jsonable
Methods inherited from UsableItem
#battle_ok?, #certain?, #dual?, #for_all?, #for_dead_friend?, #for_friend?, #for_one?, #for_opponent?, #for_random?, #for_three?, #for_two?, #for_user?, #magical?, #menu_ok?, #need_selection?, #number_of_targets, #physical?
Constructor Details
#initialize ⇒ Item
Returns a new instance of Item.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 11 def initialize super @scope = 7 @price = 0 @consumable = true @hp_recovery_rate = 0 @hp_recovery = 0 @mp_recovery_rate = 0 @mp_recovery = 0 @parameter_type = 0 @parameter_points = 0 end |
Instance Attribute Details
#animation1_id ⇒ Object
Returns the value of attribute animation1_id.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def animation1_id @animation1_id end |
#animation2_id ⇒ Object
Returns the value of attribute animation2_id.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def animation2_id @animation2_id end |
#common_event_id ⇒ Object
Returns the value of attribute common_event_id.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def common_event_id @common_event_id end |
#consumable ⇒ Object
Returns the value of attribute consumable.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def consumable @consumable end |
#description ⇒ Object
Returns the value of attribute description.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def description @description end |
#element_set ⇒ Object
Returns the value of attribute element_set.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def element_set @element_set end |
#hit ⇒ Object
Returns the value of attribute hit.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def hit @hit end |
#hp_recovery ⇒ Object
Returns the value of attribute hp_recovery.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def hp_recovery @hp_recovery end |
#hp_recovery_rate ⇒ Object
Returns the value of attribute hp_recovery_rate.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def hp_recovery_rate @hp_recovery_rate end |
#icon_name ⇒ Object
Returns the value of attribute icon_name.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def icon_name @icon_name end |
#id ⇒ Object
Returns the value of attribute id.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def id @id end |
#itype_id ⇒ Object
Returns the value of attribute itype_id.
23 24 25 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/item.rb', line 23 def itype_id @itype_id end |
#mdef_f ⇒ Object
Returns the value of attribute mdef_f.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def mdef_f @mdef_f end |
#menu_se ⇒ Object
Returns the value of attribute menu_se.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def @menu_se end |
#minus_state_set ⇒ Object
Returns the value of attribute minus_state_set.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def minus_state_set @minus_state_set end |
#mp_recovery ⇒ Object
Returns the value of attribute mp_recovery.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def mp_recovery @mp_recovery end |
#mp_recovery_rate ⇒ Object
Returns the value of attribute mp_recovery_rate.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def mp_recovery_rate @mp_recovery_rate end |
#name ⇒ Object
Returns the value of attribute name.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def name @name end |
#occasion ⇒ Object
Returns the value of attribute occasion.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def occasion @occasion end |
#parameter_points ⇒ Object
Returns the value of attribute parameter_points.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def parameter_points @parameter_points end |
#parameter_type ⇒ Object
Returns the value of attribute parameter_type.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def parameter_type @parameter_type end |
#pdef_f ⇒ Object
Returns the value of attribute pdef_f.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def pdef_f @pdef_f end |
#plus_state_set ⇒ Object
Returns the value of attribute plus_state_set.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def plus_state_set @plus_state_set end |
#price ⇒ Object
Returns the value of attribute price.
24 25 26 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/item.rb', line 24 def price @price end |
#recover_hp ⇒ Object
Returns the value of attribute recover_hp.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def recover_hp @recover_hp end |
#recover_hp_rate ⇒ Object
Returns the value of attribute recover_hp_rate.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def recover_hp_rate @recover_hp_rate end |
#recover_sp ⇒ Object
Returns the value of attribute recover_sp.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def recover_sp @recover_sp end |
#recover_sp_rate ⇒ Object
Returns the value of attribute recover_sp_rate.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def recover_sp_rate @recover_sp_rate end |
#scope ⇒ Object
Returns the value of attribute scope.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def scope @scope end |
#variance ⇒ Object
Returns the value of attribute variance.
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 43 def variance @variance end |
Instance Method Details
#key_item? ⇒ Boolean
19 20 21 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/item.rb', line 19 def key_item? @itype_id == 2 end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/item.rb', line 39 def to_s @name.to_s end |