Menu

Connexion



Retenir ?

Mot de passe oublié ?
Eclipso logo
Merry Christmas !
06/06/2020 13:43:33

Une Princesse sans amour est une Princesse oubliée - Brandobscure

[Résolu] Incompréhension sur un script.

Gelarto

Vétéran
Gelarto
  • Messages : 781

[Résolu] Incompréhension sur un script.


dim. 09 févr. 2014 - 14h57

Bonjour/Bonsoir à tous,

J'ai actuellement un petit problème de compréhension sur le fonctionnement d'un script que je commence à utiliser. Le script en question reprend le système de Permis de FF XII (tant que le permis n'est pas débloqué, on a pas accès aux bonus qu'il donne) c'est un peu le même principe que le sphérier de FF X.

Alors d'abord voilà le script :

[spoiler][code]#==============================================================================
# Crystal Engine - Licence Board
#------------------------------------------------------------------------------
# Current Version 1.05
#==============================================================================
$imported = {} if $imported.nil?
$imported["CE-LB"] = true
=begin
this script replicates the licence board from FF12
the mini faces used in the scene are set with the notetag
and changed with the script call change_actor_mini_face(x, string) were x is the
actor id and string is the file name
to set an actor's starting LP use
that same notetag when used in the enemy box set the LP Yield for Enemy
to add LP to an actor you can use either gain_lp(x, y) or $game_actors[x].lp += y
were x is the actor id and y is the LP to be added
=end
module CRYSTAL
module LICENCE

LP_TERM = "LP"

DEFUALT_LP_YIELD = 1 # Defualt Amount of LP Given out by Enemies

GAIN_LP = "Received %s LP"

FOLDER = "FF-XII files" # the folder all the images are contained

SUBFOLDERS = { # these are the sub-folders for the icons
:weapon => "Weapon", # Weapons
:armor => "Armor", # Armors
:access => "Accessory", # Accessories
:magic => "Magic", # Magic
:ability => "Ability", # Physical Skills
:augment => "Augment", # Enchancements
:quick => "Quickenings", # "Limit Breaks"
:esper => "Esper", # "Summons"
}

TYPE_NAMES = { # These are the names for the Locked Licences
:weapon => "Weapon",
:armor => "Armor",
:access => "Accessory",
:magic => "Magic",
:ability => "Skill",
:augment => "Augment",
:quick => "Mist",
# Espers operate differently than normal licences
}

TILES = ["box_normal","box_alter"] # the names for the squares

BACKGROUND_FOLDER = "Backgrounds" # the sub-folder for the backgrounds

BACKDROPS = {
0 => "background", # the defualt background for actors
1 => "background", # actor 1's background
}

REQUIRES_LICENCE = {
"Skills" => true,
"Weapons" => true,
"Armors" => true,
"Accessories" => true,
}

WINDOWS = { # the windowskins used for each option
:subfolder => "Windows", # Folder that they are all stored in
:status => "Window", # For the Status Face Window
:help => "Window_Help2",
}

ANIMATIONS = { # animations run on the board
:activate => 41, # on an activated sqaure
:unlock => 37, # on an unlocked square
}

DEBUG_LP = 3000 # The LP you start with durring a playtest
#(added to what you already have)

ACTIVE_ICON = 125 # the icon for a square that is active (faded out is off)

FACE_FOLDER = "Faces"

EQUIPMENT_REQUIRE_NORMAL_CONDITION = true # Should the equipable feature need to be set

ESPER_LICENCE_FOR_SUMMON = true # Should you have the licence for an esper to summon it.

ESPER_LICENCE_FOR_PAIR = true # Should you have the licence for an esper to pair with it.

CONFIRM_TEXT = "Obtain %s?" # Text when confirming licence obtaining

BOARD_ACTORS = [1,2,3,4,5,6,7,8,9,10] # the actors that use the board
# if an actor does not use it they can equip any piece of equipment they
# could normally equip and can use any skill they could normally use
# why this is here is because of guests in FF12 did not use the board
# instead they had set equipment and set skills that could not be changed
# under any circumstances

STARTING_TILE = 8 # the square that the licence board is on when opened for
# the first time afterwards it is whatever tile you close on

