From d709d1ed96af23baef4b4143898578d8671a48a5 Mon Sep 17 00:00:00 2001 From: Harbinger Date: Tue, 18 Dec 2012 01:31:55 -0800 Subject: [PATCH] Fix hair, dick around with new game screen. --- .gitignore | 3 +- src/org/sevenchan/dongs/Creature.as | 8 +- src/org/sevenchan/dongs/bodyparts/Hair.as | 9 +- src/org/sevenchan/dongs/creature/Human.as | 2 +- src/org/sevenchan/dongs/creature/Player.as | 8 +- src/org/sevenchan/dongs/creature/Witch.as | 2 +- src/org/sevenchan/dongs/screens/NewGameScreen.as | 207 +++++++++++++-------- .../dongs/screens/encounters/GargoyleEncounter.as | 1 + src/org/sevenchan/dongs/screens/txt/bovaintro.html | 1 + .../sevenchan/dongs/screens/txt/demonintro.html | 1 + .../screens/txt/{intro.txt => humanintro.html} | 0 11 files changed, 157 insertions(+), 85 deletions(-) create mode 100644 src/org/sevenchan/dongs/screens/txt/bovaintro.html create mode 100644 src/org/sevenchan/dongs/screens/txt/demonintro.html rename src/org/sevenchan/dongs/screens/txt/{intro.txt => humanintro.html} (100%) diff --git a/.gitignore b/.gitignore index ba84ffb..50e900d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/bin \ No newline at end of file +/bin +*.bak diff --git a/src/org/sevenchan/dongs/Creature.as b/src/org/sevenchan/dongs/Creature.as index b7f377e..23e713a 100644 --- a/src/org/sevenchan/dongs/Creature.as +++ b/src/org/sevenchan/dongs/Creature.as @@ -25,7 +25,7 @@ package org.sevenchan.dongs public var height:Number = 0.0; // How tall am I? public var build:Build = Build.AVG; // How fat am I? public var material:Material = Material.NO_MATERIAL_MODIFIER; // What am I made of? - public var hair:Hair = Hair.BALD; // His/her/hir hair is... + public var _hair:Hair = new Hair("bald",""); // His/her/hir hair is... public var skin:Skin = new Skin("human"); // His/her/hir hair is... public var _gender:Gender = Gender.ASEXUAL; // Boy, Girl, Neither, Both? public var sexualPreference:SexualPreference = SexualPreference.ASEXUAL; // Straight, Gay, ASexual, Bi? @@ -45,6 +45,7 @@ package org.sevenchan.dongs public var _mana:int = 0; // Magic shit, increases over time, especially near relaxing places. public var _gold:int = 0; // Currency + // Collections // What magic/techniques can I use? public var _abilities:Object = new Object(); @@ -500,7 +501,7 @@ package org.sevenchan.dongs if (!isHeadConcealed()) { - if (hair == Hair.BALD) + if (hair.isBald()) { descr += ", %POS% glistening scalp"; if (!areEyesConcealed()) @@ -1308,6 +1309,9 @@ package org.sevenchan.dongs } return null; } + + public function get hair():Hair { return _hair; } + public function set hair(value:Hair):void { _hair=value; } } } diff --git a/src/org/sevenchan/dongs/bodyparts/Hair.as b/src/org/sevenchan/dongs/bodyparts/Hair.as index f9988a4..c43d0fc 100644 --- a/src/org/sevenchan/dongs/bodyparts/Hair.as +++ b/src/org/sevenchan/dongs/bodyparts/Hair.as @@ -9,9 +9,8 @@ package org.sevenchan.dongs.bodyparts public class Hair { registerClassAlias("P_Hair", Hair); - public static const BALD:Hair = new Hair("no hair whatsoever"); - public var style:String; + public var style:String=""; public var color:String=""; private var _value:Number; public function get value():Number { @@ -23,11 +22,15 @@ package org.sevenchan.dongs.bodyparts this.color = color; } public function toString():String { - if (style == "bald") + if (isBald()) return "bald head"; return style+" "+color+" hair"; } + public function isBald():Boolean { + return (style == "bald" || style == ""); + } + public function getShortDescr(withModifier:Boolean = false):String { var t:String = "hair"; if(withModifier) diff --git a/src/org/sevenchan/dongs/creature/Human.as b/src/org/sevenchan/dongs/creature/Human.as index 47022d1..db0de46 100644 --- a/src/org/sevenchan/dongs/creature/Human.as +++ b/src/org/sevenchan/dongs/creature/Human.as @@ -27,7 +27,7 @@ package org.sevenchan.dongs.creature break; } this.build = Build.AVG; - this.hair = Hair.BALD; + this.hair = new Hair(); this.arms.push( BodyPartRegistry.human_arm, BodyPartRegistry.human_arm diff --git a/src/org/sevenchan/dongs/creature/Player.as b/src/org/sevenchan/dongs/creature/Player.as index c4f3fc0..a6d82cf 100644 --- a/src/org/sevenchan/dongs/creature/Player.as +++ b/src/org/sevenchan/dongs/creature/Player.as @@ -204,7 +204,7 @@ package org.sevenchan.dongs.creature // descr += "

