Class: Studio::Trainer

Inherits:
Object show all
Defined in:
scripts/00800 Studio/00001 Data/00061 Trainer.rb

Overview

Data class describing a trainer

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aiInteger (readonly)

AI level of that trainer

Returns:



30
31
32
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 30

def ai
  @ai
end

#bag_entriesArray<Hash> (readonly)

List of all items the trainer holds in its bag

Returns:

  • (Array<Hash>)


38
39
40
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 38

def bag_entries
  @bag_entries
end

#base_moneyInteger (readonly)

Base factor of the money gave by this trainer in case of defeate (money = base * last_level)

Returns:



22
23
24
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 22

def base_money
  @base_money
end

#battle_idInteger (readonly)

ID of the battler events to load in order to give more life to this trainer

Returns:



26
27
28
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 26

def battle_id
  @battle_id
end

#db_symbolSymbol (readonly)

db_symbol of the trainer

Returns:

  • (Symbol)


10
11
12
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 10

def db_symbol
  @db_symbol
end

#idInteger (readonly)

ID of the trainer

Returns:



6
7
8
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 6

def id
  @id
end

#is_coupleBoolean (readonly)

If the trainer is actually a couple (two trainer on same picture)

Returns:

  • (Boolean)


18
19
20
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 18

def is_couple
  @is_couple
end

#partyArray<Group::Encounter> (readonly)

Party of that trainer

Returns:



34
35
36
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 34

def party
  @party
end

#vs_typeInteger (readonly)

vs type of the trainer (if he uses 1 2 or more creature at once)

Returns:



14
15
16
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 14

def vs_type
  @vs_type
end

Instance Method Details

#battlerString

Get the graphic battler of the trainer

Returns:



42
43
44
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 42

def battler
  return @battlers.is_a?(String) ? @battlers : (@battlers.first || '__undefined__')
end

#class_nameString

Get the class name of the trainer

Returns:



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

def class_name
  return text_get(29, @id)
end

#nameString

Get the text name of the trainer

Returns:



54
55
56
# File 'scripts/00800 Studio/00001 Data/00061 Trainer.rb', line 54

def name
  return text_get(62, @id)
end