1 package org
.sevenchan
.dongs
.screens
4 import org
.sevenchan
.AdventureController
;
5 import org
.sevenchan
.dongs
.bodyparts
.Breast
;
6 import org
.sevenchan
.dongs
.bodyparts
.Penis
;
7 import org
.sevenchan
.dongs
.Item
;
8 import org
.sevenchan
.dongs
.items
.GoldPotion
;
9 import org
.sevenchan
.dongs
.items
.PinkPotion
;
10 import org
.sevenchan
.dongs
.items
.Potion
;
11 import org
.sevenchan
.dongs
.Screen;
17 public class WitchShopScreen
extends Screen
19 private var page
:String = "main";
20 private var subpage
:String = "main";
21 private var text
:String = "";
22 private var state
:String = "main";
23 private var title
:String = "";
24 private var priceoffset
:Number = 0;
25 private var dickincrement
:Number = 0;
26 private var type
:int = 0;
27 private var inventory
:Array = [];
29 public static function push
(id
:int = -1):void
31 AdventureController
.screenQueue
.write
(new WitchShopScreen
(id
));
34 public function WitchShopScreen
(id
:int = -1)
37 id
= MathUtils
.rand
(0, 3);
43 setup
(-5, 3, "Mildred's Manacles: Body Parts for LESS!");
46 setup
(0, 6, "Hallasee's Potion Shoppe: Always Low Quality. Always.");
48 new GoldPotion
(MathUtils
.rand
(6, 10)),
49 new PinkPotion
(MathUtils
.rand
(6, 10))];
52 setup
(1, 12, "Ehf's Dick Depot: Every Fuck Begins with Ehf.");
55 setup
(10, 24, "Granny Rasputin's Grand Gonads: The Balls of Champions.");
60 private function setup
(po
:Number, i
:Number, t
:String):void
63 this.priceoffset
= po
;
64 this.dickincrement
= i
;
67 override public function processButtonPress
(id
:int):Boolean
72 return onStartupScreen
(id
);
77 if (page
== "bodymod")
82 override public function getScreenText
():String
87 public function onStartupScreen
(id
:int):Boolean
101 return onBodyMod
(-1);
107 //[Buy] [Sell] [Change]
109 setButton
(1, "Sell");
110 setButton
(2, "Body Mods");
111 setButton
(3, "Leave");
112 text
= "<p>While walking through the town, your arm is grabbed by a frail-looking old woman. She ogles you, and then pulls a wand from the folds of her strange-looking clothing. It immediately dawns upon you that she is a Witch and is about to cast a spell. <i>Shit-</i> You think, right before she waves the wand.</p>";
113 text
+= "<p>A flash blinds you, and, instead of waking up at the barn, you look around and find that you're in a old, rustic shop that sprung up around you and the witch after she used her wand.</p>";
114 text
+= "<p>A cackle brings you to attention. The old woman is reclining precariously on a stool behind the shop's counter, surrounded by what can only be prices on various items. You're startled to see that there are some numbers beside illustrations of body parts, as well. The old woman notices your visible shock. "Oh, come on, my prices aren't THAT bad." She frowns. " So, tell me what you want."</p>";
115 text
+= "<p>Well, it couldn't hurt to ask. "Well, a translation would be nice. I'm from out of town." You request sheepishly.</p>";
116 text
+= "<p>The witch looks at you in confusion, and then her expression gives way to embarassment. "Oh, crap. I forgot to change the menus from Orcish. Just a moment..." A wave of her wand later, and the title and purpose of the establishment becomes readable:</p>";
117 text
+= "<p><b>" + title
+ "</b></p>";
118 text
+= "<p>At this shop, and those like it, you can buy and sell potions, and buy modifications to your body.</p>";
123 public function onBuy
(id
:int):Boolean
125 var item
:Item
= null;
126 text
= "<h2>Buy</h2>";
128 setButton
(0, "BACK");
129 for (var i
:int = 0; i
< inventory
.length
; i
++)
131 // 2x WhiteBerry (15G)
133 text
+= "<li><b>" + item
.amount
+ "x " + item
.name
+ " (" + (item
.value
+ priceoffset
) + "G)</b> - <i>" + item
.descr
+ "</i></li>";
134 setButton
(i
+ 1, item
.name
);
141 return processButtonPress
(-1);
145 item
= Item
.findByID
((inventory
[id
- 1] as Item
).id
);
146 var price
:int = (item
.value
+ priceoffset
);
147 // Check if we have enough money
148 if (main
.player
.gold
- price
< 0)
150 text
= "You don't have enough money for this.";
155 (inventory
[id
- 1] as Item
).amount
--;
156 if ((inventory
[id
- 1] as Item
).amount
== 0)
158 inventory
.splice
(id
- 1, 1);
163 main
.player
.addToInventory
(item
);
164 main
.player
.gold
-= price
;
173 public function onSell
(id
:int):Boolean
176 var item
:Item
= null;
177 text
= "<h2>Sell</h2>";
178 setButton
(0, "BACK");
179 if (inventory
.length
> 0)
182 for (i
= 0; i
< main
.player
.inventory
.length
; i
++)
184 // 2x WhiteBerry (15G)
185 item
= main
.player
.inventory
[i
];
186 text
+= "<li><b>" + item
.amount
+ "x " + item
.name
+ " (" + (item
.value
- priceoffset
) + "G)</b> - <i>" + item
.descr
+ "</i></li>";
187 setButton
(i
+ 1, item
.name
);
193 text
+= "<p><i>You have nothing to sell.</i></p>";
199 return processButtonPress
(-1);
203 item
= main
.player
.inventory
[id
- 1]
204 trace
("SHOPSCREEN ITEM", item
);
208 var price
:Number = (item
.value
- priceoffset
);
210 main
.player
.takeFromInventory
(item
);
211 main
.player
.gold
+= price
;
221 public function onBodyMod
(id
:int):Boolean
223 if (subpage
== "main")
225 text
= "<h2>Body Modifications</h2>";
226 // BACK Species Penises Testes Vaginas Breasts
227 // Abilities Enchant Arms Legs Wings
228 setButton
(0, "BACK");
229 setButton
(1, "Species");
230 setButton
(2, "Penises");
231 //setButton(3, "Testes");
232 //setButton(4, "Vaginas");
233 //setButton(5, "Breasts");
234 //setButton(7, "Abilities");
235 //setButton(8, "Enchant");
236 //setButton(9, "Arms");
237 //setButton(10, "Legs");
238 //setButton(11, "Wings");
246 return processButtonPress
(-1);
269 subpage
= "abilities";
273 subpage
= "enchantments";
291 if (subpage
== "species")
292 return BSChooseSpecies
(id
);
293 if (subpage
== "penises")
294 return BSPenises
(id
);
295 if (subpage
== "testes")
297 //if (subpage == "vaginas")
298 // return BSVaginas(id);
299 //if (subpage == "breasts") return BSBreasts(id);
300 //if (subpage == "abilities") return BSAbilities(id);
301 //if (subpage == "enchantments") return BSEnchantments(id);
302 //if (subpage == "arms") return BSArms(id);
303 //if (subpage == "legs") return BSLegs(id);
304 //if (subpage == "wings") return BSWings(id);
309 public function BSChooseSpecies
(id
:int):Boolean
311 if (main
.player
.gold
< 1000)
313 InfoScreen
.push
("<h2>Transformation</h2><p>You do not have enough gold.</p>");
314 WitchShopScreen
.push
();
317 text
= "<h2>Choose a Species</h2><p>Choose any creature to change into it for 1000G.</p>";
319 setButton
(0, "CANCEL");
320 setButton
(1, "Arachnid");
321 setButton
(2, "Bova");
322 setButton
(3, "Demon");
323 setButton
(4, "Harpy");
324 setButton
(4, "Human");
330 return processButtonPress
(-1);
333 main
.player
.changeTo
(CreatureRegistry
.arachnid
);
334 main
.player
.gold
-= 1000;
335 WitchShopScreen
.push
(type
);
339 main
.player
.changeTo
(CreatureRegistry
.bova
);
340 main
.player
.gold
-= 1000;
341 WitchShopScreen
.push
(type
);
345 main
.player
.changeTo
(CreatureRegistry
.demon
);
346 main
.player
.gold
-= 1000;
347 WitchShopScreen
.push
(type
);
351 main
.player
.changeTo
(CreatureRegistry
.harpy
);
352 main
.player
.gold
-= 1000;
353 WitchShopScreen
.push
(type
);
357 main
.player
.changeTo
(CreatureRegistry
.human
);
358 main
.player
.gold
-= 1000;
359 WitchShopScreen
.push
(type
);
367 private function addMenuOption
(id
:int, label
:String, price
:Number, descr
:String):String
369 // * Add Penis ($400) - Grow a new penis of your choice.
370 if (main
.player
.gold
>= price
)
371 setButton
(id
, label
);
372 return "<li><b>" + label
+ " (" + price
.toString
() + "G)</b> - " + descr
+ "</li>";
375 public function BSPenises
(id
:int):Boolean
377 trace
("BSPenises", id
)
379 setButton
(0, "CANCEL");
380 text
= "<h2>Penis Modifications</h2><p>Here, you can modify your member(s)... For a price.</p>";
382 text
+= addMenuOption
(1, "Add", 1000 + priceoffset
, "Grow a new penis of your choice");
383 var numdicks
:int = main
.player
.dicks
.length
;
386 text
+= addMenuOption
(2, "Remove", -900 + priceoffset
, "Remove one of your penises and sell it to the store.");
387 text
+= addMenuOption
(3, "Grow", numdicks
* (100 + priceoffset
), "Make your dongs bigger (by 6\")");
388 text
+= addMenuOption
(4, "Shrink", numdicks
* (100 + priceoffset
), "Shrink your wangs (by 6\")");
389 //text += addMenuOption(5, "Reset", 1000 + priceoffset, "Reset your groin to the default number, type, and size of dicks for your species.");
397 return processButtonPress
(-1);
400 var wang
:Penis
= main
.player
.addDick
();
403 InfoScreen
.push
("Your species doesn't have a default penis, so you'll get a human dick instead.");
404 wang
= BodyPartRegistry
.human_penis
;
406 wang
.onAdded
(true, main
.player
);
407 WitchShopScreen
.push
(type
);
408 main
.player
.gold
-= 1000 + priceoffset
;
412 wang
= main
.player
.dicks
.pop
();
413 main
.player
.gold
+= 900 - priceoffset
;
414 wang
.onRemoved
(true, main
.player
);
415 WitchShopScreen
.push
(type
);
419 text
= "<h2>Grow Dicks</h2>";
420 var glassDesc
:String = "shot glass";
421 if (dickincrement
>= 6 && dickincrement
< 12)
425 else if (dickincrement
>= 12 && dickincrement
< 18)
429 else if (dickincrement
>= 18 && dickincrement
< 24)
431 glassDesc
= "tumbler";
433 else if (dickincrement
>= 24)
435 glassDesc
= "beer mug";
437 text
+= "<p>The proprietor of the shop produces a " + glassDesc
+ " full of a maroon, murky liquid and hands the warm glass ";
438 text
+= "to you. </p><p>"Drink." She directs in a bored tone.</p><p>You give the liquid a quick glance, and then ";
439 text
+= "shrug, raising the " + glassDesc
+ " to your lips and draining it of its sweet contents. It doesn't take long for ";
440 text
+= "the effects to take hold, as pins-and-needles rush over your " + Utils
.pluralize
(main
.player
.dicks
.length
,"penis") + ". The skin tightens, ";
441 text
+= "and then expands. You groan loudly as your " + Utils
.pluralize
(main
.player
.dicks
.length
,"member") + " erect to their full size, and then ";
442 text
+= "continue until they reach the size you requested:</p><ul>";
443 for (var i
:int = 0; i
< main
.player
.dicks
.length
; i
++)
445 text
+= "<li>" + main
.player
.dicks
[i
].grow
(main
.player
, true, dickincrement
) + "</li>";
446 main
.player
.gold
-= 100 + priceoffset
;
451 text
= "<h2>Shrink Dicks</h2>";
452 text
+= "<p>The old woman nods after counting her cash, picks up her wand, and then suddenly screams at your groin, pointing ";
453 text
+= "her wand at it. She stops and returns to counting her cash as your penises retract the amount you specified:</p>";
455 for (i
= 0; i
< main
.player
.dicks
.length
; i
++)
457 text
+= "<li>" + main
.player
.dicks
[i
].shrink
(main
.player
, true, dickincrement
) + "</li>";
458 main
.player
.gold
-= 100 + priceoffset
;
463 var cc
:Class = getDefinitionByName
(getQualifiedClassName
(main
.player
)) as Class;
464 var c
:Creature
= new cc
();
465 main
.player
.gold
-= 1000;
473 public function BSTestes
(id
:int):Boolean
475 trace
("BSPenises", id
)
477 setButton
(0, "CANCEL");
478 text
= "<h2>Testicle Modifications</h2><p>Here, you can modify your nut(s)... For a price.</p>";
480 text
+= addMenuOption
(1, "Add", 1000 + priceoffset
, "Grow a new testicle of your choice");
481 var numballs
:int = main
.player
.dicks
.length
;
484 text
+= addMenuOption
(2, "Remove", -900 + priceoffset
, "Remove one of your balls and sell it to the store.");
485 //text += addMenuOption(5, "Reset", 1000 + priceoffset, "Reset your groin to the default number, type, and size of dicks for your species.");
493 return processButtonPress
(-1);
496 var wang
:Penis
= /*main.player.addBall()*/null;
499 InfoScreen
.push
("Your species doesn't have a default penis, so you'll get a human dick instead.");
500 wang
= BodyPartRegistry
.human_penis
;
502 wang
.onAdded
(true, main
.player
);
503 WitchShopScreen
.push
(type
);
504 main
.player
.gold
-= 1000 + priceoffset
;
508 wang
= main
.player
.dicks
.pop
();
509 main
.player
.gold
+= 900 - priceoffset
;
510 wang
.onRemoved
(true, main
.player
);
511 WitchShopScreen
.push
(type
);
515 text
= "<h2>Grow Dicks</h2>";
516 var glassDesc
:String = "shot glass";
517 if (dickincrement
>= 6 && dickincrement
< 12)
521 else if (dickincrement
>= 12 && dickincrement
< 18)
525 else if (dickincrement
>= 18 && dickincrement
< 24)
527 glassDesc
= "tumbler";
529 else if (dickincrement
>= 24)
531 glassDesc
= "beer mug";
533 text
+= "<p>The proprietor of the shop produces a " + glassDesc
+ " full of a maroon, murky liquid and hands the warm glass ";
534 text
+= "to you. </p><p>"Drink." She directs in a bored tone.</p><p>You give the liquid a quick glance, and then ";
535 text
+= "shrug, raising the " + glassDesc
+ " to your lips and draining it of its sweet contents. It doesn't take long for ";
536 text
+= "the effects to take hold, as pins-and-needles rush over your " + Utils
.pluralize
(main
.player
.dicks
.length
,"penis") + ". The skin tightens, ";
537 text
+= "and then expands. You groan loudly as your " + Utils
.pluralize
(main
.player
.dicks
.length
,"dick") + " erect to their full size, and then ";
538 text
+= "continue until they reach the size you requested:</p><ul>";
539 for (var i
:int = 0; i
< main
.player
.dicks
.length
; i
++)
541 text
+= "<li>" + main
.player
.dicks
[i
].grow
(main
.player
, true, dickincrement
) + "</li>";
542 main
.player
.gold
-= 100 + priceoffset
;
547 text
= "<h2>Shrink Dicks</h2>";
548 text
+= "<p>The old woman nods after counting her cash, picks up her wand, and then suddenly screams at your groin, pointing ";
549 text
+= "her wand at it. She stops and returns to counting her cash as your penises retract the amount you specified:</p>";
551 for (i
= 0; i
< main
.player
.dicks
.length
; i
++)
553 text
+= "<li>" + main
.player
.dicks
[i
].shrink
(main
.player
, true, dickincrement
) + "</li>";
554 main
.player
.gold
-= 100 + priceoffset
;
559 var cc
:Class = getDefinitionByName
(getQualifiedClassName
(main
.player
)) as Class;
560 var c
:Creature
= new cc
();
561 main
.player
.gold
-= 1000;
568 public function BSBreasts
(id
:int):Boolean
570 trace
("BSBreasts", id
)
572 setButton
(0, "CANCEL");
573 text
= "<h2>Breast Modifications</h2><p>Want bigger boobs? More tits? Fewer tits? Pay up and they're yours.</p>";
575 text
+= addMenuOption
(1, "Add", 1000 + priceoffset
, "Grow a new breast");
576 var numboobs
:int = main
.player
.breasts
.length
;
579 text
+= addMenuOption
(2, "Remove", -900 + priceoffset
, "Remove one of your balls and sell it to the store.");
580 text
+= addMenuOption
(3, "Grow", 100 + priceoffset
, "Fuck up your back by growing enormous tits!");
581 text
+= addMenuOption
(4, "Shrink", 100 + priceoffset
, "Shrink your boobs");
582 //text += addMenuOption(5, "Reset", 1000 + priceoffset, "Reset your groin to the default number, type, and size of dicks for your species.");
590 return processButtonPress
(-1);
593 var boob
:Breast
= main
.player
.addBreast
();
596 InfoScreen
.push
("Your species doesn't have a default breast type, so you'll get a human boob instead.");
597 boob
= BodyPartRegistry
.human_breast
;
599 boob
.onAdded
(true, main
.player
);
600 WitchShopScreen
.push
(type
);
601 main
.player
.gold
-= 1000 + priceoffset
;
605 boob
= main
.player
.breasts
.pop
();
606 main
.player
.gold
+= 900 - priceoffset
;
607 boob
.onRemoved
(true, main
.player
);
608 WitchShopScreen
.push
(type
);
612 text
= "<h2>Grow Dicks</h2>";
613 var glassDesc
:String = "shot glass";
614 if (dickincrement
>= 6 && dickincrement
< 12)
618 else if (dickincrement
>= 12 && dickincrement
< 18)
622 else if (dickincrement
>= 18 && dickincrement
< 24)
624 glassDesc
= "tumbler";
626 else if (dickincrement
>= 24)
628 glassDesc
= "beer mug";
630 text
+= "<p>The proprietor of the shop produces a " + glassDesc
+ " full of a maroon, murky liquid and hands the warm glass ";
631 text
+= "to you. </p><p>"Drink." She directs in a bored tone.</p><p>You give the liquid a quick glance, and then ";
632 text
+= "shrug, raising the " + glassDesc
+ " to your lips and draining it of its sweet contents. It doesn't take long for ";
633 text
+= "the effects to take hold, as pins-and-needles rush over your " + Utils
.pluralize
(main
.player
.dicks
.length
,"penis") + ". The skin tightens, ";
634 text
+= "and then expands. You groan loudly as your " + Utils
.pluralize
(main
.player
.dicks
.length
,"member") + " erect to their full size, and then ";
635 text
+= "continue until they reach the size you requested:</p><ul>";
636 for (var i
:int = 0; i
< main
.player
.dicks
.length
; i
++)
638 text
+= "<li>" + main
.player
.dicks
[i
].grow
(main
.player
, true, dickincrement
) + "</li>";
639 main
.player
.gold
-= 100 + priceoffset
;
644 text
= "<h2>Shrink Dicks</h2>";
645 text
+= "<p>The old woman nods after counting her cash, picks up her wand, and then suddenly screams at your groin, pointing ";
646 text
+= "her wand at it. She stops and returns to counting her cash as your penises retract the amount you specified:</p>";
648 for (i
= 0; i
< main
.player
.dicks
.length
; i
++)
650 text
+= "<li>" + main
.player
.dicks
[i
].shrink
(main
.player
, true, dickincrement
) + "</li>";
651 main
.player
.gold
-= 100 + priceoffset
;
656 var cc
:Class = getDefinitionByName
(getQualifiedClassName
(main
.player
)) as Class;
657 var c
:Creature
= new cc
();
658 main
.player
.gold
-= 1000;
666 private function BSVaginas
(id
:int):Boolean