Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Makius #272

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
55 changes: 55 additions & 0 deletions classes/Characters/Makius.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package classes.Characters
{
import classes.Creature;
import classes.GLOBAL;

public class Makius extends Creature
{
//constructor
public function Makius()
{
this._latestVersion = 1;
this.version = this._latestVersion;
this._neverSerialize = false;

this.short = "Maki";
this.originalRace = "venarian";
this.capitalA = "";
this.impregnationType = "MakiusPregnancy";
this.cumMultiplierRaw = 30;
this.ballEfficiency = 7;
this.fertilityRaw = 0.1;

//Penis
this.cocks = new Array();
this.createCock();

masculinize();
}

public function feminize():void{
flags["MAKI_STATE"] = 1;
this.buttRatingRaw = 8;

this.cocks[0].cLengthRaw = 7;
this.cocks[0].cThicknessRatioRaw = 1.25;

this.ass.bonusCapacity = 150;
this.elasticity = 3;
this.ass.wetnessRaw = 3;
}

public function masculinize():void{
flags["MAKI_STATE"] = 0;
this.buttRatingRaw = 3;

this.cocks[0].cLengthRaw = 9;
this.cocks[0].cThicknessRatioRaw = 1.75;

this.ass.bonusCapacity = 100;
this.elasticity = 1;
this.ass.wetnessRaw = 5;
this.ass.loosenessRaw = 4;
}
}
}
2 changes: 2 additions & 0 deletions classes/GLOBAL.as
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
public static const TYPE_DZAAN:int = 90;
public static const TYPE_ZAIKA:int = 91;
public static const TYPE_CUNDARIAN:int = 92;
public static const TYPE_VENARIAN:int = 93;

public static const TYPE_NAMES:Array = [
"Human",
Expand Down Expand Up @@ -351,6 +352,7 @@
"Dzaan",
"Zaika",
"Cundarian",
"Venarian",
];

