One can now specify a name when creating a character.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / screens / NewGameScreen.as
bloba33b2bac0e1f23158cced6451c171047ba2cc5b0
1 package org.sevenchan.dongs.screens
3 import flash.utils.ByteArray;
4 import org.sevenchan.dongs.creature.*;
5 import org.sevenchan.dongs.bodyparts.*;
6 import org.sevenchan.dongs.*;
7 import org.sevenchan.dongs.creature.Bova;
9 /**
10 * ...
11 * @author Harbinger
13 public class NewGameScreen extends Screen
15 private var stage:int = -1;
16 private var text:String = "";
18 [Embed(source="txt/bsd-license.txt",mimeType="application/octet-stream")]
19 private var License:Class;
21 [Embed(source="txt/intro.txt",mimeType="application/octet-stream")]
22 private var Introduction:Class;
24 public function NewGameScreen()
26 this.appearanceButton = false;
27 this.debugMenuButton = true;
28 this.exportGameButton = false;
29 this.loadOrSaveButton = false;
30 this.newGameButton = false;
31 this.importGameButton = true;
33 this.clearButtons();
34 this.setButton(NEXT_BUTTON, "Next");
37 override public function processButtonPress(id:int):Boolean
39 var done:Boolean = false;
40 switch (stage)
42 case-1: // License
43 stage = 0;
44 text = new License();
45 this.clearButtons();
46 this.setButton(NEXT_BUTTON, "Next");
47 updateScreen();
48 break;
49 case 0: // Species selection
50 this.stage = 1;
51 this.clearButtons();
52 setButton(0, "Human");
53 setButton(1, "Bova");
54 setButton(2, "Demon");
55 text = "<h2>What are you?</h2>";
56 text += "<p>First, what is your name?</p><p><br/><br/></p>";
57 main.showTextInput(true, 167.75+12, 56.75+115); // Was 50
58 text += "<p><b>Human:</b> You were born human. If you’re playing this, you probably know what a human looks like.</p>"; // Added commas, reworded a bit - Harb
59 text += "<p><b>Bova:</b> You were born as a Bova, more widely known as a cow-girl. Bovae are cow-morphs with predominantly human features save for hoofs, larger than usual breasts and milk output (assuming they're female, of course), floppy cow ears, and a black and white tail.</p>"; // s/bovine/bova/
60 text += "<p><b>Demon:</b> You were born a demon, with an unusual skin color compared to humans and bovae as well as a high libido, leaving you more easily aroused. However, you are quite capable of “exciting” your lovers and foes.</p>"; // Grammatical fixes
61 updateScreen();
62 break;
63 case 1: // Gender selection
64 this.stage = 2;
65 text = "<h2>Gender Selection</h2>";
66 switch (id)
68 case 0:
69 main.player.setBaseType(new Human());
70 text += "<p>As a simple human, you can either be male or female as you start out.</p>";
71 text += "<ul><li><b>Male</b> - You gain a dick and a couple of balls.</li><li><b>Female</b> - A vagina and randomly-sized boobs.</li></ul>";
72 text += "<p>Humans also get randomly colored skin, hair, and eyes.</p>";
73 clearButtons();
74 setButton(0, "Male");
75 setButton(2, "Female");
76 break;
77 case 1:
78 main.player.setBaseType(new Bova());
79 text += "<p>You are a Bova, a race of cow-girls that was once enslaved by man. Throwing off their shackles, they formed their own nation after a bloody war.</p>";
80 text += "<p>Bovae can be Male or Female.</p>";
81 text += "<p>Males (bulls) are very strong, yet not very smart.</p>";
82 text += "<p>Females are more cunning, yet they need their bulls for protection.</p>";
83 clearButtons();
84 setButton(0, "Male");
85 setButton(2, "Female");
86 break;
87 case 2:
88 main.player.setBaseType(new Demon());
89 text += "<p>You have chosen to become a Demon. Demons can infect other creatures with an STD that eventually changes them into demons, as well.</p>";
90 text += "<p>Demons can be any gender except asexual.</p>";
91 clearButtons();
92 setButton(0, "Male");
93 setButton(1, "Hermaphrodite");
94 setButton(2, "Female");
95 break;
97 main.showTextInput(false, 0, 0);
98 main.player.baseType.ownName = main.getTextBoxContents();
99 if (main.player.baseType.ownName.length == 0)
100 main.player.baseType.ownName = "Ugly MacDickface";
101 updateScreen();
102 break;
103 case 2: // Skin color
104 stage = 3;
105 switch (id)
107 case 0:
108 main.player.gender = Gender.MALE;
109 break;
110 case 1:
111 main.player.gender = Gender.HERM;
112 break;
113 case 2:
114 main.player.gender = Gender.FEMALE;
115 break;
117 main.player.initialGenderSetup();
118 text = "<h2>Skin color</h2>";
119 text += "<p>What color is your skin?</p>";
120 var isDemon:Boolean = main.player.getTypeName() == "demon";
121 clearButtons();
122 if (!isDemon)
124 setButton(0, "White");
125 setButton(1, "Brown");
126 setButton(2, "Black");
127 setButton(3, "Tan");
128 setButton(4, "Albino");
130 else
132 // idfk
133 setButton(0, "RedishBrown");
134 setButton(1, "Violet");
135 setButton(2, "Dark Red");
137 updateScreen();
138 break;
139 case 3: // Hair type
140 stage = 4;
141 var isDemon:Boolean = main.player.getTypeName() == "demon";
142 if (!isDemon)
144 switch (id)
146 case 0:
147 main.player.skin.color = "white";
148 break;
149 case 1:
150 main.player.skin.color = "brown";
151 break;
152 case 2:
153 main.player.skin.color = "black";
154 break;
155 case 3:
156 main.player.skin.color = "tan";
157 break;
158 case 4:
159 main.player.skin.color = "albino";
160 break;
163 else
165 switch (id)
167 case 0:
168 main.player.skin.color = "reddish brown";
169 break;
170 case 1:
171 main.player.skin.color = "violet";
172 break;
173 case 2:
174 main.player.skin.color = "dark red";
175 break;
178 text = "<h2>Hair Style</h2>";
179 text += "<p>What kind of hair do you want, assuming you want any at all?</p>";
180 setButton(0, "Plain");
181 setButton(1, "Bob cut");
182 setButton(2, "Wild&Proud");
183 setButton(3, "Ponytail");
184 setButton(4, "Bald");
185 setButton(5, "Shaven");
186 updateScreen();
187 break;
188 case 4:
189 this.stage = 5;
190 main.player.hair = new Hair();
191 switch (id)
193 case 0: // Plain
194 main.player.hair.style = "plain";
195 break;
196 case 1: // Bob cut
197 main.player.hair.style = "bob-cut";
198 break;
199 case 2: // Wild and proud
200 main.player.hair.style = "wild";
201 break;
202 case 3: // Ponytail
203 main.player.hair.style = "ponytail";
204 break;
205 case 4: // Bald
206 main.player.hair.style = "bald";
207 break;
208 case 5: // Shaven
209 main.player.hair.style = "close-shaven";
210 break;
212 clearButtons();
213 text = "<h2>Class Selection</h2>";
214 text += "<p>Here, you choose your initial startup benefits and weapons.</p>";
215 text += "<ul>";
216 setButton(0, "Avg. Joe");
217 text += "<li>Avg. Joe - Just go in with the clothes on your back. (1 STR, 1 INT, 1 SPD)</li>";
218 setButton(1, "Soldier");
219 text += "<li>Soldier - You spent more time on swordplay than books. This lets you dive right into the combat. (+3 STR, Cheap Sword, Leather Armor)</li>";
220 setButton(2, "Bookworm");
221 text += "<li>Bookworm - You read a lot of scrolls as a kid, and paid attention in class. Strength, however, is not your forte. (+3 INT, Glasses, Daemonology Book)</li>";
222 text += "</ul>";
223 updateScreen();
224 break;
225 case 5:
226 stage = 6;
227 main.player.strength = 5;
228 main.player.speed = 5;
229 main.player.intellect = 5;
231 switch (id)
233 case 0:
234 main.player.strength += 1;
235 main.player.speed += 1;
236 main.player.intellect += 1;
237 break;
238 case 1:
239 main.player.strength += 3;
240 break;
241 case 2:
242 main.player.intellect += 2;
243 main.player.speed += 1;
244 break;
245 case 3:
246 main.player.balls.push(main.player.balls[0]);
247 main.player.strength += 1;
248 main.player.speed += 1;
249 break;
251 main.player.clothing.push(ItemRegistry.BROWN_TUNIC, ItemRegistry.GRAY_PANTS);
253 text = new Introduction();
254 clearButtons();
255 main.setupStatsPanel();
256 setButton(NEXT_BUTTON, "Next");
257 updateScreen();
258 done = false;
259 break;
260 case 6:
261 return true;
263 trace(id, stage, done);
264 return done;
267 override public function getScreenText():String
269 return text;