You, " + baseType.ownName + ", are " + Utils.A(baseType.gender.label) + " " + baseType.gender.label + " " + baseType.getTypeName() + " whose body " + baseType.build.getDescription() + "." + " You also possess " + baseType.hair.toString(); - if (baseType.hair == Hair.BALD) + if (baseType.hair.isBald()) descr += ", your glistening scalp distracting from your "; else descr += ", which constrasts nicely with your "; @@ -296,6 +296,12 @@ package org.sevenchan.dongs.creature return baseType.notifyEnchantments(e); } */ + override public function get hair():Hair { + return baseType.hair; + } + override public function set hair(value:Hair):void { + baseType.hair = value; + } override public function get assholes():Vector. { return baseType._assholes; diff --git a/src/org/sevenchan/dongs/creature/Witch.as b/src/org/sevenchan/dongs/creature/Witch.as index b62d136..f2cca6e 100644 --- a/src/org/sevenchan/dongs/creature/Witch.as +++ b/src/org/sevenchan/dongs/creature/Witch.as @@ -29,7 +29,7 @@ package org.sevenchan.dongs.creature height = Math.random()*1.5 + 5; this.gender = Gender.FEMALE; this.build = Build.MALNOURISHED; - this.hair = Hair.BALD; + this.hair = new Hair(); this.arms.push( BodyPartRegistry.human_arm, BodyPartRegistry.human_arm diff --git a/src/org/sevenchan/dongs/screens/NewGameScreen.as b/src/org/sevenchan/dongs/screens/NewGameScreen.as index a33b2ba..b93d19a 100644 --- a/src/org/sevenchan/dongs/screens/NewGameScreen.as +++ b/src/org/sevenchan/dongs/screens/NewGameScreen.as @@ -18,8 +18,12 @@ package org.sevenchan.dongs.screens [Embed(source="txt/bsd-license.txt",mimeType="application/octet-stream")] private var License:Class; - [Embed(source="txt/intro.txt",mimeType="application/octet-stream")] - private var Introduction:Class; + [Embed(source="txt/humanintro.html",mimeType="application/octet-stream")] + private var HumanIntroduction:Class; + [Embed(source="txt/bovaintro.html",mimeType="application/octet-stream")] + private var BovaIntroduction:Class; + [Embed(source="txt/demonintro.html",mimeType="application/octet-stream")] + private var DemonIntroduction:Class; public function NewGameScreen() { @@ -37,6 +41,7 @@ package org.sevenchan.dongs.screens override public function processButtonPress(id:int):Boolean { var done:Boolean = false; + var validationError:String = ""; switch (stage) { case-1: // License @@ -47,73 +52,83 @@ package org.sevenchan.dongs.screens updateScreen(); break; case 0: // Species selection - this.stage = 1; this.clearButtons(); setButton(0, "Human"); setButton(1, "Bova"); setButton(2, "Demon"); + main.showTextInput(true, 167.75+12, 56.75+115); + main.player.baseType.ownName = main.getTextBoxContents(); + if (main.player.baseType.ownName.length > 0) { + this.stage = 1; + main.showTextInput(false, 0, 0); + validationError = ""; + processButtonPress(id); + return false; + }else{ + validationError = "Your name must be more than one character long." + } text = "

What are you?

"; text += "

First, what is your name?



"; - main.showTextInput(true, 167.75+12, 56.75+115); // Was 50 + if (validationError.length > 0) + text += "