LAYOUT = {
1 => [3,0],
2 => [4,0],
3 => [8,0],
4 => [9,0],
5 => [10,0],
6 => [4,2],
7 => [5,2],
8 => [6,2],
9 => [4,1],
10 => [5,1],
11 => [6,1],
12 => [7,1],
13 => [8,1],
14 => [9,1],
15 => [7,2],
16 => [8,2],
17 => [9,2],
18 => [8,3],
19 => [10,3],
20 => [9,3],
21 => [10,2],
22 => [10,1],
23 => [11,1],
24 => [11,2],
25 => [12,1],
26 => [11,3],
27 => [12,3],
28 => [12,2],
29 => [13,3],
30 => [13,1],
31 => [14,2],
32 => [13,2],
33 => [14,1],
34 => [14,3],
35 => [15,2],
36 => [15,3],
37 => [16,3],
38 => [16,2],
39 => [17,2],
40 => [17,3],
41 => [16,1],
42 => [17,1],
43 => [18,2],
44 => [18,3],
45 => [19,2],
46 => [19,3],
47 => [4,3],
48 => [5,3],
49 => [6,3],
50 => [7,3],
51 => [3,4],
52 => [4,4],
53 => [5,4],
54 => [6,4],
55 => [7,4],
56 => [8,4],
57 => [3,5],
58 => [4,5],
59 => [5,5],
60 => [6,5],
61 => [7,5],
62 => [8,5],
63 => [3,6],
64 => [4,6],
65 => [5,6],
66 => [6,6],
67 => [7,6],
68 => [8,6],
69 => [3,7],
70 => [4,7],
71 => [5,7],
72 => [6,7],
73 => [7,7],
74 => [8,7],
75 => [3,8],
76 => [4,8],
77 => [5,8],
78 => [6,8],
79 => [7,8],
80 => [8,8],
81 => [3,9],
82 => [4,9],
83 => [5,9],
84 => [6,9],
85 => [7,9],
86 => [8,9],
87 => [3,10],
88 => [4,10],
89 => [5,10],
90 => [6,10],
91 => [7,10],
92 => [8,10],
93 => [4,11],
94 => [9,4],
95 => [10,4],
96 => [9,5],
97 => [10,5],
98 => [11,5],
99 => [11,4],
100 => [12,4],
101 => [12,5],
102 => [13,4],
103 => [14,4],
104 => [13,5],
105 => [14,5],
106 => [15,4],
107 => [15,5],
108 => [16,4],
109 => [16,5],
110 => [17,4],
111 => [18,5],
112 => [17,5],
113 => [18,5],
114 => [9,6],
115 => [10,6],
116 => [11,6],
117 => [12,6],
118 => [13,6],
119 => [14,6],
120 => [15,6],
121 => [16,6],
122 => [17,6],
123 => [18,6],
124 => [9,7],
125 => [11,7],
126 => [13,7],
127 => [10,7],
128 => [12,7],
129 => [14,7],
130 => [15,7],
131 => [15,1],
132 => [6,11],
}

