code:
/**
 * Created by aimozg on 08.01.14.
 */
package classes.Scenes.Places.Farm
{
	import classes.*;
	import classes.GlobalFlags.kGAMECLASS;
	import classes.Scenes.Places.Farm;

	public class AbstractFarmContent extends BaseContent
	{
		public function AbstractFarmContent()
		{
		}
		protected function get farm():Farm {
			return game.farm;
		}

	}
}


code:
package classes.Scenes.Places.Farm
{
	import classes.Monster;
	/**
	 * ...
	 * @author ...
	 */
	public class Whitney extends Monster
	{

		public function Whitney()
		{

		}

	}

}

license: unknown


code:
//Ingnam: The Prologue
package classes.Scenes.Places
{
	import classes.*;
	import classes.BodyParts.*;
	import classes.GlobalFlags.*;
	import classes.Items.*;
	import classes.Scenes.Places.Ingnam.*;

	import coc.view.MainView;

	public class Ingnam extends BaseContent
	{
		public var ingnamFarm:IngnamFarm = new IngnamFarm();
		public var thiefScene:ThiefScene = new ThiefScene();

		public function get inIngnam():Boolean { return flags[kFLAGS.IN_INGNAM] > 0; }

		public function Ingnam()
		{
		}

		//Main Ingnam menu.
		public function menuIngnam():void {
			//Force autosave
			if (player.slotName != "VOID" && mainView.getButtonText(0) != "Game Over" && flags[kFLAGS.HARDCORE_MODE] > 0)
			{
				game.saves.saveGame(player.slotName);
			}
			//Banished to Mareth.
			if (game.time.days >= 0 && flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] <= 0 && flags[kFLAGS.GRIMDARK_MODE] < 1) {
				getBanishedToMareth();
				return;
			}
			clearOutput();
			outputText(images.showImage("location-ingnam"));
			if (flags[kFLAGS.GRIMDARK_MODE] > 0) {
				outputText("Ingnam is a village well-defended against the tides of monsters outside. There is a well-established array of shops though some of them seem to be abandoned and there's barely any activity. The temple sits within view of the patrons sitting at tables at the tavern which serves as a hub for people near and far to drink and dance. On the road leading out of the plaza that sits before the temple is a trail that meanders its way to a large farm in the distance.");
				outputText("\n\nLooming ominously in the distance is a mountain known by the locals as Mount Ilgast.");
			}
			else {
				outputText("Ingnam is a rich and prosperous village despite its small size. There is already a well-established array of shops with a constant hum of tradesmen and merchants. The temple sits within view of the patrons sitting at tables at the tavern which serves as a hub for people near and far to drink and dance. On the road leading out of the plaza that sits before the temple is a trail that meanders its way to a large farm in the distance.");
				outputText("\n\nLooming ominously in the distance is a mountain known by the locals as Mount Ilgast. Surrounding Ingnam is a vast expanse of wilderness.");
			}
			if (game.time.hours >= 21 || game.time.hours < 6) outputText("\n\nIt's dark outside. Stars dot the night sky and a moon casts the moonlight over the landscape, providing little light. Shops are closed at this time.");
			mainView.showMenuButton( MainView.MENU_NEW_MAIN );
			mainView.showMenuButton( MainView.MENU_DATA );
			mainView.showMenuButton( MainView.MENU_STATS );
			mainView.showMenuButton( MainView.MENU_PERKS );
			mainView.showMenuButton( MainView.MENU_APPEARANCE );
			showStats();
			mainView.setMenuButton( MainView.MENU_NEW_MAIN, "Main Menu", game.mainMenu.mainMenu );
			mainView.newGameButton.hint("Return to main menu.","Main Menu");
			if (camp.setLevelButton()) return;
			hideUpDown();
			menu();
			if (flags[kFLAGS.GRIMDARK_MODE] == 0) {
				addButton(0, "Explore", exploreIngnam);
				addButton(1, "Shops", menuShops);
			}
			addButton(2, "Temple", menuTemple);
			addButton(3, "Inn", menuTavern);
			addButton(4, "Farm", ingnamFarm.menuFarm);
			if (flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] > 0) addButton(14, "Return2Camp", returnToMareth);
			if (flags[kFLAGS.NEW_GAME_PLUS_LEVEL] > 0 && inventory.showStash() && flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] <= 0) addButton(6, "Stash", inventory.stash);
			addButton(7, "Inventory", inventory.inventoryMenu);
			if (player.lust >= 30) {
				if (player.lust >= player.maxLust()) {
					outputText("\n\nYou are debilitatingly aroused, and can think of doing nothing other than masturbating.");
					removeButton(0);
					removeButton(4);
				}
				game.masturbation.setMasturbateButton();
			}
			//Show wait/rest/sleep depending on conditions.
			addButton(9, "Wait", game.camp.doWait);
			if (player.fatigue > 40 || player.HP / player.maxHP() <= .9) addButton(9, "Rest", game.camp.rest);
			if (game.time.hours >= 21 || game.time.hours < 6) {
				removeButton(0);
				removeButton(1);
				removeButton(2);
				removeButton(4);
				addButton(9, "Sleep", game.camp.doSleep);
			}
			if (flags[kFLAGS.GRIMDARK_MODE] > 0) {
				addButton(14, "Leave", leaveIngnamGrimdark);
			}
		}

		//The end of prologue, starts the game.
		public function getBanishedToMareth():void {
			var hasWeapon:Boolean = false;
			clearOutput();
			hideMenus();
			outputText("Your time has come to meet up with the [if (iselder = true) other ]village elders. You[if (iselder = true) 've decided to go|  know you are going to get sent] to the demon realm and you're most likely not going to be able to return to Ingnam. You give your family and friends a long farewell.");
			if (flags[kFLAGS.NEW_GAME_PLUS_LEVEL] == 0) { //Doesn't happen in New Game+.
				if (player.weaponName != "fists") {
					hasWeapon = true;
					player.setWeapon(WeaponLib.FISTS);
				}
				while (player.hasItem(weapons.DAGGER, 1)) {
					hasWeapon = true;
					player.destroyItems(weapons.DAGGER, 1);
				}
				while (player.hasItem(weapons.PIPE, 1)) {
					hasWeapon = true;
					player.destroyItems(weapons.PIPE, 1);
				}
				while (player.hasItem(weapons.MACE, 1)) {
					hasWeapon = true;
					player.destroyItems(weapons.MACE, 1);
				}
				while (player.hasItem(weapons.SPEAR, 1)) {
					hasWeapon = true;
					player.destroyItems(weapons.SPEAR, 1);
				}
				while (player.hasItem(weapons.KATANA, 1)) {
					hasWeapon = true;
					player.destroyItems(weapons.KATANA, 1);
				}
				if (hasWeapon) outputText("\n\nUnfortunately, you [if (iselder = true) know you must|were instructed to] leave your weapon behind.");
			}
			flags[kFLAGS.IN_INGNAM] = 0;
			flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] = 1;
			doNext(game.charCreation.arrival);
		}

		public function returnToMareth():void {
			clearOutput();
			outputText("You make your journey to Mount Ilgast, walk through the portal back to Mareth and return to your camp.");
			flags[kFLAGS.IN_INGNAM] = 0;
			doNext(camp.returnToCampUseOneHour);
		}

		public function returnToIngnam():void {
			clearOutput();
			outputText("You enter the portal and make your return to Ingnam, thanks to the debug powers.");
			flags[kFLAGS.IN_INGNAM] = 1;
			doNext(camp.returnToCampUseOneHour);
		}

		public function leaveIngnamGrimdark():void {
			inRoomedDungeonResume = game.dungeons.resumeFromFight;
			game.dungeons._currentRoom = "wasteland";
			game.dungeons.move(game.dungeons._currentRoom);
		}

		//Explore Ingnam
		public function exploreIngnam():void {
			hideMenus();
			clearOutput();
			var chooser:int = rand(4);
			if (chooser == 0) {
				thiefScene.encounterThief();
				return;
			}
			else {
				outputText("You explore the village of Ingnam for a while but you don't find anything interesting.");
			}
			doNext(camp.returnToCampUseOneHour);
		}

		//Shopping time!
		public function menuShops():void {
			hideMenus();
			clearOutput();
			outputText("Which shop would you like to visit?");
			menu();
			addButton(0, "Blacksmith", shopBlacksmith);
			addButton(1, "Tailor", shopTailor);
			//addButton(2, "Alchemist", shopAlchemist);
			//addButton(3, "Trading Post", shopTradingPost);
			//addButton(4, "Black Market", shopBlackMarket);
			addButton(14, "Back", menuIngnam);
		}

		public function shopBlacksmith():void {
			clearOutput();
			if (player.isElder() && player.findPerk(PerkLib.HistorySmith2) >= 0) {
				outputText("You enter your old shop, noting the sign depicting armors. Some armor is proudly displayed on racks. You can hear the sound of hammering although it stops shortly after you enter. The local blacksmith, your former apprentice Ben, comes from the rear door and steps up to the counter and wipes away sweat from his face flushed red by the forge, \"Welcome to my shop. In a need of protection? Or something sharp?\"");
				if (flags[kFLAGS.INGNAM_WEAPONSMITH_TALKED] <= 0 && flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] <= 0) {
					outputText("\n\n\Before you can get a word in, Ben finally notices who entered. \"Ah, welcome back master. I'll take good care of the shop, so you can leave without any worries. Is there anything you need before you go?\"");
					outputText("\n\nYou haven't received any kind of weapon from the elders yet--that'll probably come when the time to depart comes around--but maybe you could get a bit more practice in before you leave. Better armor couldn't hurt either.");
					flags[kFLAGS.INGNAM_WEAPONSMITH_TALKED] = 1;
				}
			}
			else {
				outputText("You enter the armor shop, noting the sign depicting armors. Some armor is proudly displayed on racks. You can hear the sound of hammering although it stops shortly after you enter. The local blacksmith, Ben, comes from the rear door and steps up to the counter and wipes away sweat from his face flushed red by the forge, \"Welcome to my shop. In a need of protection? Or something sharp?\"");
				if (flags[kFLAGS.INGNAM_WEAPONSMITH_TALKED] <= 0 && flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] <= 0) {
					outputText("\n\n\Before you can get a word in, Ben lets out an exasperated sigh, saying, \"Ah, just forget about...\"");
					outputText("\n\nYou crook an eyebrow questioningly at the blacksmith. Ben then realizes his blunder.");
					outputText("\n\n\"Ah, well it’s just... You’re the new Champion, right? None of the people I've seen get sent through the portal brought a weapon, so I doubt you'll need one, aside from what I assume the elders will provide you with. Still, if you want to train with weapons, you can go ahead and buy them. A little preparation never hurt anyone.\" the blacksmith says.");
					flags[kFLAGS.INGNAM_WEAPONSMITH_TALKED] = 1;
				}
			}
			outputText("\n\nBlacksmith's pricings");
			menu();
			if (player.findPerk(PerkLib.HistoryFighter) >= 0) { //20% discount for History: Fighter
				addShopItem(weapons.DAGGER, 32, 1);
				addShopItem(weapons.PIPE, 40, 1);
				addShopItem(weapons.MACE, 80, 1);
				addShopItem(weapons.SPEAR, 140, 1);
				addShopItem(weapons.KATANA, 200, 1);
			}
			else if (player.findPerk(PerkLib.HistoryFighter2) >= 0) { //40% discount for History: Guard
				addShopItem(weapons.DAGGER, 24, 1);
				addShopItem(weapons.PIPE, 30, 1);
				addShopItem(weapons.MACE, 60, 1);
				addShopItem(weapons.SPEAR, 105, 1);
				addShopItem(weapons.KATANA, 150, 1);
			}
			else {
				addShopItem(weapons.DAGGER, 40, 1);
				addShopItem(weapons.PIPE, 50, 1);
				addShopItem(weapons.MACE, 100, 1);
				addShopItem(weapons.SPEAR, 175, 1);
				addShopItem(weapons.KATANA, 250, 1);
			}
			if (player.findPerk(PerkLib.HistorySmith) >= 0) { //20% discount for History: Smith perk
				addShopItem(armors.LEATHRA, 40, 2);
				addShopItem(armors.FULLCHN, 120, 2);
				addShopItem(armors.SCALEML, 160, 2);
			}
			else if (player.findPerk(PerkLib.HistorySmith2) >= 0) { //40% discount for History: Master Smith perk
				addShopItem(armors.LEATHRA, 30, 2);
				addShopItem(armors.FULLCHN, 90, 2);
				addShopItem(armors.SCALEML, 120, 2);
			}
			else {
				addShopItem(armors.LEATHRA, 50, 2);
				addShopItem(armors.FULLCHN, 150, 2);
				addShopItem(armors.SCALEML, 200, 2);
			}
			addButton(14, "Leave", menuShops);
		}

		public function shopTailor():void {
			clearOutput();
			outputText("You enter the tailor’s. The interior is laden with mannequins wearing half-finished works. Clothes are displayed on racks without obvious flaws. A fastidious, well-groomed young man with an immaculate blue three-piece suit topped with a measuring tape draping around his collar stands behind the counter and smiles at you with deference.");
			outputText("\n\n\"Welcome to my shop. Do you need to get outfitted?\" he says pulling keenly at the measuring tape draping his shoulders.");
			outputText("\n\nTailor shop pricings");
			menu();
			if (player.findPerk(PerkLib.HistorySlut2) >= 0) { //30% discount for History: Libertine perk
				addShopItem(armors.C_CLOTH, 7, 3);
				addShopItem(armors.ADVCLTH, 52, 3);
				addShopItem(armors.CLSSYCL, 70, 3);
				addShopItem(armors.TUBETOP, 28, 3);
				addShopItem(armors.OVERALL, 21, 3);
				addShopItem(armors.M_ROBES, 52, 3);
				addShopItem(armors.LTHRPNT, 140, 3);
				addShopItem(armors.RBBRCLT, 350, 3);
				addShopItem(armors.T_BSUIT, 455, 3);
			}
			else {
				addShopItem(armors.C_CLOTH, 10, 3);
				addShopItem(armors.ADVCLTH, 75, 3);
				addShopItem(armors.CLSSYCL, 100, 3);
				addShopItem(armors.TUBETOP, 40, 3);
				addShopItem(armors.OVERALL, 30, 3);
				addShopItem(armors.M_ROBES, 75, 3);
				addShopItem(armors.LTHRPNT, 200, 3);
				addShopItem(armors.RBBRCLT, 500, 3);
				addShopItem(armors.T_BSUIT, 650, 3);
			}
			addButton(14, "Leave", menuShops);
		}

		public function shopAlchemist():void {
			clearOutput();
			if (player.isElder() && player.findPerk(PerkLib.HistoryAlchemist2) >= 0) {
				if (flags[kFLAGS.INGNAM_ALCHEMIST_TALKED] <= 0) {
					outputText("As you approach the stone building the familiar smell of herbs and plants being brewed hits your nose. The crimson banner over the heavy wooden door indicates that this is your apothecary. You enter the place where you used to work on your famed remedies.");
					outputText("\n\nYou open the door and enter. Despite the establishment being dimly lit by candlelight you can make out the vast multicolored rows of countless potions, elixirs and tonics. Fragrant drying herbs are hanging from the rafters and various strange-looking equipment is set up in a variety of locations in the store.");
					outputText("\n\nWhen you decided to become this year's Champion, you left your store to a fellow alchemist. The ancient-looking man in a much-singed pair of robes is working on something volatile in the corner until he hears your presence. He stops and shuffles up to the timber counter, drumming it under his stained fingers. \"It's good to see you again. What can I do for you?\" he says from under his frayed hood.");
					flags[kFLAGS.INGNAM_ALCHEMIST_TALKED] = 1;
				}
				else {
					outputText("Once again, you return to the alchemist, letting the familiar smell of herbs and plants being brewed hit your nose.");
					outputText("\n\nThe alchemist senses your presences and he steps up to the counter and says, \"How may I help you?\"");
				}
			}
			else {
				if (flags[kFLAGS.INGNAM_ALCHEMIST_TALKED] <= 0) {
					outputText("As you approach the stone building the overpowering smell of herbs and plants being brewed hits your nose. The crimson banner over the heavy wooden door indicates that this is where the potions are made. You enter what appears to be the place where the alchemist works on his famed remedies.");
					outputText("\n\nYou open the door and enter. Despite the establishment being dimly lit by candlelight you can make out the vast multicolored rows of countless potions, elixirs and tonics. Fragrant drying herbs are hanging from the rafters and various strange-looking equipment is set up in a variety of locations in the store.");
					outputText("\n\nAn ancient-looking man in a much-singed pair of robes is working on something volatile in the corner until he hears your presence. He stops and shuffles up to the timber counter, drumming it under his stained fingers. \"What can I do for you, young master?\" he says from under his frayed hood.");
					flags[kFLAGS.INGNAM_ALCHEMIST_TALKED] = 1;
				}
				else {
					outputText("Once again, you return to the alchemist, letting the overpowering smell of herbs and plants being brewed hit your nose.");
					outputText("\n\nThe alchemist senses your presences and he steps up to the counter and says, \"How may I help you?\"");
				}
			}
			outputText("\n\nAlchemy shop pricings");
			menu();
			if (player.hasPerk(PerkLib.HistoryAlchemist)) { //20% discount for History: Alchemist perk
				addShopItem(consumables.REDUCTO, 80, 4);
				addShopItem(consumables.GROPLUS, 80, 4);
				addShopItem(consumables.L_DRAFT, 25, 4);
				addShopItem(consumables.LACTAID, 40, 4);
			}
			else if (player.hasPerk(PerkLib.HistoryAlchemist2)) { //40% discount for History: Master Alchemist perk
				addShopItem(consumables.REDUCTO, 60, 4);
				addShopItem(consumables.GROPLUS, 60, 4);
				addShopItem(consumables.L_DRAFT, 18, 4);
				addShopItem(consumables.LACTAID, 30, 4);
			}
			else {
				addShopItem(consumables.REDUCTO, 100, 4);
				addShopItem(consumables.GROPLUS, 100, 4);
				addShopItem(consumables.L_DRAFT, 30, 4);
				addShopItem(consumables.LACTAID, 50, 4);
			}
			addButton(14, "Leave", menuShops);
		}

		public function shopTradingPost():void {
			clearOutput();
			outputText("The trading post is one of the larger buildings in the village with its porch covered in barrels filled with pickled goods, preserved delicacies and dried goods from the humble local farm to exotic faraway lands. The interior is packed with crowded shelves that boast a variety of goods, all arranged neatly on shelves.");
			outputText("\n\nYou suspect you could buy some imported goods here.");
			outputText("\n\nTrading post pricings");
			menu();
			addShopItem(consumables.VITAL_T, 30, 5);
			addShopItem(consumables.SMART_T, 30, 5);
			addShopItem(consumables.FISHFIL, 5, 5);
			addButton(14, "Leave", menuShops);
		}

		public function shopBlackMarket():void {
			clearOutput();
			if (flags[kFLAGS.INGNAM_BLACKMARKET_TALKED] <= 0) {
				outputText("You walk into an alley you swear you have never explored before. You stifle your fear as you walk into the dingy looking alley.");
				outputText("\n\nUnease creeps over you until you hear a raspy voice whisper from the darkness of the alley. You look around to see a hooded figure skulk from the shadows to approach you.");
				outputText("\n\n\"Greetings. I know you. You’re going to be the new Champion, right?\" The hooded figure croaks. His face is mostly concealed by the shade of his hood. Slightly unnerved by the prowling figure you tell him that yes, you’re going to be the Champion of Ingnam.");
				outputText("\n\nHe pulls his hood down, quickly looking for the all-clear and rasps, \"I’ve managed to sneak into the portal at the mountains. There is extraordinary stuff that can transform you! It takes me years of planning as the portal is only open for a short window of time before it closes for the rest of the year.\"");
				outputText("\n\nWith a skin-crawling chuckle he opens up his coat and shows you the array of goods and says, \"I’ve managed to smuggle these in. They aren’t cheap but I guarantee you, they’re the real deal! See anything you like?\"");
				flags[kFLAGS.INGNAM_BLACKMARKET_TALKED] = 1;
			}
			else {
				outputText("Once again, you walk into the alley where the shady dealer should be. He approaches you as if he knows you.");
				outputText("\n\n\"Back, I see? See any deals you like?\" The shady man asks.");
			}
			outputText("\n\nBlack market pricings");
			menu();
			addShopItem(consumables.W_FRUIT, 75, 6);
			addShopItem(consumables.CANINEP, 75, 6);
			addShopItem(consumables.EQUINUM, 75, 6);
			addShopItem(consumables.INCUBID, 75, 6);
			addShopItem(consumables.SUCMILK, 75, 6);
			addButton(14, "Leave", menuShops);
		}

		//Transaction for buying items.
		public function transactionItemConfirmation(item:ItemType, price:int, shop:int):void {
			clearOutput();
			outputText("\"That will be " + num2Text(price) + " gems for " + item.longName + ".\"");
			if (player.gems >= price) {
				outputText("\n\nDo you buy it?");
				menu();
				addButton(0, "Yes", transactionYes, item, price, shop);
				addButton(1, "No", transactionNo, shop);
			}
			else {
				outputText("\n\nYou count out your gems and realize it's beyond your price range.");
				menu()
				addButton(0, "Next", transactionNo, shop);
			}
		}
		public function transactionYes(item:ItemType, price:int, shop:int):void {
			//Determine shop
			var shopToGo:Function = null
			if (shop == 1) shopToGo = shopBlacksmith;
			else if (shop == 2) shopToGo = shopBlacksmith;
			else if (shop == 3) shopToGo = shopTailor;
			else if (shop == 4) shopToGo = shopAlchemist;
			else if (shop == 5) shopToGo = shopTradingPost;
			else shopToGo = shopBlackMarket;
			//Process
			clearOutput();
			if (player.gems >= price) {
				outputText("You have purchased " + item.longName + " for " + price + " gems. ");
				player.gems -= price;
				menu();
				statScreenRefresh();
				inventory.takeItem(item, shopToGo);
			}
			else {
				outputText("You count out your gems and realize it's beyond your price range.");
				menu();
				addButton(0, "Next", transactionNo, shop);
			}
		}
		public function transactionNo(shop:int):void {
			if (shop == 1) shopBlacksmith();
			else if (shop == 2) shopBlacksmith();
			else if (shop == 3) shopTailor();
			else if (shop == 4) shopAlchemist();
			else if (shop == 5) shopTradingPost();
			else if (shop == 6) shopBlackMarket();
			else shopBlackMarket();
		}

		public function addShopItem(item:ItemType, price:int, shop:int):void {
			outputText("\n" + capitalizeFirstLetter(item.longName) + " - " + price + " gems");
			var button:int = 0;
			for (var i:int = 0; i < 14; i++) {
				if (output.buttonIsVisible(i)) button++;
			}
			addButton(button, item.shortName, transactionItemConfirmation, item, price, shop);
		}

		//Temple
		public function menuTemple():void {
			hideMenus();
			clearOutput();
			outputText(images.showImage("location-ingnam-temple"));
			outputText("The village temple appears humble-looking from its stony exterior, but the interior of it is truly a marvel to behold--intricately decorated wooden arches adorned with complex patterns of arcane runes of the Old World, walls adorned with majestic tapestries depicting the gods and their most valiant of feats, and at the end of the temple stands an immaculately crafted shrine to the All-Giving, the mother of all gods.");
			outputText("\n\nIncense languorously wafts from the alcoves where fruits are left out as offerings. Monks passively move amongst the parishioners, offering solace to those in need and food or drink to those who are weary from their travels.");
			outputText("\n\nThere are several soft mats on the floor to provide spots for people to pray.");
			menu();
			addButton(0, "Meditate", game.masturbation.meditate);
			addButton(14, "Leave", menuIngnam);
		}

		//Tavern
		public function menuTavern():void {
			hideMenus();
			clearOutput();
			outputText(images.showImage("location-ingnam-inn"));
			outputText("The inn is a cozy little nook that exudes a warm and welcoming air. You see several guardsmen roaring with laughter over a few steins and a hand of cards, and some townsfolk chatting about random topics. The innkeeper stands behind the polished wooden counter, serving beverages to his patrons and cleaning up spilled drinks.");
			if (flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] > 0 && flags[kFLAGS.INGNAM_GREETED_AFTER_LONGTIME] <= 0) {
				welcomeBack();
			}
			if ((player.horns.type > 0 && player.horns.type != flags[kFLAGS.INGNAM_EARS_LAST_TYPE] && flags[kFLAGS.INGNAM_EARS_FREAKOUT] <= 0) || (player.tail.type > 0 && player.tail.type != flags[kFLAGS.INGNAM_TAIL_LAST_TYPE] && flags[kFLAGS.INGNAM_TAIL_FREAKOUT] <= 0) && flags[kFLAGS.INGNAM_PROLOGUE_COMPLETE] <= 0) {
				appearanceFreakout();
				return;
			}
			menu();
			addButton(0, "Order Drink", orderDrink).hint("Buy some refreshing beverages.");
			addButton(1, "Order Food", orderFood).hint("Buy some food" + (flags[kFLAGS.HUNGER_ENABLED] > 0 && player.hunger < 50 ? " and curb that hunger of yours!": ".") + "");
			if (flags[kFLAGS.INGNAM_RUMORS] < 3) addButton(2, "Stories", hearRumors).hint("Hear the story the innkeeper has to offer.");
			//if (player.findPerk(PerkLib.HistoryWhore) >= 0) addButton(5, "Prostitute", whoreForGems).hint("Seek someone who's willing to have sex with you for profit.");
			addButton(14, "Leave", menuIngnam);
		}

		public function welcomeBack():void {
			clearOutput();
			outputText("The innkeeper looks at you and says, \"Welcome back! I've missed you! How did your adventures go?\"");
			outputText("\n\nYou tell the innkeeper about your adventures and how you've met various denizens in Mareth.\n\n");
			if (flags[kFLAGS.TIMES_TRANSFORMED] <= 0) outputText("The innkeeper looks at you in awe and says, \"Wow, you haven't changed at all! How did you manage to stay in that strange realm for years and still be normal?\"");
			else if (player.race == "human") {
				outputText("The innkeeper looks at you and says, \"I can see that you have changed a bit.\" ");
			}
			else {
				outputText("The innkeeper looks at you and says, \"I can see that you have changed quite a lot! Back then, before you left, you were a human. Now look at yourself!\"");
			}
			if (player.horns.value > 0 && player.horns.type > 0) {
				outputText("\n\n\"Are these " + (player.horns.type == Horns.ANTLERS ? "antlers" : "horns") + "? I can imagine they must be real,\" The innkeeper says before touching your [horns]. You can already feel his fingers rubbing against your [horns]. \"Yes, they're real and I think you look better,\" he says. You thank him for complimenting on your horns.");
			}
			if (player.wings.type != Wings.NONE) {
				outputText("\n\nNext, he looks at your wings that sprout from your back and says, \"Wings? I've never seen a person with wings before!\" ");
				if (player.canFly()) outputText("You tell him that you can fly. To demonstrate, you guide the innkeeper outside and you grit your teeth with effort as you flap your wings and you finally launch off from the ground and fly around the town! The people of Ingnam, including your family and friends, look at you in shock and some even say, \"" + player.mf("He", "She") + " can fly!\"");
			}
			outputText("\n\nPLACEHOLDER.");
			flags[kFLAGS.INGNAM_GREETED_AFTER_LONGTIME] = 1;
			doNext(menuTavern);
		}

		public function appearanceFreakout():void {
			clearOutput();
			outputText("The innkeeper stands up to see that there's something unusual with your appearance.");
			if (player.horns.type > 0) {
				if (player.ears.type == Ears.HORSE) {
					outputText("\n\nHe says, \"Your ears... They look different! They look like horse's! I have no idea how your ears changed.\"");
				}
				if (player.ears.type == Ears.DOG) {
					outputText("\n\nHe says, \"Your ears... They look like dog's! I have no idea how your ears changed.\"");
				}
				if (player.ears.type == Ears.CAT) {
					outputText("\n\nHe says, \"Your ears... They look like cat's! I have no idea how your ears changed but other than that, you look much cuter with cat ears!\" He walks over to you and scratch your cat-ears. \"They look and feel so real,\" he says.");
				}
				flags[kFLAGS.INGNAM_EARS_LAST_TYPE] = player.horns.type;
				flags[kFLAGS.INGNAM_EARS_FREAKOUT] = 1;
			}
			if (player.horns.type > 0 && player.tail.type > 0 && player.hasLongTail()) outputText("Next, he walks behind you, taking a glance at your tail.");
			if (player.tail.type > 0) {
				if (player.hasLongTail()) {
					outputText("\n\nHe says with a surprised look, \"You have a tail now? Are you sure this is fake?\" You tell him that your tail is not fake; it's real. \"Prove it,\" he says as he tugs your tail. Ouch! That hurts! \"Sorry about that,\" he says, \"but that tail definitely looks and feels real! I think your tail does look nice.\"");
					outputText("\n\nYou wag your tail and thank him for the compliment and he walks behind the counter.");
				}
				flags[kFLAGS.INGNAM_TAIL_LAST_TYPE] = player.tail.type;
				flags[kFLAGS.INGNAM_TAIL_FREAKOUT] = 1;
			}
			doNext(menuTavern);
		}

		public function orderDrink():void {
			clearOutput();
			outputText("What kind of drink would you like?");
			outputText("\n\nPricings");
			outputText("\n5 gems - Beer");
			outputText("\n2 gems - Milk");
			outputText("\n3 gems - Root Beer");

			menu();
			addButton(0, "Beer", buyBeer);
			addButton(1, "Milk", buyMilk);
			addButton(2, "Root Beer", buyRootBeer);
			addButton(14, "Back", menuTavern);
		}

		public function buyBeer():void {
			clearOutput();
			if (player.gems < 5) {
				outputText("You don't have enough gems for that.");
				doNext(orderDrink);
				return;
			}
			player.gems -= 5;
			if (player.isChild()) {
				outputText("\"I'd like a glass of beer please,\" you say. The innkeeper gives you a strange look, but decides to allow it. After all, it may be your last chance, considering the dangers you're about to face.");
				outputText("\n\nYou drink the beer slowly, your face becoming flushed as your small body quickly feels the effects of the alcohol. ");
				dynStats("lus", 20);
				player.refillHunger(10);
				if (!player.hasStatusEffect(StatusEffects.Drunk)) {
					player.createStatusEffect(StatusEffects.Drunk, 2, 2, 1, 0);
					dynStats("str", 0.1);
					dynStats("inte", -0.5);
					dynStats("lib", 0.25);
					outputText("\n\nYou already feel a bit drunk. Maybe you should stop at one glass?");
				}
				else {
					player.addStatusValue(StatusEffects.Drunk, 2, 2);
					if (player.statusEffectv1(StatusEffects.Drunk) < 2) player.addStatusValue(StatusEffects.Drunk, 1, 1);
					if (player.statusEffectv2(StatusEffects.Drunk) == 2) {
						outputText("\n\nYou feel a bit drunk. Maybe you should cut back on the beers?");
					}
					//Get so drunk you end up peeing! Genderless can still urinate.
					if (player.statusEffectv2(StatusEffects.Drunk) >= 3) {
						outputText("\n\nYou feel so drunk. Your vision is blurry and you realize something's not feeling right. Gasp! You have to piss like a racehorse! You stumble toward the back door and go outside. ")
						if (player.hasVagina() && !player.hasCock()) outputText("You open up your [armor] and squat down while you release your pressure onto the ground. ");
						else outputText("You open up your [armor] and lean against the wall using one of your arms for support while you release your pressure onto the wall. ");
						outputText("It's like as if the floodgate has opened! ");
						awardAchievement("Urine Trouble", kACHIEVEMENTS.GENERAL_URINE_TROUBLE, true, true, false);
						awardAchievement("Smashed", kACHIEVEMENTS.GENERAL_SMASHED, true, true, false);
						outputText("\n\nIt seems to take forever but it eventually stops. You look down to see that your urine has been absorbed into the ground. You close up your [armor] and head back inside.");
						player.removeStatusEffect(StatusEffects.Drunk);
						cheatTime(1/12);
					}
				}
			}
			else {
				outputText("\"I'd like a glass of beer please,\" you say. You hand over the five gems to the innkeeper and he pours you a glass of beer.");
				outputText("\n\nYou kick back and drink the beer slowly. ");
				dynStats("lus", 20);
				player.refillHunger(10);
				if (!player.hasStatusEffect(StatusEffects.Drunk)) {
					player.createStatusEffect(StatusEffects.Drunk, 2, 1, 1, 0);
					dynStats("str", 0.1);
					dynStats("inte", -0.5);
					dynStats("lib", 0.25);
				}
				else {
					player.addStatusValue(StatusEffects.Drunk, 2, 1);
					if (player.statusEffectv1(StatusEffects.Drunk) < 2) player.addStatusValue(StatusEffects.Drunk, 1, 1);
					if (player.statusEffectv2(StatusEffects.Drunk) == 2) {
						outputText("\n\nYou feel a bit drunk. Maybe you should cut back on the beers?");
					}
					//Get so drunk you end up peeing! Genderless can still urinate.
					if (player.statusEffectv2(StatusEffects.Drunk) >= 3) {
						outputText("\n\nYou feel so drunk. Your vision is blurry and you realize something's not feeling right. Gasp! You have to piss like a racehorse! You stumble toward the back door and go outside. ")
						if (player.hasVagina() && !player.hasCock()) outputText("You open up your [armor] and squat down while you release your pressure onto the ground. ");
						else outputText("You open up your [armor] and lean against the wall using one of your arms for support while you release your pressure onto the wall. ");
						outputText("It's like as if the floodgate has opened! ");
						awardAchievement("Urine Trouble", kACHIEVEMENTS.GENERAL_URINE_TROUBLE, true, true, false);
						awardAchievement("Smashed", kACHIEVEMENTS.GENERAL_SMASHED, true, true, false);
						outputText("\n\nIt seems to take forever but it eventually stops. You look down to see that your urine has been absorbed into the ground. You close up your [armor] and head back inside.");
						player.removeStatusEffect(StatusEffects.Drunk);
						cheatTime(1/12);
					}
				}
			}
			cheatTime(1/12);
			doNext(menuTavern);
		}
		public function buyMilk():void {
			clearOutput();
			if (player.gems < 2) {
				outputText("You don't have enough gems for that.");
				doNext(orderDrink);
				return;
			}
			player.gems -= 2;
			outputText("\"I'd like a glass of milk please,\" you say. You hand over the two gems to the innkeeper and he pours you a glass of milk.");
			outputText("\n\nYou drink the cup of milk. You feel calm and refreshed. ");
			player.changeFatigue(-15);
			player.HPChange(player.maxHP() / 4, false);
			player.refillHunger(10);
			cheatTime(1/12);
			doNext(menuTavern);
		}
		public function buyRootBeer():void {
			clearOutput();
			if (player.gems < 3) {
				outputText("You don't have enough gems for that.");
				doNext(orderDrink);
				return;
			}
			player.gems -= 3;
			outputText("\"I'd like a glass of root beer please,\" you say. You hand over the three gems to the innkeeper and he pours you a glass of root beer.");
			outputText("\n\nYou drink the cup of root beer. Refreshing! ");
			player.changeFatigue(-15);
			player.HPChange(player.maxHP() / 4, false);
			player.refillHunger(10);
			cheatTime(1/12);
			doNext(menuTavern);
		}

		public function orderFood():void { //Order food, because you need to be able to fill hunger.
			clearOutput();
			outputText("You take a seat and look at the menu. What would you like?");
			outputText("\n\nPricings");
			outputText("\n5 gems - Sandwich");
			outputText("\n3 gems - Soup");
			outputText("\n5 gems - Hard biscuits (Packed)");
			outputText("\n10 gems - Trail mix (Packed)");
			menu();
			addButton(0, "Sandwich", buySandwich);
			addButton(1, "Soup", buySoup);
			addButton(2, "Biscuits", buyHardBiscuits);
			addButton(3, "Trail Mix", buyTrailMix);
			addButton(14, "Back", menuTavern);
		}

		public function buySandwich():void { //Eat sandwich, refill hunger. The reason it's ambiguous is to let you imagine what sandwich you're eating.
			clearOutput();
			if (player.gems < 5) {
				outputText("You don't have enough gems for that.");
				doNext(orderDrink);
				return;
			}
			player.gems -= 5;
			outputText("You tell the innkeeper that you would like a sandwich and toss five gems at him. \"Certainly, " + player.mf("sir", "madam") + ",\" he says as he quickly grabs a plate and assembles a sandwich. Hey, it's your favorite type!");
			outputText("\n\nYou eat the sandwich. Delicious!");
			player.HPChange(player.maxHP() / 3, false);
			player.refillHunger(25);
			cheatTime(1/12);
			doNext(menuTavern);
		}

		public function buySoup():void { //Eat soup. Again, it's vague to let you imagine what soup you're eating.
			clearOutput();
			if (player.gems < 3) {
				outputText("You don't have enough gems for that.");
				doNext(orderDrink);
				return;
			}
			player.gems -= 3;
			outputText("You tell the innkeeper that you would like a bowl of soup and toss three gems at him. \"Certainly, " + player.mf("sir", "madam") + ",\" he says as he grabs a bowl and fills it with steaming soup. Hey, it's your favorite type!");
			outputText("\n\nYou take one spoonful at a time, blowing to make sure the soup isn't too hot. You eventually finish the soup. Delicious!");
			player.HPChange(player.maxHP() / 3, false);
			player.refillHunger(20);
			cheatTime(1/12);
			doNext(menuTavern);
		}

		private function buyHardBiscuits():void {
			clearOutput();
			if (player.gems < 5) {
				outputText("You can't afford one of those!");
				doNext(orderFood);
				return;
			}
			outputText("You pay five gems for a pack of hard biscuits.  ");
			player.gems -= 5;
			statScreenRefresh();
			inventory.takeItem(consumables.H_BISCU, orderFood);
		}

		private function buyTrailMix():void {
			clearOutput();
			if (player.gems < 10) {
				outputText("You can't afford one of those!");
				doNext(orderFood);
				return;
			}
			outputText("You pay ten gems for a pack of trail mix.  ");
			player.gems -= 10;
			statScreenRefresh();
			inventory.takeItem(consumables.TRAILMX, orderFood);
		}

		public function hearRumors():void { //Hear rumors. Will be altered after defeating Lethice so he will say "Welcome back".
			clearOutput();
			var rumor:int = rand(4);
			outputText("You ask the innkeeper if he has anything special to tell you.");
			if (flags[kFLAGS.INGNAM_RUMORS] == 0) {
				if (player.isElder()) {
					//I do plan on writing new rumours for elders, but I don't have any ideas at the moment so I'm just leaving them as they are for now.
					outputText("\n\nHe nods and says, \"Let me tell you. You know what happens to the so-called 'champions'?\" ");
					outputText("\n\nYou nod in response and he continues, \"Well... Nobody ever came. I've seen twenty people departing over the course of my career. Twenty years. None of them ever returned. Who knows what happened to them? Some say they're abducted by an evil presence as soon as they set foot into the portal.\"");
					outputText("\n\nHe looks at you and sniffles. \"Truth be told, you're going to be the Champion of Ingnam. You will be sent to the so-called 'portal' that is supposedly located in Mount Ilgast. I will miss your patronage at the inn. You're still welcome anytime.\"");
				}
				else {
					outputText("\n\nHe nods and says, \"Let me tell you. You know what happens to the so-called 'champions'?\" ");
					outputText("\n\nYou nod in response and he continues, \"Well... Nobody ever came. I've seen twenty people departing over the course of my career. Twenty years. None of them ever returned. Who knows what happened to them? Some say they're abducted by an evil presence as soon as they set foot into the portal.\"");
					outputText("\n\nHe looks at you and sniffles. \"Truth be told, you're going to be the Champion of Ingnam. You will be sent to the so-called 'portal' that is supposedly located in Mount Ilgast."+ (player.isChild() ? " I know you're too young to be a patron here, but I'll miss you anyway." : " I will miss your patronage at the inn.") +" You're still welcome anytime.\"");
				}
				flags[kFLAGS.INGNAM_RUMORS] = 1;
			}
			else if (flags[kFLAGS.INGNAM_RUMORS] == 1) {
				if (player.isElder()) {
					outputText("\n\nHe nods and says, \"You know Mount Ilgast?\" ");
					outputText("\n\nYou nod in response and he continues, \"Before I began my work as an innkeeper, I was an adventurer. I've explored Mount Ilgast once. There was something glowing. It's a portal but it's no ordinary portal. Even strange was that there was something stirring in my groin. Honestly, I swear I never felt that sensation before. I winded up masturbating at the cave entrance just because of that warmth. As soon as I go near the portal, the warm sensation came back again. It's just strange, really strange. So I've hurried back to Ingnam and never visited the mountain again.\"");
					outputText("\n\nYou thank him for telling you.");
				}
				else {
					outputText("\n\nHe nods and says, \"You know Mount Ilgast?\" ");
					outputText("\n\nYou nod in response and he continues, \"Before I began my work as an innkeeper, I was an adventurer. I've explored Mount Ilgast once. There was something glowing. It's a portal but it's no ordinary portal. Even strange was that there was something stirring in my groin. Honestly, I swear I never felt that sensation before. I winded up masturbating at the cave entrance just because of that warmth. As soon as I go near the portal, the warm sensation came back again. It's just strange, really strange. So I've hurried back to Ingnam and never visited the mountain again.\"");
					outputText("\n\nYou thank him for telling you.");
				}
				flags[kFLAGS.INGNAM_RUMORS] = 2;
			}
			else if (flags[kFLAGS.INGNAM_RUMORS] == 2) {
				if (player.isElder()) {
					outputText("\n\nHe nods and says, \"Would you really like to know something special?\" You nod in response and he continues, \"One time I've seen a man with cat ears and a tail. I thought they were just accessories but he insisted it was real. So I tugged on his ears and it was... real. I thought he used a lot of glue but he insisted that it's real. His ears do feel real. His tail even swished from side to side like it's an actual cat tail. He told me about something called 'Whisker Fruit' or something. So my guess is that the food in the so-called 'demon realm' can change you.\"");
					outputText("\n\nYou tell him if he has some tips for you. He says, \"Yes. If I were you, I would eat them only as last resort. Even a food that could transform you can make the difference between life and death.\" You thank him for the advice.");
					outputText("\n\n\"You're welcome. I have nothing left to tell you but you're always welcome,\" he says.");
				}
				else {
					outputText("\n\nHe nods and says, \"Would you really like to know something special?\" You nod in response and he continues, \"One time I've seen a man with cat ears and a tail. I thought they were just accessories but he insisted it was real. So I tugged on his ears and it was... real. I thought he used a lot of glue but he insisted that it's real. His ears do feel real. His tail even swished from side to side like it's an actual cat tail. He told me about something called 'Whisker Fruit' or something. So my guess is that the food in the so-called 'demon realm' can change you.\"");
					outputText("\n\nYou tell him if he has some tips for you. He says, \"Yes. If I were you, I would eat them only as last resort. Even a food that could transform you can make the difference between life and death.\" You thank him for the advice.");
					outputText("\n\n\"You're welcome. I have nothing left to tell you but you're always welcome,\" he says.");
				}
				flags[kFLAGS.INGNAM_RUMORS] = 3; //Finished
			}
			doNext(camp.returnToCampUseOneHour);
		}

	}

}


