Class: RPG::Actor

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/actor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActor


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/rpg/actor.rb', line 5

def initialize
  @id = 0
  @name = ""
  @class_id = 1
  @initial_level = 1
  @final_level = 99
  @exp_basis = 30
  @exp_inflation = 30
  @character_name = ""
  @character_hue = 0
  @battler_name = ""
  @battler_hue = 0
  @parameters = Table.new(6,100)
  for i in 1..99
    @parameters[0,i] = 500+i*50
    @parameters[1,i] = 500+i*50
    @parameters[2,i] = 50+i*5
    @parameters[3,i] = 50+i*5
    @parameters[4,i] = 50+i*5
    @parameters[5,i] = 50+i*5
  end
  @weapon_id = 0
  @armor1_id = 0
  @armor2_id = 0
  @armor3_id = 0
  @armor4_id = 0
  @weapon_fix = false
  @armor1_fix = false
  @armor2_fix = false
  @armor3_fix = false
  @armor4_fix = false
end

Instance Attribute Details

#armor1_fixObject

Flag making the actor's shield unremovable.


104
105
106
# File 'lib/rpg/actor.rb', line 104

def armor1_fix
  @armor1_fix
end

#armor1_idObject

ID of the actor's initially equipped shield.


89
90
91
# File 'lib/rpg/actor.rb', line 89

def armor1_id
  @armor1_id
end

#armor2_fixObject

Flag making the actor's helmet unremovable.


107
108
109
# File 'lib/rpg/actor.rb', line 107

def armor2_fix
  @armor2_fix
end

#armor2_idObject

ID of the actor's initially equipped helmet.


92
93
94
# File 'lib/rpg/actor.rb', line 92

def armor2_id
  @armor2_id
end

#armor3_fixObject

Flag making the actor's body armor unremovable.


110
111
112
# File 'lib/rpg/actor.rb', line 110

def armor3_fix
  @armor3_fix
end

#armor3_idObject

ID of the actor's initially equipped body armor.


95
96
97
# File 'lib/rpg/actor.rb', line 95

def armor3_id
  @armor3_id
end

#armor4_fixObject

Flag making the actor's accessory unremovable.


113
114
115
# File 'lib/rpg/actor.rb', line 113

def armor4_fix
  @armor4_fix
end

#armor4_idObject

ID of the actor's initially equipped accessory.


98
99
100
# File 'lib/rpg/actor.rb', line 98

def armor4_id
  @armor4_id
end

#battler_hueObject

The adjustment value for the battler graphic's hue (0..360).


69
70
71
# File 'lib/rpg/actor.rb', line 69

def battler_hue
  @battler_hue
end

#battler_nameObject

The actor's battler graphic file name.


66
67
68
# File 'lib/rpg/actor.rb', line 66

def battler_name
  @battler_name
end

#character_hueObject

The adjustment value for the character graphic's hue (0..360).


63
64
65
# File 'lib/rpg/actor.rb', line 63

def character_hue
  @character_hue
end

#character_nameObject

The actor's character graphic file name.


60
61
62
# File 'lib/rpg/actor.rb', line 60

def character_name
  @character_name
end

#class_idObject

The actor class ID.


45
46
47
# File 'lib/rpg/actor.rb', line 45

def class_id
  @class_id
end

#exp_basisObject

The value on which the experience curve is based (10..50).


54
55
56
# File 'lib/rpg/actor.rb', line 54

def exp_basis
  @exp_basis
end

#exp_inflationObject

The amount of experience curve inflation (10..50).


57
58
59
# File 'lib/rpg/actor.rb', line 57

def exp_inflation
  @exp_inflation
end

#final_levelObject

The actor's final level.


51
52
53
# File 'lib/rpg/actor.rb', line 51

def final_level
  @final_level
end

#idObject

The actor ID.


39
40
41
# File 'lib/rpg/actor.rb', line 39

def id
  @id
end

#initial_levelObject

The actor's initial level.


48
49
50
# File 'lib/rpg/actor.rb', line 48

def initial_level
  @initial_level
end

#nameObject

The actor name.


42
43
44
# File 'lib/rpg/actor.rb', line 42

def name
  @name
end

#parametersTable

2-dimensional Table containing base parameters for each level.

Generally takes the form parameters[kind, level].

kind indicates the parameter type:

0

max HP

1

max SP

2

strength

3

dexterity

4

agility

5

intelligence).


83
84
85
# File 'lib/rpg/actor.rb', line 83

def parameters
  @parameters
end

#weapon_fixObject

Flag making the actor's weapon unremovable.


101
102
103
# File 'lib/rpg/actor.rb', line 101

def weapon_fix
  @weapon_fix
end

#weapon_idObject

ID of the actor's initially equipped weapon.


86
87
88
# File 'lib/rpg/actor.rb', line 86

def weapon_id
  @weapon_id
end