SQUARES = {
1 => {
:name => "Time Magic 1", # Name of Tile
:type => :magic, # Tile Type
:cost => 50, # LP Cost
:level => 1, # Level of Square
:unlocks => [44,48], # Skills/Equipment/Augments unlocked
:file_name => "blue", # Filename base
:erase => false, # Should it be erased from everyone else's board once used
:switch => 0, # Unlock Switch
},
2 => {
:name =>"Arcane Magic 1",
:type => :magic,
:cost => 50,
:level => 1,
:unlocks => [49,50],
:file_name => "arcane",
:erase => false,
:switch => 0,
},
3 => {
:name => "Green Magic 3",
:type => :magic,
:cost => 60,
:level => 3,
:unlocks => [39,40,47],
:file_name => "green",
:erase => false,
:switch => 0,
},
4 => {
:name => "Green Magic 4",
:type => :magic,
:cost => 80,
:level => 4,
:unlocks => [41,43,45,46],
:file_name => "green",
:erase => false,
:switch => 0,
},
5 => {
:name => "White Magic 5",
:type => :magic,
:cost => 120,
:level => 5,
:unlocks => [70],
:file_name => "white",
:erase => false,
:switch => 0,
},
6 => {
:name => "Black Magic 3",
:type => :magic,
:cost => 70,
:level => 3,
:unlocks => [52,56,60],
:file_name => "black",
:erase => false,
:switch => 0,
},
7 => {
:name => "White Magic 4",
:type => :magic,
:cost => 90,
:level => 4,
:unlocks => [34,69],
:file_name => "white",
:erase => false,
:switch => 0,
},
8 => {
:name => "Arcane Magic 2",
:type => :magic,
:cost => 65,
:level => 5,
:unlocks => [71,72],
:file_name => "white",
:erase => false,
:switch => 0,
},
9 => {
:name => "Black Magic 4",
:type => :magic,
:cost => 65,
:level => 4,
:unlocks => [64,66,68],
:file_name => "black",
:erase => false,
:switch => 0,
},
10 => {
:name => "White Magic 3",
:type => :magic,
:cost => 55,
:level => 3,
:unlocks => [28,30,32],
:file_name => "white",
:erase => false,
:switch => 0,
},
11 => {
:name => "White Magic 2",
:type => :magic,
:cost => 35,
:level => 2,
:unlocks => [27,29,33],
:file_name => "white",
:erase => false,
:switch => 0,
},
12 => {
:name => "White Magic 1",
:type => :magic,
:cost => 15,
:level => 1,
:unlocks => [26,31],
:file_name => "white",
:erase => false,
:switch => 0,
},
13 => {
:name => "Green Magic 1",
:type => :magic,
:cost => 25,
:level => 1,
:unlocks => [35,36],
:file_name => "green",
:erase => false,
:switch => 0,
},
14 => {
:name => "Green Magic 2",
:type => :magic,
:cost => 35,
:level => 1,
:unlocks => [37,42],
:file_name => "green",
:erase => false,
:switch => 0,
},
15 => {
:name => "Black Magic 1",
:type => :magic,
:cost => 15,
:level => 1,
:unlocks => [51,55,59],
:file_name => "black",
:erase => false,
:switch => 0,
},
16 => {
:name => "Black Magic 2",
:type => :magic,
:cost => 25,
:level => 2,
:unlocks => [63,65,67],
:file_name => "black",
:erase => false,
:switch => 0,
},
17 => {
:name => "Axes 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [1,2],
:file_name => "axe",
:erase => false,
:switch => 0,
},
18 => {
:name => "Axes 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [3,4],
:file_name => "axe",
:erase => false,
:switch => 0,
},
19 => {
:name => "Axes 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [5,6],
:file_name => "axe",
:erase => false,
:switch => 0,
},
20 => {
:name => "Claws 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [7,8],
:file_name => "claw",
:erase => false,
:switch => 0,
},
21 => {
:name => "Claws 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [9,10],
:file_name => "claw",
:erase => false,
:switch => 0,
},
22 => {
:name => "Claws 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [11,12],
:file_name => "claw",
:erase => false,
:switch => 0,
},
23 => {
:name => "Spears 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [13,14],
:file_name => "spear",
:erase => false,
:switch => 0,
},
24 => {
:name => "Spears 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [15,16],
:file_name => "spear",
:erase => false,
:switch => 0,
},
25 => {
:name => "Spears 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [17,18],
:file_name => "spear",
:erase => false,
:switch => 0,
},
26 => {
:name => "Swords 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [19,20],
:file_name => "sword",
:erase => false,
:switch => 0,
},
27 => {
:name => "Swords 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [21,22],
:file_name => "sword",
:erase => false,
:switch => 0,
},
28 => {
:name => "Swords 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [23,24],
:file_name => "sword",
:erase => false,
:switch => 0,
},
29 => {
:name => "Katanas 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [25,26],
:file_name => "katana",
:erase => false,
:switch => 0,
},
30 => {
:name => "Katanas 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [27,28],
:file_name => "katana",
:erase => false,
:switch => 0,
},
31 => {
:name => "Katanas 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [29,30],
:file_name => "katana",
:erase => false,
:switch => 0,
},
32 => {
:name => "Bows 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [31,32],
:file_name => "bow",
:erase => false,
:switch => 0,
},
33 => {
:name => "Bows 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [33,34],
:file_name => "bow",
:erase => false,
:switch => 0,
},
34 => {
:name => "Bows 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [35,36],
:file_name => "bow",
:erase => false,
:switch => 0,
},
35 => {
:name => "Daggers 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [37,38],
:file_name => "dage",
:erase => false,
:switch => 0,
},
36 => {
:name => "Daggers 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [39,40],
:file_name => "dage",
:erase => false,
:switch => 0,
},
37 => {
:name => "Daggers 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [41,42],
:file_name => "dage",
:erase => false,
:switch => 0,
},
38 => {
:name => "Hammers 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [43,44],
:file_name => "maze",
:erase => false,
:switch => 0,
},
39 => {
:name => "Hammers 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [45,46],
:file_name => "maze",
:erase => false,
:switch => 0,
},
40 => {
:name => "Hammers 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [47,48],
:file_name => "maze",
:erase => false,
:switch => 0,
},
41 => {
:name => "Staves 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [49,50],
:file_name => "cane",
:erase => false,
:switch => 0,
},
42 => {
:name => "Staves 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [51,52],
:file_name => "cane",
:erase => false,
:switch => 0,
},
43 => {
:name => "Staves 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [53,54],
:file_name => "cane",
:erase => false,
:switch => 0,
},
44 => {
:name => "Guns 1",
:type => :weapon,
:cost => 25,
:level => 1,
:unlocks => [55,56],
:file_name => "gun",
:erase => false,
:switch => 0,
},
45 => {
:name => "Guns 2",
:type => :weapon,
:cost => 35,
:level => 2,
:unlocks => [57,58],
:file_name => "gun",
:erase => false,
:switch => 0,
},
46 => {
:name => "Guns 3",
:type => :weapon,
:cost => 55,
:level => 3,
:unlocks => [59,60],
:file_name => "gun",
:erase => false,
:switch => 0,
},
47 => {
:name => "Strong Attack",
:type => :ability,
:cost => 10,
:level => 1,
:unlocks => [80],
:file_name => "skill",
:erase => false,
:switch => 0,
},
48 => {
:name => "Cleave",
:type => :ability,
:cost => 10,
:level => 1,
:unlocks => [81],
:file_name => "skill",
:erase => false,
:switch => 0,
},
49 => {
:name => "Berserker's Roar",
:type => :ability,
:cost => 25,
:level => 2,
:unlocks => [82],
:file_name => "skill",
:erase => false,
:switch => 0,
},
50 => {
:name => "Berserker's Dance",
:type => :ability,
:cost => 50,
:level => 3,
:unlocks => [83],
:file_name => "skill",
:erase => false,
:switch => 0,
},
51 => {
:name => "Giant's Rampage",
:type => :ability,
:cost => 100,
:level => 3,
:unlocks => [84],
:file_name => "skill",
:erase => false,
:switch => 0,
},
52 => {
:name => "Tackle",
:type => :ability,
:cost => 10,
:level => 1,
:unlocks => [85],
:file_name => "skill",
:erase => false,
:switch => 0,
},
53 => {
:name => "Chakra",
:type => :ability,
:cost => 10,
:level => 4,
:unlocks => [86],
:file_name => "skill",
:erase => false,
:switch => 0,
},
54 => {
:name => "Tiger Stance",
:type => :ability,
:cost => 25,
:level => 5,
:unlocks => [87],
:file_name => "skill",
:erase => false,
:switch => 0,
},
55 => {
:name => "No Shadow Kick",
:type => :ability,
:cost => 50,
:level => 1,
:unlocks => [88],
:file_name => "skill",
:erase => false,
:switch => 0,
},
56 => {
:name => "Claw Dance",
:type => :ability,
:cost => 100,
:level => 6,
:unlocks => [89],
:file_name => "skill",
:erase => false,
:switch => 0,
},
57 => {
:name => "Cover",
:type => :ability,
:cost => 10,
:level => 1,
:unlocks => [90],
:file_name => "skill",
:erase => false,
:switch => 0,
},
58 => {
:name => "Provoke",
:type => :ability,
:cost => 10,
:level => 7,
:unlocks => [91],
:file_name => "skill",
:erase => false,
:switch => 0,
},
59 => {
:name => "Super Guard",
:type => :ability,
:cost => 25,
:level => 8,
:unlocks => [92],
:file_name => "skill",
:erase => false,
:switch => 0,
},
60 => {
:name => "Restrengthen",
:type => :ability,
:cost => 50,
:level => 9,
:unlocks => [93],
:file_name => "skill",
:erase => false,
:switch => 0,
},
61 => {
:name => "Zero Storm",
:type => :ability,
:cost => 100,
:level => 10,
:unlocks => [94],
:file_name => "skill",
:erase => false,
:switch => 0,
},
62 => {
:name => "Aura Blade",
:type => :ability,
:cost => 10,
:level => 11,
:unlocks => [95],
:file_name => "skill",
:erase => false,
:switch => 0,
},
63 => {
:name => "Dispel",
:type => :ability,
:cost => 10,
:level => 12,
:unlocks => [96],
:file_name => "skill",
:erase => false,
:switch => 0,
},
64 => {
:name => "Magic Barrier",
:type => :ability,
:cost => 25,
:level => 13,
:unlocks => [97],
:file_name => "skill",
:erase => false,
:switch => 0,
},
65 => {
:name => "Reinforce",
:type => :ability,
:cost => 50,
:level => 8,
:unlocks => [98],
:file_name => "skill",
:erase => false,
:switch => 0,
},
66 => {
:name => "Radiant Blade",
:type => :ability,
:cost => 100,
:level => 11,
:unlocks => [99],
:file_name => "skill",
:erase => false,
:switch => 0,
},
67 => {
:name => "Yoroidoshi",
:type => :ability,
:cost => 10,
:level => 1,
:unlocks => [100],
:file_name => "skill",
:erase => false,
:switch => 0,
},
68 => {
:name => "Shintou Mekkyaku",
:type => :ability,
:cost => 10,
:level => 4,
:unlocks => [101],
:file_name => "skill",
:erase => false,
:switch => 0,
},
69 => {
:name => "Hassou",
:type => :ability,
:cost => 25,
:level => 8,
:unlocks => [102],
:file_name => "skill",
:erase => false,
:switch => 0,
},
70 => {
:name => "Tsubamekaeshi",
:type => :ability,
:cost => 50,
:level => 14,
:unlocks => [103],
:file_name => "skill",
:erase => false,
:switch => 0,
},
71 => {
:name => "Ouka Mugen jin",
:type => :ability,
:cost => 100,
:level => 3,
:unlocks => [104],
:file_name => "skill",
:erase => false,
:switch => 0,
},
72 => {
:name => "Weapon Break",
:type => :ability,
:cost => 10,
:level => 1,
:unlocks => [105],
:file_name => "skill",
:erase => false,
:switch => 0,
},
73 => {
:name => "Armour Break",
:type => :ability,
:cost => 10,
:level => 1,
:unlocks => [106],
:file_name => "skill",
:erase => false,
:switch => 0,
},
74 => {
:name => "Zero Shadow",
:type => :ability,
:cost => 25,
:level => 15,
:unlocks => [107],
:file_name => "skill",
:erase => false,
:switch => 0,
},
75 => {
:name => "Triple Shot",
:type => :ability,
:cost => 50,
:level => 16,
:unlocks => [108],
:file_name => "skill",
:erase => false,
:switch => 0,
},
76 => {
:name => "Thousand Arrows",
:type => :ability,
:cost => 100,
:level => 16,
:unlocks => [109],
:file_name => "skill",
:erase => false,
:switch => 0,
},
77 => {
:name => "Vanish",
:type => :ability,
:cost => 10,
:level => 17,
:unlocks => [110],
:file_name => "skill",
:erase => false,
:switch => 0,
},
78 => {
:name => "Flare",
:type => :ability,
:cost => 10,
:level => 18,
:unlocks => [111],
:file_name => "skill",
:erase => false,
:switch => 0,
},
79 => {
:name => "Thief's Luck",
:type => :ability,
:cost => 25,
:level => 19,
:unlocks => [112],
:file_name => "skill",
:erase => false,
:switch => 0,
},
80 => {
:name => "Assassin's Edge",
:type => :ability,
:cost => 50,
:level => 27,
:unlocks => [113],
:file_name => "skill",
:erase => false,
:switch => 0,
},
81 => {
:name => "Valiant Edge",
:type => :ability,
:cost => 100,
:level => 27,
:unlocks => [114],
:file_name => "skill",
:erase => false,
:switch => 0,
},
82 => {
:name => "Spirit's Blessing",
:type => :ability,
:cost => 10,
:level => 9,
:unlocks => [115],
:file_name => "skill",
:erase => false,
:switch => 0,
},
83 => {
:name => "Fairy's Breath",
:type => :ability,
:cost => 25,
:level => 20,
:unlocks => [116],
:file_name => "skill",
:erase => false,
:switch => 0,
},
84 => {
:name => "God's Will",
:type => :ability,
:cost => 50,
:level => 21,
:unlocks => [117],
:file_name => "skill",
:erase => false,
:switch => 0,
},
85 => {
:name => "Goddess' Embrace",
:type => :ability,
:cost => 100,
:level => 8,
:unlocks => [118],
:file_name => "skill",
:erase => false,
:switch => 0,
},
86 => {
:name => "Magic Reflect",
:type => :ability,
:cost => 10,
:level => 22,
:unlocks => [119],
:file_name => "skill",
:erase => false,
:switch => 0,
},
87 => {
:name => "Enhance Spell",
:type => :ability,
:cost => 25,
:level => 23,
:unlocks => [120],
:file_name => "skill",
:erase => false,
:switch => 0,
},
88 => {
:name => "Nightmare",
:type => :ability,
:cost => 50,
:level => 24,
:unlocks => [121],
:file_name => "skill",
:erase => false,
:switch => 0,
},
89 => {
:name => "Magic Torrent",
:type => :ability,
:cost => 100,
:level => 25,
:unlocks => [122],
:file_name => "skill",
:erase => false,
:switch => 0,
},
90 => {
:name => "Magic Pulse",
:type => :ability,
:cost => 10,
:level => 20,
:unlocks => [123],
:file_name => "skill",
:erase => false,
:switch => 0,
},
91 => {
:name => "Spell Resistance",
:type => :ability,
:cost => 25,
:level => 26,
:unlocks => [124],
:file_name => "skill",
:erase => false,
:switch => 0,
},
92 => {
:name => "Mana Barrier",
:type => :ability,
:cost => 50,
:level => 8,
:unlocks => [125],
:file_name => "skill",
:erase => false,
:switch => 0,
},
93 => {
:name => "Mystic Spell",
:type => :ability,
:cost => 100,
:level => 25,
:unlocks => [126],
:file_name => "skill",
:erase => false,
:switch => 0,
},
94 => {
:name => "General Armor 1",
:type => :armor,
:cost => 25,
:level => 1,
:unlocks => [1,6],
:file_name => "soft",
:erase => false,
:switch => 0,
},
95 => {
:name => "General Armor 2",
:type => :armor,
:cost => 35,
:level => 2,
:unlocks => [2,7],
:file_name => "soft",
:erase => false,
:switch => 0,
},
96 => {
:name => "General Armor 3",
:type => :armor,
:cost => 45,
:level => 3,
:unlocks => [3,8],
:file_name => "soft",
:erase => false,
:switch => 0,
},
97 => {
:name => "General Armor 4",
:type => :armor,
:cost => 55,
:level => 4,
:unlocks => [4,9],
:file_name => "soft",
:erase => false,
:switch => 0,
},
98 => {
:name => "General Armor 5",
:type => :armor,
:cost => 65,
:level => 5,
:unlocks => [5,10],
:file_name => "soft",
:erase => false,
:switch => 0,
},
99 => {
:name => "Magic Armor 1",
:type => :armor,
:cost => 25,
:level => 1,
:unlocks => [11,16],
:file_name => "magic",
:erase => false,
:switch => 0,
},
100 => {
:name => "Magic Armor 2",
:type => :armor,
:cost => 35,
:level => 2,
:unlocks => [12,17],
:file_name => "magic",
:erase => false,
:switch => 0,
},
101 => {
:name => "Magic Armor 3",
:type => :armor,
:cost => 45,
:level => 3,
:unlocks => [13,18],
:file_name => "magic",
:erase => false,
:switch => 0,
},
102 => {
:name => "Magic Armor 4",
:type => :armor,
:cost => 55,
:level => 4,
:unlocks => [14,19],
:file_name => "magic",
:erase => false,
:switch => 0,
},
103 => {
:name => "Magic Armor 5",
:type => :armor,
:cost => 65,
:level => 5,
:unlocks => [15,20],
:file_name => "magic",
:erase => false,
:switch => 0,
},
104 => {
:name => "Light Armor 1",
:type => :armor,
:cost => 25,
:level => 1,
:unlocks => [21,26],
:file_name => "metal",
:erase => false,
:switch => 0,
},
105 => {
:name => "Light Armor 2",
:type => :armor,
:cost => 35,
:level => 2,
:unlocks => [22,27],
:file_name => "metal",
:erase => false,
:switch => 0,
},
106 => {
:name => "Light Armor 3",
:type => :armor,
:cost => 45,
:level => 3,
:unlocks => [23,28],
:file_name => "metal",
:erase => false,
:switch => 0,
},
107 => {
:name => "Light Armor 4",
:type => :armor,
:cost => 55,
:level => 4,
:unlocks => [24,29],
:file_name => "metal",
:erase => false,
:switch => 0,
},
108 => {
:name => "Light Armor 5",
:type => :armor,
:cost => 65,
:level => 5,
:unlocks => [25,30],
:file_name => "metal",
:erase => false,
:switch => 0,
},
109 => {
:name => "Heavy Armor 1",
:type => :armor,
:cost => 25,
:level => 1,
:unlocks => [31,36],
:file_name => "helmet",
:erase => false,
:switch => 0,
},
110 => {
:name => "Heavy Armor 2",
:type => :armor,
:cost => 35,
:level => 2,
:unlocks => [32,37],
:file_name => "helmet",
:erase => false,
:switch => 0,
},
111 => {
:name => "Heavy Armor 3",
:type => :armor,
:cost => 45,
:level => 3,
:unlocks => [33,38],
:file_name => "helmet",
:erase => false,
:switch => 0,
},
112 => {
:name => "Heavy Armor 4",
:type => :armor,
:cost => 55,
:level => 4,
:unlocks => [34,39],
:file_name => "helmet",
:erase => false,
:switch => 0,
},
113 => {
:name => "Heavy Armor 5",
:type => :armor,
:cost => 65,
:level => 5,
:unlocks => [35,40],
:file_name => "helmet",
:erase => false,
:switch => 0,
},
114 => {
:name => "Shields 1",
:type => :armor,
:cost => 25,
:level => 1,
:unlocks => [41,46],
:file_name => "shield",
:erase => false,
:switch => 0,
},
115 => {
:name => "Shields 2",
:type => :armor,
:cost => 35,
:level => 2,
:unlocks => [42,47],
:file_name => "shield",
:erase => false,
:switch => 0,
},
116 => {
:name => "Shields 3",
:type => :armor,
:cost => 45,
:level => 3,
:unlocks => [43,48],
:file_name => "shield",
:erase => false,
:switch => 0,
},
117 => {
:name => "Shields 4",
:type => :armor,
:cost => 55,
:level => 4,
:unlocks => [44,49],
:file_name => "shield",
:erase => false,
:switch => 0,
},
118 => {
:name => "Shields 5",
:type => :armor,
:cost => 65,
:level => 5,
:unlocks => [45,50],
:file_name => "shield",
:erase => false,
:switch => 0,
},
119 => {
:name => "Accessories 1",
:type => :access,
:cost => 25,
:level => 1,
:unlocks => [51,56],
:file_name => "ring",
:erase => false,
:switch => 0,
},
120 => {
:name => "Accessories 2",
:type => :access,
:cost => 35,
:level => 2,
:unlocks => [52,57],
:file_name => "ring",
:erase => false,
:switch => 0,
},
121 => {
:name => "Accessories 3",
:type => :access,
:cost => 45,
:level => 3,
:unlocks => [53,58],
:file_name => "ring",
:erase => false,
:switch => 0,
},
122 => {
:name => "Accessories 4",
:type => :access,
:cost => 55,
:level => 4,
:unlocks => [54,59],
:file_name => "ring",
:erase => false,
:switch => 0,
},
123 => {
:name => "Accessories 5",
:type => :access,
:cost => 65,
:level => 5,
:unlocks => [55,60],
:file_name => "ring",
:erase => false,
:switch => 0,
},
124 => {
:name => "Pharmacology",
:type => :augment,
:cost => 25,
:level => 1,
:unlocks => 1,
:file_name => "pt",
:erase => false,
:switch => 0,
:description => "Items are more effective."
},
125 => {
:name => "Pharmacology",
:type => :augment,
:cost => 35,
:level => 1,
:unlocks => 2,
:file_name => "pt",
:erase => false,
:switch => 0,
:description => "Items are more effective."
},
126 => {
:name => "Pharmacology",
:type => :augment,
:cost => 45,
:level => 1,
:unlocks => 3,
:file_name => "pt",
:erase => false,
:switch => 0,
:description => "Items are more effective."
},
127 => {
:name => "Battle Lore",
:type => :augment,
:cost => 35,
:level => 1,
:unlocks => 4,
:file_name => "atk",
:erase => false,
:switch => 0,
:description => "Deals more physical damage in battle."
},
128 => {
:name => "Battle Lore",
:type => :augment,
:cost => 50,
:level => 1,
:unlocks => 5,
:file_name => "atk",
:erase => false,
:switch => 0,
:description => "Deals more physical damage in battle."
},
129 => {
:name => "Battle Lore",
:type => :augment,
:cost => 70,
:level => 1,
:unlocks => 6,
:file_name => "atk",
:erase => false,
:switch => 0,
:description => "Deals more physical damage in battle."
},
130 => {
:name => "Viglance",
:type => :augment,
:cost => 80,
:level => 1,
:unlocks => 7,
:file_name => "eva",
:erase => false,
:switch => 0,
:description => "Prevents being supprised by enemies."
},
131 => {
:name => "Belias",
:type => :esper,
:cost => 10,
:level => 9,
:unlocks => [11],
:file_name => "special",
:erase => true,
:switch => 1,
},
132 => {
:name => "Elementalize",
:type => :ability,
:cost => 60,
:level => 8,
:unlocks => [76,77,78],
:file_name => "skill",
:erase => false,
:switch => 0,
},
}