public static const VALID_FACE_TYPES:Array = [
Expand Down
203 changes: 203 additions & 0 deletions classes/GameData/Pregnancy/Handlers/MakiusPregnancyHandler.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
package classes.GameData.Pregnancy.Handlers
{
import classes.Characters.PlayerCharacter;
import classes.Characters.PregnancyPlaceholder;
import classes.GameData.Pregnancy.BasePregnancyHandler;
import classes.GameData.Pregnancy.Child;
import classes.GameData.Pregnancy.Templates.MakiusUniqueChild;
import classes.GameData.Pregnancy.UniqueChild;
import classes.GameData.StatTracking;
import classes.GameData.ChildManager;
import classes.GameData.MailManager;
import classes.Creature;
import classes.PregnancyData;
import classes.StorageClass;
import classes.kGAMECLASS;
import classes.GLOBAL;
import classes.Engine.Interfaces.ParseText;
import classes.Engine.Utility.indefiniteArticle;
import classes.Engine.Utility.IncrementFlag;
import classes.Engine.Interfaces.AddLogEvent;

public class MakiusPregnancyHandler extends BasePregnancyHandler
{
public function MakiusPregnancyHandler()
{
_handlesType = "MakiusPregnancy";
_basePregnancyIncubationTime = (60 * 24 * 365); //one year
_basePregnancyChance = .1;
_canImpregnateButt = true;
_pregnancyQuantityMaximum = 2;
_definedAverageLoadSize = 30;

_onTryImpregnate = makiusTryImpregnate;
_onSuccessfulImpregnation = makiusSuccessfulImpregnation;
_onDurationEnd = makiusDurationEnd;

for(var i:int = 0; i <= 360; i++){
if (i == 25){
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if (pregSlot == 3){
if (kGAMECLASS.makius.hasStatusEffect("makiusPregnancyReveal")) AddLogEvent(ParseText("Your codex beeps, notifying you of a new message: <b>Maki wants to tell you something important in person.</b>") , "passive");
else AddLogEvent(ParseText("You find yourself fantasizing about Maki, picturing how big his belly will get from his pregnancy.") , "passive");
}
else AddLogEvent(ParseText("A scent that, normally, wouldn't bother you is suddenly unbearably rank. Lately your sense of smell has been getting stronger and you often wake up nauseous.") , "passive");
}, true);
}else if (i == 50){
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if(pregSlot != 3) AddLogEvent(ParseText("You have a sudden craving for some ice cream. A whole tub of chocolate ice cream, mixed with chili peppers and pickles. Despite your better judgement you are utterly convinced that this would be a delicious meal.") , "passive");
}, true);
}else if (i == 100){
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if (pregSlot != 3) {
AddLogEvent(ParseText("Lately you've been having sudden cravings for strange foods that you wouldn't normally eat, plus you're getting a little more bloated than you're accustomed to. Your [pc.belly] has been feeling harder than it should be and your feet are definitely swollen. You check your codex and confirm what you've suspected: <b>you're pregnant with " + ((kGAMECLASS.pc.pregnancyData[pregSlot] as PregnancyData).pregnancyQuantity > 1?"venarian pups":"a venarian pup") + "</b>. Makius, the doctor you recruited for your " + (kGAMECLASS.flags["MAKI_OFFERED_JOB_AT_NURSERY"] && !kGAMECLASS.flags["MAKI_IN_CREW"]?"nursery":"crew") + ", is most likely the father and you start to mull how exactly you are going to break the news to him.") , "passive");
kGAMECLASS.makius.createStatusEffect("makiusPregnancyReaction" + pregSlot);
}
}, true);
}else if (i == 200){
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if(pregSlot != 3) AddLogEvent(ParseText("You begin to daydream about the lithe body of your dork of a baby's father, focusing on his crotch. You can't help but release a lustful groan as your body heats up. In your imagination he tries to cover his face with his arms, for even in your fantasies he is ever-so slightly embarrassed. It doesn't take long until you are fondly, and lecherously, remembering the conception of your child.") , "passive");
}, true);
}else if (i == 300){
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if(pregSlot != 3) AddLogEvent(ParseText("You absentmindedly caress your pregnant tummy, enjoying how nice and sensitive it is. The bump looks bigger every day, though you know it's still a long while before you deliver the baby.") , "passive");
}, true);
}else if (i == 350){
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if(pregSlot != 3) AddLogEvent(ParseText("You suddenly feel a kick to your stomach. After the surprise wears off, you realize it was your baby. As you caress your [pc.belly] you feel another kick, and you can't help but smile as you are brimming with joy and motherly affection. It's getting close to the due date.") , "passive");
}, true);
}else if (i == 362){
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if (pregSlot == 3) AddLogEvent(ParseText("Your codex beeps notifiying you that Maki's pregnancy is almost due. <b>You should " + (kGAMECLASS.flags["MAKI_IN_CREW"]?"Check up on him whenever possible":"be there for him at Tavros station when it happens") + ".</b>") , "passive");
else AddLogEvent(ParseText("Every day it's getting harder and harder to carry the baby in your womb. Your legs hurt, you are nauseous all the time and your baby bump is getting larger every week. You should rejoice that the struggle is almost over, but you know that you'll miss the feeling of the growing infant inside your womb. Then again, once it's done, you can just ride another dick. Let them go deep in you, so they can fill you with their baby batter to get you pregnant again! Either way, you should be going into labor any day now.") , "passive");
}, true);
}
// Progressive changes with no text:
else if(i > 300)
{
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if (pregSlot != 3) {
kGAMECLASS.pc.addPregnancyBellyMod(pregSlot, 2, true);
if(kGAMECLASS.pc.milkFullness < 10) kGAMECLASS.pc.milkFullness += 2;
if(kGAMECLASS.pc.milkMultiplier < 1.5) kGAMECLASS.pc.milkMultiplier += 0.02;
if (kGAMECLASS.pc.milkRate < 25) kGAMECLASS.pc.milkRate += 0.1;
}
}, true);
}
else if(i > 200)
{
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if (pregSlot != 3) {
kGAMECLASS.pc.addPregnancyBellyMod(pregSlot, 1, true);
if (kGAMECLASS.pc.milkFullness < 10) kGAMECLASS.pc.milkFullness += 2;
}
}, true);
}
else
{
addStageProgression(_basePregnancyIncubationTime - (i * 24 * 60), function(pregSlot:int):void {
if (pregSlot != 3) {
kGAMECLASS.pc.addPregnancyBellyMod(pregSlot, 0.5, true);
}
}, true);
}

}
}