code:
package classes.Scenes.Places.Ingnam
{
	import classes.*;
	import classes.GlobalFlags.*;
	import classes.Items.*;

	public class IngnamFarm extends BaseContent
	{

		public function IngnamFarm()
		{
		}

		//Farm
		public function menuFarm():void {
			hideMenus();
			clearOutput();
			outputText(images.showImage("location-ingnam-farm"));
			outputText("As you make your way up the dirt road to the farm, you immediately see the vast bountiful acres of crops ripe for harvest and dairy cows idly grazing in the fields by a large weather-worn barn. A wooden windmill creaks quietly nearby a quaint two-storey homestead.");
			if (flags[kFLAGS.INGNAM_FARMER_MET] <= 0) {
				outputText("\n\nYou hear a rustling from the swaying cornfield and instinctively tense up for a fight. To your relief it is the farm's owner who emerges. The farmer is woman of average build and she is modestly garbed in overalls. Wiping away her sweaty blond locks from her flushed face walks up to greet you with a warm smile.");
				outputText("\n\n\"I heard rumors that you're going to be the Champion of Ingnam, is that true [name]?.\" the young farmer asks nervously. You affirm somberly, yes, you are the next Champion. Tears start to well up in her eyes as her voice begins to crack with emotion \"I've known you" + player.isLoliShota(" all your life"," since we were kids") + ", I can't believe I won't be seeing you again [name]... This has to be some mistake.\"");
				outputText("\n\nYou embrace her and tell the shaking farmer that it is for the good of the village. Her tears start to roll down her reddened cheeks, you stroke her hair soothing, whispering that everything will be fine.");
				outputText("\n\nAfter talking about your upcoming task, the farming girl calms down and offers you some gems, \"You can still work here to get some gems. I'll pay you five gems for each hour you work. This should help you out while on your journey...\"");
				flags[kFLAGS.INGNAM_FARMER_MET] = 1;
			}
			outputText("\n\nYou could help out the farmer with some work for gems.");
			menu();
			addButton(0, "Work", workAtFarm).hint("Work at the farm for gems.");
			addButton(14, "Leave", game.ingnam.menuIngnam);
		}

		public function workAtFarm():void { //Job at the farm.
			clearOutput();
			if (player.fatigue + 20 > player.maxFatigue()) {
				outputText("You are too exhausted to work at the farm!");
				doNext(menuFarm);
				return;
			}
			var chooser:int = rand(3);
			outputText("You let the farmer know that you're here to work for the farm.");
			if (chooser == 0) {
				outputText("\n\n\"Great! The stable needs cleaning. I understand it's not for the faint of the heart but I promise you'll be rewarded,\" the farmer says. She guides you to the stables and hands you the shovel for cleaning" + (silly() ? " and a clothespin to clip your nose shut": "") + ".");
				outputText("\n\nYou spend half an hour cleaning the muck out of the stable. When you're finished cleaning the muck, the farmer comes back at you and instructs you to change the straw pile. You do as she instructs, sweeping all the old straw piles into one large pile. Finally, you spend the rest of the hour laying a new layer of straw for the horses to lay on.");
				outputText("\n\n\"I'll take care of these from there. Thank you for helping me. You've taken some of the load off my burden. Here's your payment,\" she says. She hands you five gems.");
				if (player.str100 < 25 && rand(2) == 0) {
					outputText("\n\nYou feel a bit stronger from all the hard work you've done.");
					dynStats("str", 1);
				}
				if (player.tou100 < 25 && rand(2) == 0) {
					outputText("\n\nYour efforts have helped to improve your stamina.");
					dynStats("tou", 1);
				}
				player.changeFatigue(20);
			}
			else if (chooser == 1) {
				outputText("\n\n\"Great! I could use a hand harvesting crops,\" she says, \"We need five full baskets of crops.\"");
				outputText("\n\nShe escorts you to the field where the crops grow. She hands you the basket so you can collect the crops. \"We'll harvest the crops. You only need to fill five, I'll take care of the rest,\" she says.");
				outputText("\n\nYou pick the corn from the plant one by one and put them into basket. This continues until the basket gets full after which you switch to another empty basket. You get back to harvesting and repeat until all the baskets are full. The farmer comes to see that you've filled all the baskets. \"Good work! I'll take care of things from there. Here's your payment,\" she says. She hands you the five gems.");
				if (player.str100 < 25 && rand(2) == 0) {
					outputText("\n\nYou feel a bit stronger from all the hard work you've done.");
					dynStats("str", 1);
				}
				if (player.tou100 < 25 && rand(2) == 0) {
					outputText("\n\nYour efforts have helped to improve your stamina.");
					dynStats("tou", 1);
				}
				player.changeFatigue(20);
			}
			else {
				outputText("\n\n\"Great! The cows need to be milked. It should be a simple task,\" she says. She escorts you to the cow pen and says, \"Fill as much buckets as you can but make sure all the cows are milked. When you're done, we'll haul the buckets. I have things to attend. Good luck!\"");
				outputText("\n\nYou place the bucket under one of the cows' udders. You gently squeeze the udders. Milk squirts from its udders and into the bucket. When the milk flow stops, you move on to the next cow. You repeat the process, cow after cow.");
				outputText("\n\nBy the time you've finished milking all the cows, you are left with ten full buckets of milk. The farmer comes back and says, \"Did you milk all these cows?\" You give her a nod and show her the full buckets of milk. \"Thank you. You know what? You've deserved some free milk! Now would be a good time for some break,\" She says happily. She fills a cup with milk and gives it to you. You promptly drink the milk. Wow, this stuff is delicious when it's freshly milked! After a good drink, you strike up some conversation with her.");
				player.refillHunger(20);
				player.HP += 50;
				player.changeFatigue(-10);
				outputText("\n\nAfter a few minutes of chatting, the break is over and you help her with hauling the buckets to her farmhouse, four at a time. After three trips, she gives you a final task of filling the milk bottles. You carefully pour the milk through a funnel into the bottle and when you manage to fill it, you move on to the next bottle. You repeat the process until the buckets are empty. \"Good work! You have finished your work! Here's your payment,\" she says as she hands you the five gems you deserve.");
				if (player.str100 < 25 && rand(2) == 0) {
					outputText("\n\nYou feel a bit stronger from all the hard work you've done.");
					dynStats("str", 1);
				}
				if (player.tou100 < 25 && rand(2) == 0) {
					outputText("\n\nYour efforts have helped to improve your stamina.");
					dynStats("tou", 1);
				}
				player.changeFatigue(10);
			}
			if (player.findPerk(PerkLib.HistorySlacker) >= 0) player.changeFatigue(-5);
			outputText("\n\nYou walk back to Ingnam.");
			player.gems += 5;
			statScreenRefresh();
			doNext(camp.returnToCampUseOneHour);
		}
	}

}