end
end
#==============================================================================
# Editing beyond this point may cause stone, zombie, mist frenzy, and/or toad,
# so edit at your own risk.
#==============================================================================
module CRYSTAL
module REGEXP
module ACTOR

MINI_FACE = /<(?:MINI_FACE|Mini Face|mini face):[ ](.*)>/i

QUICKENINGS = /<(?:QUICKENINGS|Quickenings|quickenings):[ ]*(\d+(?:\s*,\s*\d+)*)>/i

SQUARES_UNLOCKED = /<(?:SQUARES_UNLOCKED|Squares Unlocked|squares unlocked):[ ]*(\d+(?:\s*,\s*\d+)*)>/i

LP = /<(?:LP|lp):[ ](\d+)>/i

end
module ENEMY

LP = /<(?:LP|lp):[ ](\d+)>/i

end
end
end
module CRYSTAL
module CHECK
#--------------------------------------------------------------------------
# * Checks if you have a certain script installed
#--------------------------------------------------------------------------
def self.require(self_name, script, site = "http://crystalnoel42.wordpress.com")
unless $imported["CE-BasicModule"]
msg = "The script '#{self_name}' requires the latest\n"
msg += "version of 'Crystal Engine - Basic Module' to work properly\n"
msg += "Go to http://crystalnoel42.wordpress.com/ to download this script."
raise SyntaxError.new(msg)
end
unless $imported[script]
msg = "The script '#{self_name}' requires the latest\n"
msg += "version of #{scripts_list(script)} to work properly\n"
msg += "Go to #{site} to download this script."
raise SyntaxError.new(msg)
end
end
end
end
CRYSTAL::CHECK.require("Crystal Engine - Licence Board", "CE-BasicModule")
#==============================================================================
# ** DataManager
#------------------------------------------------------------------------------
# This module manages the database and game objects. Almost all of the
# global variables used by the game are initialized by this module.
#==============================================================================

