Skip to content

Commit

Permalink
Patches initial stuff added.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldergames committed Nov 29, 2014
1 parent ec554a6 commit b61eda2
Show file tree
Hide file tree
Showing 5 changed files with 256 additions and 44 deletions.
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Version 0.3r
- Fertilium.
- Virilium.
* You can now save/sleep at the penthouse after befriending the twins. This gives you another free safe spot in Rigard.
* Patches is now slightly more talkative.

--------------------------------------------
PREVIOUS VERSIONS
Expand Down
1 change: 1 addition & 0 deletions js/credits.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ CreditsScreen = function() {
Text.Add("Momo: QuietBrowser and LukaDoc<br/>");
Text.Add("Naga: LonelyRonin<br/>");
Text.Add("Estevan gay sex: Ben<br/>");
Text.Add("Patches: Me and LD<br/>");

Text.NL();

Expand Down
8 changes: 4 additions & 4 deletions js/event/nomads/chief.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ Scenes.Chief.Interact = function() {
// PATCHWORK
scenes.push(function() {
Text.AddOutput("<i>“If you need anything, why don't you check out Patchwork's shop?”</i> the old man suggests, indicating an odd pile of clothes in front of the only wagon in the camp. It is barely possible to distinguish that a person is hidden somewhere inside the multicolored robes, which seems to be made from sewn-together pieces of colored cloth. <i>“Patches scavenges stuff from all around. If you aren't too particular about the origins of an item, or its price, you might find something of interest.”</i>", parse);
Text.Newline();

// TODO: Conditional, later when patches is implemented

Text.AddOutput("Trying to not sound impolite, you ask the chief what Patchwork is exactly. Is it a woman, a man? The old man considers the immobile pile of cloth, puffing on his pipe. <i>“Trying to keep together this bunch for a few decades has had me seeing a lot weirder things than Patchwork,”</i> he finally grunts. <i>“If it matters so much to you, why don't you ask them?”</i>", parse);
if(patchwork.Met() < Patchwork.Met.KnowGender) {
Text.Newline();
Text.AddOutput("Trying to not sound impolite, you ask the chief what Patchwork is exactly. Is it a woman, a man? The old man considers the immobile pile of cloth, puffing on his pipe. <i>“Trying to keep together this bunch for a few decades has had me seeing a lot weirder things than Patchwork,”</i> he finally grunts. <i>“If it matters so much to you, why don't you ask them?”</i>", parse);
}
Gui.NextPrompt(Scenes.Chief.Interact);
});
// CHIEF
Expand Down
284 changes: 247 additions & 37 deletions js/event/nomads/patchwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,92 +6,302 @@
function Patchwork(storage) {
Entity.call(this);

this.name = "Patches";

this.body.DefFemale();
//TODO body

/*
* Set up patchworks shop
*/
this.Shop = new Shop();
this.Shop.AddItem(Items.Equinium, 5);
//this.Shop.AddItem(Items.HorseHair, 5);
this.Shop.AddItem(Items.HorseShoe, 5);
//this.Shop.AddItem(Items.HorseCum, 5);
this.Shop.AddItem(Items.Equinium, 5, null, Scenes.Patchwork.BuyFunc);
//this.Shop.AddItem(Items.HorseHair, 5, null, Scenes.Patchwork.BuyFunc);
this.Shop.AddItem(Items.HorseShoe, 5, null, Scenes.Patchwork.BuyFunc);
//this.Shop.AddItem(Items.HorseCum, 5, null, Scenes.Patchwork.BuyFunc);

this.Shop.AddItem(Items.Leporine, 5);
this.Shop.AddItem(Items.RabbitFoot, 5);
//this.Shop.AddItem(Items.CarrotJuice, 5);
//this.Shop.AddItem(Items.Lettuce, 5);
this.Shop.AddItem(Items.Leporine, 5, null, Scenes.Patchwork.BuyFunc);
this.Shop.AddItem(Items.RabbitFoot, 5, null, Scenes.Patchwork.BuyFunc);
//this.Shop.AddItem(Items.CarrotJuice, 5, null, Scenes.Patchwork.BuyFunc);
//this.Shop.AddItem(Items.Lettuce, 5, null, Scenes.Patchwork.BuyFunc);

this.Shop.AddItem(Items.Felinix, 5);
//this.Shop.AddItem(Items.Whiskers, 5);
this.Shop.AddItem(Items.HairBall, 5);
//this.Shop.AddItem(Items.CatClaw, 5);
this.Shop.AddItem(Items.Felinix, 5, null, Scenes.Patchwork.BuyFunc);
//this.Shop.AddItem(Items.Whiskers, 5, null, Scenes.Patchwork.BuyFunc);
this.Shop.AddItem(Items.HairBall, 5, null, Scenes.Patchwork.BuyFunc);
//this.Shop.AddItem(Items.CatClaw, 5, null, Scenes.Patchwork.BuyFunc);

this.Shop.AddItem(Items.CowBell, 5);
this.Shop.AddItem(Items.CowBell, 5, null, Scenes.Patchwork.BuyFunc);

this.Shop.AddItem(Items.DogBiscuit, 5);
this.Shop.AddItem(Items.DogBiscuit, 5, null, Scenes.Patchwork.BuyFunc);

this.Shop.AddItem(Items.Trinket, 5);
this.Shop.AddItem(Items.Feather, 5);
this.Shop.AddItem(Items.FruitSeed, 5);
this.Shop.AddItem(Items.Trinket, 5, null, Scenes.Patchwork.BuyFunc);
this.Shop.AddItem(Items.Feather, 5, null, Scenes.Patchwork.BuyFunc);
this.Shop.AddItem(Items.FruitSeed, 5, null, Scenes.Patchwork.BuyFunc);

this.Shop.AddItem(Items.Hummus, 5);
this.Shop.AddItem(Items.Hummus, 5, null, Scenes.Patchwork.BuyFunc);

//this.Shop.AddItem(Items.Toys.SmallDildo, 5);
this.Shop.AddItem(Items.Toys.SmallDildo, 5, null, Scenes.Patchwork.BuyFunc);

this.flags = {};
this.flags["Met"] = Patchwork.Met.NotMet;

if(storage) this.FromStorage(storage);
}
Patchwork.prototype = new Entity();
Patchwork.prototype.constructor = Patchwork;

Patchwork.Met = {
NotMet : 0,
Met : 1,
Met2 : 2,
KnowGender : 3
};
Patchwork.prototype.Met = function() {
return this.flags["Met"];
}

Patchwork.prototype.FromStorage = function(storage) {
this.Butt().virgin = parseInt(storage.avirgin) == 1;
this.FirstVag().virgin = parseInt(storage.virgin) == 1;

this.LoadPersonalityStats(storage);
this.LoadFlags(storage);
this.LoadSexFlags(storage);
}

Patchwork.prototype.ToStorage = function() {
var storage = {
avirgin : this.Butt().virgin ? 1 : 0,
virgin : this.FirstVag().virgin ? 1 : 0
};

this.SavePersonalityStats(storage);
this.SaveFlags(storage);
this.SaveSexStats(storage);

return storage;
}

Patchwork.prototype.PronounGender = function() {
return this.flags["Met"] >= Patchwork.Met.KnowGender ? Gender.female : Gender.male;
}

Patchwork.prototype.heshe = function() {
var gender = this.PronounGender();
if(gender == Gender.male) return "they";
else return "she";
}
Patchwork.prototype.HeShe = function() {
var gender = this.PronounGender();
if(gender == Gender.male) return "They";
else return "She";
}
Patchwork.prototype.himher = function() {
var gender = this.PronounGender();
if(gender == Gender.male) return "them";
else return "her";
}
Patchwork.prototype.hisher = function() {
var gender = this.PronounGender();
if(gender == Gender.male) return "their";
else return "her";
}
Patchwork.prototype.HisHer = function() {
var gender = this.PronounGender();
if(gender == Gender.male) return "Their";
else return "Her";
}
Patchwork.prototype.hishers = function() {
var gender = this.PronounGender();
if(gender == Gender.male) return "theirs";
else return "hers";
}
Patchwork.prototype.mfPronoun = function(male, female) {
var gender = this.PronounGender();
if(gender == Gender.male) return male;
else return female;
}


Scenes.Patchwork = {};

Scenes.Patchwork.Interact = function() {
var that = patchwork;
var parse = {};
parse = patchwork.ParserPronouns(parse);

Text.Clear();
Text.AddOutput("You approach the odd peddler.");
if(patchwork.flags["Met"] < Patchwork.Met.Met) {
Text.Add("You make your way towards the mysterious robed peddler and their makeshift shop, near the campfire. Even as you get right up to them, they remain as enigmatic as before; the robes they wear are so all-encompassing, you can’t make out anything about their features. You’re pretty sure that whatever’s under there is humanoid, but that’s as far as you’d dare to venture.", parse);
Text.NL();
Text.Add("Wide, flared sleeves completely swallow their arms and hands alike, whilst the hem trails along the ground, preventing even the slightest glimpse of their feet. A raised neck - a shawl, maybe, but it’s hard to tell where any part of the robe ends and another begins - combines with a low-fallen hood to completely obscure the face. And all over, patches of fabric, a dazzling array of pattern-fragments and colors, scattered about without any semblance of rhyme or reason.", parse);
Text.NL();
Text.Add("Some of the many patches look to have been added to preserve the life of the robes beneath, others to extend the original fabric and make it even more shrouding. A few folds of fabric suggest that some might have been added as makeshift pockets, and as far as you know, some of the more colorful ones may have even been added for decoration.", parse);
Text.NL();
Text.Add("The robed figure turns to look at you. <i>”You’re new,”</i> a muffled voice states.", parse);
Text.NL();
Text.Add("You’re about to introduce yourself, when a small telescope emerges from the sea of patched cloth, extending until it’s a bit too close for comfort. You can see what looks like an eye through the lens. It swoops over you in a quick examination before retracting back into the robes.", parse);
Text.NL();
Text.Add("<i>”Welcome to my shop, stranger. What’s your business?”</i>", parse);
Text.NL();
Text.Add("The oddity of the merchant has you pausing for a moment, considering if you really want to do business with them after all.", parse);
Text.Flush();
Scenes.Patchwork.Prompt();
}
else if(patchwork.flags["Met"] < Patchwork.Met.Met2) {
Text.Add("With a little trepidation, you approach the eccentric pedlar in their patchworked robes again, asking if they are willing to do business with you.", parse);
Text.NL();
Text.Add("<i>”Password?”</i>", parse);
Text.NL();
Text.Add("Password? You blink in confusion, then remember what the strange shopkeeper told you last time. Oh, yes, the password... now, what was it...?", parse);
Text.Flush();

var next = function() {
Text.Clear();
Text.Add("<i>”Close enough, what’s your business stranger?”</i>", parse);
Text.NL();
Text.Add("You blink slowly; they went to the trouble of demanding a password, and now they don’t even care if it’s the right one or not? Oh well... what did you want to do, anyway?", parse);
Text.Flush();
Scenes.Patchwork.Prompt();
}

//[Umm…][Something like…][Err…]
var options = new Array();
options.push({ nameStr : "[Umm…]",
func : next, enabled : true,
tooltip : "What was it now?"
});
options.push({ nameStr : "[Something like…]",
func : next, enabled : true,
tooltip : "What was it now?"
});
options.push({ nameStr : "[Err…]",
func : next, enabled : true,
tooltip : "What was it now?"
});
Gui.SetButtonsFromList(options, false, null);
}
else {
Text.Add("<i>”Password?”</i> the shady merchant asks.", parse);
Text.NL();
Text.Add("You shrug your shoulders, and spit out whatever random word pops into your head. You know [heshe]’ll let you shop just for playing along with whatever this silly game of [hishers] is.", parse);
Text.NL();
Text.Add("<i>”Close enough, what’s your business stranger?”</i>", parse);

if(DEBUG) {
Text.NL();
Text.Add(Text.BoldColor("DEBUG: relation: " + patchwork.relation.Get()));
Text.NL();
Text.Add(Text.BoldColor("DEBUG: subDom: " + patchwork.subDom.Get()));
Text.NL();
Text.Add(Text.BoldColor("DEBUG: slut: " + patchwork.slut.Get()));
}

Text.Flush();
Scenes.Patchwork.Prompt();
}
}

Scenes.Patchwork.PW = function() {
var words = [
"trinket", "bauble", "coin", "feather", "bird", "raven", "hemp", "pin", "yarn", "stone", "gem", "fish", "jelly", "goop", "key", "stitches", "clamp", "charm", "nymph", "blue", "red", "yellow", "green", "purple", "orange", "apple", "sauce", "gloom", "pockets", "gym", "scales", "shoe", "song", "groom", "bee", "wasp", "honey", "store", "laundry", "underwear", "cog", "long", "cat", "watch", "pineapple", "juice", "squawk", "fluffy tails", "dust", "hugs", "belly", "bomb", "pump", "grease"
];

var getWord = function() {
var idx = Math.floor(Math.random() * words.length);
var word = words[idx];
words.remove(idx);
return word;
};

if(DEBUG) {
Text.Newline();
Text.AddOutput(Text.BoldColor("DEBUG: relation: " + patchwork.relation.Get()));
Text.Newline();
Text.AddOutput(Text.BoldColor("DEBUG: subDom: " + patchwork.subDom.Get()));
Text.Newline();
Text.AddOutput(Text.BoldColor("DEBUG: slut: " + patchwork.slut.Get()));
Text.Newline();
}
return getWord() + " " + getWord() + " " + getWord();
}

Scenes.Patchwork.BuyFunc = function() {
patchwork.relation.IncreaseStat(10, 1);
return false;
}

Scenes.Patchwork.Prompt = function() {
var parse = {
notS : patchwork.mfPronoun("", "s")
};
parse = patchwork.ParserPronouns(parse);

var options = new Array();

options.push({ nameStr : "Talk",
func : function() {
Text.Clear();
Text.AddOutput("[Placeholder] I'ma shopkeeper.");
}, enabled : true
Text.Add("[Placeholder] I'ma shopkeeper.");
}, enabled : false //TODO
});
options.push({ nameStr : "Buy",
func : function() {
patchwork.Shop.Buy(Scenes.Patchwork.Interact);
var parse = {

};

Text.Clear();
Text.Add("<i>”What are ya buying?”</i> [heshe] ask[notS], opening [hisher] robes to show you the item-lined pockets.", parse);
Text.NL();
patchwork.Shop.Buy(Scenes.Patchwork.Prompt, true);
}, enabled : true
});
options.push({ nameStr : "Sell",
func : function() {
patchwork.Shop.Sell(Scenes.Patchwork.Interact);
var parse = {

};

Text.Clear();
Text.Add("<i>”What are ya selling?”</i> [heshe] ask[notS], [hisher] telescopic monocle extending past [hisher] robes to examine your goods.", parse);
Text.NL();
patchwork.Shop.Sell(Scenes.Patchwork.Prompt, true);
}, enabled : true
});

Gui.SetButtonsFromList(options, true, PrintDefaultOptions);
Gui.SetButtonsFromList(options, true, function() {
parse["pw"] = Scenes.Patchwork.PW();

Text.Clear();
if(patchwork.flags["Met"] < Patchwork.Met.Met) {
Text.Add("<i>”Wait,”</i> the creature calls as you’re about to turn. <i>”The password for next time is: [pw]. Remember it or no business for you, stranger.”</i>", parse);
Text.NL();
Text.Add("Lets see… [pw], huh? Privately noting the oddity of requiring a password to do business to yourself, you assure the mysterious merchant you will remember it.", parse);
patchwork.flags["Met"] = Patchwork.Met.Met;
}
else if(patchwork.flags["Met"] < Patchwork.Met.Met2) {
Text.Add("<i>”Next time’s password is: [pw].”</i>", parse);
Text.NL();
Text.Add("Slowly you nod your head, dryly assuring them that you have it... but, privately, you ask yourself if you really need it; so long as you play along, it looks like they’ll accept whatever you say.", parse);
patchwork.flags["Met"] = Patchwork.Met.Met2;
}
else {
Text.Add("<i>”Next time’s password is: [pw].”</i>", parse);
Text.NL();
Text.Add("You nod your head, and assure them you have it.", parse);
}
Text.Flush();

Gui.NextPrompt();
});
}


world.loc.Plains.Nomads.Fireplace.events.push(new Link(
"Patchwork", function() { return (world.time.hour >= 8 && world.time.hour < 24); }, true,
function() {
if(!(world.time.hour >= 8 && world.time.hour < 24)) return;

Text.Add("A strange individual wearing a patchwork robe has set up shop close to the fireplace. ");
var parse = {
notS : patchwork.mfPronoun("", "s"),
dont : patchwork.mfPronoun("don’t", "doesn’t")
};
parse = patchwork.ParserPronouns(parse);

if(patchwork.Met() < Patchwork.Met.Met)
Text.Add("A strange individual wearing a patchwork robe has set up shop close to the campfire. ");
else
Text.Add("Patchwork the peddler is standing by the campfire. You have the distinct feeling [heshe] know[notS] you’re here, even if [heshe] [dont] seem to be moving at the moment. ", parse);
Text.NL();
},
Scenes.Patchwork.Interact
Expand Down
Loading

0 comments on commit b61eda2

Please sign in to comment.