code:
package classes.Scenes.Places.Ingnam
{
	import classes.*;
	import classes.BodyParts.Butt;
	import classes.BodyParts.Hips;
	import classes.internals.*;
	import classes.GlobalFlags.*;

	public class Thief extends Monster
	{

		private var shota:Boolean = game.ingnam.thiefScene.shota;

		override public function defeated(hpVictory:Boolean):void
		{
			game.ingnam.thiefScene.winAgainstThief();
		}

		public function Thief()
		{
			this.a = "the ";
			this.short = "thief";
			this.imageName = "thief";
			this.long = "The thief standing before you is a human" + (shota ? ", not even in his teens yet" : "") + ".  His skin is fairly pale and his hair is brown.  He's wearing a set of leather armor and wielding a dagger in his right hand.  He's intent on knocking you out so he can take your gems.";
			this.race = "Human";
			// this.plural = false;
			this.createCock();
			createBreastRow(Appearance.breastCupInverse("flat"));
			this.ass.analLooseness = Ass.LOOSENESS_NORMAL;
			this.ass.analWetness = Ass.WETNESS_NORMAL;
			this.tallness = (shota?4:5)*12 + 5 + rand(4);
			this.hips.rating = Hips.RATING_BOYISH;
			this.butt.rating = Butt.RATING_TIGHT;
			this.skin.tone = "light";
			this.hair.color = "brown";
			this.hair.length = 4;
			initStrTouSpeInte(17, 16, 16, 17);
			initLibSensCor(20, 15, 20);
			this.weaponName = "knife";
			this.weaponVerb = "slash";
			this.weaponAttack = 4;
			this.armorName = "leather armor";
			this.lust = 25;
			this.temperment = TEMPERMENT_LOVE_GRAPPLES;
			this.level = 1;
			this.gems = 5+rand(10);
			this.drop = new WeightedDrop().add(weapons.DAGGER,1)
					.add(armors.LEATHRA,1)
					.add(null,8);
			checkMonster();
		}

	}

}


