Class: Studio::Item
- Defined in:
- scripts/00800 Studio/00001 Data/00021 Item.rb
Overview
Data class describing an Item (see 00002 Item folder for functional items)
Direct Known Subclasses
BallItem, EventItem, FleeingItem, HealingItem, RepelItem, StoneItem, TechItem
Constant Summary collapse
- ItemGetME =
List of get item ME
%w[Audio/ME/ROSA_ItemObtained.ogg Audio/ME/ROSA_KeyItemObtained.ogg Audio/ME/ROSA_TMObtained.ogg]
Instance Attribute Summary collapse
-
#db_symbol ⇒ Symbol
readonly
db_symbol of the item.
-
#fling_power ⇒ Integer
readonly
Power of the Fling move when item is thrown.
-
#icon ⇒ String
readonly
Icon of the item (in the bag).
-
#id ⇒ Integer
readonly
ID of the item.
-
#is_battle_usable ⇒ Boolean
readonly
If the item can be used in battle.
-
#is_holdable ⇒ Boolean
readonly
If the item can be held by a creature.
-
#is_limited ⇒ Boolean
readonly
If the item must be consumed when used.
-
#is_map_usable ⇒ Boolean
readonly
If the item can be used in the overworld.
-
#position ⇒ Integer
readonly
Relative position of the item (in the socket) in ascending order.
-
#price ⇒ Integer
readonly
Price of the item (in the shop).
-
#socket ⇒ Integer
readonly
Pocket of the item in the bag.
Instance Method Summary collapse
-
#description ⇒ String
(also: #descr)
Description of the item.
-
#exact_name ⇒ String
Get the exact name of the item (including move name).
-
#me ⇒ String
Get the ME of the item when it's got.
-
#name ⇒ String
Get the name of the item.
-
#plural_name ⇒ String
Name of the item in plural.
Instance Attribute Details
#db_symbol ⇒ Symbol (readonly)
db_symbol of the item
12 13 14 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 12 def db_symbol @db_symbol end |
#fling_power ⇒ Integer (readonly)
Power of the Fling move when item is thrown
48 49 50 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 48 def fling_power @fling_power end |
#icon ⇒ String (readonly)
Icon of the item (in the bag)
16 17 18 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 16 def icon @icon end |
#id ⇒ Integer (readonly)
ID of the item
8 9 10 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 8 def id @id end |
#is_battle_usable ⇒ Boolean (readonly)
If the item can be used in battle
32 33 34 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 32 def is_battle_usable @is_battle_usable end |
#is_holdable ⇒ Boolean (readonly)
If the item can be held by a creature
44 45 46 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 44 def is_holdable @is_holdable end |
#is_limited ⇒ Boolean (readonly)
If the item must be consumed when used
40 41 42 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 40 def is_limited @is_limited end |
#is_map_usable ⇒ Boolean (readonly)
If the item can be used in the overworld
36 37 38 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 36 def is_map_usable @is_map_usable end |
#position ⇒ Integer (readonly)
Relative position of the item (in the socket) in ascending order
28 29 30 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 28 def position @position end |
#price ⇒ Integer (readonly)
Price of the item (in the shop)
20 21 22 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 20 def price @price end |
#socket ⇒ Integer (readonly)
Pocket of the item in the bag
24 25 26 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 24 def socket @socket end |
Instance Method Details
#description ⇒ String Also known as: descr
Description of the item
70 71 72 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 70 def description return text_get(13, @id) end |
#exact_name ⇒ String
Get the exact name of the item (including move name)
58 59 60 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 58 def exact_name return name end |
#me ⇒ String
Get the ME of the item when it's got
77 78 79 80 81 82 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 77 def me return ItemGetME[2] if socket == 3 return ItemGetME[1] if socket == 5 return ItemGetME[0] end |
#name ⇒ String
Get the name of the item
52 53 54 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 52 def name return text_get(12, @id) end |
#plural_name ⇒ String
Name of the item in plural
64 65 66 |
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 64 def plural_name return ext_text(9001, @id) end |