module DataManager
#--------------------------------------------------------------------------
# * Load Database
#--------------------------------------------------------------------------
class << self; alias load_database_lb load_database; end
def self.load_database
load_database_lb
create_board
position_board
$lb_current_tile = CRYSTAL::LICENCE::STARTING_TILE
load_notetags_lb
end
#--------------------------------------------------------------------------
# * Create the Licence Board Data
#--------------------------------------------------------------------------
def self.create_board
$augments = []
$licence_board = [nil]
for i in 1..CRYSTAL::LICENCE::SQUARES.size
square = CRYSTAL::LICENCE::SQUARES[i]
$licence_board.push(Game_Square.new(i,square))
end
end
#--------------------------------------------------------------------------
# * Place the Licence Board Data in Order
#--------------------------------------------------------------------------
def self.position_board
$lb_layout = []
for square in $licence_board
next if square.nil?
$lb_layout[square.x] ||= []
$lb_layout[square.x][square.y] = square
end
end
#--------------------------------------------------------------------------
# * Loads the Notetags to Script
#--------------------------------------------------------------------------
def self.load_notetags_lb
groups = [$data_actors, $data_enemies]
for group in groups
for obj in group
next if obj.nil?
obj.load_notetags_lb
end
end
end
end
#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
# This class performs save screen processing.
#==============================================================================