" + validationError + "

"; + text += "

Next, what are you?

"; text += "

Human: You were born human. If you’re playing this, you probably know what a human looks like.

"; // Added commas, reworded a bit - Harb text += "

Bova: 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.

"; // s/bovine/bova/ text += "

Demon: 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.

"; // Grammatical fixes + updateScreen(); break; case 1: // Gender selection - this.stage = 2; + this.clearButtons(); text = "

Gender Selection

"; + stage = 2; switch (id) - { - case 0: - main.player.setBaseType(new Human()); - text += "

As a simple human, you can either be male or female as you start out.

"; - text += ""; - text += "

Humans also get randomly colored skin, hair, and eyes.

"; - clearButtons(); - setButton(0, "Male"); - setButton(2, "Female"); - break; - case 1: - main.player.setBaseType(new Bova()); - text += "

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.

"; - text += "

Bovae can be Male or Female.

"; - text += "

Males (bulls) are very strong, yet not very smart.

"; - text += "

Females are more cunning, yet they need their bulls for protection.

"; - clearButtons(); - setButton(0, "Male"); - setButton(2, "Female"); - break; - case 2: - main.player.setBaseType(new Demon()); - text += "

You have chosen to become a Demon. Demons can infect other creatures with an STD that eventually changes them into demons, as well.

"; - text += "

Demons can be any gender except asexual.

"; - clearButtons(); - setButton(0, "Male"); - setButton(1, "Hermaphrodite"); - setButton(2, "Female"); - break; - } - main.showTextInput(false, 0, 0); - main.player.baseType.ownName = main.getTextBoxContents(); - if (main.player.baseType.ownName.length == 0) - main.player.baseType.ownName = "Ugly MacDickface"; + { + case 0: + main.player.setBaseType(new Human()); + text += "

As a simple human, you can either be male or female as you start out.

"; + text += ""; + text += "

Humans also get randomly colored skin, hair, and eyes.

"; + clearButtons(); + setButton(0, "Male"); + setButton(2, "Female"); + break; + case 1: + main.player.setBaseType(new Bova()); + text += "

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.

"; + text += "

Bovae can be Male or Female.

"; + text += "

Males (bulls) are very strong, yet not very smart.

"; + text += "

Females are more cunning, yet they need their bulls for protection.

"; + clearButtons(); + setButton(0, "Male"); + setButton(2, "Female"); + break; + case 2: + main.player.setBaseType(new Demon()); + text += "

You have chosen to become a Demon. Demons can infect other creatures with an STD that eventually changes them into demons, as well.

"; + text += "

Demons can be any gender except asexual.

"; + clearButtons(); + setButton(0, "Male"); + setButton(1, "Hermaphrodite"); + setButton(2, "Female"); + break; + } updateScreen(); break; case 2: // Skin color stage = 3; switch (id) - { - case 0: - main.player.gender = Gender.MALE; - break; - case 1: - main.player.gender = Gender.HERM; - break; - case 2: - main.player.gender = Gender.FEMALE; - break; - } + { + case 0: + main.player.gender = Gender.MALE; + break; + case 1: + main.player.gender = Gender.HERM; + break; + case 2: + main.player.gender = Gender.FEMALE; + break; + } main.player.initialGenderSetup(); text = "

Skin color

"; text += "

What color is your skin?

"; @@ -138,7 +153,7 @@ package org.sevenchan.dongs.screens break; case 3: // Hair type stage = 4; - var isDemon:Boolean = main.player.getTypeName() == "demon"; + isDemon = main.player.getTypeName() == "demon"; if (!isDemon) { switch (id) @@ -189,26 +204,62 @@ package org.sevenchan.dongs.screens this.stage = 5; main.player.hair = new Hair(); switch (id) - { - case 0: // Plain - main.player.hair.style = "plain"; - break; - case 1: // Bob cut - main.player.hair.style = "bob-cut"; - break; - case 2: // Wild and proud - main.player.hair.style = "wild"; - break; - case 3: // Ponytail - main.player.hair.style = "ponytail"; - break; - case 4: // Bald - main.player.hair.style = "bald"; - break; - case 5: // Shaven - main.player.hair.style = "close-shaven"; - break; - } + { + case 0: // Plain + main.player.hair.style = "plain"; + break; + case 1: // Bob cut + main.player.hair.style = "bob-cut"; + break; + case 2: // Wild and proud + main.player.hair.style = "wild"; + break; + case 3: // Ponytail + main.player.hair.style = "ponytail"; + break; + case 4: // Bald + main.player.hair.style = "bald"; + break; + case 5: // Shaven + main.player.hair.style = "close-shaven"; + break; + } + clearButtons(); + if (main.player.hair.isBald()) + { + text = "

