string loadClass() { NPCData.Jobs npcJob = NPCCharList.CharRetainers [RightManCreatePanInn.retainerIndex].cityJobs; switch (npcJob) { case NPCData.Jobs.CastleDomestic: return("domestic"); case NPCData.Jobs.CastleCook: return("cook"); case NPCData.Jobs.CastleHealer: return("healer"); case NPCData.Jobs.CastleHunter: return("hunter"); case NPCData.Jobs.CastleEntertainer: return("entertainer"); case NPCData.Jobs.CastleArtisan: return("artisan"); case NPCData.Jobs.CastleFarmhand: return("farmhand"); case NPCData.Jobs.CastleScribe: return("scribe"); case NPCData.Jobs.CastleAccountant: return("accountant"); case NPCData.Jobs.CastleSlaveMaster: return("slavemaster"); case NPCData.Jobs.CastleGuard: return("guard"); case NPCData.Jobs.CastleCaptain: return("captain"); case NPCData.Jobs.CastleCourtier: return("courtier"); case NPCData.Jobs.CastleCounselor: return("counselor"); case NPCData.Jobs.CastleProstitute: return("prostitute"); default: return("0"); } }
int checkJobsNum(NPCData.Jobs job) { int i = 0; int count = 0; while (i < NPCCharList.CharRetainers.Count) { if (NPCCharList.CharRetainers [i].cityJobs == job) { count++; } i++; } return(count); }
public float setPoliticalPower(NPCData.Jobs cityPos) { iterator += 1; Random.InitState(hashcode + WorldControl.day * System.DateTime.Now.Millisecond + iterator); float retvalue = 0; switch (cityPos) { case NPCData.Jobs.GRANDPRIESTESS: return(retvalue = Random.Range(20, 200)); case NPCData.Jobs.GRANDINQUISITOR: return(retvalue = Random.Range(30, 240)); default: return(0); } }
bool checkJobs(NPCData.Jobs job, int max) { int i = 0; int count = 0; while (i < NPCCharList.CharRetainers.Count) { if (NPCCharList.CharRetainers [i].cityJobs == job) { count++; } i++; } if (count >= max) { return(false); } return(true); }
bool checkJob(NPCData.Jobs job) { switch (job) { case NPCData.Jobs.CastleRest: return(true); case NPCData.Jobs.CastleDomestic: return(true); case NPCData.Jobs.CastleCook: return(true); case NPCData.Jobs.CastleHealer: return(true); case NPCData.Jobs.CastleEntertainer: return(true); case NPCData.Jobs.CastleHunter: return(true); case NPCData.Jobs.CastleArtisan: return(true); case NPCData.Jobs.CastleFarmhand: return(true); case NPCData.Jobs.CastleScribe: return(true); case NPCData.Jobs.CastleProstitute: return(true); case NPCData.Jobs.CastleAccountant: return(true); case NPCData.Jobs.CastleSlaveMaster: return(true); case NPCData.Jobs.CastleGuard: return(true); case NPCData.Jobs.CastleCaptain: return(true); case NPCData.Jobs.CastleCourtier: return(true); case NPCData.Jobs.CastleCounselor: return(true); default: return(false); } }
public float setCharReputation(NPCData.Jobs cityPos, NPCData.CharClass charClass) { iterator += 1; Random.InitState(hashcode + WorldControl.day * System.DateTime.Now.Millisecond + iterator); float retvalue = 0; switch (cityPos) { case NPCData.Jobs.GRANDPRIESTESS: retvalue = Random.Range(-300, 350); break; case NPCData.Jobs.GRANDINQUISITOR: retvalue = Random.Range(-350, 300); break; default: break; } switch (charClass) { case NPCData.CharClass.Alchemist: return(retvalue += Random.Range(-50, 70)); case NPCData.CharClass.Artist: return(retvalue += Random.Range(-20, 50)); case NPCData.CharClass.Barbarian: return(retvalue += Random.Range(-50, 20)); case NPCData.CharClass.Bureaucrat: return(retvalue += Random.Range(-30, 30)); case NPCData.CharClass.CommunityWorker: return(retvalue += Random.Range(-10, 30)); case NPCData.CharClass.DarkPaladin: return(retvalue += Random.Range(-70, -10)); case NPCData.CharClass.Diplomat: return(retvalue += Random.Range(-50, 70)); case NPCData.CharClass.Enforcer: return(retvalue += Random.Range(-20, 20)); case NPCData.CharClass.Feral: return(retvalue += Random.Range(-50, 20)); case NPCData.CharClass.Mystic: return(retvalue += Random.Range(-50, 70)); case NPCData.CharClass.Monk: return(retvalue += Random.Range(-15, 30)); case NPCData.CharClass.Paladin: return(retvalue += Random.Range(10, 70)); case NPCData.CharClass.Performer: return(retvalue += Random.Range(-10, 30)); case NPCData.CharClass.Politician: return(retvalue += Random.Range(-90, 70)); case NPCData.CharClass.Priest: return(retvalue += Random.Range(-30, 70)); case NPCData.CharClass.Scholar: return(retvalue += Random.Range(-20, 90)); case NPCData.CharClass.Soldier: return(retvalue += Random.Range(-20, 20)); case NPCData.CharClass.Warrior: return(retvalue += Random.Range(-30, 30)); case NPCData.CharClass.W***e: return(retvalue += Random.Range(-50, 20)); case NPCData.CharClass.Thief: return(retvalue += Random.Range(-50, 70)); default: return(retvalue += retvalue + Random.Range(-10, 10)); } }
int ddReturn(int selector) { if (selector == 0) { NPCData.Jobs job = NPCCharList.CharRetainers [idxCL].cityJobs; switch (job) { case NPCData.Jobs.CastleRest: return(0); case NPCData.Jobs.CastleDomestic: return(1); case NPCData.Jobs.CastleCook: return(2); case NPCData.Jobs.CastleHealer: return(3); case NPCData.Jobs.CastleHunter: return(4); case NPCData.Jobs.CastleEntertainer: return(5); case NPCData.Jobs.CastleArtisan: return(6); case NPCData.Jobs.CastleFarmhand: return(7); case NPCData.Jobs.CastleScribe: return(8); case NPCData.Jobs.CastleProstitute: return(9); case NPCData.Jobs.CastleAccountant: return(10); case NPCData.Jobs.CastleSlaveMaster: return(11); case NPCData.Jobs.CastleGuard: return(12); case NPCData.Jobs.CastleCaptain: return(13); case NPCData.Jobs.CastleCourtier: return(14); case NPCData.Jobs.CastleCounselor: return(15); default: return(0); } } else if (selector == 1) { fileRulesNPC.Wages wages = RulesNPC.savedRules[idxRN].wage; switch (wages) { case fileRulesNPC.Wages.None: return(0); case fileRulesNPC.Wages.Low: return(1); case fileRulesNPC.Wages.Average: return(2); case fileRulesNPC.Wages.Good: return(3); case fileRulesNPC.Wages.High: return(4); case fileRulesNPC.Wages.Exorbitant: return(5); default: return(0); } } else if (selector == 2) { fileRulesNPC.Sleeping sleeping = RulesNPC.savedRules[idxRN].sleeping; switch (sleeping) { case fileRulesNPC.Sleeping.Ground: return(0); case fileRulesNPC.Sleeping.Barracks: return(1); case fileRulesNPC.Sleeping.PrivateRoom: return(2); case fileRulesNPC.Sleeping.Boudoir: return(3); case fileRulesNPC.Sleeping.MCRoom: return(4); case fileRulesNPC.Sleeping.Dungeon: return(5); default: return(0); } } else { fileRulesNPC.Diet diet = RulesNPC.savedRules[idxRN].diet; switch (diet) { case fileRulesNPC.Diet.RancidFood: return(0); case fileRulesNPC.Diet.CheapFood: return(1); case fileRulesNPC.Diet.FreshFood: return(2); case fileRulesNPC.Diet.LeftOvers: return(3); case fileRulesNPC.Diet.BeastsCum: return(4); default: return(0); } } }
public void charCreator(int sexselector, int factionselector, int recruitselector, int positionselector, int classselector, int rankselector, int fetishselector, int beautyselector, int upbringselector, int raceselector, int racespecific, bool pregnantselector) { //public enum CharSex { Woman, Man, Dickgirl, Futanari, Cuntboy, Trap, Eunuch }; // 0 female, trap 5 // faction: use 0 //0 recruited, 1 enemy, 2 monster, 3 neutral, 4 your prisoner, 5 your slave // use 12 for retainer in position selector, 1000 for none //class: 0 soldier,1 warrior, 2 clerk, 3 bureaucrat, 4 monk/nun, 5 priest, 6 alchemist UNC, 7 mystic UNC, 8 thief, 9 infiltrator, 10 paladin, 11 dark paladin, 12 feral, 13 barbarian //14 scout, 15 ranger, 16 community worker, 17 w***e, 18 farmer, 19 industry worker, 20 politician, 21 diplomat, 22 inquisitor, 23 enforcer, 24 Performer, 25 Artist, 26 Scholar // 0 C, 1 B, 2 A, 3 S, 1000 random // Fetish: 0 None, 1 Dominant, 2 Submissive, AnalWhore, GroupSex, CumSlut, Incest, Crossdressing, Exhibitionism, PetPlay, RapeFantasy, Voyeurism, Monsters, SizeDifference, 1000 random // beauty selector: 0, 20, 40, etc. up to 80+ enter more or less what you want from 0 to 100, it will be random. Any other number is a random //upbring: VeryPoor, Poor, MiddleClass, Rich, VeryRich, Noble, Royal, Count, 1000 for random // race: 0 human, 1 furry, 2 avian. 3 aquatic, 4 exotics //race specific: 0 human, else check list // pregnant selector, use false to have her non pregnant. Need texts for pregnancy before adding this feature //race specific: 1000 random, check NPCSettlerRace for info charID = NPCControl.NPCGenID; // id thats going to be used to look for him, should use a genNPC control for this NPCControl.NPCGenID += 1; charSexC = npcSettlerSex.setSex(sexselector); charName = npcSettlerName.setName(charSexC); charSurname = npcSettlerName.setSurname(); charGenderC = npcSettlerSex.setGender(charSexC); cityFactionC = npcSettlerfaction.setFaction(factionselector); isRecruited = npcSettlerSide.recruitStatus(recruitselector); isEnemy = npcSettlerSide.enemyStatus(recruitselector); isMonster = npcSettlerSide.monsterStatus(recruitselector); isPrisoner = npcSettlerSide.prisonerStatus(recruitselector); isNeutral = npcSettlerSide.neutralStatus(recruitselector); isSlave = npcSettlerSide.slaveStatus(recruitselector); cityPositionC = npcSettlerPosition.setPosition(positionselector); charClassC = npcSettlerClass.setClass(classselector); charRankC = npcSettlerRank.setRank(rankselector); charFetishC = npcSettlerFetish.setFetish(fetishselector); charPersonalityC = npcSettlerPersonAtt.setPersonality(); attPhysical = npcSettlerAttributes.setPhysical(charClassC); attMental = npcSettlerAttributes.setMental(charClassC); attSocial = npcSettlerAttributes.setSocial(charClassC); attMagicPower = npcSettlerAttributes.setMagicPower(charClassC); coreSkillMartial = npcSettlerCoreSkills.setCoreMartial(charClassC); //0 coreSkillSecurity = npcSettlerCoreSkills.setCoreSecurity(charClassC); coreSkillLabor = npcSettlerCoreSkills.setCoreLabor(charClassC); coreSkillTactics = npcSettlerCoreSkills.setCoreTactics(charClassC); coreSkillGovernance = npcSettlerCoreSkills.setCoreGovernance(charClassC); coreSkillStewardship = npcSettlerCoreSkills.setStewardship(charClassC); coreSkillPersuasion = npcSettlerCoreSkills.setCorePersuasion(charClassC); coreSkillIntrigue = npcSettlerCoreSkills.setIntrigue(charClassC); coreSkillDiplomacy = npcSettlerCoreSkills.setDiplomacy(charClassC); utilitySkillCrafting = npcSettlerUtilitySkills.setUtilityCrafting(charClassC); utilitySkillHouseKeeping = npcSettlerUtilitySkills.setHouseKeeping(charClassC); utilitySkillFarmHand = npcSettlerUtilitySkills.setUtilityFarm(charClassC); utilitySkillMedicine = npcSettlerUtilitySkills.setUtilityMedicine(charClassC); utilitySkillAlchemy = npcSettlerUtilitySkills.setUtilityAlchemy(charClassC); utilitySkillLearning = npcSettlerUtilitySkills.setUtilityLearning(charClassC); utilitySkillPerformance = npcSettlerUtilitySkills.setUtilityPerformance(charClassC); utilitySkillEtiquette = npcSettlerUtilitySkills.setUtilityEtiquette(charClassC); utilitySkillStreetwise = npcSettlerUtilitySkills.setUtilityStreetwise(charClassC); sexSkillMasseuse = npcSettlerSexSkills.setSkillMasseuse(charClassC); sexSkillStripping = npcSettlerSexSkills.setSkillStripping(charClassC); sexSkillBondage = npcSettlerSexSkills.setSkillBondage(charClassC); sexSkillPetplay = npcSettlerSexSkills.setSkillPetPlay(charClassC); sexSkillPetting = npcSettlerSexSkills.setSkillPetting(charClassC); sexSkillGroupSex = npcSettlerSexSkills.setSkillGroupSex(charClassC); sexSkillPenetration = npcSettlerSexSkills.setSkillDemonstration(charClassC); sexSkillWhoring = npcSettlerSexSkills.setSkillWhoring(charClassC); sexSkillEscorting = npcSettlerSexSkills.setSkillEscorting(charClassC); attBeauty = npcSettlerPersonAtt.setBeauty(beautyselector); //(ugly, plain, good looking, captivating, stunning) attTemperament = npcSettlerPersonAtt.setTemperament(charClassC); //(apathethic,cold, reserved, lively, passional) attWillpower = npcSettlerPersonAtt.setWillpower(charClassC); // (submissive, docile, humble, assertive, willful) attNature = npcSettlerPersonAtt.setNature(charClassC); //(spinless, coward, uncertain, brave, determined) attOpenness = npcSettlerPersonAtt.setOpenness(charClassC); //(Frigthened, uninterested, timid, open, unashamed) attDignity = npcSettlerPersonAtt.setDignity(charClassC); // how much self worth it has attObedience = npcSettlerPersonAtt.setObedience(charClassC); attHappiness = npcSettlerPersonAtt.setHappiness(charClassC); attLibido = npcSettlerPersonAtt.setLibido(charClassC); // attMorality = npcSettlerPersonAtt.setMorality(charClassC); // how good and bad, it can be corrupt good, it means the person is just twisted attPiety = npcSettlerPersonAtt.setPiety(charClassC); bgUpbringC = npcSettlerBG.setUpbring(upbringselector); if (isPrisoner == true || isSlave == true || isNeutral == true) { charGold = 0; } else { charGold = npcSettlerBG.setGold(bgUpbringC); } bgChildhoodC = npcSettlerBG.setBGChildhood(); bgAdulthoodC = npcSettlerBG.setBGAdulthood(); bgStory [0] = npcSettlerBG.setChildStory(bgChildhoodC); bgStory [1] = npcSettlerBG.setAdultStory(bgAdulthoodC); bgStory [2] = npcSettlerBG.setCurrentStory(charClassC); charRaceC = npcSettlerRace.setRace(raceselector, racespecific); charRaceC = npcSettlerRace.adjustRaceGender(charRaceC, charSexC); charFurColorC = raceCreator.setFur(charRaceC); charFeatherColorC = raceCreator.setFeathers(charRaceC); charSkinColorC = raceCreator.setSkinColor(charRaceC); charSkinTypeC = raceCreator.setSkinType(charRaceC); dickTypeC = raceCreator.setDickType(charRaceC); lowerBackC = raceCreator.setLowerBack(charRaceC); shoulderBladesC = raceCreator.setShoulderBlades(charRaceC); headTypeC = raceCreator.setHeadType(charRaceC); //tailTypeC = raceCreator.setTailType (charRaceC); armsTypeC = raceCreator.setArms(charRaceC); legsTypeC = raceCreator.setLegs(charRaceC); headAccesory1C = raceCreator.setHeadAcc1(charRaceC); headAccesory2C = raceCreator.setHeadAcc2(charRaceC); eyesTypeC = raceCreator.setEyes(charRaceC); hasFur = raceCreator.setHasFur(charRaceC); // everyone uses the fur colours tho hasFeathers = raceCreator.setHasFeathers(charRaceC); hasScales = raceCreator.setHasScales(charRaceC); hasTentacles = raceCreator.setHasTentacles(charRaceC); isFlying = raceCreator.setIsFlying(charRaceC); isFurry = raceCreator.setIsFurry(charRaceC); // to determine portrait isFuta = raceCreator.setIsFuta(charSexC); beardStyleC = npcSettlerHead.setBeardStyle(charSexC, charRaceC); beardLengthC = npcSettlerHead.setBeardLength(charSexC, charRaceC); hairColorC = npcSettlerHead.setHairColor(); hairStyleC = npcSettlerHead.setHairStyle(); hairTypeC = npcSettlerHead.setHairType(charRaceC); hairLengthCM = npcSettlerHead.setHairLengthCM(); hairLengthC = npcSettlerHead.setHairLength(hairLengthCM); eyesColorC = npcSettlerHead.setEyesColor(charRaceC); genderBehaviorStat = npcSettlerPersonAtt.setBehaviorStat(charGenderC); genderBehaviorC = npcSettlerPersonAtt.setGenderBehavior(genderBehaviorStat); facialFeaturesStat = npcSettlerHead.setFacialFeatStat(charGenderC); facialFeaturesC = npcSettlerHead.setFacialFeat(facialFeaturesStat); bodyFeaturesStat = npcSettlerBody.setBodyFeatStat(charGenderC); bodyFeaturesC = npcSettlerBody.setBodyFeatures(facialFeaturesStat); heightChar = npcSettlerBody.SetHeightChar(charRaceC); // in cm heightNameC = npcSettlerBody.setHeightName(heightChar); bodyPhysStat = npcSettlerBody.SetBodyPhysStat(); // to change it, 0 to 100 bodyPhysiqueC = npcSettlerBody.setBodyPhysique(bodyPhysStat); bodyBuildStat = npcSettlerBody.setBodyBuildStat(); // to change it bodyBuildC = npcSettlerBody.setBodyBuild(bodyBuildStat); dickNum = npcSettlerBody.setDickNum(charSexC); //how many dicks it has dickSizeCM = npcSettlerBody.setDickSizeCM(heightChar, charSexC); // in cm dickSizeC = npcSettlerBody.setDickSize(dickSizeCM); testicleSizeCM = npcSettlerBody.setTesticleSizeCM(charSexC, heightChar); testiclesSizeC = npcSettlerBody.setTesticlesSize(testicleSizeCM); // in cm, used to determine if you have or not clitorisSize = npcSettlerBody.setClitorisSize(); breastRow = npcSettlerBody.setBreastRow(charRaceC); breast1Size = npcSettlerBody.setBreast1Size(charSexC, charRaceC); // to determine its current size. Each point is +1 cup, each X changes name, check NPCSettler breast2Size = npcSettlerBody.setBreast2Size(breastRow); // to determine its current size. Each point is +1 cup, each X changes name, check NPCSettler breast1NameC = npcSettlerBody.setBreastName(breast1Size); breast2NameC = npcSettlerBody.setBreastName(breast2Size); breast1CupC = npcSettlerBody.setBreastCup(breast1Size); breast2CupC = npcSettlerBody.setBreastCup(breast2Size); areola1Size = npcSettlerBody.setAureoleSize(); // aerola size of the first row, 1 change, in cm areola2Size = areola1Size; // aerola size of the first row, 1 change, in cm waistSize = npcSettlerBody.waistSize(); waistNameC = npcSettlerBody.setWaistName(waistSize); hipsSize = npcSettlerBody.setHipsSize(waistSize); hipsNameC = npcSettlerBody.setHipsName(hipsSize); assSize = npcSettlerBody.setAssSize(hipsSize); assNameC = npcSettlerBody.setAssName(assSize); hasKnot = npcSettlerFertility.setHasKnot(charRaceC); hasVagina = npcSettlerFertility.setHasVagina(charSexC); isVirgin = npcSettlerFertility.setIsVirgin(charRaceC); isFertile = npcSettlerFertility.setIsFertile(); charFertility = npcSettlerFertility.setCharFertility(); isPregnant = npcSettlerFertility.isPregnant(pregnantselector, charSexC); childRaceC = npcSettlerFertility.setChildRace(charRaceC); pregnantCD = npcSettlerFertility.setPregnantCD(isPregnant); // turns until giving birth pregnantText = npcSettlerFertility.pregnantText(isPregnant, childRaceC); // isLactating = isPregnant; lactationML = npcSettlerFertility.setLactationML(charRaceC); // how much it lactates in ml vagLooseness = npcSettlerFertility.setVagLooseness(isVirgin); vagLoose = npcSettlerFertility.setVagLoose(vagLooseness); maxHealth = npcSettlerCombatStats.setMaxHealth(charRaceC); currentHealth = maxHealth; maxArousal = npcSettlerCombatStats.setMaxArousal(charRaceC); currentArousal = 0; maxMP = npcSettlerCombatStats.setMaxMP(charRaceC, charClassC); currentMP = maxMP; // power and politics charReputation = npcSettlerPosition.setCharReputation(cityPositionC, charClassC); politicalPower = npcSettlerPosition.setPoliticalPower(cityPositionC); charAgeC = npcSettlerPersonAtt.setCharAge(charRaceC); charLoyalty = npcSettlerPersonAtt.setLoyalty(charRaceC, charClassC); charCorruption = npcSettlerPersonAtt.setCorruption(charRaceC, charClassC); int i; i = 0; while (i < 8) { charAddictions [i] = npcSettlerPersonAtt.setAddiction(i, charRaceC, charClassC); i++; } charValue = npcSettlerPersonAtt.setCharValue(charRankC, charClassC, bgUpbringC, charRaceC, attBeauty, attWillpower, attObedience); // public List<NPCData.CharTraits> charTraits; TempList.Clear(); setChar(); TempList[0].charTattoos = new string[18]; i = 0; while (i < 18) { TempList[0].charTattoos[i] = ""; i++; } TempList[0].charPiercings = new string[21]; i = 0; while (i < 21) { TempList[0].charPiercings[i] = ""; i++; } TempList[0].charEquipment = new int[12]; i = 0; while (i < 12) { TempList[0].charEquipment[i] = npcSettlerEquip.setCharEquipment(i, bgUpbringC, charClassC, charRaceC); i++; } //CHANGE TO SOMETHING MORE DYNAMIC... LATER TempList [0].charDodge = 10; NPCSettlerTraits.trait1 = 1000; NPCSettlerTraits.trait2 = 1000; NPCSettlerTraits.trait3 = 1000; NPCSettlerTraits.trait4 = 1000; NPCSettlerTraits.trait5 = 1000; NPCSettlerTraits.trait6 = 1000; NPCSettlerTraits.trait7 = 1000; NPCSettlerTraits.trait8 = 1000; NPCSettlerTraits.trait9 = 1000; NPCSettlerTraits.trait10 = 1000; i = 0; while (i < 10) { i++; TempList[0].charTraits.Add(npcSettlerTraits.setTrait(i, charClassC, charRaceC, charPersonalityC, bgUpbringC, attBeauty, charSexC)); } i = TempList[0].charTraits.Count; while (i > 0) { i--; if (TempList[0].charTraits[i] == NPCData.CharTraits.NONE) { TempList[0].charTraits.RemoveAt(i); } } int count = TempList[0].charTraits.Count; i = 0; while (i < count) { npcSettlerTraitsBonus.setTraitBonus(TempList[0].charTraits[i]); i++; } npcSettlerRankAdjustment.rankAdjustment(); i = 0; while (i < 4) { iterator += 1; Random.InitState(hashcode + WorldControl.day * System.DateTime.Now.Millisecond + iterator); if (i >= 2 && Random.Range(0, 100) >= 85) { break; } attacksTempList.Add(npcSettlerAttacks.classAttacks(charClassC, charRaceC)); i++; } i = 0; while (i < 4) { iterator += 1; Random.InitState(hashcode + WorldControl.day * System.DateTime.Now.Millisecond + iterator); if (i >= 2 && Random.Range(0, 100) >= 85) { break; } attacksTempList.Add(npcSettlerAttacks.raceAttacks(charRaceC)); i++; } List <NPCData.CharAttacks> attacksDistinctList = attacksTempList.Distinct().ToList(); foreach (NPCData.CharAttacks value in attacksDistinctList) { TempList [0].charAttacks.Add(value); } NPCSettlerPortrait.createPortrait(); if (isRecruited == true && isPrisoner == false && isSlave == false) { NPCCharList.CharRetainers.Add(TempList [0]); } if (isEnemy == true && isPrisoner == false && isSlave == false) { NPCCharList.CharEnemies.Add(TempList [0]); } if (isNeutral == true) { NPCCharList.CharRetainers.Add(TempList [0]); //NPCCharList.CharNeutral.Add (TempList [0]); } if (isMonster == true) { //this is for debug, remove NPCCharList.CharMonster.Add(TempList[0]); } if (isPrisoner == true && isRecruited == true) { NPCCharList.CharRetainerPrisoner.Add(TempList [0]); } if (isSlave == true && isRecruited == true) { NPCCharList.CharRetainers.Add(TempList [0]); } if (isPrisoner == true && isEnemy == true) { NPCCharList.CharEnemyPrisoner.Add(TempList [0]); } if (isSlave == true && isEnemy == true) { NPCCharList.CharEnemySlave.Add(TempList [0]); } // attStyle; sets after equipment, use the dedicated settler in game for this }
public static string updateJob(int idx) { int hashcode = NPCCharList.CharRetainers [idx].charName.GetHashCode(); Random.InitState(WorldControl.day * System.DateTime.Now.Millisecond * idx + hashcode + 2); int randNum = Random.Range(0, 100); float dif, goldf; int gold; NPCData.Jobs job = NPCCharList.CharRetainers [idx].cityJobs; switch (job) { case NPCData.Jobs.CastleRest: NPCCharList.CharRetainers [idx].attHappiness += 2 + Random.Range(0, 5); NPCCharList.CharRetainers [idx].attFear -= 1 + Random.Range(0, 2); if (NPCCharList.CharRetainers [idx].attExpectation > 0) { NPCCharList.CharRetainers [idx].attExpectation -= 1 + Random.Range(0, 2); } else if (NPCCharList.CharRetainers [idx].attExpectation < 0) { NPCCharList.CharRetainers [idx].attExpectation += 1 + Random.Range(0, 2); } return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " took the day off to rest."); case NPCData.Jobs.CastleDomestic: dif = 100 - (NPCCharList.CharRetainers [idx].attObedience + (NPCCharList.CharRetainers [idx].attHappiness / 2)); NPCCharList.CharRetainers [idx].attHappiness -= 1 + (Random.Range(0, 1)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0, 5); } if (dif < randNum) { CastleUpdate.tempCastleCleanliness += (15 + Random.Range(0, 15)) * ((NPCCharList.CharRetainers [idx].utilitySkillHouseKeeping + NPCCharList.CharRetainers [idx].attPhysical) / 140); if (NPCCharList.CharRetainers [idx].attPhysical < 45) { NPCCharList.CharRetainers [idx].attPhysical += 0.5f + Random.Range(0, 1); } if (dif > 40) { NPCCharList.CharRetainers [idx].workReward += 1; } NPCCharList.CharRetainers [idx].utilitySkillHouseKeeping += 0.5f + Random.Range(0f, 2f); return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " did all it's domestic chores."); } else if (randNum > (dif - (dif / 2))) { CastleUpdate.tempCastleCleanliness += (5 + Random.Range(0, 5)) * ((NPCCharList.CharRetainers [idx].utilitySkillHouseKeeping + NPCCharList.CharRetainers [idx].attPhysical) / 280); NPCCharList.CharRetainers [idx].workReward -= 1; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " only did half of it's domestic chores."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to do it's domestic chores."); } case NPCData.Jobs.CastleCook: dif = 100f - (NPCCharList.CharRetainers [idx].attObedience + (NPCCharList.CharRetainers [idx].attHappiness / 1.9f)); NPCCharList.CharRetainers [idx].attHappiness -= 0.5f + (Random.Range(0, 1)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0, 4); } if (dif < randNum) { CastleUpdate.tempCastleFoodQuality += (NPCCharList.CharRetainers [idx].utilitySkillHouseKeeping + NPCCharList.CharRetainers [idx].attMental) / 3; if (NPCCharList.CharRetainers [idx].attMental < 45) { NPCCharList.CharRetainers [idx].attMental += 0.5f + Random.Range(0, 1); } NPCCharList.CharRetainers [idx].utilitySkillHouseKeeping += 0.5f + Random.Range(0, 2.5f); if (dif > 35) { NPCCharList.CharRetainers [idx].workReward += 1; } return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " helped all day in the kitchen."); } else if (randNum > (dif - (dif / 2))) { CastleUpdate.tempCastleFoodQuality += (NPCCharList.CharRetainers [idx].utilitySkillHouseKeeping + NPCCharList.CharRetainers [idx].attMental) / 320; NPCCharList.CharRetainers [idx].workReward -= 1; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " barely helped in the kitchen."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to help in the kitchen."); } case NPCData.Jobs.CastleHealer: dif = 100f - (NPCCharList.CharRetainers [idx].attObedience + (NPCCharList.CharRetainers [idx].attHappiness / 1.75f)); NPCCharList.CharRetainers [idx].attHappiness += 0.5f + (Random.Range(0, 1)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0, 2f); } else { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(0, 2f); } if (dif < randNum) { CastleUpdate.tempCastleHealthcare += (NPCCharList.CharRetainers [idx].utilitySkillMedicine + NPCCharList.CharRetainers [idx].attMental) / 200; if (NPCCharList.CharRetainers [idx].attMental < 60) { NPCCharList.CharRetainers [idx].attMental += 0.5f + Random.Range(0, 2); } NPCCharList.CharRetainers [idx].utilitySkillMedicine += 0.5f + Random.Range(0, 1f); if (dif > 30) { NPCCharList.CharRetainers [idx].workReward += 1; } return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " took care of the slaves and free citizens in the castle."); } else if (randNum > (dif - (dif / 2))) { CastleUpdate.tempCastleHealthcare += (NPCCharList.CharRetainers [idx].utilitySkillMedicine + NPCCharList.CharRetainers [idx].attMental) / 400; NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " barely took care of the slaves and free citizens in the castle."); } else { NPCCharList.CharRetainers [idx].workReward -= 3; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to take care of the slaves and free citizens in the castle."); } case NPCData.Jobs.CastleHunter: dif = 100 - ((NPCCharList.CharRetainers [idx].attObedience / 1.2f) + (NPCCharList.CharRetainers [idx].attHappiness / 4) + (NPCCharList.CharRetainers [idx].attWillpower / 4)); NPCCharList.CharRetainers [idx].attHappiness -= 0.5f + (Random.Range(0, 2)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0, 3); } if (dif < randNum) { if (NPCCharList.CharRetainers [idx].charCorruption < 20) { float rand = Random.Range(-4, 4); if (rand > 0) { NPCCharList.CharRetainers [idx].charCorruption += rand; } } goldf = (2 + Random.Range(0, 30)) * ((((NPCCharList.CharRetainers [idx].coreSkillMartial + NPCCharList.CharRetainers [idx].attPhysical) / 200) + (NPCCharList.CharRetainers [idx].attWillpower / 100)) / 1.5f); gold = (int)goldf; if (NPCCharList.CharRetainers [idx].attPhysical < 80) { NPCCharList.CharRetainers [idx].attPhysical += 0.5f + Random.Range(0, 1); } if (dif > 40) { NPCCharList.CharRetainers [idx].workReward += 1; } NPCCharList.CharRetainers [idx].coreSkillMartial += 0.5f + Random.Range(0f, 2f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " went deep inside the forest to hunt and earned " + gold.ToString() + " gold."); } else if (randNum > (dif - (dif / 2))) { if (NPCCharList.CharRetainers [idx].charCorruption < 20) { float rand = Random.Range(-4, 2); if (rand > 0) { NPCCharList.CharRetainers [idx].charCorruption += rand; } } goldf = (2 + Random.Range(0, 30)) * ((((NPCCharList.CharRetainers [idx].coreSkillMartial + NPCCharList.CharRetainers [idx].attPhysical) / 400) + (NPCCharList.CharRetainers [idx].attWillpower / 200)) / 1.5f); gold = (int)goldf; NPCCharList.CharRetainers [idx].workReward -= 1; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " didn't went too deep into the forest to hunt and earned " + gold.ToString() + " gold."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to go to hunt."); } case NPCData.Jobs.CastleEntertainer: dif = 100 - ((NPCCharList.CharRetainers [idx].attObedience / 1.2f) + (NPCCharList.CharRetainers [idx].attHappiness / 4) + (NPCCharList.CharRetainers [idx].attLibido / 8)); NPCCharList.CharRetainers [idx].attHappiness -= 0.5f + (Random.Range(0, 2)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0, 3); } if (dif < randNum) { if (NPCCharList.CharRetainers [idx].charCorruption < 25) { float rand = Random.Range(-4, 2); if (rand > 0) { NPCCharList.CharRetainers [idx].charCorruption += rand; } } if (NPCCharList.CharRetainers [idx].attSocial < 80) { NPCCharList.CharRetainers [idx].attSocial += 0.5f + Random.Range(0, 1); } if (dif > 30) { NPCCharList.CharRetainers [idx].workReward += 1; } NPCCharList.CharRetainers [idx].utilitySkillPerformance += 0.5f + Random.Range(0f, 2f); goldf = (2f + Random.Range(0f, 30f)) * ((((NPCCharList.CharRetainers [idx].utilitySkillPerformance + NPCCharList.CharRetainers [idx].attSocial) / 200f) + (NPCCharList.CharRetainers [idx].attNature / 80f) + (NPCCharList.CharRetainers [idx].attBeauty / 60f)) / 2.5f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " performed to the crowd, earing " + gold.ToString() + " gold."); } else if (randNum > (dif - (dif / 2))) { if (NPCCharList.CharRetainers [idx].charCorruption < 25) { float rand = Random.Range(-4, 2); if (rand > 0) { NPCCharList.CharRetainers [idx].charCorruption += rand; } } goldf = (2f + Random.Range(0f, 30f)) * ((((NPCCharList.CharRetainers [idx].utilitySkillPerformance + NPCCharList.CharRetainers [idx].attSocial) / 400f) + (NPCCharList.CharRetainers [idx].attNature / 160f) + (NPCCharList.CharRetainers [idx].attBeauty / 120f)) / 2.5f); gold = (int)goldf; GameControl.charGold += gold; NPCCharList.CharRetainers [idx].workReward -= 1; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " lazily performed to the crowd, earing " + gold.ToString() + " gold."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to perform today."); } case NPCData.Jobs.CastleArtisan: dif = 100f - (NPCCharList.CharRetainers [idx].attObedience + (NPCCharList.CharRetainers [idx].attHappiness / 1.9f)); NPCCharList.CharRetainers [idx].attHappiness -= 0.5f + (Random.Range(0, 1)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0f, 2f); } if (dif < randNum) { if (NPCCharList.CharRetainers [idx].attPhysical < 80) { NPCCharList.CharRetainers [idx].attPhysical += 0.5f + Random.Range(0f, 1.5f); } NPCCharList.CharRetainers [idx].utilitySkillCrafting += 0.5f + Random.Range(0, 2.5f); if (dif > 35) { NPCCharList.CharRetainers [idx].workReward += 1; } goldf = (3f + Random.Range(0f, 35f)) * ((NPCCharList.CharRetainers [idx].utilitySkillCrafting + NPCCharList.CharRetainers [idx].attPhysical) / 200f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " went to the city to work as an artisan, earning " + gold.ToString() + " gold."); } else if (randNum > (dif - (dif / 2))) { NPCCharList.CharRetainers [idx].workReward -= 1; goldf = (3f + Random.Range(0f, 35f)) * ((NPCCharList.CharRetainers [idx].utilitySkillCrafting + NPCCharList.CharRetainers [idx].attPhysical) / 400f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " reluctantly worked as an artisan, earning " + gold.ToString() + " gold."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to work as an artisan."); } case NPCData.Jobs.CastleFarmhand: dif = 100f - (NPCCharList.CharRetainers [idx].attObedience + (NPCCharList.CharRetainers [idx].attHappiness / 2f)); NPCCharList.CharRetainers [idx].attHappiness -= 0.5f + (Random.Range(0f, 1.5f)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0f, 3f); } if (dif < randNum) { if (NPCCharList.CharRetainers [idx].attPhysical < 100) { NPCCharList.CharRetainers [idx].attPhysical += 0.5f + Random.Range(0f, 1f); } NPCCharList.CharRetainers [idx].utilitySkillFarmHand += 0.5f + Random.Range(0, 2f); if (dif > 35) { NPCCharList.CharRetainers [idx].workReward += 1; } goldf = (1f + Random.Range(0f, 25f)) * ((NPCCharList.CharRetainers [idx].utilitySkillFarmHand + NPCCharList.CharRetainers [idx].attPhysical) / 160f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " went to the city to work as a farmhand, earning " + gold.ToString() + " gold."); } else if (randNum > (dif - (dif / 2))) { NPCCharList.CharRetainers [idx].workReward -= 1; goldf = (1f + Random.Range(0f, 25f)) * ((NPCCharList.CharRetainers [idx].utilitySkillFarmHand + NPCCharList.CharRetainers [idx].attPhysical) / 320f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " reluctantly went to the city to work as a farmhand, earning " + gold.ToString() + " gold."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to work as a farmhand."); } case NPCData.Jobs.CastleScribe: dif = 100f - (NPCCharList.CharRetainers [idx].attObedience + (NPCCharList.CharRetainers [idx].attHappiness / 1.75f)); NPCCharList.CharRetainers [idx].attHappiness += 0.5f + (Random.Range(0f, 0.5f)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0f, 1.5f); } if (dif < randNum) { if (NPCCharList.CharRetainers [idx].attMental < 100) { NPCCharList.CharRetainers [idx].attMental += 0.5f + Random.Range(0f, 1f); } NPCCharList.CharRetainers [idx].utilitySkillLearning += 0.5f + Random.Range(0, 1.5f); if (dif > 35) { NPCCharList.CharRetainers [idx].workReward += 1; } goldf = (1f + Random.Range(0f, 50f)) * ((NPCCharList.CharRetainers [idx].utilitySkillLearning + NPCCharList.CharRetainers [idx].attMental + NPCCharList.CharRetainers [idx].attHappiness) / 300f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " work as a scribe, earning " + gold.ToString() + " gold."); } else if (randNum > (dif - (dif / 2))) { NPCCharList.CharRetainers [idx].workReward -= 1; goldf = (1f + Random.Range(0f, 50f)) * ((NPCCharList.CharRetainers [idx].utilitySkillLearning + NPCCharList.CharRetainers [idx].attMental + NPCCharList.CharRetainers [idx].attHappiness) / 600f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " reluctantly work as a scribe, earning " + gold.ToString() + " gold."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to work as an scribe."); } case NPCData.Jobs.CastleProstitute: dif = 100 - ((NPCCharList.CharRetainers [idx].attObedience / 1.4f) + (NPCCharList.CharRetainers [idx].attHappiness / 4) + (NPCCharList.CharRetainers [idx].attLibido / 4)); NPCCharList.CharRetainers [idx].attHappiness -= 1f + (Random.Range(0, 4)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring >= 3) { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0, 4); } if (dif < randNum) { if (NPCCharList.CharRetainers [idx].charCorruption < 80) { float rand = Random.Range(-4, 4); if (rand > 0) { NPCCharList.CharRetainers [idx].charCorruption += rand; } } if (NPCCharList.CharRetainers [idx].attOpenness < 80) { NPCCharList.CharRetainers [idx].attOpenness += Random.Range(0, 3); } if (NPCCharList.CharRetainers [idx].attLibido < 70) { NPCCharList.CharRetainers [idx].attLibido += Random.Range(0, 3); } if (NPCCharList.CharRetainers [idx].attDignity > 40) { NPCCharList.CharRetainers [idx].attDignity -= Random.Range(0, 3); } if (NPCCharList.CharRetainers [idx].attMorality > 50) { NPCCharList.CharRetainers [idx].attMorality -= Random.Range(0, 3); } if (NPCCharList.CharRetainers [idx].attSocial < 100) { NPCCharList.CharRetainers [idx].attSocial += 0.5f + Random.Range(0, 1); } if (dif > 30) { NPCCharList.CharRetainers [idx].workReward += 1; } NPCCharList.CharRetainers [idx].sexSkillWhoring += 0.5f + Random.Range(0f, 2f); goldf = (2f + Random.Range(0f, 40f)) * ((((NPCCharList.CharRetainers [idx].sexSkillWhoring + NPCCharList.CharRetainers [idx].attSocial) / 200f) + (NPCCharList.CharRetainers [idx].attNature / 60f) + (NPCCharList.CharRetainers [idx].attBeauty / 40f)) / 2.3f); gold = (int)goldf; GameControl.charGold += gold; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " worked as a prostitute, earning " + gold.ToString() + " gold."); } else if (randNum > (dif - (dif / 2))) { if (NPCCharList.CharRetainers [idx].charCorruption < 80) { float rand = Random.Range(-4, 4); if (rand > 0) { NPCCharList.CharRetainers [idx].charCorruption += rand; } } if (NPCCharList.CharRetainers [idx].attOpenness < 80) { NPCCharList.CharRetainers [idx].attOpenness += Random.Range(0, 3); } if (NPCCharList.CharRetainers [idx].attLibido < 70) { NPCCharList.CharRetainers [idx].attLibido += Random.Range(0, 3); } if (NPCCharList.CharRetainers [idx].attDignity > 40) { NPCCharList.CharRetainers [idx].attDignity -= Random.Range(0, 3); } if (NPCCharList.CharRetainers [idx].attMorality > 50) { NPCCharList.CharRetainers [idx].attMorality -= Random.Range(0, 3); } goldf = (2f + Random.Range(0f, 40f)) * ((((NPCCharList.CharRetainers [idx].sexSkillWhoring + NPCCharList.CharRetainers [idx].attSocial) / 400f) + (NPCCharList.CharRetainers [idx].attNature / 120f) + (NPCCharList.CharRetainers [idx].attBeauty / 80f)) / 2.3f); gold = (int)goldf; GameControl.charGold += gold; NPCCharList.CharRetainers [idx].workReward -= 1; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " reluctantly worked as a prostitute, earning " + gold.ToString() + " gold."); } else { NPCCharList.CharRetainers [idx].workReward -= 2; return(NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " refused to work as a prostitute today."); } case NPCData.Jobs.CastleAccountant: float needSupplies = 500 - CastleController.castleSupplies; NPCCharList.CharRetainers [idx].attHappiness += 1f + (Random.Range(0, 2)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring < 3) { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(0, 2); } if (NPCCharList.CharRetainers [idx].attMental < 100) { NPCCharList.CharRetainers [idx].attMental += Random.Range(0, 1); } if (NPCCharList.CharRetainers [idx].coreSkillStewardship < 100) { NPCCharList.CharRetainers [idx].coreSkillStewardship += 0.5f + Random.Range(0, 2); } if (CastleController.castleSupplies > 500) { return("There is no need to buy more supplies for now."); } if (GameControl.charGold > (needSupplies * (3 - ((NPCCharList.CharRetainers [idx].coreSkillStewardship + NPCCharList.CharRetainers [idx].attMental) / 133)))) { GameControl.charGold -= (int)(needSupplies * (3 - ((NPCCharList.CharRetainers [idx].coreSkillStewardship + NPCCharList.CharRetainers [idx].attMental) / 133))); CastleController.castleSupplies = 500; return("Your accountant " + NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " has bought " + needSupplies + "x amount of supplies, for " + (3 - ((NPCCharList.CharRetainers [idx].coreSkillStewardship + NPCCharList.CharRetainers [idx].attMental) / 133)).ToString() + " each."); } else { return("your accountant" + NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " didn't had anough funds to buy the supplies your castle needs."); } case NPCData.Jobs.CastleSlaveMaster: NPCCharList.CharRetainers [idx].attHappiness += 0.5f + (Random.Range(0, 2)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring < 3) { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(0, 1.5f); } if (NPCCharList.CharRetainers [idx].attSocial < 100) { NPCCharList.CharRetainers [idx].attSocial += Random.Range(0, 1); } if (NPCCharList.CharRetainers [idx].coreSkillPersuasion < 100) { NPCCharList.CharRetainers [idx].coreSkillPersuasion += 0.5f + Random.Range(0, 2); } CastleUpdate.tempSlaveMasterEff += ((NPCCharList.CharRetainers [idx].coreSkillPersuasion + NPCCharList.CharRetainers [idx].attSocial) / 200); return("Your slave master, " + NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + ", took care of your prisoners today."); case NPCData.Jobs.CastleCaptain: NPCCharList.CharRetainers [idx].attHappiness += 2f + (Random.Range(0, 2)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring < 3) { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(1, 2f); } if (NPCCharList.CharRetainers [idx].attPhysical < 100) { NPCCharList.CharRetainers [idx].attPhysical += Random.Range(0, 1); } if (NPCCharList.CharRetainers [idx].coreSkillMartial < 100) { NPCCharList.CharRetainers [idx].coreSkillMartial += 0.5f + Random.Range(0, 2); } CastleUpdate.tempCastleSecurity += ((NPCCharList.CharRetainers [idx].attPhysical + NPCCharList.CharRetainers [idx].coreSkillSecurity + NPCCharList.CharRetainers [idx].coreSkillMartial) / 250) / (RulesNPC.savedRules.Count / 8); CastleUpdate.tempMaxMartialTrain += NPCCharList.CharRetainers [idx].coreSkillMartial; CastleUpdate.tempMaxSecurityTrain += NPCCharList.CharRetainers [idx].coreSkillSecurity; return("Your captain of the guard, " + NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + " trained your guards and patrolled the castle."); case NPCData.Jobs.CastleGuard: NPCCharList.CharRetainers [idx].attHappiness += 1f + (Random.Range(0, 1)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring < 3) { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(0, 1f); } else { NPCCharList.CharRetainers [idx].attHappiness -= Random.Range(0, 2f); } if (NPCCharList.CharRetainers [idx].attPhysical < 75) { NPCCharList.CharRetainers [idx].attPhysical += Random.Range(0, 1); } if (NPCCharList.CharRetainers [idx].coreSkillMartial < CastleController.maxMartialTrain) { NPCCharList.CharRetainers [idx].coreSkillMartial += 0.5f + Random.Range(0, 2); } if (NPCCharList.CharRetainers [idx].coreSkillSecurity < CastleController.maxSecurityTrain) { NPCCharList.CharRetainers [idx].coreSkillSecurity += 0.5f + Random.Range(0, 2); } CastleUpdate.tempCastleSecurity += ((NPCCharList.CharRetainers [idx].attPhysical + NPCCharList.CharRetainers [idx].coreSkillSecurity + NPCCharList.CharRetainers [idx].coreSkillMartial) / 300) / (RulesNPC.savedRules.Count / 8); return("Your guard, " + NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + ", patrolled your castle today."); case NPCData.Jobs.CastleCourtier: NPCCharList.CharRetainers [idx].attHappiness += 2f + (Random.Range(0, 1)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring < 3) { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(1, 4f); } else { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(0, 2f); } if (NPCCharList.CharRetainers [idx].attSocial < 100) { NPCCharList.CharRetainers [idx].attSocial += Random.Range(0, 2f); } if (NPCCharList.CharRetainers [idx].coreSkillGovernance < 100) { NPCCharList.CharRetainers [idx].coreSkillGovernance += Random.Range(0, 2.5f); } return("Your courtier, " + NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + ", hanged around with you in the court room."); case NPCData.Jobs.CastleCounselor: NPCCharList.CharRetainers [idx].attHappiness += 2f + (Random.Range(0, 2)); if ((int)NPCCharList.CharRetainers [idx].bgUpbring < 3) { NPCCharList.CharRetainers [idx].attHappiness += Random.Range(0, 3f); } if (NPCCharList.CharRetainers [idx].attSocial < 100) { NPCCharList.CharRetainers [idx].attSocial += Random.Range(0, 2f); } if (NPCCharList.CharRetainers [idx].coreSkillDiplomacy < 100) { NPCCharList.CharRetainers [idx].coreSkillDiplomacy += Random.Range(0, 2.5f); } CastleUpdate.tempCastleMentalcare += ((NPCCharList.CharRetainers [idx].coreSkillDiplomacy + NPCCharList.CharRetainers [idx].attSocial) / 50); return("Your counselor, " + NPCCharList.CharRetainers [idx].charName + " " + NPCCharList.CharRetainers [idx].charSurname + ", has helped those who are more depressed to get in a better mood."); } return("bug in updatejob"); }