code:
package classes.Scenes.Places.Ingnam
{
	import classes.*;
	import classes.GlobalFlags.*;
	import classes.Items.*;

	public class ThiefScene extends BaseContent
	{

		public function ThiefScene()
		{
		}

		public var shota:Boolean = false;

		public function encounterThief():void {
			clearOutput();
			shota = rand(2) == 0 && npcOptions.genericLoliShota && flags[kFLAGS.UNDERAGE_ENABLED] >= 0;
			outputText("You wander peacefully through your village, until you feel something pressing against your shoulder. Looking around, you see " + (shota ? "a young" : "a") + " thief behind you. [say: Give me your money,] he demands.");
			menu();
			addButton(0, "Fight", startCombatImmediate, new Thief).hint("Fight the lowlife off.");
			addButton(1, "Give Gems", giveGems).hint("Give the thief what he wants.");
		}

		private function giveGems():void {
			clearOutput();
			outputText("Reaching into your pouch, you ");
			if (player.gems <= 0) outputText("find it to be completely empty, forcing you to beg the thief for mercy. \"Damn! Looks like I've picked the wrong person,\" the thief says with a grumbled look. He lets go of you and saunters off.");
			else if (player.gems > 0 && player.gems <= 5) {
				outputText("quickly pull out " + (player.gems == 1 ? "your last gem": "a few gems") + " to hand over. \"That's not much. Fine,\" the thief grumbles before letting you go and taking your only gem" + (player.gems == 1 ? "": "s") + ", sauntering off with a scowl.");
				flags[kFLAGS.THIEF_GEMS] += player.gems;
				player.gems = 0;
			}
			else {
				outputText("quickly pull out a fistful of gems to hand over. The thief snatches them and tells you to scram, leaving you 5 gems lighter.");
				flags[kFLAGS.THIEF_GEMS] += 5;
				player.gems -= 5;
			}
			statScreenRefresh();
			doNext(camp.returnToCampUseOneHour);
		}

		public function winAgainstThief():void {
			clearOutput();
			outputText("The thief collapses from his " + (monster.lust >= monster.maxLust() ? "overwhelming desires" : "injuries") + ". You smile in satisfaction as you rummage through his gem pouch");
			if (flags[kFLAGS.THIEF_GEMS] > 0) outputText(", happily retrieving the gems the thief has taken from you");
			outputText(".");
			monster.gems += flags[kFLAGS.THIEF_GEMS];
			flags[kFLAGS.THIEF_GEMS] = 0;
			menu();
			if (player.lust >= 33 && flags[kFLAGS.SFW_MODE] <= 0) {
				outputText("\n\nYou could punish the thief if you want to. If so, which parts would you use?");
				if (player.hasCock()) {
					if (player.cockThatFits(monster.analCapacity()) >= 0) addButton(0, "Anal Fuck", rapeThiefAnally).hint("The thief definitely needs to learn a lesson not to mess with you. Buttfuck the " + (shota ? "preteen " : "") + "thief.");
					else outputText(" Your cock is too big to fit!");
				}
				if (player.hasVagina()) addButton(1, "Get Licked", getLicked).hint("Punish the thief by having him lick your vagina.");
				addButton(4, "Leave", combat.cleanupAfterCombat);
				return;
			}
			combat.cleanupAfterCombat();
		}

		private function rapeThiefAnally():void {
			var x:int = player.cockThatFits(monster.analCapacity());
			clearOutput();
			outputText("You drag the unconscious thief into one of the alleys and remove his leather pants so he's naked from the waist down. The " + (shota ? "young boy" : "thief") + " wakes up, realizing what you're doing and says with a whimper, \"Please don't put that in there. I've never had anything in there.\"");
			outputText("\n\nYou " + (player.armor != ArmorLib.NOTHING || player.lowerGarment != UndergarmentLib.NOTHING ? "remove your " + player.armorName + ", " : "") + "get the thief into position and you slowly slide your " + player.cockDescript(x) + " into his rear hole. Despite the " + (shota ? "boy" : "thief") + "'s protestations, he seems to find pleasure.");
			outputText("\n\n\"Yes, fuck me! Please fuck me!\" The thief yells. That's the only encouragement you need as you thrust back and forth, abusing his " + (shota ? "underage " : "") + "ass. You grab his shoulders to get more leverage and you continue to pound with reckless abandon.");
			outputText("\n\nEventually, you can hold back no more and you unload your seed into his depths. The thief achieves orgasm as well, cumming all over the ground before falling on ground, dazed. You slide your " + player.cockDescript(x) + " out with a pop" + player.clothedOrNaked(", redress yourself") + " and leave the ravaged thief to recover.");
			player.orgasm('Dick');
			combat.cleanupAfterCombat();
		}

		private function getLicked():void {
			clearOutput();
			outputText("You drag the unconscious thief into one of the alleys. The " + (shota ? "young boy" : "thief") + " wakes up and realize what you're going to do. You " + (player.armor != ArmorLib.NOTHING || player.lowerGarment != UndergarmentLib.NOTHING ? "remove the bottom half of your " + player.armorName + "" : "") + " to reveal your " + player.vaginaDescript() + (player.hasCock() ? " and " + player.cockDescript(): "") + ".");
			outputText("\n\n\"Now lick. I want it licked good!\" you tell the thief. The " + (shota ? "little boy" : "thief") + " lets out a sigh as he licks your [pussy]. You let out a moan in pleasure while he's tongue-fucking your [pussy].");
			outputText("\n\nEventually, you can hold back no more and your [pussy] spasms, launching femcum");
			if (player.hasCock()) outputText(" while your [cock] fires ropes of jism");
			outputText(" all over his face. Still disoriented, the thief collapses back on the ground. You " + player.clothedOrNaked("redress yourself") + " and make a hasty exit while the thief is recovering from his ordeal.");
			player.orgasm('Vaginal');
			combat.cleanupAfterCombat();
		}

	}

}