public static function makiusTryImpregnate(father:Creature, mother:Creature, pregSlot:int, thisPtr:BasePregnancyHandler):Boolean
{
if (mother.originalRace == "venarian"){
if (kGAMECLASS.flags["MAKI_STATE"] != 1 || kGAMECLASS.flags["MAKI_TAKING_FEMALE_CONTRACEPTIVES"]) return false;
}else if (pregSlot == 3 || kGAMECLASS.flags["MAKI_TAKING_MALE_CONTRACEPTIVES"]) return false;
return BasePregnancyHandler.defaultOnTryImpregnate(father, mother, pregSlot, thisPtr);
}

public static function makiusSuccessfulImpregnation(father:Creature, mother:Creature, pregSlot:int, thisPtr:BasePregnancyHandler):void
{
BasePregnancyHandler.defaultOnSuccessfulImpregnation(father, mother, pregSlot, thisPtr);
if (pregSlot == 3){
//this preg can only have one child on slot 3
(mother.pregnancyData[pregSlot] as PregnancyData).pregnancyQuantity = 1;
//Maki knows about the pregnancy immedietly because he's a doctor (and because there aren't any scenes for when he finds out while evicted)
kGAMECLASS.flags["MAKI_STATE"] = 2;
kGAMECLASS.makius.createStatusEffect("makiusPregnancyReveal");
}
}

public static function makiusDurationEnd(mother:Creature, pregSlot:int, thisPtr:BasePregnancyHandler):void
{
if (pregSlot == 3){
if (kGAMECLASS.flags["MAKI_IN_CREW"]){
kGAMECLASS.flags["MAKI_STATE"] = 1;
kGAMECLASS.makiusSubbed(6);
}else kGAMECLASS.flags["MAKI_STATE"] = 0;

if (kGAMECLASS.flags["MAKI_IN_CREW"]){
kGAMECLASS.makius.createStatusEffect("makiusWaitForBirth");
}else{
kGAMECLASS.eventQueue.push(kGAMECLASS.makiusGivesBirth);
}
}else{
kGAMECLASS.eventQueue.push((function(c_mother:Creature, c_pregSlot:int, c_thisPtr:BasePregnancyHandler):Function
{
return function():void
{
kGAMECLASS.makiusPcGivesBirth((mother.pregnancyData[pregSlot] as PregnancyData).pregnancyQuantity, c_thisPtr as MakiusPregnancyHandler);
MakiusPregnancyHandler.cleanupPregnancy(c_mother, c_pregSlot, c_thisPtr);
}
})(mother, pregSlot, thisPtr));
}
}

override public function nurseryEndPregnancy(mother:Creature, pregSlot:int, useBornTimestamp:uint):Child
{
kGAMECLASS.makiusPcGivesBirth((mother.pregnancyData[pregSlot] as PregnancyData).pregnancyQuantity, this, true);
cleanupPregnancy(mother, pregSlot, this);
return null;
}

//Returns true if first is female
public function generatemakiusChildren(makiusFather:Boolean, amount:int = 1):Boolean{
var c:MakiusUniqueChild = new MakiusUniqueChild();
var traitChar:Creature = kGAMECLASS.chars["PC_BABY"];
c.BornTimestamp = kGAMECLASS.GetGameTimestamp();

var firstBorn:Boolean = Math.random() > 0.5;
if (firstBorn) c.NumFemale = 1;
else c.NumMale = 1;
var females:int = Math.random() * (amount - 1);

c.NumFemale = c.NumFemale + females;
c.NumMale = c.NumMale + (amount - 1) - females;

// Adopt pc's colors:
c.skinTone = traitChar.skinTone;
c.lipColor = traitChar.lipColor;
c.nippleColor = traitChar.nippleColor;
c.eyeColor = traitChar.eyeColor;
c.hairColor = traitChar.hairColor;
c.furColor = traitChar.skinFurScalesColor();
ChildManager.addChild(c);

if (makiusFather) kGAMECLASS.flags["MAKI_SIRED_CHILDREN"] = kGAMECLASS.flags["MAKI_SIRED_CHILDREN"] + amount;
else kGAMECLASS.flags["MAKI_BIRTHED_CHILDREN"] = kGAMECLASS.flags["MAKI_BIRTHED_CHILDREN"] + amount;

return firstBorn;
}

