· 8 years ago · Mar 27, 2018, 03:44 AM
1import math
2from tkinter import *
3from functools import partial
4import random
5import colorsys
6from tkinter import filedialog
7
8
9root = Tk()
10root.title("Orange Isles Generator")
11root.geometry("455x640")
12root.maxsize(455, 680)
13root.minsize(455, 680)
14
15#CHAR formating guide [Str, dex, con, kha, psy, will, height?, class1, class2, spec1, spec2, level]
16# 0 1 2 3 4 5 6 7 8 9 10 11
17
18classList = ["This should not appear", "Jinn", "Mugen", "Iato" , "Ninja", "Ekko Ikki", "Sumo", "Arquebusier", "Mushishi", "Alchemist", "Miko"]
19
20BlankList = ["","",""]
21JinnList = ["Blademastery","Hamon","Agility"]
22MugenList = ["Nitoryu","Ferocity","Instinct"]
23IatoList = ["Skirmish","Yoichi","Battlecry"]
24NinjaList = ["Taijutsu","Genjutsu","Ninjitsu"]
25EkkoList = ["Quarterstaff","Kung-fu","Discipline"]
26SumoList = ["Grapple","Tank","Enlightenment"]
27ArquibusierList = ["Precision","Tinker","Demolition"]
28MushishiList = ["Music","Handling","Empathy"]
29RenkenjutsushiList = ["Renkenjutsushi","Chemistry","Shikigami"]
30MikoList = ["Chakra","Deism","Soul"]
31
32
33
34JinnDisc = "Jinn are quick on their feet and prefer to use two-handed weapons to end battles quickly and decisively with critical hits. Some Jinn practice Hamon, a type of Breath magic. \n +2 Dex, +1 Str"
35MugenDisc = "Typical Shonin protagonists, Mugen are known to fight with their animal senses and prefer the more emotional, aggressive combat style of tapping into their feral emotions in battle. \n+2 Str, +1 Dex"
36IatoDisc = "Soldiers, formidable with a spear or bow, these warriors and hone their voices to be used in powerful shouts, and are a favorite of professional militaries. \n+1 Str, +1 Dex, +1 Con"
37NinjaDisc = "Ninja attack precisely, efficiently, and stealthily using daggers, throwing weapons, and magically augmented combat abilities called Jutsus invoked silently using hand-signs. \n+2 Dex, +1 Kha"
38EkkoDisc = "Warrior-Monks of the Futamachi tradition. Ekko Ekki hone their bodies and souls as weapons through rigorous training and discipline. \n\n+1 Str, +1 Con, +1 Will"
39SumoDisc = "Huge in size, unmatched in stamina. Many of these heavy warriors are powerhouses of grappling, while others prefer simple tea and frequent meditation. \n+2 Con, +1 Str"
40ArquibusierDisc = "Focused minds dwell on the more practical side of nature. Hunters, trappers, and demolitionists use their wits to get the job done right. \n\n+2 Psy, +1 Dex"
41MushishiDisc = "Lovers of music and nature, Mushishi are found traveling the lands with strange musical instruments and even stranger companions. \n\n+2 Will, +1 Kha"
42RenkenjutsushiDisc = "Lovers of old scrolls and rare wisdoms, these Alchemists study the strangeness of nature, ancient writings, and potent chemicals. \n\n+2 Psy, +1 Kha"
43MikoDisc = "Powerfull sorcerers, the Miko usually live cloistered in temples and shrines collecting fans and talismans with which to channel energies and commune with spirits. \n+2Kha, +1 Psy"
44
45MetaDisc=["" , JinnDisc, MugenDisc, IatoDisc, NinjaDisc, EkkoDisc, SumoDisc, ArquibusierDisc, MushishiDisc, RenkenjutsushiDisc, MikoDisc]
46
47Disc11 = "Showdown Jinn: (+1 Str)\nJinn who chose to master the blade favor the powerful and accurate strikes of a two-handed katana. This school of martial arts focuses on careful preparation and devastating critical hits, it teaches that the best fight is the shortest one. Masters of these teachings are often found in the courts of nobles as bodyguards, or as personal executioners."
48Disc12 = "Hamon Jinn: (+1 Psy)\nMost often found alone sipping tea or meditating beneath waterfalls, these wanderers exercise superhuman control of their breath through intense inner focus. Through these breath arts, some are able to step beyond their normal physical limits, stopping their own heartbeat, staving off death for a time, or harnessing spiritual powers. Some exceptional Hamon users even use their breath control arts to breathe fire, or inhale magical energy."
49Disc13 = "Agility Jinn: (+1 Dex)\nLightning on their feet and almost never taken by surprise, these acrobats maneuver themselves out of the way of harm, weaving in and out of combat, or jumping from rooftop to rooftop. It is said that a man may strike the air in a fit of rage a dozen times, but he if the air strikes him back he will know that he has met with a student of Agility."
50
51Disc21 = "Nitoryu Mugen: (+1 Str)\nSome say that the Nitoryu's dual-sword style is outright reckless, but Nitoryu usually respond to this criticism with wisdom of their own like, \"The best defense is a good offense\", and \" Eh?! I don't get it? Screw this! I'm all in!\". What separates good Nitoyu from bad ones is the number of mornings they wake up say such things. If one is looking for a, Nitoyu (professional or otherwise) they can typically be found congregating in bars and gambling houses."
52Disc22 = "Ferocity Mugen: (+1 Kha)\nThose born with fire in their hearts and lightning in their eyes are good candidates to become these ill-tempered warriors. Ferocity Mugen fight in a rage, enhancing their physical and magical abilities by building up a bloodlust through acts of violence. Once in a frenzy, these Berzerkers are unmatched in single combat, gaining additional attributes, regenerative abilities, and in rare cases, even vampiric powers."
53Disc23 = "Instinct Mugen: (+1 Dex)\nPhrases like \"Crouching tiger, hidden dragon.\", and \"Float like a butterfly, sting like a bee.\" capture the spirit of the Instinct Mugen. These warriors are in tune with the animalistic side of their emotions and senses, granting them superhuman abilities to do things such as smell poisons, react with cat-like reflexes, or even transform their bodies. Some masters of instinct embrace their feral side so fully that they are able to transform entirely."
54
55Disc31 = "Skirmish Iato: (+1 Str)\nAs professional soldiers, the skirmishers train for hours in heavy armor to build up their stamina for roles in the military. This military school trains soldiers in the use of battle-tactics, warglave combat, and the trades of war such as manufacturing bandages, weapons, and armor, as well as other war-time nessicaries such as as ship-building, and military strategy. Masters of the skirmish offten find their place beside great lords as generals and military leaders."
56Disc32 = "Yoichi Iato: (+1 Dex)\nThe Yoichi bow is a specialized tool of war. In addition to deadly arrows, these greatbows are most known for their utility in for launching grappleing hooks, signal flairs, and other specialized projectiles. Members of the Yoichi special division also master wildlands survival skills, mountaineering, and sailing, making these versitile rangers at home wherever their ranging takes them."
57Disc33 = "Battlecry Iato: (+1 Will)\nThose who practice the Battlecry train in the ancient art of Thu’um, handed down from Table Mountain. Warriors of this proud school hone their voices to perform chants, shouts, and words of power, which bolster allies, hinder foes, and call forth elemental spirits. Iato who practice these magical shouts are favored as officers in the army due to their ability to give orders on large battlefields and their area-of-effect abilities."
58
59Disc41 = "Taijutsu Ninja: (+1 Str)\nTaijutsu refers to the school of Ninja techniques focused on martial arts, and chakra within the body. Taijutsu techniques concentrate one's chakra within the body to improve hand-to-hand combat and physical abilities. Some practitioners of Taijutsu can move with superhuman strength and speed, while others have the ability to manipulate the chakra in others bodies to unlock hidden potential, cause disabilities, or even instant death."
60Disc42 = "Genjutsu Ninja: (+1 Dex)\nGenjutsu is the practice of decepton, trickery, stealth, and Illusion. Practitioners of Genjutsu prefer the tactics of ambush, staying hidden to direct confrontation. Their weapons of choice are daggers sharp enough to be deadly at close range or when thrown. Masters of Genjutsu are deadly assassins with the ability to create illusions, become invisible, or change places with shadows. No supprise then that those who openly practice Genjutsu are often feared and mistrusted."
61Disc43 = "Ninjutsu Ninja: (+1 Kha)\nNinjutsu practitioners use hand-signs to silently weave spells with one or two hands. These signs allow deciples of Ninjutsu to preform cantrips of magic such as shooting flames, summoning bees, binding foes, picking locks, silencing their steps and much more. Ninjutsu is a specialized silent form of dexterity based spell-casting, sacrificing the complexity and flexability of other types of spellcasting for quietness and speed."
62
63Disc51 = "Quarterstaff Ekko Ikki: (+1 Str)\nWarrior monks who train in the martial art of the Quarterstaff. Those who practice with this weapon become experts at the controlling space around themselves with the reach of their staff, delivering sweeps, slams, stuns, while also keeping light enough on their feet to shift between different combat stances when the circumstances of combat require it. An expert with a quarterstaff is a flexible presence on the battlefield, exerting control at every range."
64Disc52 = "Kung-Fu Ekko Ikki: (+1 Dex)\nClosed Fist, Crane style, Drunken Fist Boxing, Jeet-Kun-Do, Path of the Dragon. Many traditions of Kung-fu martial arts exist, but taken together all of these traditions place an emphasis on evasion and unarmed combat. Masters of this field often go on to found Do-jo's to create their own styles, or to travel the land competeing in tournements. A practitioner of Kung-fu will surely find a home away from home as well as an eager teacher at any of these Do-jo's."
65Disc53 = "Discipline Ekko Ikki: (+1 Con)\nA walk of life for those with iron will, and leather skin. Traits like self-dicipline, endurence, and the ability to ignore pain are the hallmark of these resiliant monks who train from a young age to preform feats of endurance like walking on hot coals, or balancing their weight on the point of a spear. Discipline monks wear no armor, but train to be resistant to bleding, poisons, sickness, cold, and magic."
66
67Disc61 = "Grapple Sumo: (+1 Str)\nDecending from an ancient form of cerimonial grappling combat, modern Sumo grappling has come a long way from its roots thanks to the Sumo Dojo in Southport. The techniques taught there emphisize the more practical aspects of heavy-weight unarmed grappling using grabs, throws, and pins as a form of self-defense. Sumo grappling techniques are usually non-leathal but are never-the-less very effective at subduing single opponents."
68Disc62 = "Tank Sumo: (+1 Con)\nThe hardiest and heaviest of Sumo fighters who speciialize in damage reduction are Tanks. By assuming their traditional battle-squat, Tank Sumos are able to reduce incoming damage by half. Tanks also often train in heavy armor, and practice techniques to further reduce damage by dexterously staggering it out over time. Being a heavy-weight dosen't come cheap, though! Tank Sumos are notorious for their appitites for food."
69Disc63 = "Enlightenment Sumo: (+1 Psy)\nA love of peace, hearty food, and inner happieness come to those who open their third-eye to the soul of the world. Some call these jolly fat giants hedonists, but their persuits lie higher than mere corporial pleasure. The ability to astrally project, see through the eyes, or into the hearts of others, as well as preforming healing magic and cooking excelent meals are the domain of those who walk the path to Enlightenment."
70
71Disc71 = "Precision Arquebusier: (+1 Psy)\nA relitively new technology brought over by sea from the elven city of Kryx by way of Gaug in the west. Though some manufacture of these firearms exists domestically now, the equipment to manufacture componants for these weapons is still relitively rare. Still, the efficacy of these weapons, especially against armor, is unquestionable. Cannons, rifles, pistols and blunderbusses, deal tremendous damage - even if they can't quickly be reloaded."
72Disc72 = "Tinker Arquebusier: (+1 Dex)\nQuick with their heads and hands, the Tinker fancies contraptions as a way of life. Some Tinkers perfer spike traps, spring locks, pitfalls and snares as a means of hunting food, while others find work in cities as watchmakers, or on large-scale urban development projects such as dams and windmills. Some have even taken their tinkering so far as the battlefield, becoming indispensable to generals - designing ships, forts, catapults, and cannons. "
73Disc73 = "Demolition Arquebusier: (+1 Kha)\nOne crossed wire, one wayward pinch of potassium chlorate, one errant twitch... and KABLOOIE! These engineres of destruction often meet their end at their own hands rather than my means of another, but they would have it no other way. For those willing to chance accedential self-immolation, the path of the demolitionist has its perks. From fireworks to frag-grenades spectacular explosions abound for those who dare to chance life in the fast-lane."
74
75Disc81 = "Music Mushishi: (+1 Psy)\nSingers and dancers who know how to carry a tune. These musicians don't just compose and play songs, they are able to imbue their music with magical effects. Healing, causing/curing drowsiness, inspiring courage, or just making merry - the magical music of the Mushishi makes him a faveorite at bars, inns, or in royal courts. Some stories even tell of legendary songs with the power to bewitch demons, raise the dead, or turn every-day people into great heroes."
76Disc82 = "Handling Mushishi: (+1 Kha)\nPied-pipers who, rather than relying on their ability as musicians - rely on Yokai, magical spirits found outside of cities. Handling Yokai requires extensive knowledge of the myriad species of spiritual fauna and the specific instruments that bewitch each of them, but an expert Handler with the right tools can turn any wild spirit into a friend, ally, or tool. Skilled handlers are able to amplify the abilities of their pets by channeling their own magic through them."
77Disc83 = "Empathy Mushishi: (+1 Will)\nThese Mushishi are natural empaths, able to sense the emotions of creatures. Because of this, often empathic Mushishi will go out of their way to help those in distress. By projecting their own emotions skilled Empathists are able to preform beneficial magic like pain-split, redirect-harm, and soothe. But emotion is not always positive, causing berzerking, dread and wracking-pains are also in the toolkit of the empathist that chooses to embrace the negitive side of emotions."
78
79Disc91 = "Renkenjustushi Alchemist: (+1 Kha)\nManufacturing enchanted scripts, talismans, and wards is the domain of the Renkenjutsushi who use their brushes to practice this form of magical caligraphy. A Renkenjutsushi learns to store spells such as exploding fireballs, paralyzing runes or soul-traping wards in carefully prepaired runes which can be activated upon being read, opened, or invoked. "
80Disc92 = "Chemistry Alchemist: (+1 Con)\n"
81Disc93 = "Shikigami Alchemist: (+1 Psy)\n"
82
83Disc101 = "Chakra Miko: (+1 Kha)\n"
84Disc102 = "Deism Miko: (+1 Will)\n"
85Disc103 = "Soul Miko: (+1 Psy)\n"
86
87DiscList = [Disc11,Disc12,Disc13,Disc21,Disc22,Disc23,Disc31,Disc32,Disc33,Disc41,Disc42,Disc43,Disc51,Disc52,Disc53,Disc61,Disc62,Disc63,Disc71,Disc72,Disc73,Disc81,Disc82,Disc83,Disc91,Disc92,Disc93,Disc101,Disc102,Disc103]
88
89
90
91def LoadChar():
92
93 filepath = filedialog.askopenfilename(initialdir = "/characters",title = "Select file",filetypes = (("txt files","*.txt"),("all files","*.*")))
94 if filepath != '':
95 file = open(filepath, 'r')
96 string = file.read()
97 string = string[1:-1]
98 splitstring = string.split(", ")
99 CHAR = list(map(int, splitstring))
100 file.close()
101
102 drawStats(CHAR)
103
104 return CHAR
105
106def rgb_to_hex(red, green, blue):
107 return '%02x%02x%02x' % (red, green, blue)
108
109def Clear(CHAR):
110 clearSpec(CHAR)
111 clearClass(CHAR)
112
113 CHAR[0] = 0
114 CHAR[1] = 0
115 CHAR[2] = 0
116 CHAR[3] = 0
117 CHAR[4] = 0
118 CHAR[5] = 0
119 CHAR[6] = 0
120 CHAR[7] = 0
121 CHAR[8] = 0
122 CHAR[9] = 0
123 CHAR[10] = 0
124 CHAR[11] = 1
125
126 drawStats(CHAR)
127 return(CHAR)
128
129
130
131def clearSpec(CHAR):
132 CHAR[9]=0
133 CHAR[10]=0
134 buttonSpec11.config(text="")
135 buttonSpec12.config(text="")
136 buttonSpec13.config(text="")
137 buttonSpec21.config(text="")
138 buttonSpec22.config(text="")
139 buttonSpec23.config(text="")
140 releaseSpec1()
141 releaseSpec2()
142
143def clearClass(CHAR):
144 button1C1.config(relief="raised")
145 button1C2.config(relief="raised")
146 button1C3.config(relief="raised")
147 button1C4.config(relief="raised")
148 button1C5.config(relief="raised")
149 button1C6.config(relief="raised")
150 button1C7.config(relief="raised")
151 button1C8.config(relief="raised")
152 button1C9.config(relief="raised")
153 button1C10.config(relief="raised")
154 button2C1.config(relief="raised")
155 button2C2.config(relief="raised")
156 button2C3.config(relief="raised")
157 button2C4.config(relief="raised")
158 button2C5.config(relief="raised")
159 button2C6.config(relief="raised")
160 button2C7.config(relief="raised")
161 button2C8.config(relief="raised")
162 button2C9.config(relief="raised")
163 button2C10.config(relief="raised")
164 clearSpec(CHAR)
165 CHAR[7]=0
166 CHAR[8]=0
167 CHAR[9]=0
168 CHAR[10]=0
169
170
171def randomCHAR(CHAR):
172 randomClass(CHAR)
173 randomStats(CHAR)
174
175def ExportStats(CHAR):
176
177 def saveChar(CHAR):
178 name = exportEntryBox.get()
179 if name == "":
180 return
181 else:
182 SaveFile = open("characters/" + name + ".txt","w")
183 SaveFile.write(str(CHAR))
184
185 SaveFile.close()
186 exportWindow.destroy()
187 return
188
189 exportWindow = Toplevel()
190
191 exportEntryBox = Entry(exportWindow)
192 exportEntryButton = Button(exportWindow, width = 14, text = "Save", command = partial(saveChar, CHAR))
193
194 exportEntryBox.grid(column = 0, row = 0, padx = 4, pady = 4)
195 exportEntryButton.grid(column = 0, row = 1, padx = 4, pady = 4)
196
197 #exportWindow.bind('<Return>', saveChar(CHAR))
198 exportEntryBox.focus_set()
199
200
201def drawStats(CHAR):
202
203 LV = CHAR[11]
204 ClassBonus1 = CB1(CHAR)
205 ClassBonus2 = CB2(CHAR)
206
207 STR = str(CHAR[0]+((LV-1)*3)+(LV*(ClassBonus1[0]+ClassBonus2[0])))
208 DEX = str(CHAR[1]+((LV-1)*3)+(LV*(ClassBonus1[1]+ClassBonus2[1])))
209 CON = str(CHAR[2]+((LV-1)*3)+(LV*(ClassBonus1[2]+ClassBonus2[2])))
210 KHA = str(CHAR[3]+((LV-1)*3)+(LV*(ClassBonus1[3]+ClassBonus2[3])))
211 PSY = str(CHAR[4]+((LV-1)*3)+(LV*(ClassBonus1[4]+ClassBonus2[4])))
212 WILL = str(CHAR[5]+((LV-1)*3)+(LV*(ClassBonus1[5]+ClassBonus2[5])))
213
214 realHeight =((((int(STR)+int(CON))/2)-11)+70)
215 heightFeet = math.floor(realHeight/12)
216 heightInches = math.floor(realHeight%12)
217 HeightString = str(heightFeet) + "'" + str(heightInches) + "\'\'"
218
219 WeightMod = ((int(CON))-(int(DEX)+int(STR))/2)*7
220 Weight = math.floor((realHeight*4)-80+WeightMod)
221 WeightString = str(Weight) + " lb."
222
223
224 FORCE = str(round((((int(STR)**2)/10)**1.25)))
225
226 WFORCE = str(round((((int(int(STR)+CHAR[6])**2)/10)**1.25)))
227 HEALTH = str(round((10**(0.1*int(CON))+(10*int(CON)))))
228
229
230
231 StatsLabel1.config(text= "Str:\t" + STR + "\t(" + str(CHAR[0]+(LV-1)*3) + "+" + str(LV*(ClassBonus1[0]+ClassBonus2[0])) + ")")
232 StatsLabel2.config(text= "Dex:\t" + DEX + "\t(" + str(CHAR[1]+(LV-1)*3) + "+" + str((LV*(ClassBonus1[1]+ClassBonus2[1]))) + ")")
233 StatsLabel3.config(text= "Con:\t" + CON + "\t(" + str(CHAR[2]+(LV-1)*3) + "+" + str((LV*(ClassBonus1[2]+ClassBonus2[2]))) + ")")
234 StatsLabel4.config(text= "Kha:\t" + KHA + "\t(" + str(CHAR[3]+(LV-1)*3) + "+" + str((LV*(ClassBonus1[3]+ClassBonus2[3]))) + ")")
235 StatsLabel5.config(text= "Psy:\t" + PSY + "\t(" + str(CHAR[4]+(LV-1)*3) + "+" + str((LV*(ClassBonus1[4]+ClassBonus2[4]))) + ")")
236 StatsLabel6.config(text= "Will:\t" + WILL + "\t(" + str(CHAR[5]+(LV-1)*3) + "+" + str((LV*(ClassBonus1[5]+ClassBonus2[5]))) + ")")
237 total = (int(STR)+int(DEX)+int(CON)+int(KHA)+int(PSY)+int(WILL))
238 StatsLabel7.config(text= "Total: \t" + str(total))
239 StatsLabel8.config(text= "" + "Force: " + FORCE ) #+ "(" + WFORCE + ")")
240 StatsLabel9.config(text= "\t " + "HP: " + HEALTH)
241 StatsLabel10.config(text= "\t " + "" + HeightString)
242 StatsLabel11.config(text= "\t " + "" + WeightString)
243 StatsLabel12.config(text= "\t " + "Eye color: ")
244 StatsLabel13.config(text= " ")
245
246 if total <= 30:
247 StatsLabel13.config(bg = 'SystemButtonFace')
248 else:
249 mult = 1
250 magAvg = (int(KHA) + int(WILL) + int(PSY))
251
252 if int(KHA) >= int(WILL):
253 if int(KHA) >= int(PSY):
254 maxStat = int(KHA)
255 else:
256 maxStat = int(PSY)
257 else:
258 if int(PSY) >= int(WILL):
259 maxStat = int(PSY)
260 else:
261 maxStat = int(WILL)
262
263
264 magAvg = maxStat
265
266 colorR = (int(((int(KHA)/magAvg))*255))
267 colorG = (int(((int(WILL)/magAvg))*255))
268 colorB = (int(((int(PSY)/magAvg))*255))
269 eyeColor = "#%02x%02x%02x" % (colorR, colorG, colorB)
270 StatsLabel13.config(bg = eyeColor)
271
272
273 if CON == "0":
274 StatsLabel10.config(text= "\t " + "Height: " + "0'0")
275 StatsLabel11.config(text= "\t " + "Weight: " + "0 lb.")
276
277 writeClassInfo(CHAR)
278 writeSpecInfo(CHAR)
279 drawSpecButtons(CHAR)
280
281 charInfo = [STR, DEX, CON, KHA, PSY, WILL, HeightString, FORCE, WFORCE, HEALTH, CHAR[11]]
282 # 0 1 2 3 4 5 6 7 8 9 10
283 return charInfo
284
285def writeSpecInfo(CHAR):
286
287 if CHAR[7] == 1: #Jinn
288 if CHAR[9] == 0:
289 specDisc1 = DiscList[0]
290 elif CHAR[9] == 1:
291 specDisc1 = DiscList[1]
292 elif CHAR[9] == 2:
293 specDisc1 = DiscList[2]
294 elif CHAR[7] == 2: #Mugen
295 if CHAR[9] == 0:
296 specDisc1 = DiscList[3]
297 elif CHAR[9] == 1:
298 specDisc1 = DiscList[4]
299 elif CHAR[9] == 2:
300 specDisc1 = DiscList[5]
301 elif CHAR[7] == 3: #Iato
302 if CHAR[9] == 0:
303 specDisc1 = DiscList[6]
304 elif CHAR[9] == 1:
305 specDisc1 = DiscList[7]
306 elif CHAR[9] == 2:
307 specDisc1 = DiscList[8]
308 elif CHAR[7] == 4: #Ninja
309 if CHAR[9] == 0:
310 specDisc1 = DiscList[9]
311 elif CHAR[9] == 1:
312 specDisc1 = DiscList[10]
313 elif CHAR[9] == 2:
314 specDisc1 = DiscList[11]
315 elif CHAR[7] == 5: #Ekko
316 if CHAR[9] == 0:
317 specDisc1 = DiscList[12]
318 elif CHAR[9] == 1:
319 specDisc1 = DiscList[13]
320 elif CHAR[9] == 2:
321 specDisc1 = DiscList[14]
322 elif CHAR[7] == 6: #Sumo
323 if CHAR[9] == 0:
324 specDisc1 = DiscList[15]
325 elif CHAR[9] == 1:
326 specDisc1 = DiscList[16]
327 elif CHAR[9] == 2:
328 specDisc1 = DiscList[17]
329 elif CHAR[7] == 7: #Arqu
330 if CHAR[9] == 0:
331 specDisc1 = DiscList[18]
332 elif CHAR[9] == 1:
333 specDisc1 = DiscList[19]
334 elif CHAR[9] == 2:
335 specDisc1 = DiscList[20]
336 elif CHAR[7] == 8: #Mushi
337 if CHAR[9] == 0:
338 specDisc1 = DiscList[21]
339 elif CHAR[9] == 1:
340 specDisc1 = DiscList[22]
341 elif CHAR[9] == 2:
342 specDisc1 = DiscList[23]
343 elif CHAR[7] == 9: #Renken
344 if CHAR[9] == 0:
345 specDisc1 = DiscList[24]
346 elif CHAR[9] == 1:
347 specDisc1 = DiscList[25]
348 elif CHAR[9] == 2:
349 specDisc1 = DiscList[26]
350 elif CHAR[7] == 10: #Miko
351 if CHAR[9] == 0:
352 specDisc1 = DiscList[27]
353 elif CHAR[9] == 1:
354 specDisc1 = DiscList[28]
355 elif CHAR[9] == 2:
356 specDisc1 = DiscList[29]
357 else:
358 specDisc1 = ""
359 #ROUND2#
360 if CHAR[8] == 1: #Jinn
361 if CHAR[10] == 0:
362 specDisc2 = DiscList[0]
363 elif CHAR[10] == 1:
364 specDisc2 = DiscList[1]
365 elif CHAR[10] == 2:
366 specDisc2 = DiscList[2]
367 elif CHAR[8] == 2: #Mugen
368 if CHAR[10] == 0:
369 specDisc2 = DiscList[3]
370 elif CHAR[10] == 1:
371 specDisc2 = DiscList[4]
372 elif CHAR[10] == 2:
373 specDisc2 = DiscList[5]
374 elif CHAR[8] == 3: #Iato
375 if CHAR[10] == 0:
376 specDisc2 = DiscList[6]
377 elif CHAR[10] == 1:
378 specDisc2 = DiscList[7]
379 elif CHAR[10] == 2:
380 specDisc2 = DiscList[8]
381 elif CHAR[8] == 4: #Ninja
382 if CHAR[10] == 0:
383 specDisc2 = DiscList[9]
384 elif CHAR[10] == 1:
385 specDisc2 = DiscList[10]
386 elif CHAR[10] == 2:
387 specDisc2 = DiscList[11]
388 elif CHAR[8] == 5: #Ekko
389 if CHAR[10] == 0:
390 specDisc2 = DiscList[12]
391 elif CHAR[10] == 1:
392 specDisc2 = DiscList[13]
393 elif CHAR[10] == 2:
394 specDisc2 = DiscList[14]
395 elif CHAR[8] == 6: #Sumo
396 if CHAR[10] == 0:
397 specDisc2 = DiscList[15]
398 elif CHAR[10] == 1:
399 specDisc2 = DiscList[16]
400 elif CHAR[10] == 2:
401 specDisc2 = DiscList[17]
402 elif CHAR[8] == 7: #Arqu
403 if CHAR[10] == 0:
404 specDisc2 = DiscList[18]
405 elif CHAR[10] == 1:
406 specDisc2 = DiscList[19]
407 elif CHAR[10] == 2:
408 specDisc2 = DiscList[20]
409 elif CHAR[8] == 8: #Mushi
410 if CHAR[10] == 0:
411 specDisc2 = DiscList[21]
412 elif CHAR[10] == 1:
413 specDisc2 = DiscList[22]
414 elif CHAR[10] == 2:
415 specDisc2 = DiscList[23]
416 elif CHAR[8] == 9: #Renken
417 if CHAR[10] == 0:
418 specDisc2 = DiscList[24]
419 elif CHAR[10] == 1:
420 specDisc2 = DiscList[25]
421 elif CHAR[10] == 2:
422 specDisc2 = DiscList[26]
423 elif CHAR[8] == 10: #Miko
424 if CHAR[10] == 0:
425 specDisc2 = DiscList[27]
426 elif CHAR[10] == 1:
427 specDisc2 = DiscList[28]
428 elif CHAR[10] == 2:
429 specDisc2 = DiscList[29]
430 else:
431 specDisc2 = ""
432
433
434 specInfo1Label.config(text = str(specDisc1))
435 specInfo2Label.config(text = str(specDisc2))
436
437def RandomLevel(CHAR):
438 buttonLevel1.config(relief="raised")
439 buttonLevel2.config(relief="raised")
440 buttonLevel3.config(relief="raised")
441 buttonLevel4.config(relief="raised")
442 buttonLevel5.config(relief="raised")
443 CHAR[11] = random.randint(1,5)
444
445 if CHAR[11] == 1:
446 buttonLevel1.config(relief="sunken")
447 elif CHAR[11] == 2:
448 buttonLevel2.config(relief="sunken")
449 elif CHAR[11] == 3:
450 buttonLevel3.config(relief="sunken")
451 elif CHAR[11] == 4:
452 buttonLevel4.config(relief="sunken")
453 elif CHAR[11] == 5:
454 buttonLevel5.config(relief="sunken")
455 drawStats(CHAR)
456
457
458def writeClassInfo(CHAR):
459 classText1=(str(MetaDisc[CHAR[7]]))
460 classText2=(str(MetaDisc[CHAR[8]]))
461 Class1Label.config(text=classText1)
462 Class2Label.config(text=classText2)
463
464def clearAll(CHAR):
465 CHAR = [0,0,0,0,0,0,0,0,0,0,0,1]
466 clearClass(CHAR)
467 drawStats(CHAR)
468 return(CHAR)
469
470def CB1(CHAR):
471 if CHAR[7] == 1:
472 BNS = [1,2,0,0,0,0] #Jinn
473 if CHAR[9] == 0:
474 BNS[0] +=1
475 elif CHAR[9] == 1:
476 BNS[4] +=1
477 elif CHAR[9] == 2:
478 BNS[1] +=1
479 return(BNS)
480
481 elif CHAR[7] == 2:
482 BNS = [2,1,0,0,0,0] #Mugen
483 if CHAR[9] == 0:
484 BNS[0] +=1
485 elif CHAR[9] == 1:
486 BNS[3] +=1
487 elif CHAR[9] == 2:
488 BNS[1] +=1
489 return(BNS)
490
491 elif CHAR[7] == 3:
492 BNS = [1,1,1,0,0,0] #Iato
493 if CHAR[9] == 0:
494 BNS[2] +=1
495 elif CHAR[9] == 1:
496 BNS[1] +=1
497 elif CHAR[9] == 2:
498 BNS[5] +=1
499 return(BNS)
500
501 elif CHAR[7] == 4:
502 BNS = [0,2,0,1,0,0] #Ninja
503 if CHAR[9] == 0:
504 BNS[0] +=1
505 elif CHAR[9] == 1:
506 BNS[1] +=1
507 elif CHAR[9] == 2:
508 BNS[3] +=1
509 return(BNS)
510
511 elif CHAR[7] == 5:
512 BNS = [1,0,1,0,0,1] #Ekko
513 if CHAR[9] == 0:
514 BNS[0] +=1
515 elif CHAR[9] == 1:
516 BNS[1] +=1
517 elif CHAR[9] == 2:
518 BNS[2] +=1
519 return(BNS)
520
521 elif CHAR[7] == 6:
522 BNS = [1,0,2,0,0,0] #Sumo
523 if CHAR[9] == 0:
524 BNS[0] +=1
525 elif CHAR[9] == 1:
526 BNS[2] +=1
527 elif CHAR[9] == 2:
528 BNS[4] +=1
529 return(BNS)
530
531 elif CHAR[7] == 7:
532 BNS = [0,1,0,0,2,0] #Arq
533 if CHAR[9] == 0:
534 BNS[4] +=1
535 elif CHAR[9] == 1:
536 BNS[1] +=1
537 elif CHAR[9] == 2:
538 BNS[3] +=1
539 return(BNS)
540
541 elif CHAR[7] == 8:
542 BNS = [0,0,0,1,0,2] #Mush
543 if CHAR[9] == 0:
544 BNS[4] +=1
545 elif CHAR[9] == 1:
546 BNS[3] +=1
547 elif CHAR[9] == 2:
548 BNS[5] +=1
549 return(BNS)
550
551 elif CHAR[7] == 9:
552 BNS = [0,0,0,1,2,0] #Renk
553 if CHAR[9] == 0:
554 BNS[3] +=1
555 elif CHAR[9] == 1:
556 BNS[2] +=1
557 elif CHAR[9] == 2:
558 BNS[4] +=1
559 return(BNS)
560
561 elif CHAR[7] == 10:
562 BNS = [0,0,0,2,1,0] #Miko
563 if CHAR[9] == 0:
564 BNS[3] +=1
565 elif CHAR[9] == 1:
566 BNS[5] +=1
567 elif CHAR[9] == 2:
568 BNS[4] +=1
569 return(BNS)
570 else:
571 BNS=[0,0,0,0,0,0]
572 return(BNS)
573
574def CB2(CHAR):
575 if CHAR[8] == 1:
576 BNS = [1,2,0,0,0,0] #Jinn
577 if CHAR[10] == 0:
578 BNS[0] +=1
579 elif CHAR[10] == 1:
580 BNS[4] +=1
581 elif CHAR[10] == 2:
582 BNS[1] +=1
583 return(BNS)
584
585 elif CHAR[8] == 2:
586 BNS = [2,1,0,0,0,0] #Mugen
587 if CHAR[10] == 0:
588 BNS[0] +=1
589 elif CHAR[10] == 1:
590 BNS[3] +=1
591 elif CHAR[10] == 2:
592 BNS[1] +=1
593 return(BNS)
594
595 elif CHAR[8] == 3:
596 BNS = [1,1,1,0,0,0] #Iato
597 if CHAR[10] == 0:
598 BNS[2] +=1
599 elif CHAR[10] == 1:
600 BNS[1] +=1
601 elif CHAR[10] == 2:
602 BNS[5] +=1
603 return(BNS)
604
605 elif CHAR[8] == 4:
606 BNS = [0,2,0,1,0,0] #Ninja
607 if CHAR[10] == 0:
608 BNS[0] +=1
609 elif CHAR[10] == 1:
610 BNS[1] +=1
611 elif CHAR[10] == 2:
612 BNS[3] +=1
613 return(BNS)
614
615 elif CHAR[8] == 5:
616 BNS = [1,0,1,0,0,1] #Ekko
617 if CHAR[10] == 0:
618 BNS[0] +=1
619 elif CHAR[10] == 1:
620 BNS[1] +=1
621 elif CHAR[10] == 2:
622 BNS[2] +=1
623 return(BNS)
624
625 elif CHAR[8] == 6:
626 BNS = [1,0,2,0,0,0] #Sumo
627 if CHAR[10] == 0:
628 BNS[0] +=1
629 elif CHAR[10] == 1:
630 BNS[2] +=1
631 elif CHAR[10] == 2:
632 BNS[4] +=1
633 return(BNS)
634
635 elif CHAR[8] == 7:
636 BNS = [0,1,0,0,2,0] #Arq
637 if CHAR[10] == 0:
638 BNS[4] +=1
639 elif CHAR[10] == 1:
640 BNS[1] +=1
641 elif CHAR[10] == 2:
642 BNS[3] +=1
643 return(BNS)
644
645 elif CHAR[8] == 8:
646 BNS = [0,0,0,1,0,2] #Mush
647 if CHAR[10] == 0:
648 BNS[4] +=1
649 elif CHAR[10] == 1:
650 BNS[3] +=1
651 elif CHAR[10] == 2:
652 BNS[5] +=1
653 return(BNS)
654
655 elif CHAR[8] == 9:
656 BNS = [0,0,0,1,2,0] #Renk
657 if CHAR[10] == 0:
658 BNS[3] +=1
659 elif CHAR[10] == 1:
660 BNS[2] +=1
661 elif CHAR[10] == 2:
662 BNS[4] +=1
663 return(BNS)
664
665 elif CHAR[8] == 10:
666 BNS = [0,0,0,2,1,0] #Miko
667 if CHAR[10] == 0:
668 BNS[3] +=1
669 elif CHAR[10] == 1:
670 BNS[5] +=1
671 elif CHAR[10] == 2:
672 BNS[4] +=1
673 return(BNS)
674 else:
675 BNS=[0,0,0,0,0,0]
676 return(BNS)
677
678def drawSpecButtons(CHAR):
679 releaseSpec1()
680 releaseSpec2()
681
682 if CHAR[9] == 0:
683 buttonSpec11.config(relief="sunken")
684 elif CHAR[9] == 1:
685 buttonSpec12.config(relief="sunken")
686 elif CHAR[9] == 2:
687 buttonSpec13.config(relief="sunken")
688
689 if CHAR[10] == 0:
690 buttonSpec21.config(relief="sunken")
691 elif CHAR[10] == 1:
692 buttonSpec22.config(relief="sunken")
693 elif CHAR[10] == 2:
694 buttonSpec23.config(relief="sunken")
695
696def randomStats(CHAR):
697
698 STR = baseStat()
699 DEX = baseStat()
700 CON = baseStat()
701 KHA = baseStat()
702 PSY = baseStat()
703 WILL = baseStat()
704
705 CHAR[0]=STR
706 CHAR[1]=DEX
707 CHAR[2]=CON
708 CHAR[3]=KHA
709 CHAR[4]=PSY
710 CHAR[5]=WILL
711
712 ClassBNS1 = CB1
713 ClassBNS2 = CB2
714
715 #heightFactor = (STR+CON)/2
716
717 drawStats(CHAR)
718
719 return()
720
721def baseStat():
722 return(random.randint(1,6)+random.randint(1,6)+random.randint(1,6))
723
724def randomClass(CHAR):
725 CHAR[7] = random.randint(1,10)
726 CHAR[8] = random.randint(1,10)
727 CHAR[9] = random.randint(0,2)
728 CHAR[10] = random.randint(0,2)
729 updateButtons1(CHAR)
730 updateButtons2(CHAR)
731
732 Class1 = CHAR[7]
733 Class2 = CHAR[8]
734
735 button1C1.config(relief="raised")
736 button1C2.config(relief="raised")
737 button1C3.config(relief="raised")
738 button1C4.config(relief="raised")
739 button1C5.config(relief="raised")
740 button1C6.config(relief="raised")
741 button1C7.config(relief="raised")
742 button1C8.config(relief="raised")
743 button1C9.config(relief="raised")
744 button1C10.config(relief="raised")
745 button2C1.config(relief="raised")
746 button2C2.config(relief="raised")
747 button2C3.config(relief="raised")
748 button2C4.config(relief="raised")
749 button2C5.config(relief="raised")
750 button2C6.config(relief="raised")
751 button2C7.config(relief="raised")
752 button2C8.config(relief="raised")
753 button2C9.config(relief="raised")
754 button2C10.config(relief="raised")
755
756 if Class1 == 0:
757 print("Class1 = 0")
758 elif Class1 == 1:
759 button1C1.config(relief="sunken")
760 elif Class1 == 2:
761 button1C2.config(relief="sunken")
762 elif Class1 == 3:
763 button1C3.config(relief="sunken")
764 elif Class1 == 4:
765 button1C4.config(relief="sunken")
766 elif Class1 == 5:
767 button1C5.config(relief="sunken")
768 elif Class1 == 6:
769 button1C6.config(relief="sunken")
770 elif Class1 == 7:
771 button1C7.config(relief="sunken")
772 elif Class1 == 8:
773 button1C8.config(relief="sunken")
774 elif Class1 == 9:
775 button1C9.config(relief="sunken")
776 elif Class1 == 10:
777 button1C10.config(relief="sunken")
778
779
780 if Class2 == 0:
781 print("Class2 = 0")
782 elif Class2 == 1:
783 button2C1.config(relief="sunken")
784 elif Class2 == 2:
785 button2C2.config(relief="sunken")
786 elif Class2 == 3:
787 button2C3.config(relief="sunken")
788 elif Class2 == 4:
789 button2C4.config(relief="sunken")
790 elif Class2 == 5:
791 button2C5.config(relief="sunken")
792 elif Class2 == 6:
793 button2C6.config(relief="sunken")
794 elif Class2 == 7:
795 button2C7.config(relief="sunken")
796 elif Class2 == 8:
797 button2C8.config(relief="sunken")
798 elif Class2 == 9:
799 button2C9.config(relief="sunken")
800 elif Class2 == 10:
801 button2C10.config(relief="sunken")
802
803 drawStats(CHAR)
804
805
806def textDraw1(CHAR):
807 CHAR[7] = 1
808 button1C1.config(relief="sunken")
809 button1C2.config(relief="raised")
810 button1C3.config(relief="raised")
811 button1C4.config(relief="raised")
812 button1C5.config(relief="raised")
813 button1C6.config(relief="raised")
814 button1C7.config(relief="raised")
815 button1C8.config(relief="raised")
816 button1C9.config(relief="raised")
817 button1C10.config(relief="raised")
818 updateButtons1(CHAR)
819 return()
820
821def textDraw2(CHAR):
822 CHAR[7] = 2
823 button1C1.config(relief="raised")
824 button1C2.config(relief="sunken")
825 button1C3.config(relief="raised")
826 button1C4.config(relief="raised")
827 button1C5.config(relief="raised")
828 button1C6.config(relief="raised")
829 button1C7.config(relief="raised")
830 button1C8.config(relief="raised")
831 button1C9.config(relief="raised")
832 button1C10.config(relief="raised")
833 updateButtons1(CHAR)
834 return()
835
836def textDraw3(CHAR):
837 CHAR[7] = 3
838 button1C1.config(relief="raised")
839 button1C2.config(relief="raised")
840 button1C3.config(relief="sunken")
841 button1C4.config(relief="raised")
842 button1C5.config(relief="raised")
843 button1C6.config(relief="raised")
844 button1C7.config(relief="raised")
845 button1C8.config(relief="raised")
846 button1C9.config(relief="raised")
847 button1C10.config(relief="raised")
848 updateButtons1(CHAR)
849 return()
850
851def textDraw4(CHAR):
852 CHAR[7] = 4
853 button1C1.config(relief="raised")
854 button1C2.config(relief="raised")
855 button1C3.config(relief="raised")
856 button1C4.config(relief="sunken")
857 button1C5.config(relief="raised")
858 button1C6.config(relief="raised")
859 button1C7.config(relief="raised")
860 button1C8.config(relief="raised")
861 button1C9.config(relief="raised")
862 button1C10.config(relief="raised")
863 updateButtons1(CHAR)
864 return()
865
866def textDraw5(CHAR):
867 CHAR[7] = 5
868 button1C1.config(relief="raised")
869 button1C2.config(relief="raised")
870 button1C3.config(relief="raised")
871 button1C4.config(relief="raised")
872 button1C5.config(relief="sunken")
873 button1C6.config(relief="raised")
874 button1C7.config(relief="raised")
875 button1C8.config(relief="raised")
876 button1C9.config(relief="raised")
877 button1C10.config(relief="raised")
878 updateButtons1(CHAR)
879 return()
880
881def textDraw6(CHAR):
882 CHAR[7] = 6
883 button1C1.config(relief="raised")
884 button1C2.config(relief="raised")
885 button1C3.config(relief="raised")
886 button1C4.config(relief="raised")
887 button1C5.config(relief="raised")
888 button1C6.config(relief="sunken")
889 button1C7.config(relief="raised")
890 button1C8.config(relief="raised")
891 button1C9.config(relief="raised")
892 button1C10.config(relief="raised")
893 updateButtons1(CHAR)
894 return()
895
896def textDraw7(CHAR):
897 CHAR[7] = 7
898 button1C1.config(relief="raised")
899 button1C2.config(relief="raised")
900 button1C3.config(relief="raised")
901 button1C4.config(relief="raised")
902 button1C5.config(relief="raised")
903 button1C6.config(relief="raised")
904 button1C7.config(relief="sunken")
905 button1C8.config(relief="raised")
906 button1C9.config(relief="raised")
907 button1C10.config(relief="raised")
908 updateButtons1(CHAR)
909 return()
910
911def textDraw8(CHAR):
912 CHAR[7] = 8
913 button1C1.config(relief="raised")
914 button1C2.config(relief="raised")
915 button1C3.config(relief="raised")
916 button1C4.config(relief="raised")
917 button1C5.config(relief="raised")
918 button1C6.config(relief="raised")
919 button1C7.config(relief="raised")
920 button1C8.config(relief="sunken")
921 button1C9.config(relief="raised")
922 button1C10.config(relief="raised")
923 updateButtons1(CHAR)
924 return()
925
926def textDraw9(CHAR):
927 CHAR[7] = 9
928 button1C1.config(relief="raised")
929 button1C2.config(relief="raised")
930 button1C3.config(relief="raised")
931 button1C4.config(relief="raised")
932 button1C5.config(relief="raised")
933 button1C6.config(relief="raised")
934 button1C7.config(relief="raised")
935 button1C8.config(relief="raised")
936 button1C9.config(relief="sunken")
937 button1C10.config(relief="raised")
938 updateButtons1(CHAR)
939 return()
940
941def textDraw10(CHAR):
942 button1C1.config(relief="raised")
943 button1C2.config(relief="raised")
944 button1C3.config(relief="raised")
945 button1C4.config(relief="raised")
946 button1C5.config(relief="raised")
947 button1C6.config(relief="raised")
948 button1C7.config(relief="raised")
949 button1C8.config(relief="raised")
950 button1C9.config(relief="raised")
951 button1C10.config(relief="sunken")
952 CHAR[7] = 10
953 updateButtons1(CHAR)
954 return()
955
956##################
957
958
959def textDraw11(CHAR):
960 CHAR[8] = 1
961 button2C1.config(relief="sunken")
962 button2C2.config(relief="raised")
963 button2C3.config(relief="raised")
964 button2C4.config(relief="raised")
965 button2C5.config(relief="raised")
966 button2C6.config(relief="raised")
967 button2C7.config(relief="raised")
968 button2C8.config(relief="raised")
969 button2C9.config(relief="raised")
970 button2C10.config(relief="raised")
971 updateButtons2(CHAR)
972 return()
973
974def textDraw12(CHAR):
975 CHAR[8] = 2
976 button2C1.config(relief="raised")
977 button2C2.config(relief="sunken")
978 button2C3.config(relief="raised")
979 button2C4.config(relief="raised")
980 button2C5.config(relief="raised")
981 button2C6.config(relief="raised")
982 button2C7.config(relief="raised")
983 button2C8.config(relief="raised")
984 button2C9.config(relief="raised")
985 button2C10.config(relief="raised")
986 updateButtons2(CHAR)
987 return()
988
989def textDraw13(CHAR):
990 CHAR[8] = 3
991 button2C1.config(relief="raised")
992 button2C2.config(relief="raised")
993 button2C3.config(relief="sunken")
994 button2C4.config(relief="raised")
995 button2C5.config(relief="raised")
996 button2C6.config(relief="raised")
997 button2C7.config(relief="raised")
998 button2C8.config(relief="raised")
999 button2C9.config(relief="raised")
1000 button2C10.config(relief="raised")
1001 updateButtons2(CHAR)
1002 return()
1003
1004def textDraw14(CHAR):
1005 CHAR[8] = 4
1006 button2C1.config(relief="raised")
1007 button2C2.config(relief="raised")
1008 button2C3.config(relief="raised")
1009 button2C4.config(relief="sunken")
1010 button2C5.config(relief="raised")
1011 button2C6.config(relief="raised")
1012 button2C7.config(relief="raised")
1013 button2C8.config(relief="raised")
1014 button2C9.config(relief="raised")
1015 button2C10.config(relief="raised")
1016 updateButtons2(CHAR)
1017 return()
1018
1019def textDraw15(CHAR):
1020 CHAR[8] = 5
1021 button2C1.config(relief="raised")
1022 button2C2.config(relief="raised")
1023 button2C3.config(relief="raised")
1024 button2C4.config(relief="raised")
1025 button2C5.config(relief="sunken")
1026 button2C6.config(relief="raised")
1027 button2C7.config(relief="raised")
1028 button2C8.config(relief="raised")
1029 button2C9.config(relief="raised")
1030 button2C10.config(relief="raised")
1031 updateButtons2(CHAR)
1032 return()
1033
1034def textDraw16(CHAR):
1035 CHAR[8] = 6
1036 button2C1.config(relief="raised")
1037 button2C2.config(relief="raised")
1038 button2C3.config(relief="raised")
1039 button2C4.config(relief="raised")
1040 button2C5.config(relief="raised")
1041 button2C6.config(relief="sunken")
1042 button2C7.config(relief="raised")
1043 button2C8.config(relief="raised")
1044 button2C9.config(relief="raised")
1045 button2C10.config(relief="raised")
1046 updateButtons2(CHAR)
1047 return()
1048
1049def textDraw17(CHAR):
1050 CHAR[8] = 7
1051 button2C1.config(relief="raised")
1052 button2C2.config(relief="raised")
1053 button2C3.config(relief="raised")
1054 button2C4.config(relief="raised")
1055 button2C5.config(relief="raised")
1056 button2C6.config(relief="raised")
1057 button2C7.config(relief="sunken")
1058 button2C8.config(relief="raised")
1059 button2C9.config(relief="raised")
1060 button2C10.config(relief="raised")
1061 updateButtons2(CHAR)
1062 return()
1063
1064def textDraw18(CHAR):
1065 CHAR[8] = 8
1066 button2C1.config(relief="raised")
1067 button2C2.config(relief="raised")
1068 button2C3.config(relief="raised")
1069 button2C4.config(relief="raised")
1070 button2C5.config(relief="raised")
1071 button2C6.config(relief="raised")
1072 button2C7.config(relief="raised")
1073 button2C8.config(relief="sunken")
1074 button2C9.config(relief="raised")
1075 button2C10.config(relief="raised")
1076 updateButtons2(CHAR)
1077 return()
1078
1079def textDraw19(CHAR):
1080 CHAR[8] = 9
1081 button2C1.config(relief="raised")
1082 button2C2.config(relief="raised")
1083 button2C3.config(relief="raised")
1084 button2C4.config(relief="raised")
1085 button2C5.config(relief="raised")
1086 button2C6.config(relief="raised")
1087 button2C7.config(relief="raised")
1088 button2C8.config(relief="raised")
1089 button2C9.config(relief="sunken")
1090 button2C10.config(relief="raised")
1091 updateButtons2(CHAR)
1092 return()
1093
1094def textDraw20(CHAR):
1095 CHAR[8] = 10
1096 button2C1.config(relief="raised")
1097 button2C2.config(relief="raised")
1098 button2C3.config(relief="raised")
1099 button2C4.config(relief="raised")
1100 button2C5.config(relief="raised")
1101 button2C6.config(relief="raised")
1102 button2C7.config(relief="raised")
1103 button2C8.config(relief="raised")
1104 button2C9.config(relief="raised")
1105 button2C10.config(relief="sunken")
1106 updateButtons2(CHAR)
1107 return()
1108
1109def updateButtons1(CHAR):
1110
1111 Class1 = CHAR[7]
1112
1113 if Class1 == 0:
1114 currentList1 = BlankList
1115 elif Class1 == 1:
1116 currentList1 = JinnList
1117 elif Class1 == 2:
1118 currentList1 = MugenList
1119 elif Class1 == 3:
1120 currentList1 = IatoList
1121 elif Class1 == 4:
1122 currentList1 = NinjaList
1123 elif Class1 == 5:
1124 currentList1 = EkkoList
1125 elif Class1 == 6:
1126 currentList1 = SumoList
1127 elif Class1 == 7:
1128 currentList1 = ArquibusierList
1129 elif Class1 == 8:
1130 currentList1 = MushishiList
1131 elif Class1 == 9:
1132 currentList1 = RenkenjutsushiList
1133 elif Class1 == 10:
1134 currentList1 = MikoList
1135 else:
1136 print("OOPS")
1137
1138 buttonSpec11.config(text=(str(currentList1[0])))
1139 buttonSpec12.config(text=(str(currentList1[1])))
1140 buttonSpec13.config(text=(str(currentList1[2])))
1141
1142 drawStats(CHAR)
1143
1144def updateButtons2(CHAR):
1145
1146 Class2 = CHAR[8]
1147
1148 if Class2 == 0:
1149 currentList2 = BlankList
1150 elif Class2 == 1:
1151 currentList2 = JinnList
1152 elif Class2 == 2:
1153 currentList2 = MugenList
1154 elif Class2 == 3:
1155 currentList2 = IatoList
1156 elif Class2 == 4:
1157 currentList2 = NinjaList
1158 elif Class2 == 5:
1159 currentList2 = EkkoList
1160 elif Class2 == 6:
1161 currentList2 = SumoList
1162 elif Class2 == 7:
1163 currentList2 = ArquibusierList
1164 elif Class2 == 8:
1165 currentList2 = MushishiList
1166 elif Class2 == 9:
1167 currentList2 = RenkenjutsushiList
1168 elif Class2 == 10:
1169 currentList2 = MikoList
1170 else:
1171 print("BUGED")
1172
1173 buttonSpec21.config(text=(str(currentList2[0])))
1174 buttonSpec22.config(text=(str(currentList2[1])))
1175 buttonSpec23.config(text=(str(currentList2[2])))
1176
1177 drawStats(CHAR)
1178
1179
1180def releaseSpec1():
1181 buttonSpec11.config(relief="raised")
1182 buttonSpec12.config(relief="raised")
1183 buttonSpec13.config(relief="raised")
1184
1185def releaseSpec2():
1186 buttonSpec21.config(relief="raised")
1187 buttonSpec22.config(relief="raised")
1188 buttonSpec23.config(relief="raised")
1189
1190
1191
1192def buttonSpec1(CHAR):
1193 CHAR[9] = 0
1194 buttonSpec11.config(relief="sunken")
1195 buttonSpec12.config(relief="raised")
1196 buttonSpec13.config(relief="raised")
1197 drawStats(CHAR)
1198
1199def buttonSpec2(CHAR):
1200 CHAR[9] = 1
1201 buttonSpec11.config(relief="raised")
1202 buttonSpec12.config(relief="sunken")
1203 buttonSpec13.config(relief="raised")
1204 drawStats(CHAR)
1205
1206def buttonSpec3(CHAR):
1207 CHAR[9] = 2
1208 buttonSpec11.config(relief="raised")
1209 buttonSpec12.config(relief="raised")
1210 buttonSpec13.config(relief="sunken")
1211 drawStats(CHAR)
1212
1213def buttonSpec4(CHAR):
1214 CHAR[10] = 0
1215 buttonSpec21.config(relief="sunken")
1216 buttonSpec22.config(relief="raised")
1217 buttonSpec23.config(relief="raised")
1218 drawStats(CHAR)
1219
1220def buttonSpec5(CHAR):
1221 CHAR[10] = 1
1222 buttonSpec21.config(relief="raised")
1223 buttonSpec22.config(relief="sunken")
1224 buttonSpec23.config(relief="raised")
1225 drawStats(CHAR)
1226
1227def buttonSpec6(CHAR):
1228 CHAR[10] = 2
1229 buttonSpec21.config(relief="raised")
1230 buttonSpec22.config(relief="raised")
1231 buttonSpec23.config(relief="sunken")
1232 drawStats(CHAR)
1233
1234def clearLevel():
1235 buttonLevel1.config(relief="raised")
1236 buttonLevel2.config(relief="raised")
1237 buttonLevel3.config(relief="raised")
1238 buttonLevel4.config(relief="raised")
1239 buttonLevel5.config(relief="raised")
1240 level=0
1241
1242def Level1(CHAR):
1243 clearLevel()
1244 buttonLevel1.config(relief="sunken")
1245 CHAR[11] = 1
1246 #randomStats(CHAR)
1247 drawStats(CHAR)
1248
1249def Level2(CHAR):
1250 clearLevel()
1251 buttonLevel2.config(relief="sunken")
1252 CHAR[11] = 2
1253 #randomStats(CHAR)
1254 drawStats(CHAR)
1255
1256def Level3(CHAR):
1257 clearLevel()
1258 buttonLevel3.config(relief="sunken")
1259 CHAR[11] = 3
1260 #randomStats(CHAR)
1261 drawStats(CHAR)
1262
1263def Level4(CHAR):
1264 clearLevel()
1265 buttonLevel4.config(relief="sunken")
1266 CHAR[11] = 4
1267 #randomStats(CHAR)
1268 drawStats(CHAR)
1269
1270def Level5(CHAR):
1271 clearLevel()
1272 buttonLevel5.config(relief="sunken")
1273 CHAR[11] = 5
1274 #randomStats(CHAR)
1275 drawStats(CHAR)
1276
1277#Variables Section
1278
1279CHAR = [0,0,0,0,0,0,0,0,0,0,0,1]
1280ClassBNS1 = [0,0,0,0,0,0]
1281ClassBNS2 = [0,0,0,0,0,0]
1282Class1 = CHAR[7]
1283Class2 = CHAR[8]
1284Spec1 = CHAR[9]
1285Spec2 = CHAR[10]
1286
1287
1288####Frames####
1289
1290classSelectFrame = Frame(root, bd = 1, relief = "sunken")
1291specSelectFrame = Frame(root, bd = 1, relief = "sunken")
1292class1Frame = Frame(classSelectFrame, bd = 1, relief = "sunken")
1293class2Frame = Frame(classSelectFrame, bd = 1, relief = "sunken")
1294
1295specInfoMasterFrame = Frame(root, bd = 1, relief = "sunken")
1296specInfo1Frame = Frame(specInfoMasterFrame, bd = 1, relief = "sunken", height = 200, width=224)
1297specInfo2Frame = Frame(specInfoMasterFrame, bd = 1, relief = "sunken", height = 200, width=224)
1298
1299
1300infoFrame = Frame(classSelectFrame, bd = 1, relief="groove", height=325, width=274)
1301statsFrame = Frame(infoFrame, bd = 1, relief = "sunken", padx = 2, pady=2, height=150, width=270)
1302class1InfoFrame = Frame(infoFrame, bd = 1, relief = "sunken", height = 85, width = 270)
1303class2InfoFrame = Frame(infoFrame, bd = 1, relief = "sunken", height = 85, width = 270)
1304
1305bottomFrame = Frame(root, bd = 1, relief = "sunken")
1306topFrame = Frame(root, bd = 1, relief = "sunken")
1307
1308
1309#Labes
1310StatsLabel = Label(statsFrame, text = "")
1311Class2Label = Label(class2InfoFrame, text = "", wraplength = 265, padx = 2, justify="left")
1312Class1Label = Label(class1InfoFrame, text = "", wraplength = 265, padx = 2, justify="left")
1313
1314StatsLabel1 = Label(statsFrame, text = "Str: ", anchor="w", justify="left")
1315StatsLabel2 = Label(statsFrame, text = "Dex: ", anchor="w", justify="left")
1316StatsLabel3 = Label(statsFrame, text = "Con: ", anchor="w", justify="left")
1317StatsLabel4 = Label(statsFrame, text = "Kha: ", anchor="w", justify="left")
1318StatsLabel5 = Label(statsFrame, text = "Psy: ", anchor="w", justify="left")
1319StatsLabel6 = Label(statsFrame, text = "Will: ", anchor="w", justify="left")
1320StatsLabel7 = Label(statsFrame, text = "Total: ", anchor="w", justify="left")
1321StatsLabel8 = Label(statsFrame, text = "Force: ", anchor="e", justify="right")
1322StatsLabel9 = Label(statsFrame, text = "()", anchor="e", justify="right")
1323StatsLabel10 = Label(statsFrame, text = "()", anchor="e", justify="right")
1324StatsLabel11 = Label(statsFrame, text = "()", anchor="e", justify="right")
1325StatsLabel12 = Label(statsFrame, text = "()", anchor="e", justify="right")
1326StatsLabel13 = Label(statsFrame, text = "()", anchor="e", justify="right")
1327
1328specInfo1Label = Label(specInfo1Frame, text = "DUMMY TEXT", anchor = "w", justify = "center", wraplength = 222)
1329specInfo2Label = Label(specInfo2Frame, text = "DUMMY TEXT", anchor = "e", justify = "center", wraplength = 222)
1330
1331#Buttons
1332
1333
1334buttonSpec11 = Button(specSelectFrame, text = "", width = 20, command = partial(buttonSpec1, CHAR))
1335buttonSpec12 = Button(specSelectFrame, text = "", width = 20, command = partial(buttonSpec2, CHAR))
1336buttonSpec13 = Button(specSelectFrame, text = "", width = 20, command = partial(buttonSpec3, CHAR))
1337buttonSpec21 = Button(specSelectFrame, text = "", width = 20, command = partial(buttonSpec4, CHAR))
1338buttonSpec22 = Button(specSelectFrame, text = "", width = 20, command = partial(buttonSpec5, CHAR))
1339buttonSpec23 = Button(specSelectFrame, text = "", width = 20, command = partial(buttonSpec6, CHAR))
1340
1341heightVar = 1
1342
1343button1C1 = Button(class1Frame, text = classList[1], command = partial(textDraw1, CHAR), width = 10, height = heightVar)
1344button1C2 = Button(class1Frame, text = classList[2], command = partial(textDraw2, CHAR), width = 10, height = heightVar)
1345button1C3 = Button(class1Frame, text = classList[3], command = partial(textDraw3, CHAR), width = 10, height = heightVar)
1346button1C4 = Button(class1Frame, text = classList[4], command = partial(textDraw4, CHAR), width = 10, height = heightVar)
1347button1C5 = Button(class1Frame, text = classList[5], command = partial(textDraw5, CHAR), width = 10, height = heightVar)
1348button1C6 = Button(class1Frame, text = classList[6], command = partial(textDraw6, CHAR), width = 10, height = heightVar)
1349button1C7 = Button(class1Frame, text = classList[7], command = partial(textDraw7, CHAR), width = 10, height = heightVar)
1350button1C8 = Button(class1Frame, text = classList[8], command = partial(textDraw8, CHAR), width = 10, height = heightVar)
1351button1C9 = Button(class1Frame, text = classList[9], command = partial(textDraw9, CHAR), width = 10, height = heightVar)
1352button1C10 = Button(class1Frame, text = classList[10], command = partial(textDraw10, CHAR), width = 10, height = heightVar)
1353
1354button2C1 = Button(class2Frame, text = classList[1], command = partial(textDraw11, CHAR), width = 10, height = heightVar)
1355button2C2 = Button(class2Frame, text = classList[2], command = partial(textDraw12, CHAR), width = 10, height = heightVar)
1356button2C3 = Button(class2Frame, text = classList[3], command = partial(textDraw13, CHAR), width = 10, height = heightVar)
1357button2C4 = Button(class2Frame, text = classList[4], command = partial(textDraw14, CHAR), width = 10, height = heightVar)
1358button2C5 = Button(class2Frame, text = classList[5], command = partial(textDraw15, CHAR), width = 10, height = heightVar)
1359button2C6 = Button(class2Frame, text = classList[6], command = partial(textDraw16, CHAR), width = 10, height = heightVar)
1360button2C7 = Button(class2Frame, text = classList[7], command = partial(textDraw17, CHAR), width = 10, height = heightVar)
1361button2C8 = Button(class2Frame, text = classList[8], command = partial(textDraw18, CHAR), width = 10, height = heightVar)
1362button2C9 = Button(class2Frame, text = classList[9], command = partial(textDraw19, CHAR), width = 10, height = heightVar)
1363button2C10 = Button(class2Frame, text = classList[10], command = partial(textDraw20, CHAR), width = 10, height = heightVar)
1364
1365levelWidth = 14
1366buttonLevel1 = Button(topFrame, text = "Low Level", command = partial(Level1,CHAR), width = levelWidth)
1367buttonLevel2 = Button(topFrame, text = "Medium Level", command = partial(Level2,CHAR), width = levelWidth)
1368buttonLevel3 = Button(topFrame, text = "High Level", command = partial(Level3,CHAR), width = levelWidth)
1369buttonLevel4 = Button(topFrame, text = "Oni", command = partial(Level4,CHAR), width = levelWidth)
1370buttonLevel5 = Button(topFrame, text = "God Level", command = partial(Level5,CHAR), width = levelWidth)
1371
1372widthVar=14
1373buttonRandomChar = Button(bottomFrame, text = "Random Character", width = widthVar, height = 1, padx = 4, command=partial(randomCHAR, CHAR))
1374buttonRandomStats = Button(bottomFrame, text = "Random Stats", width = widthVar, height = 1, padx = 3, command=partial(randomStats, CHAR))
1375buttonRandomClass = Button(bottomFrame, text = "Random Class", width = widthVar, height = 1, padx = 3, command=partial(randomClass,CHAR))
1376buttonExport = Button(bottomFrame, text = "Save", width = widthVar, height = 1, padx = 4, command=partial(ExportStats, CHAR))
1377buttonImport = Button(bottomFrame, text = "Load", width = widthVar, height = 1, padx = 4, command=partial(LoadChar))
1378buttonRandomLevel = Button(bottomFrame, text = "Random Level", width = widthVar, height = 1, padx = 4, command=partial(RandomLevel, CHAR))
1379buttonClearCHAR = Button(bottomFrame, text = "Clear", width = widthVar, height = 1, padx = 4, command=partial(Clear, CHAR))
1380
1381
1382##############################Draw Section###############################
1383
1384topFrame.pack(side="top", anchor="n")
1385classSelectFrame.pack(anchor = "n", padx = 2, pady = 2, fill=X)
1386specSelectFrame.pack(anchor = "n", fill=X, padx = 2, pady = 2)
1387specInfoMasterFrame.pack(anchor = "n", fill=X, padx = 2, pady = 2)
1388
1389 ####SpecInfoFrame####
1390specInfo1Frame.grid(column = 0, row = 0)
1391specInfo2Frame.grid(column = 1, row = 0)
1392specInfo1Label.grid(column = 0, row = 0)
1393specInfo2Label.grid(column = 0, row = 0)
1394
1395specInfo1Frame.grid_propagate(0)
1396specInfo2Frame.grid_propagate(0)
1397
1398 ####Draw MenuBar####
1399mainMenu = Menu(root, tearoff=0)
1400
1401fileMenu = Menu(mainMenu, tearoff=0)
1402fileMenu.add_command(label="Save")
1403fileMenu.add_command(label="Edit")
1404fileMenu.add_command(label="Clear", command=partial(clearAll, CHAR))
1405
1406mainMenu.add_cascade(label="File", menu=fileMenu)
1407root.config(menu=mainMenu)
1408
1409####Top Frame####
1410buttonLevel1.grid(column = 0, row =0)
1411buttonLevel2.grid(column = 1, row =0)
1412buttonLevel3.grid(column = 2, row =0)
1413buttonLevel4.grid(column = 3, row =0)
1414#buttonLevel5.grid(column = 4, row =0)
1415
1416 ####Draw Classbar####
1417class1Frame.grid(column = 0, row = 0, padx = 2, pady = 2, in_ = classSelectFrame, sticky = "nw")
1418class2Frame.grid(column = 2, row = 0, padx = 2, pady = 2, in_ = classSelectFrame, sticky = "ne")
1419
1420button1C1.grid(row=0,column=0, sticky = "w", columnspan=3)
1421button1C2.grid(row=1,column=0, sticky = "w", columnspan=3)
1422button1C3.grid(row=2,column=0, sticky = "w", columnspan=3)
1423button1C4.grid(row=3,column=0, sticky = "w", columnspan=3)
1424button1C4.grid(row=4,column=0, sticky = "w", columnspan=3)
1425button1C5.grid(row=5,column=0, sticky = "w", columnspan=3)
1426button1C6.grid(row=6,column=0, sticky = "w", columnspan=3)
1427button1C7.grid(row=7,column=0, sticky = "w", columnspan=3)
1428button1C8.grid(row=8,column=0, sticky = "w", columnspan=3)
1429button1C9.grid(row=9,column=0, sticky = "w", columnspan=3)
1430button1C10.grid(row=10,column=0, sticky = "w", columnspan=3)
1431
1432button2C1.grid(row=0,column=0, sticky = "e", columnspan=3)
1433button2C2.grid(row=1,column=0, sticky = "e", columnspan=3)
1434button2C3.grid(row=2,column=0, sticky = "e", columnspan=3)
1435button2C4.grid(row=3,column=0, sticky = "e", columnspan=3)
1436button2C4.grid(row=4,column=0, sticky = "e", columnspan=3)
1437button2C5.grid(row=5,column=0, sticky = "e", columnspan=3)
1438button2C6.grid(row=6,column=0, sticky = "e", columnspan=3)
1439button2C7.grid(row=7,column=0, sticky = "e", columnspan=3)
1440button2C8.grid(row=8,column=0, sticky = "e", columnspan=3)
1441button2C9.grid(row=9,column=0, sticky = "e", columnspan=3)
1442button2C10.grid(row=10,column=0, sticky = "e", columnspan=3)
1443
1444buttonSpec11.grid(column = 0, row = 0, sticky = "n")
1445buttonSpec12.grid(column = 1, row = 0, sticky = "n")
1446buttonSpec13.grid(column = 2, row = 0, sticky = "n")
1447buttonSpec21.grid(column = 0, row = 1, sticky = "n")
1448buttonSpec22.grid(column = 1, row = 1, sticky = "n")
1449buttonSpec23.grid(column = 2, row = 1, sticky = "n")
1450
1451####Bottom Frame####
1452
1453bottomFrame.pack(side="bottom")
1454buttonRandomChar.grid(column = 0, row = 1)
1455buttonRandomStats.grid(column = 1, row = 1)
1456buttonRandomClass.grid(column = 2, row = 1)
1457buttonExport.grid(column = 3, row = 1)
1458buttonImport.grid(column = 3, row = 0)
1459#buttonRandomLevel.grid(column = 2, row = 0)
1460buttonClearCHAR.grid(column = 0, row = 0)
1461
1462#####InfoFrame#####
1463infoFrame.grid(column = 1, row = 0, in_ = classSelectFrame, padx = 2, pady = 2, rowspan=3)
1464infoFrame.grid_propagate(0)
1465
1466statsFrame.grid(column=0,row=0)
1467class1InfoFrame.grid(column=0,row=1)
1468class2InfoFrame.grid(column=0,row=2)
1469
1470statsFrame.grid_propagate(0)
1471class1InfoFrame.grid_propagate(0)
1472class2InfoFrame.grid_propagate(0)
1473
1474Class2Label.grid(column = 0, row = 0, in_ = class2InfoFrame)
1475Class1Label.grid(column = 0, row = 0, in_ = class1InfoFrame)
1476
1477StatsLabel1.grid(column = 0, row = 0, sticky = "w")
1478StatsLabel2.grid(column = 0, row = 1, sticky = "w")
1479StatsLabel3.grid(column = 0, row = 2, sticky = "w")
1480StatsLabel4.grid(column = 0, row = 3, sticky = "w")
1481StatsLabel5.grid(column = 0, row = 4, sticky = "w")
1482StatsLabel6.grid(column = 0, row = 5, sticky = "w")
1483StatsLabel7.grid(column = 0, row = 6, sticky = "w")
1484StatsLabel8.grid(column = 1, row = 0, sticky = "e")
1485StatsLabel9.grid(column = 1, row = 1, sticky = "e")
1486StatsLabel10.grid(column = 1, row = 3, sticky = "e")
1487StatsLabel11.grid(column = 1, row = 4, sticky = "e")
1488StatsLabel12.grid(column = 1, row = 5, sticky = "e")
1489StatsLabel13.grid(column = 2, row = 5, sticky = "e")
1490
1491
1492
1493
1494###########################POST INITILIZATION###################################
1495
1496CHAR = clearAll(CHAR)
1497CHAR = [0,0,0,0,0,0,0,0,0,0,0,1]
1498
1499root.mainloop()