code:
package classes.Scenes.Places {
	import classes.*;
	import classes.BodyParts.*;
	import classes.GlobalFlags.*;
	import classes.Scenes.NPCs.SylviaScene;
	import classes.Scenes.Places.MothCave.DoloresScene;
	import classes.internals.*;
	import classes.saves.SelfSaving;
	import classes.saves.SelfSaver;
	import classes.TimeAwareInterface;

	public class MothCave extends BaseContent implements SelfSaving, TimeAwareInterface {
		public var doloresScene:DoloresScene = new DoloresScene();

		public var saveContent:Object = {
			tapestryChange: 0,
			tapestryTime: 0
		};

		public function get saveName():String {
			return "mothcave";
		}

		public function get saveVersion():int {
			return 1;
		}

		public function load(version:int, saveObject:Object):void {
			for (var property:String in saveContent) {
				if (saveObject.hasOwnProperty(property)) saveContent[property] = saveObject[property];
			}
		}

		public function reset():void {
			saveContent.tapestryChange = 0;
			saveContent.tapestryTime = 0;
		}

		public function onAscend(reset:Boolean):void {
			saveContent.tapestryChange = 0;
			saveContent.tapestryTime = 0;
		}

		public function saveToObject():Object {
			return saveContent;
		}

		public function loadFromObject(o:Object, ignoreErrors:Boolean):void {
		}

		public function timeChangeLarge():Boolean { return false; }
		public function timeChange():Boolean {
			if (saveContent.tapestryChange == 1) {
				saveContent.tapestryTime++;
				if (saveContent.tapestryTime >= 168) saveContent.tapestryChange = 2
			}
			return false;
		}

		public function MothCave() {
			SelfSaver.register(this);
			CoC.timeAwareClassAdd(this);
		}

		public function encounterCave():void {
			doloresScene.saveContent.doloresAngry = false;
			if (game.sylviaScene.pregnancy.incubation == 0 && game.sylviaScene.pregnancy.event > 0) game.sylviaScene.doloresBirth();
			else if (game.sylviaScene.sylviaProg == 4 && game.sylviaScene.saveContent.sylviaFertile == 0) game.sylviaScene.sylviaCaveFirst();
			else if (doloresScene.doloresProg == 1) doloresScene.doloresPostBirth();
			else if (doloresScene.doloresProg == 2 && doloresScene.doloresTime > 72) doloresScene.doloresToys();
			else if (doloresScene.doloresProg == 3 && doloresScene.doloresTime > 72) doloresScene.doloresTalking();
			else if (doloresScene.doloresProg == 4 && doloresScene.doloresTime > 72) doloresScene.doloresMagic();
			else if (doloresScene.doloresProg == 6 && doloresScene.doloresTime > 24) doloresScene.doloresPreCocoon();
			else if (doloresScene.doloresProg == 7) doloresScene.doloresCocoon();
			else if (doloresScene.doloresProg == 8 && doloresScene.doloresTime > 144) doloresScene.doloresHatches();
			else if (doloresScene.doloresProg == 12) doloresScene.doloresTalkAfter();
			else if (doloresScene.doloresProg == 13 && doloresScene.doloresTime > 48) doloresScene.doloresTapestryMaking();
			else caveMenu();
		}

		public function caveMenu():void {
			clearOutput();
			outputText("You make your way to Sylvia's home with ease, the path there now " + (game.sylviaScene.sylviaProg > 4 || doloresScene.doloresProg > 5 ? "quite " : "") + "familiar to you. After several minutes of slugging through swampy water, the sight of the inviting cave entrance gladdens you, and you hasten inside.");
			if (doloresScene.doloresProg == 9) outputText("\n\nYou [walk] into the main room of the cave, but no one is here to greet you. Strange, but you can hear sounds coming from the back hallway, so it's clear someone is still here.");
			else outputText("\n\nYou see Sylvia at the back of the room" + (doloresScene.doloresProg > 1 ? ", and Dolores is probably in her own, if you'd like to " + (doloresScene.doloresProg > 3 ? "talk with" : "see") + " her" : "") + ".");
			menu();
			addNextButton("Sylvia", game.sylviaScene.execEncounter).disableIf(doloresScene.doloresProg == 9 && doloresScene.doloresTime > 36, "She isn't here right now.");
			if (doloresScene.doloresProg > 1) addNextButton("Dolores", doloresScene.encounterDolores).disableIf(doloresScene.saveContent.doloresAngry, "Maybe you should give her some time to cool off.");
			addNextButton("Tapestries", tapestryMenu);
			addButton(14, "Leave", camp.returnToCampUseOneHour);
		}

		//Start of tapestry stuff
		public function tapestryMenu():void {
			clearOutput();
			outputText("A collection of silk tapestries hand on the walls of this cave. Many of them depict the lives of moths long past, but some of them are more artistic endeavors, portraying various natural scenes, alongside the occasional more abstract piece. You see Sylvia's at the back wall of the cave");
			if (saveContent.tapestryChange == 2) outputText(", but something seems different about it");
			else if (doloresScene.doloresProg > 14) outputText(", and Dolores's hangs right beside it");
			else if (doloresScene.doloresProg > 0) outputText(", a notably empty space cleared next to it");
			else if (saveContent.tapestryChange == 3) outputText(", marred though it is");
			outputText(".");
			menu();
			addNextButton("Admire", admireTapestries);
			addNextButton("Sylvia", sylviaTapestry);
			if (doloresScene.doloresProg > 14) addNextButton("Dolores", doloresTapestry);
			addButton(14, "Back", caveMenu);
		}

		public function admireTapestries():void {
			clearOutput();
			outputText("You decide to spend some time simply admiring the craftsmanship of the tapestries. Drifting around the cave, you find a surprising amount of variation in them. Although from a distance they all seem to be of similar style, up close you can tell that each one was made with love and passion. While you might not know any of their subjects, you find yourself feeling a strange sense of connection. Even these brief snatches of their lives are enough to get a sense of who they were, their essence.");
			outputText("\n\nEventually, you just pull up a chair before the biggest block of them. There's something calming, almost narcotic about their aura, as if a sweet summer breeze is blowing in and sweeping away all of your material concerns. You pick out one in particular, whose centerpiece is a beautiful image of a forest on a placid day. There's something about the dappled leaves, the grass swaying in the wind, and that impossibly clear sky that draws you in, relaxing your entire body.");
			outputText("\n\nSylvia joins you after a while, walking up behind you and draping her arms over your shoulders. Her presence is " + (game.sylviaScene.sylviaGetDom < 50 ? "calming, supportive, her warmth a reminder that she'll always be there for you" : "calming, reassuring, a reminder that you'll always have a place in her arms") + ". The two of you sit in silence for a long while, just enjoying the atmosphere, but eventually, the moth-girl speaks up. [say: They're... something special, aren't they?]");
			outputText("\n\nYou agree.");
			outputText("\n\nA couple of minutes later you get up and stretch your limbs, which feel surprisingly stiff for how long you've been sitting. Sylvia flutters over—but when did she leave your side?—and gives you a kiss as you prepare to leave. " + (doloresScene.doloresProg > 3 ? "On your way out of the cave, you spot your daughter reading a book by the shelf, and you wave to her before exiting" : "You give Sylvia one last wave before exiting the cave") + ".");
			outputText("\n\nWhen you finally feel the bog's fetid air on your skin again, you're hit with a sudden shock. " + (15 < time.hours < 19 ? "Night has fallen over the swamp during your time in the cave, snuffing out the few shafts of light peeking through the foliage" : "The position of the " + (time.hours > 18 ? "moon" : "sun") + " has shifted significantly since you entered the cave") + ". Were you sitting there longer than you thought?");
			player.changeFatigue( -20);
			dynStats("lib", -1);
			doNext(camp.returnToCampUseFourHours);
		}

		public function sylviaTapestry():void {
			clearOutput();
			if (saveContent.tapestryChange > 1) {
				outputText("The silken tapestry that you inspected before hangs on the far wall of the cave, depicting scenes from, you presume, Sylvia's childhood. Taking a closer look, you're once again impressed by its quality—the handiwork is superb, and the material exquisite, resulting in a true work of art. At the leftmost edge, you see a happy couple holding a young caterpillar with one hand stretching out toward the sky. The mother is a moth just like Sylvia, but the father appears to be a human, like you" + (player.startingRace != "human" ? " used to be" : "") + ". Further along, you see a small white and purple streak zipping between trees in a blur as her mother looks on. It seems Sylvia was just as good at flying as a child, but you can't help but notice her father's absence.");
				outputText("\n\nThe centerpiece is... different. In place of the breathtaking wings you saw last time, there is a violent, chaotic maelstrom of hastily restitched thread. Jagged lines of red and purple form the rough outline of a heart, and in the center of it is a vaguely [race]-shaped figure. A shiver runs down your spine as the realization dawns on you. It seems that Sylvia has mangled the original design, replacing it with some sort of dedication to you. The erratic and disorganized nature of the work make clear its creator's mania, and you can feel the obsession radiating through. While it is evidence of her love for you, the fact that Sylvia was willing to rip up a treasured childhood relic is somewhat worrying.");
				if (saveContent.tapestryChange == 2) saveContent.tapestryChange = 3;
			} else {
				outputText("A silken tapestry hangs on the far wall of the cave, depicting scenes from, you presume, Sylvia's childhood. Taking a closer look, you're impressed by its quality—the handiwork is superb, and the material exquisite, resulting in a true work of art. At the leftmost edge, you see a happy couple holding a young caterpillar with one hand stretching out toward the sky. The mother is a moth just like Sylvia, but the father appears to be a human, like you" + (player.startingRace != "human" ? " used to be" : "") + ". Further along, you see a small white and purple streak zipping between trees in a blur as her mother looks on. It seems Sylvia was just as good at flying as a child, but you can't help but notice her father's absence.");
				outputText("\n\nThe centerpiece is a breathtaking recreation of Sylvia's wings, all of the intricate patterns rendered in minute detail. The extreme level of care taken in making this is perfectly evident in their expertly wrought beauty, and you can feel the love radiating through. Sadly, the right side of the tapestry remains unfinished, its frayed edge abruptly cut off part way through. An unfinished scene of uncertain significance has been interrupted, only a small part of Sylvia's mother having been finished. The half-completed visage of the older moth woman is vaguely melancholic" + (player.cor < 30 ? ", sending a sympathetic pang through your heart" : "") + ".");
				if (saveContent.tapestryChange < 1) saveContent.tapestryChange = 1;
			}
			doNext(tapestryMenu);
		}

		public function doloresTapestry():void {
			clearOutput();
			outputText("You take a look at Dolores's freshly made tapestry, which hangs just to the right of her mother's. The craftsmanship is truly wonderful, and you" + (doloresScene.saveContent.doloresTimesLeft < 2 ? "'re filled with the memories of all of the time you've spent with Dolores" : " feel a small pang of regret at having missed so many moments come unbidden to your heart") + ".");
			outputText("\n\nThe left side depicts several scenes from her early childhood. You see a young Dolores holding one end of a book, the other supported by the hands of some helpful giant, and staring at it in astonishment, her eyes bright stars alive with wonder. Further along, you see the little moth drift across the silk, her expression surprisingly evocative for how small the depiction is. Her mouth is closed, and so are her eyes, " + (doloresScene.saveContent.doloresTimesLeft < 2 ? "but you've known her long enough to tell that she's not upset" : "and you can't quite understand what she's feeling") + ".");
			outputText("\n\nOn the right side, there are a few images of Dolores practicing magic. The grace and beauty of her motions come through the threads, and you can feel the same wonder you're sure she feels when pursuing her passion. " + (doloresScene.saveContent.doloresDecision == 1 ? "That old book features prominently in these scenes, a constant companion to her experimentation" : "However, there's a slight sadness in her face, and you feel an incredible sense of longing coming from the fabric") + ".");
			outputText("\n\nThe centerpiece is the slightest bit odd. You see your daughter standing, her eyes closed and her palms turned outwards. Some kind of aura radiates out from them, forming a corona around her and making her seem like some radiant angel. Behind her looms a yawning abyss, and, looking at it, you shiver. Something about it " + (doloresScene.saveContent.doloresFinal%10 != 1 ? "strongly reminds you of the thing you encountered in the clearing" : "sends a chill down your spine, though you don't know why") + ". You quickly move on to Dolores's expression, which is somehow " + (doloresScene.saveContent.doloresFinal%10 == 2 ? "stoic" : "melancholic") + " and impenetrable, its mystery drawing you in.");
			outputText("\n\nConsidering the tapestry as a whole, you're impressed by both your daughter's vivacity and Sylvia's skill in bringing it to life.");
			doNext(tapestryMenu);
		}
	}

}