Class: RPG::UsableItem
- Extended by:
- RgssDb::JsonableConstructor
- Includes:
- RgssDb::Jsonable
- Defined in:
- lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item_damage.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item_effect.rb
Overview
The Superclass of Skill and Item.
Defined Under Namespace
Instance Attribute Summary collapse
-
#absorb_damage ⇒ Object
Returns the value of attribute absorb_damage.
-
#animation_id ⇒ Object
Returns the value of attribute animation_id.
-
#atk_f ⇒ Object
Returns the value of attribute atk_f.
-
#base_damage ⇒ Object
Returns the value of attribute base_damage.
-
#common_event_id ⇒ Object
Returns the value of attribute common_event_id.
-
#damage ⇒ Object
Returns the value of attribute damage.
-
#damage_to_mp ⇒ Object
Returns the value of attribute damage_to_mp.
-
#effects ⇒ Object
Returns the value of attribute effects.
-
#element_set ⇒ Object
Returns the value of attribute element_set.
-
#hit_type ⇒ Object
Returns the value of attribute hit_type.
-
#ignore_defense ⇒ Object
Returns the value of attribute ignore_defense.
-
#minus_state_set ⇒ Object
Returns the value of attribute minus_state_set.
-
#occasion ⇒ Object
Returns the value of attribute occasion.
-
#physical_attack ⇒ Object
Returns the value of attribute physical_attack.
-
#plus_state_set ⇒ Object
Returns the value of attribute plus_state_set.
-
#repeats ⇒ Object
Returns the value of attribute repeats.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#speed ⇒ Object
Returns the value of attribute speed.
-
#spi_f ⇒ Object
Returns the value of attribute spi_f.
-
#success_rate ⇒ Object
Returns the value of attribute success_rate.
-
#tp_gain ⇒ Object
Returns the value of attribute tp_gain.
-
#variance ⇒ Object
Returns the value of attribute variance.
Attributes inherited from BaseItem
#description, #features, #icon_index, #id, #name, #note
Instance Method Summary collapse
- #battle_ok? ⇒ Boolean
- #certain? ⇒ Boolean
- #dual? ⇒ Boolean
- #for_all? ⇒ Boolean
- #for_dead_friend? ⇒ Boolean
- #for_friend? ⇒ Boolean
- #for_one? ⇒ Boolean
- #for_opponent? ⇒ Boolean
- #for_random? ⇒ Boolean
- #for_three? ⇒ Boolean
- #for_two? ⇒ Boolean
- #for_user? ⇒ Boolean
-
#initialize ⇒ UsableItem
constructor
A new instance of UsableItem.
- #magical? ⇒ Boolean
- #menu_ok? ⇒ Boolean
- #need_selection? ⇒ Boolean
- #number_of_targets ⇒ Object
- #physical? ⇒ Boolean
Methods included from RgssDb::JsonableConstructor
Methods included from RgssDb::Jsonable
Methods inherited from BaseItem
Constructor Details
#initialize ⇒ UsableItem
Returns a new instance of UsableItem.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 11 def initialize super @scope = 0 @occasion = 0 @speed = 0 @animation_id = 0 @common_event_id = 0 @base_damage = 0 @variance = 20 @atk_f = 0 @spi_f = 0 @physical_attack = false @damage_to_mp = false @absorb_damage = false @ignore_defense = false @element_set = [] @plus_state_set = [] @minus_state_set = [] end |
Instance Attribute Details
#absorb_damage ⇒ Object
Returns the value of attribute absorb_damage.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def absorb_damage @absorb_damage end |
#animation_id ⇒ Object
Returns the value of attribute animation_id.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def animation_id @animation_id end |
#atk_f ⇒ Object
Returns the value of attribute atk_f.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def atk_f @atk_f end |
#base_damage ⇒ Object
Returns the value of attribute base_damage.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def base_damage @base_damage end |
#common_event_id ⇒ Object
Returns the value of attribute common_event_id.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def common_event_id @common_event_id end |
#damage ⇒ Object
Returns the value of attribute damage.
81 82 83 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 81 def damage @damage end |
#damage_to_mp ⇒ Object
Returns the value of attribute damage_to_mp.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def damage_to_mp @damage_to_mp end |
#effects ⇒ Object
Returns the value of attribute effects.
81 82 83 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 81 def effects @effects end |
#element_set ⇒ Object
Returns the value of attribute element_set.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def element_set @element_set end |
#hit_type ⇒ Object
Returns the value of attribute hit_type.
81 82 83 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 81 def hit_type @hit_type end |
#ignore_defense ⇒ Object
Returns the value of attribute ignore_defense.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def ignore_defense @ignore_defense end |
#minus_state_set ⇒ Object
Returns the value of attribute minus_state_set.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def minus_state_set @minus_state_set end |
#occasion ⇒ Object
Returns the value of attribute occasion.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def occasion @occasion end |
#physical_attack ⇒ Object
Returns the value of attribute physical_attack.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def physical_attack @physical_attack end |
#plus_state_set ⇒ Object
Returns the value of attribute plus_state_set.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def plus_state_set @plus_state_set end |
#repeats ⇒ Object
Returns the value of attribute repeats.
81 82 83 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 81 def repeats @repeats end |
#scope ⇒ Object
Returns the value of attribute scope.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def scope @scope end |
#speed ⇒ Object
Returns the value of attribute speed.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def speed @speed end |
#spi_f ⇒ Object
Returns the value of attribute spi_f.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def spi_f @spi_f end |
#success_rate ⇒ Object
Returns the value of attribute success_rate.
81 82 83 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 81 def success_rate @success_rate end |
#tp_gain ⇒ Object
Returns the value of attribute tp_gain.
81 82 83 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 81 def tp_gain @tp_gain end |
#variance ⇒ Object
Returns the value of attribute variance.
83 84 85 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 83 def variance @variance end |
Instance Method Details
#battle_ok? ⇒ Boolean
75 76 77 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 75 def battle_ok? [0, 1].include?(@occasion) end |
#certain? ⇒ Boolean
69 70 71 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 69 def certain? @hit_type == 0 end |
#dual? ⇒ Boolean
67 68 69 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 67 def dual? [3].include?(@scope) end |
#for_all? ⇒ Boolean
63 64 65 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 63 def for_all? [2, 8, 10].include?(@scope) end |
#for_dead_friend? ⇒ Boolean
39 40 41 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 39 def for_dead_friend? [9, 10].include?(@scope) end |
#for_friend? ⇒ Boolean
35 36 37 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 35 def for_friend? [7, 8, 9, 10, 11].include?(@scope) end |
#for_one? ⇒ Boolean
47 48 49 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 47 def for_one? [1, 3, 4, 7, 9, 11].include?(@scope) end |
#for_opponent? ⇒ Boolean
31 32 33 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 31 def for_opponent? [1, 2, 3, 4, 5, 6].include?(@scope) end |
#for_random? ⇒ Boolean
59 60 61 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 59 def for_random? [4, 5, 6].include?(@scope) end |
#for_three? ⇒ Boolean
55 56 57 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 55 def for_three? [6].include?(@scope) end |
#for_two? ⇒ Boolean
51 52 53 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 51 def for_two? [5].include?(@scope) end |
#for_user? ⇒ Boolean
43 44 45 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 43 def for_user? [11].include?(@scope) end |
#magical? ⇒ Boolean
77 78 79 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 77 def magical? @hit_type == 2 end |
#menu_ok? ⇒ Boolean
79 80 81 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 79 def [0, 2].include?(@occasion) end |
#need_selection? ⇒ Boolean
71 72 73 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/usable_item.rb', line 71 def need_selection? [1, 3, 7, 9].include?(@scope) end |
#number_of_targets ⇒ Object
49 50 51 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 49 def number_of_targets for_random? ? @scope - 2 : 0 end |
#physical? ⇒ Boolean
73 74 75 |
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/usable_item.rb', line 73 def physical? @hit_type == 1 end |