Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / screens / shops / BodyShop.as
blob30c4db6f34cd436bfca25c7159aadffb8fb83e42
1 package org.sevenchan.dongs.screens.shops
3 import flash.utils.Dictionary;
4 import org.sevenchan.dongs.ActionNode;
5 import org.sevenchan.dongs.bodyparts.IBodyPart;
6 import org.sevenchan.dongs.Creature;
7 import org.sevenchan.dongs.MenuNode;
8 import org.sevenchan.dongs.screens.Shop;
9 import org.sevenchan.dongs.Town;
11 /**
12 * ...
13 * @author ...
15 public class BodyShop extends Shop
17 private var partsInventory:Dictionary = new Dictionary();
18 private var BuyItems:MenuNode;
19 public function BodyShop(dName:String,dDesc:String, name:String, description:String,t:Town, markup:Number, itemsSold:Array)
21 super(dName,dDesc,name, description,t, markup, []);
22 inventory = [];
24 currentItem.clearChildren();
25 currentItem.content = <![CDATA[
26 <p>
27 As soon as your eyes adjust to the interior lighting, you immediately gag and back towards the door. Before you, lit by
28 flickering candle light, are rows upon rows of body parts displayed in clear glass cases. Everything from spider legs to
29 tentacles to unidentified organs sit on luxurious red pillows inside of their dimly lit cases.
30 </p>
31 <p>
32 Hey, not on the rug, buddy !” The store owner shouts from behind the thick marble counter, jabbing his fat finger in your
33 direction while peering over his jewelers spectacles perched over what could be called a nose. “Im not gonna have a
34 fucking drunk wreck my new carpet.” He reveals a thick wooden bat and wobbles it at you in a somewhat threatening manner.
35 </p>
36 <p>
37 You hold up your hands in defense. “Uh, sorry. Ive never seen a, uh…” You flail your hands a bit, indicating the shop
38 in its entirety. The store owner narrows his eyes. “Youve never seen a body shop before? Seriously?” You nod in
39 response, eyes focused on the bat. He scratches his balding head, and then sighs, his rotund body collapsing in
40 exasperation as he throws the bat into a cupboard and rolls his eyes. “Alright, I guess Ive got nothing better to do than give people the
41 grand fucking tour.” He starts to explain, and the pieces begin to fall together.
42 </p>
43 <p>
44 Most towns in the demon realm have body shops. Here, you can buy and sell body parts, which comes in handy when you begin
45 to collect excess limbs from creature encounters. In addition, some body parts carry their own special attacks or
46 abilities. However, anatomy is hard to come by, so its typically very expensive, and the spells to safely graft the more
47 powerful limbs to your body require more in the way of potions and labor, so theyre more costly.
48 </p>
49 ]]>.toString();
50 BuyItems = currentItem.pushMenu("Buy", "Check out the frightening display of limbs");
52 var ArmsMenu:MenuNode = null;
53 var AssholesMenu:MenuNode = null;
54 var BreastsMenu:MenuNode = null;
55 var EyesMenu:MenuNode = null;
56 var HairMenu:MenuNode = null;
57 var LegsMenu:MenuNode = null;
58 var PenisMenu:MenuNode = null;
59 var SkinMenu:MenuNode = null;
60 var TesticleMenu:MenuNode = null;
61 var VaginaMenu:MenuNode = null;
62 var WingMenu:MenuNode = null;
63 var cats:Array = [];
64 for each (var o:* in itemsSold)
66 var bp:IBodyPart = o as IBodyPart;
67 partsInventory[bp.name] = MathUtils.rand(1, 5);
68 if (cats.lastIndexOf(bp.category) == -1)
70 cats.push(bp.category);
71 switch(bp.category) {
72 case "arms":
73 AddToOrCreateMenu(ArmsMenu, "arms", "Arms", "Arms and similar limbs.",bp);
74 break;
75 case "assholes":
76 AddToOrCreateMenu(AssholesMenu, "assholes", "Anuses", "Buttholes, rectums, insectoid/spider abdomens and such.",bp);
77 break;
78 case "breasts":
79 AddToOrCreateMenu(BreastsMenu, "breasts", "Breasts", "Boobs and other secretion glands shaped like boobs.", bp);
80 break;
81 case "eyes":
82 AddToOrCreateMenu(EyesMenu, "eyes", "Eyes", "Sight organs of all kinds",bp);
83 break;
84 //case "hair":
85 // AddToOrCreateMenu(HairMenu, "hair", "Hair", "Hair. There's not much to it", bp);
86 // break;
87 case "legs":
88 AddToOrCreateMenu(LegsMenu, "legs", "Legs", "Limbs made for locomotion (and sometimes kicking).", bp);
89 break;
90 case "dicks":
91 AddToOrCreateMenu(PenisMenu, "dicks", "Penises", "Male sex organs.", bp);
92 break;
93 case "skin":
94 AddToOrCreateMenu(SkinMenu, "skin", "Skin", "Skin, scales, fur, slime. Change your body texture.", bp);
95 break;
96 case "testicle":
97 AddToOrCreateMenu(TesticleMenu, "balls", "Testes", "Balls affect how your semen looks and how it affects people who get pumped full of it.", bp);
98 break;
99 case "vagina":
100 AddToOrCreateMenu(VaginaMenu, "vaginas", "Vaginas", "Female sex organs of all shapes and sizes.", bp);
101 break;
102 default:
103 trace("!!!!!!WAAAAAAAT!!!!",typeof(bp), bp.category);
109 private function AddToOrCreateMenu(menu:MenuNode, bodyGroup:String, menuName:String, menuDescription:String, bp:IBodyPart):void
111 trace("Adding " + bp.sellDesc + ": " + bp.value);
112 if (menu == null) {
113 menu = BuyItems.pushMenu(menuName, menuDescription);
114 menu.content = menuDescription;
116 menu.pushAction(bp.name,bp.value+(bp.value*markup),bp.sellDesc,function(ply:Creature, node:ActionNode, o:*):Boolean
118 ply[bodyGroup].push(bp);
119 return true;
120 }, bp);