Class: Studio::Item

Inherits:
Object show all
Defined in:
scripts/00800 Studio/00001 Data/00021 Item.rb

Overview

Data class describing an Item (see 00002 Item folder for functional items)

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

Instance Method Summary collapse

Instance Attribute Details

#db_symbolSymbol (readonly)

db_symbol of the item

Returns:

  • (Symbol)


12
13
14
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 12

def db_symbol
  @db_symbol
end

#fling_powerInteger (readonly)

Power of the Fling move when item is thrown

Returns:



48
49
50
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 48

def fling_power
  @fling_power
end

#iconString (readonly)

Icon of the item (in the bag)

Returns:



16
17
18
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 16

def icon
  @icon
end

#idInteger (readonly)

ID of the item

Returns:



8
9
10
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 8

def id
  @id
end

#is_battle_usableBoolean (readonly)

If the item can be used in battle

Returns:

  • (Boolean)


32
33
34
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 32

def is_battle_usable
  @is_battle_usable
end

#is_holdableBoolean (readonly)

If the item can be held by a creature

Returns:

  • (Boolean)


44
45
46
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 44

def is_holdable
  @is_holdable
end

#is_limitedBoolean (readonly)

If the item must be consumed when used

Returns:

  • (Boolean)


40
41
42
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 40

def is_limited
  @is_limited
end

#is_map_usableBoolean (readonly)

If the item can be used in the overworld

Returns:

  • (Boolean)


36
37
38
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 36

def is_map_usable
  @is_map_usable
end

#positionInteger (readonly)

Relative position of the item (in the socket) in ascending order

Returns:



28
29
30
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 28

def position
  @position
end

#priceInteger (readonly)

Price of the item (in the shop)

Returns:



20
21
22
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 20

def price
  @price
end

#socketInteger (readonly)

Pocket of the item in the bag

Returns:



24
25
26
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 24

def socket
  @socket
end

Instance Method Details

#descriptionString Also known as: descr

Description of the item

Returns:



70
71
72
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 70

def description
  return text_get(13, @id)
end

#exact_nameString

Get the exact name of the item (including move name)

Returns:



58
59
60
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 58

def exact_name
  return name
end

#meString

Get the ME of the item when it's got

Returns:



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

#nameString

Get the name of the item

Returns:



52
53
54
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 52

def name
  return text_get(12, @id)
end

#plural_nameString

Name of the item in plural

Returns:



64
65
66
# File 'scripts/00800 Studio/00001 Data/00021 Item.rb', line 64

def plural_name
  return ext_text(9001, @id)
end