Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / screens / NewGameScreen.as
blobb93d19a19118e3b47336de18aa651df4b3530b19
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/humanintro.html",mimeType="application/octet-stream")]
22 private var HumanIntroduction:Class;
23 [Embed(source="txt/bovaintro.html",mimeType="application/octet-stream")]
24 private var BovaIntroduction:Class;
25 [Embed(source="txt/demonintro.html",mimeType="application/octet-stream")]
26 private var DemonIntroduction:Class;
28 public function NewGameScreen()
30 this.appearanceButton = false;
31 this.debugMenuButton = true;
32 this.exportGameButton = false;
33 this.loadOrSaveButton = false;
34 this.newGameButton = false;
35 this.importGameButton = true;
37 this.clearButtons();
38 this.setButton(NEXT_BUTTON, "Next");
41 override public function processButtonPress(id:int):Boolean
43 var done:Boolean = false;
44 var validationError:String = "";
45 switch (stage)
47 case-1: // License
48 stage = 0;
49 text = new License();
50 this.clearButtons();
51 this.setButton(NEXT_BUTTON, "Next");
52 updateScreen();
53 break;
54 case 0: // Species selection
55 this.clearButtons();
56 setButton(0, "Human");
57 setButton(1, "Bova");
58 setButton(2, "Demon");
59 main.showTextInput(true, 167.75+12, 56.75+115);
60 main.player.baseType.ownName = main.getTextBoxContents();
61 if (main.player.baseType.ownName.length > 0) {
62 this.stage = 1;
63 main.showTextInput(false, 0, 0);
64 validationError = "";
65 processButtonPress(id);
66 return false;
67 }else{
68 validationError = "Your name must be more than one character long."
70 text = "<h2>What are you?</h2>";
71 text += "<p>First, what is your name?</p><p><br/><br/></p>";
72 if (validationError.length > 0)
73 text += "<p style='color:red;font-weight:bold;'>" + validationError + "</p>";
74 text += "<p>Next, what are you?</p>";
75 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
76 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/
77 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
79 updateScreen();
80 break;
81 case 1: // Gender selection
82 this.clearButtons();
83 text = "<h2>Gender Selection</h2>";
84 stage = 2;
85 switch (id)
87 case 0:
88 main.player.setBaseType(new Human());
89 text += "<p>As a simple human, you can either be male or female as you start out.</p>";
90 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>";
91 text += "<p>Humans also get randomly colored skin, hair, and eyes.</p>";
92 clearButtons();
93 setButton(0, "Male");
94 setButton(2, "Female");
95 break;
96 case 1:
97 main.player.setBaseType(new Bova());
98 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>";
99 text += "<p>Bovae can be Male or Female.</p>";
100 text += "<p>Males (bulls) are very strong, yet not very smart.</p>";
101 text += "<p>Females are more cunning, yet they need their bulls for protection.</p>";
102 clearButtons();
103 setButton(0, "Male");
104 setButton(2, "Female");
105 break;
106 case 2:
107 main.player.setBaseType(new Demon());
108 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>";
109 text += "<p>Demons can be any gender except asexual.</p>";
110 clearButtons();
111 setButton(0, "Male");
112 setButton(1, "Hermaphrodite");
113 setButton(2, "Female");
114 break;
116 updateScreen();
117 break;
118 case 2: // Skin color
119 stage = 3;
120 switch (id)
122 case 0:
123 main.player.gender = Gender.MALE;
124 break;
125 case 1:
126 main.player.gender = Gender.HERM;
127 break;
128 case 2:
129 main.player.gender = Gender.FEMALE;
130 break;
132 main.player.initialGenderSetup();
133 text = "<h2>Skin color</h2>";
134 text += "<p>What color is your skin?</p>";
135 var isDemon:Boolean = main.player.getTypeName() == "demon";
136 clearButtons();
137 if (!isDemon)
139 setButton(0, "White");
140 setButton(1, "Brown");
141 setButton(2, "Black");
142 setButton(3, "Tan");
143 setButton(4, "Albino");
145 else
147 // idfk
148 setButton(0, "RedishBrown");
149 setButton(1, "Violet");
150 setButton(2, "Dark Red");
152 updateScreen();
153 break;
154 case 3: // Hair type
155 stage = 4;
156 isDemon = main.player.getTypeName() == "demon";
157 if (!isDemon)
159 switch (id)
161 case 0:
162 main.player.skin.color = "white";
163 break;
164 case 1:
165 main.player.skin.color = "brown";
166 break;
167 case 2:
168 main.player.skin.color = "black";
169 break;
170 case 3:
171 main.player.skin.color = "tan";
172 break;
173 case 4:
174 main.player.skin.color = "albino";
175 break;
178 else
180 switch (id)
182 case 0:
183 main.player.skin.color = "reddish brown";
184 break;
185 case 1:
186 main.player.skin.color = "violet";
187 break;
188 case 2:
189 main.player.skin.color = "dark red";
190 break;
193 text = "<h2>Hair Style</h2>";
194 text += "<p>What kind of hair do you want, assuming you want any at all?</p>";
195 setButton(0, "Plain");
196 setButton(1, "Bob cut");
197 setButton(2, "Wild&Proud");
198 setButton(3, "Ponytail");
199 setButton(4, "Bald");
200 setButton(5, "Shaven");
201 updateScreen();
202 break;
203 case 4:
204 this.stage = 5;
205 main.player.hair = new Hair();
206 switch (id)
208 case 0: // Plain
209 main.player.hair.style = "plain";
210 break;
211 case 1: // Bob cut
212 main.player.hair.style = "bob-cut";
213 break;
214 case 2: // Wild and proud
215 main.player.hair.style = "wild";
216 break;
217 case 3: // Ponytail
218 main.player.hair.style = "ponytail";
219 break;
220 case 4: // Bald
221 main.player.hair.style = "bald";
222 break;
223 case 5: // Shaven
224 main.player.hair.style = "close-shaven";
225 break;
227 clearButtons();
228 if (main.player.hair.isBald())
230 text = "<h2>Hair Color</h2><p>You don't have hair, so you get to skip this section!</p>";;
231 setButton(NEXT_BUTTON, "Next");
232 } else {
233 text = "<h2>Hair Color</h2>";
234 text += "<p>What color hair do you have?</p>";
235 setButton(0, "Brown");
236 setButton(1, "Blonde");
237 setButton(2, "Black");
238 setButton(3, "Red");
239 setButton(4, "Gray");
241 updateScreen();
242 break;
243 case 5:
244 switch(id)
246 case 0: //Brown
247 main.player.hair.color = "brown";
248 break;
249 case 1: //Blonde
250 main.player.hair.color = "blonde";
251 break;
252 case 2: //Black
253 main.player.hair.color = "black";
254 break;
255 case 3: //Red
256 main.player.hair.color = "red";
257 break;
258 case 4: //Gray
259 main.player.hair.color = "gray";
260 break;
262 stage = 6;
263 clearButtons();
264 text = "<h2>Class Selection</h2>";
265 text += "<p>Here, you choose your initial startup benefits and weapons.</p>";
266 text += "<ul>";
267 setButton(0, "Avg. Joe");
268 text += "<li>Avg. Joe - Just go in with the clothes on your back. (1 STR, 1 INT, 1 SPD)</li>";
269 setButton(1, "Soldier");
270 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>";
271 setButton(2, "Bookworm");
272 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>";
273 text += "</ul>";
274 updateScreen();
275 break;
276 case 6:
277 stage = 7;
278 main.player.strength = 5;
279 main.player.speed = 5;
280 main.player.intellect = 5;
282 switch (id)
284 case 0:
285 main.player.strength += 1;
286 main.player.speed += 1;
287 main.player.intellect += 1;
288 break;
289 case 1:
290 main.player.strength += 3;
291 break;
292 case 2:
293 main.player.intellect += 2;
294 main.player.speed += 1;
295 break;
296 case 3:
297 main.player.balls.push(main.player.balls[0]);
298 main.player.strength += 1;
299 main.player.speed += 1;
300 break;
302 main.player.clothing.push(ItemRegistry.BROWN_TUNIC, ItemRegistry.GRAY_PANTS);
303 if(main.player.baseType is Human)
304 text = new HumanIntroduction();
305 if (main.player.baseType is Bova)
306 text = new BovaIntroduction();
307 if (main.player.baseType is Demon)
308 text = new DemonIntroduction();
309 clearButtons();
310 main.setupStatsPanel();
311 setButton(NEXT_BUTTON, "Next");
312 updateScreen();
313 done = false;
314 break;
315 case 7:
316 return true;
318 trace(id, stage, done);
319 return done;
322 override public function getScreenText():String
324 return text;