class Scene_Save < Scene_File
#--------------------------------------------------------------------------
# * Confirm Save File
#--------------------------------------------------------------------------
alias on_savefile_ok_lb on_savefile_ok
def on_savefile_ok
$game_actors[1].preserve_data
on_savefile_ok_lb
end
end
#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
# This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
#--------------------------------------------------------------------------
# * Confirm Save File
#--------------------------------------------------------------------------
alias on_savefile_ok_lb on_savefile_ok
def on_savefile_ok
on_savefile_ok_lb
$augments = $game_actors[1].augments
$licence_board = $game_actors[1].licence_board
$lb_layout = $game_actors[1].lb_layout
$lb_current_tile = $game_actors[1].lb_current_tile
end
end
#==============================================================================
# ** RPG::Actor
#------------------------------------------------------------------------------
# This is the data class for actors.
#==============================================================================

class RPG::Actor < RPG::BaseItem
#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :mini_face
attr_accessor :squares_unlocked
attr_accessor :lp
attr_accessor :quickenings
#--------------------------------------------------------------------------
# * Get the Mini Face from Notes
#--------------------------------------------------------------------------
def load_notetags_lb
@mini_face = ""
@squares_unlocked = []
@lp = 0
@quickenings = []
#---
self.note.split(/[\r\n]+/).each { |line|
case line
#---
when CRYSTAL::REGEXP::ACTOR::MINI_FACE
@mini_face = $1
when CRYSTAL::REGEXP::ACTOR::QUICKENINGS
$1.scan(/\d+/).each { |num|
@quickenings.push($data_skills[num.to_i]) if num.to_i >= 0 }
when CRYSTAL::REGEXP::ACTOR::SQUARES_UNLOCKED
$1.scan(/\d+/).each { |num|
@squares_unlocked.push(num.to_i) if num.to_i >= 0 }
when CRYSTAL::REGEXP::ACTOR::LP
@lp = $1.to_i
#---
end
} # self.note.split
#---
end
end
#==============================================================================
# ** RPG::Enemy
#------------------------------------------------------------------------------
# This is the data class for enemies.
#==============================================================================