Hair Color

You don't have hair, so you get to skip this section!

";; + setButton(NEXT_BUTTON, "Next"); + } else { + text = "

Hair Color

"; + text += "

What color hair do you have?

"; + setButton(0, "Brown"); + setButton(1, "Blonde"); + setButton(2, "Black"); + setButton(3, "Red"); + setButton(4, "Gray"); + } + updateScreen(); + break; + case 5: + switch(id) + { + case 0: //Brown + main.player.hair.color = "brown"; + break; + case 1: //Blonde + main.player.hair.color = "blonde"; + break; + case 2: //Black + main.player.hair.color = "black"; + break; + case 3: //Red + main.player.hair.color = "red"; + break; + case 4: //Gray + main.player.hair.color = "gray"; + break; + } + stage = 6; clearButtons(); text = "

Class Selection

"; text += "

Here, you choose your initial startup benefits and weapons.

"; @@ -222,8 +273,8 @@ package org.sevenchan.dongs.screens text += ""; updateScreen(); break; - case 5: - stage = 6; + case 6: + stage = 7; main.player.strength = 5; main.player.speed = 5; main.player.intellect = 5; @@ -249,15 +300,19 @@ package org.sevenchan.dongs.screens break; } main.player.clothing.push(ItemRegistry.BROWN_TUNIC, ItemRegistry.GRAY_PANTS); - - text = new Introduction(); + if(main.player.baseType is Human) + text = new HumanIntroduction(); + if (main.player.baseType is Bova) + text = new BovaIntroduction(); + if (main.player.baseType is Demon) + text = new DemonIntroduction(); clearButtons(); main.setupStatsPanel(); setButton(NEXT_BUTTON, "Next"); updateScreen(); done = false; break; - case 6: + case 7: return true; } trace(id, stage, done); diff --git a/src/org/sevenchan/dongs/screens/encounters/GargoyleEncounter.as b/src/org/sevenchan/dongs/screens/encounters/GargoyleEncounter.as index 88ac151..05f3fe7 100644 --- a/src/org/sevenchan/dongs/screens/encounters/GargoyleEncounter.as +++ b/src/org/sevenchan/dongs/screens/encounters/GargoyleEncounter.as @@ -1716,6 +1716,7 @@ text += "

about her thighs. She has two normal human legs sculpted to end in n text += "

She has a pair of big, pleasingly soft D-cup breasts. They are without nipples.

"; text += "

She has a small yet easily stretched pussy between her legs, with a . 2 inch clitoris.

"; text += "

She has a tight asshole between her soft butt cheeks, right where it belongs.

"; + } } override public function onStartupScreen():void diff --git a/src/org/sevenchan/dongs/screens/txt/bovaintro.html b/src/org/sevenchan/dongs/screens/txt/bovaintro.html new file mode 100644 index 0000000..537065e --- /dev/null +++ b/src/org/sevenchan/dongs/screens/txt/bovaintro.html @@ -0,0 +1 @@ +

[Bova Introduction is still a WIP.]

\ No newline at end of file diff --git a/src/org/sevenchan/dongs/screens/txt/demonintro.html b/src/org/sevenchan/dongs/screens/txt/demonintro.html new file mode 100644 index 0000000..54e1e57 --- /dev/null +++ b/src/org/sevenchan/dongs/screens/txt/demonintro.html @@ -0,0 +1 @@ +

[Demon Introduction is still a WIP.]

\ No newline at end of file diff --git a/src/org/sevenchan/dongs/screens/txt/intro.txt b/src/org/sevenchan/dongs/screens/txt/humanintro.html similarity index 100% rename from src/org/sevenchan/dongs/screens/txt/intro.txt rename to src/org/sevenchan/dongs/screens/txt/humanintro.html -- 2.11.4.GIT