public static function cleanupPregnancy(mother:Creature, pregSlot:int, thisPtr:BasePregnancyHandler):void
{
var pData:PregnancyData = mother.pregnancyData[pregSlot];
mother.bellyRatingMod -= pData.pregnancyBellyRatingContribution;
pData.reset();

if (pregSlot == 3){
kGAMECLASS.makius.removeStatusEffect("makiusPregnancyReveal");
kGAMECLASS.makius.removeStatusEffect("makiusWaitForBirth");
}else{
kGAMECLASS.makius.removeStatusEffect("makiusPregnancyReaction" + pregSlot);
}
}
}
}
2 changes: 2 additions & 0 deletions classes/GameData/Pregnancy/PregnancyManager.as
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import classes.GameData.Pregnancy.Handlers.LapinaraPregnancyHandler;
import classes.GameData.Pregnancy.Handlers.LaquinePregnancyHandler;
import classes.GameData.Pregnancy.Handlers.LDCShockHopperPregnancyHandler;
import classes.GameData.Pregnancy.Handlers.MakiusPregnancyHandler;
import classes.GameData.Pregnancy.Handlers.MilodanPregnancyHandler;
import classes.GameData.Pregnancy.Handlers.MirrinPregnancyHandler;
import classes.GameData.Pregnancy.Handlers.NyreaHuntressPregnancy;
Expand Down Expand Up @@ -97,6 +98,7 @@
PregnancyManager.insertNewHandler(new AusarPregnancyHandler());
PregnancyManager.insertNewHandler(new IlariaPregnancyHandler());
PregnancyManager.insertNewHandler(new StormGuardPregnancyHandler());
PregnancyManager.insertNewHandler(new MakiusPregnancyHandler());

}

Expand Down
18 changes: 18 additions & 0 deletions classes/GameData/Pregnancy/Templates/MakiusUniqueChild.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package classes.GameData.Pregnancy.Templates
{
import classes.GLOBAL;
import classes.kGAMECLASS;
import classes.GameData.ChildManager;
import classes.GameData.Pregnancy.UniqueChild;

public class MakiusUniqueChild extends UniqueChild
{
public function MakiusUniqueChild()
{
RaceType = GLOBAL.TYPE_VENARIAN;
MaturationRate = 1;
UniqueParent = "MAKIUS";
originalRace = "venarian";
}
}
}
65 changes: 65 additions & 0 deletions classes/ShittyShips/ShittyShipGear/Upgrades/Medlab.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package classes.ShittyShips.ShittyShipGear.Upgrades
{
import classes.Creature;
import classes.Engine.Combat.DamageTypes.TypeCollection;
import classes.ShittyShip;
import classes.StringUtil;
import classes.ItemSlotClass;
import classes.GLOBAL;
import classes.GameData.TooltipManager;
import classes.kGAMECLASS;
import classes.Engine.Combat.damageRand;
import classes.Engine.Combat.outputDamage;
import classes.Engine.Combat.DamageTypes.DamageResult;
import classes.Characters.PlayerCharacter;
import classes.Engine.Utility.rand;
import classes.Engine.Utility.possessive;

/**
* Currently unobtainable, meant as a shared medbay for medically inclined characters, but no scenes have been coded.
* Makius's follower content will reflect him working in the medlab if it is installed.
*/
public class Medlab extends ItemSlotClass
{
public function Medlab()
{
this._latestVersion = 1;

this.quantity = 1;
this.stackSize = 1;
this.type = GLOBAL.ACCESSORY;

//Used on inventory buttons
this.shortName = "Medlab";

//Regular name
this.longName = "Medical lab";

TooltipManager.addFullName(this.shortName, StringUtil.toTitleCase(this.longName));

//Longass shit, not sure what used for yet.
this.description = "Medical lab";

//Displayed on tooltips during mouseovers
this.tooltip = "A module with all the requirements for a certified doctor to operate. Not particularly useful without a crew doctor.";

TooltipManager.addTooltip(this.shortName, this.tooltip);

//Information
this.basePrice = 10000;
this.attack = 0;
this.defense = 0;
this.shieldDefense = 0;
this.shields = 0;
this.sexiness = 0;
this.critBonus = 0;
this.evasion = 0;
this.fortification = 0;

this.combatUsable = false;
this.addFlag(GLOBAL.ITEM_FLAG_SHIP_EQUIPMENT);

this.version = _latestVersion;
}
}
}
Loading