class RPG::Enemy < RPG::BaseItem
#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :lp
#--------------------------------------------------------------------------
# * Get the Mini Face from Notes
#--------------------------------------------------------------------------
def load_notetags_lb
@lp = CRYSTAL::LICENCE::DEFUALT_LP_YIELD
#---
self.note.split(/[\r\n]+/).each { |line|
case line
#---
when CRYSTAL::REGEXP::ENEMY::LP
@lp = $1.to_i
#---
end
} # self.note.split
#---
end
end
#==============================================================================
# ** Cache
#------------------------------------------------------------------------------
# This module loads graphics, creates bitmap objects, and retains them.
# To speed up load times and conserve memory, this module holds the
# created bitmap object in the internal hash, allowing the program to
# return preexisting objects when the same bitmap is requested again.
#==============================================================================

module Cache
#--------------------------------------------------------------------------
# * Get Licence Board Graphic
#--------------------------------------------------------------------------
def self.licence_file(folder, filename)
file = "Graphics/"
file += CRYSTAL::LICENCE::FOLDER
file += "/"
file += folder
file += "/"
load_bitmap(file, filename)
end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles actors. It is used within the Game_Actors class
# ($game_actors) and is also referenced from the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :mini_face # Mini Face Graphic
attr_accessor :squares_visible # Visible Squares on the Licence Board
attr_accessor :squares_unlocked # Squares Opened up on the Licence Board
attr_accessor :licences # Licences Obatiained from the Board
attr_accessor :lp # Licence Points
attr_accessor :background # Background for Licence Board
attr_accessor :espers # All the Espers Obtained
attr_accessor :quickenings # The Quickenings Obtained
attr_accessor :quicks_learned # The Number of Quickeings Learned
attr_accessor :augments # The Global Variable for Augments
attr_accessor :licence_board # The Global Variable for the LB
attr_accessor :lb_layout # The Global Variable for the LB's Layout
attr_accessor :lb_current_tile # The Global Variable for the LB's Current Tile
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias lb_initialize initialize
def initialize(actor_id)
@licences_set = false
init_licences
lb_initialize(actor_id)
@espers = []
@quicks_learned = 0
@quickenings = actor.quickenings
@mini_face = actor.mini_face
@squares_unlocked = []
actor.squares_unlocked.each { |num|
@squares_unlocked.push($licence_board[num]) if num >= 0 }
@squares_visible = @squares_unlocked.clone
for square in @squares_unlocked
squares = $licence_board[square.id].surrounding_squares(id)
@squares_visible.concat squares
end
for square in @squares_unlocked
square.active[@actor_id] = true
end
add_init_licences
@licences_set = true
init_equips(actor.equips)
@lp = actor.lp
@lp += CRYSTAL::LICENCE::DEBUG_LP if $TEST
@background = CRYSTAL::LICENCE::BACKDROPS[0]
@background = CRYSTAL::LICENCE::BACKDROPS[id] unless CRYSTAL::LICENCE::BACKDROPS[id].nil?
end
#--------------------------------------------------------------------------
# * Licence Initialization
#--------------------------------------------------------------------------
def init_licences
@licences = {}
@licences[:skills] = []
@licences[:weapons] = []
@licences[:armors] = []
unless CRYSTAL::LICENCE::REQUIRES_LICENCE["Skills"]
for skill in $data_skills
@licences[:skills].push(skill)
end
end
unless CRYSTAL::LICENCE::REQUIRES_LICENCE["Weapons"]
for i in 1...$data_weapons.size
weapon = $data_weapons[i]
@licences[:weapons].push(weapon)
end
end
unless CRYSTAL::LICENCE::REQUIRES_LICENCE["Armors"]
for i in 1...$data_armors.size
armor = $data_armors[i]
case armor.etype_id
when 4
#do nothing
else
@licences[:armors].push(armor)
end
end
end
unless CRYSTAL::LICENCE::REQUIRES_LICENCE["Accessories"]
for i in 1...$data_armors.size
armor = $data_armors[i]
case armor.etype_id
when 4
@licences[:armors].push(armor)
end
end
end
end
#--------------------------------------------------------------------------
# * Add Pre-Unlocked Licences
#--------------------------------------------------------------------------
def add_init_licences
for square in @squares_unlocked
case square.type
when :magic
for skill in square.unlocks
@licences[:skills].push(skill)
end
when :ability
for skill in square.unlocks
@licences[:skills].push(skill)
end
when :weapon
for weapon in square.unlocks
@licences[:weapons].push(weapon)
end
when :armor
for armor in square.unlocks
@licences[:armors].push(armor)
end
when :access
for armor in square.unlocks
@licences[:armors].push(armor)
end
when :augment
$augments[square.unlocks][id] = true
when :esper
for i in square.unlocks
@espers.push($game_actors[i])
end
when :quick
for i in @quickenings
unless skill_learn?($data_skills[i])
@quicks_learned += 1
learn_skill(i)
@licences[:skills].push($data_skills[i])
if @quicks_learned == @quickenings.size
square.clear_all_mist_licences(actor_id)
end
return
end
end
end
end
end
#--------------------------------------------------------------------------
# * Remove Equipment that Cannot Be Equipped
# item_gain: Return removed equipment to party.
#--------------------------------------------------------------------------
alias licence_unequip release_unequippable_items
def release_unequippable_items(item_gain = true)
return unless @licences_set
licence_unequip(item_gain)
end
#--------------------------------------------------------------------------
# * Does this Actor use the Board
#--------------------------------------------------------------------------
def board_actor?
CRYSTAL::LICENCE::BOARD_ACTORS.include?(id)
end
#--------------------------------------------------------------------------
# * Get Skill Object Array
#--------------------------------------------------------------------------
alias all_skills skills
def skills
return all_skills if $BTEST
return all_skills unless board_actor?
set = []
for skill in @licences[:skills]
set.push(skill) if skill_learn?(skill)
end
return set
end
#--------------------------------------------------------------------------
# * Determine if Equippable
#--------------------------------------------------------------------------
alias lb_equippable? equippable?
def equippable?(item)
return lb_equippable?(item) if $BTEST
return lb_equippable?(item) unless board_actor?
return false unless item.is_a?(RPG::EquipItem)
return false if equip_type_sealed?(item.etype_id)
if CRYSTAL::LICENCE::EQUIPMENT_REQUIRE_NORMAL_CONDITION
if item.is_a?(RPG::Weapon)
for weapon in @licences[:weapons]
return lb_equippable?(item) if item.id == weapon.id
end
end
if item.is_a?(RPG::Armor)
for armor in @licences[:armors]
return lb_equippable?(item) if item.id == armor.id
end
end
else
if item.is_a?(RPG::Weapon)
for weapon in @licences[:weapons]
return lb_equippable?(item) if item.id == weapon.id
end
end
if item.is_a?(RPG::Armor)
for armor in @licences[:armors]
return lb_equippable?(item) if item.id == armor.id
end
end
end
return false
end
#--------------------------------------------------------------------------
# * Determine if has Augment
#--------------------------------------------------------------------------
def augment?(aug_id)
return false if $augments.nil?
return $augments[aug_id][id]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
alias lb_refresh refresh
def refresh
lb_refresh
return if @lp.nil?
@lp = [[@lp, 999999].min, 0].max
end
#--------------------------------------------------------------------------
# * Preverves the Licence Board Data
#--------------------------------------------------------------------------
def preserve_data
@augments = $augments
@licence_board = $licence_board
@lb_layout = $lb_layout
@lb_current_tile = $lb_current_tile
end
end
if $imported["YSE-GuardianSummon"] && CRYSTAL::LICENCE::ESPER_LICENCE_FOR_SUMMON
#==============================================================================
# ¡ Window_BattleSummon
#==============================================================================

class Window_BattleSummon < Window_MenuGuardian
#------------------------------------------