public override bool Mutate(GameObject GO, int Level) { ParentObject.SetStringProperty("BleedLiquid", "acid-1000"); ParentObject.AddPart <AcidImmunity>(true); Unmutate(GO); return(base.Mutate(GO, Level)); }
public override bool HandleEvent(ObjectCreatedEvent E) { ParentObject.AddPart <Blackout>(); Blackout BlackOutHook = ParentObject.GetPart <Blackout>(); BlackOutHook.Radius = 0; return(base.HandleEvent(E)); }
public override bool Mutate(GameObject GO, int Level) { Unmutate(GO); ParentObject.SetStringProperty("BleedLiquid", "acid-1000"); ParentObject.AddPart <AcidImmunity>(true); ParentObject.AddPart <WaterHazardous>(true); ParentObject.AddPart <DamagesArmorOnEquipped>(true); ActivatedAbilityID = AddMyActivatedAbility("Spit Acid", "CommandSpitAcid", "Physical Mutation", null, "*", null, false); return(base.Mutate(GO, Level)); }
public override void Attach() { var desiredFaction = Factions.GetRandomFaction(); var reviledFaction = 75.in100() ? Factions.get("Fish") /* otherwise */ : Factions.GetRandomFaction(); ParentObject.AddPart(new AddsRep(desiredFaction.Name, 100)); ParentObject.AddPart(new AddsRep(reviledFaction.Name, -100)); ParentObject.GetPart <Description>().Short = $"A legend boldly proclaims the allegiances of the wearer of this strange piece of billed fabric for all to see:\n\nI am desired by {desiredFaction.getFormattedName()}\nAnd reviled by {reviledFaction.getFormattedName()}"; }
public override bool Mutate(GameObject GO, int Level) { Mutations GainPSiFocus = GO.GetPart <Mutations>(); if (!GainPSiFocus.HasMutation("FocusPsi")) { GainPSiFocus.AddMutation("FocusPsi", 1); } if (!ParentObject.HasPart("ShimmeringShroudHandler")) { ParentObject.AddPart <ShimmeringShroudHandler>(); } ActivateShimmeringShroudAbilityID = base.AddMyActivatedAbility("Activate Shroud", "CommandShimmeringShroud", "Mental Mutation", null, "*", null, false, false, false, false, false); ChargePotentialAbilityID = base.AddMyActivatedAbility("Charge Potential", "CommandChargePotencyShroud", "Mental Mutation", null, "*", null, true, false, true, false, false); PotencyForChargesAbility = base.AddMyActivatedAbility("Recharge Battery", "ChargeBatteryEvent", "Electrokinesis", null, "~", null, false, false, true, false, false); ElectrokinesisGauge = base.AddMyActivatedAbility("Electrokinesis", "ElectroToggleEvent", "Mutation"); this.ChangeLevel(Level); return(base.Mutate(GO, Level)); }
public override bool FireEvent(Event E) { if (E.ID == "UpdateFistProperties") { // AddPlayerMessage("Updating fist?"); MeleeWeapon FistProperties = this.ParentObject.GetPart("MeleeWeapon") as MeleeWeapon; FistProperties.BaseDamage = (string)E.GetParameter("Dice"); if (!ParentObject.HasPart("KO_On_Finish")) { ParentObject.AddPart <KO_On_Finish>(); // AddPlayerMessage("Part added to " + ParentObject); } // AddPlayerMessage(FistProperties.BaseDamage); } return(base.FireEvent(E)); }
public override bool AddSkill(GameObject GO) { if (!ParentObject.HasPart("KO_On_Finish")) { // AddPlayerMessage("AddingKOPart from Skill Tree"); ParentObject.AddPart <KO_On_Finish>(); // AddPlayerMessage("Part KO added to " + ParentObject); } if (!ParentObject.HasPart("MartialBody")) { // AddPlayerMessage("Adding MartialbodPart from Skill Tree"); ParentObject.AddPart <MartialBody>(); // AddPlayerMessage("Part MB added to " + ParentObject); } if (!ParentObject.HasSkill("WM_MMA_MartialConI")) { ParentObject.AddSkill("WM_MMA_MartialConI"); } return(true); }
public void Check() { if (ParentObject.HasPart(typeof(Brain))) { var conversationScript = ParentObject.GetPart <ConversationScript>(); if (conversationScript == null) { ParentObject.AddPart( new ConversationScript(ConversationID) ); } else { conversationScript.ConversationID = ConversationID; } ParentObject.RemovePart(this); } }
public override bool FireEvent(Event E) { if (E.ID == "Dropped") { boot = true; } if (E.ID == "EnteredCell" && boot) { boot = false; if (ParentObject.GetPart <Brain>() == null) { return(false); } ParentObject.GetPart <Brain>().PerformReequip(); ParentObject.GetPart <Brain>().BecomeCompanionOf(ParentObject.ThePlayer); ParentObject.GetPart <Brain>().IsLedBy(ParentObject.ThePlayer); ParentObject.GetPart <Brain>().SetFeeling(ParentObject.ThePlayer, 100); ParentObject.GetPart <Brain>().Goals.Clear(); ParentObject.GetPart <Brain>().Calm = false; ParentObject.GetPart <Brain>().Hibernating = false; ParentObject.GetPart <Brain>().FactionMembership.Clear(); ParentObject.AddPart(new Combat()); XRLCore.Core.Game.ActionManager.AddActiveObject(ParentObject); } if (E.ID == "GetShortDescription") { string str = "\n&CAwoken: This corpse has been reanimated with cybernetic technologies."; E.SetParameter("Postfix", E.GetStringParameter("Postfix") + str); } else if ((E.ID == "GetDisplayName" || E.ID == "GetShortDisplayName") && (!ParentObject.Understood() || !ParentObject.HasProperName)) { E.GetParameter <StringBuilder>("Prefix").Append("awoken "); } return(base.FireEvent(E)); }
public override bool Mutate(GameObject GO, int Level) { ParentObject.SetStringProperty("BleedLiquid", "poisonichor-1000"); ParentObject.AddPart <PoisonImmunity>(true); return(base.Mutate(GO, Level)); }
public void AddModifiers() { if (ParentObject.DisplayName.Contains("Playful") || ParentObject.DisplayName.Contains("Energetic") || ParentObject.DisplayName.Contains("Exciting") || ParentObject.DisplayName.Contains("Wild")) { ParentObject.Statistics["MoveSpeed"].BaseValue += Stat.Random(5, 15); } else if (ParentObject.DisplayName.Contains("Funny") || ParentObject.DisplayName.Contains("Awkward") || ParentObject.DisplayName.Contains("Clueless") || ParentObject.DisplayName.Contains("Floppy-tongued")) { Description Desc = ParentObject.GetPart <Description>(); Desc._Short = Desc._Short + " =pronouns.Subjective= seems very silly."; } else if (ParentObject.DisplayName.Contains("Clever")) { if (!ParentObject.HasPart("LegendaryDogsWaterFinder")) { ParentObject.AddPart <LegendaryDogsWaterFinder>(new LegendaryDogsWaterFinder(), true); } } else if (ParentObject.DisplayName.Contains("Soft")) { if (!ParentObject.HasPart("LegendaryDogsPetTitlePart")) { ParentObject.AddPart <LegendaryDogsPetTitlePart>(new LegendaryDogsPetTitlePart(), true); } } else if (ParentObject.DisplayName.Contains("Loyal")) { // nothing } else if (ParentObject.DisplayName.Contains("Loveable")) { // handled via effects } else if (ParentObject.DisplayName.Contains("Messy")) { ParentObject.MakeBloody(LegendaryDogsDogBuilder.MessyLiquids.GetRandomElement()); } else if (ParentObject.DisplayName.Contains("Happy")) { // nothing } else if (ParentObject.DisplayName.Contains("Simple")) { // nothing } else if (ParentObject.DisplayName.Contains("Loving")) { // nothing } else if (ParentObject.DisplayName.Contains("Content")) { // nothing } else if (ParentObject.DisplayName.Contains("Good")) { this.GoodFactionPenalty = 100 + 25 * (ParentObject.DisplayName.Split(new[] { "Very" }, StringSplitOptions.None).Length - 1); } else if (ParentObject.DisplayName.Contains("Caring")) { // nothing } else if (ParentObject.DisplayName.Contains("Fluffy")) { if (!ParentObject.HasPart("LegendaryDogsPetTitlePart")) { ParentObject.AddPart <LegendaryDogsPetTitlePart>(new LegendaryDogsPetTitlePart("fluffy"), true); } } else if (ParentObject.DisplayName.Contains("Smooth")) { if (!ParentObject.HasPart("LegendaryDogsPetTitlePart")) { ParentObject.AddPart <LegendaryDogsPetTitlePart>(new LegendaryDogsPetTitlePart("smooth"), true); } } else if (ParentObject.DisplayName.Contains("Warm")) { if (!ParentObject.HasPart("LegendaryDogsPetTitlePart")) { ParentObject.AddPart <LegendaryDogsPetTitlePart>(new LegendaryDogsPetTitlePart("warm"), true); } } else if (ParentObject.DisplayName.Contains("Stub-tailed")) { // nothing } }
public override bool FireEvent(Event E) { if (E.ID == "Dropped") { boot = true; } if (E.ID == "EnteredCell" && boot) { boot = false; if (ParentObject.GetPart <Brain>() == null) { return(false); } ParentObject.GetPart <Brain>().PerformReequip(); ParentObject.GetPart <Brain>().BecomeCompanionOf(ParentObject.ThePlayer); ParentObject.GetPart <Brain>().IsLedBy(ParentObject.ThePlayer); ParentObject.GetPart <Brain>().SetFeeling(ParentObject.ThePlayer, 100); ParentObject.GetPart <Brain>().Goals.Clear(); ParentObject.GetPart <Brain>().Calm = false; ParentObject.GetPart <Brain>().Hibernating = false; ParentObject.GetPart <Brain>().FactionMembership.Clear(); ParentObject.AddPart(new Combat()); XRLCore.Core.Game.ActionManager.AddActiveObject(ParentObject); } if (E.ID == "GetInventoryActions") { if (ParentObject.GetPart <Physics>() == null) { return(false); } EventParameterGetInventoryActions eventParameterGetInventoryActions = E.GetParameter("Actions") as EventParameterGetInventoryActions; if (ParentObject.GetPart <Physics>().Equipped != null) { if (!HasPropertyOrTag("NoRemoveOptionInInventory")) { eventParameterGetInventoryActions.AddAction("Remove", 'r', true, "&Wr&yemove", "InvCommandUnequipObject", 10); } } else { bool flag2 = true; if (ParentObject.GetPart <Physics>().InInventory == null || !ParentObject.GetPart <Physics>().InInventory.IsPlayer()) { if (ParentObject.IsTakeable()) { eventParameterGetInventoryActions.AddAction("Get", 'g', true, "&Wg&yet", "CommandTakeObject", 30); } else { flag2 = false; } } else if (!ParentObject.HasTagOrProperty("CannotDrop")) { eventParameterGetInventoryActions.AddAction("Drop", 'd', true, "&Wd&yrop", "CommandDropObject"); } if (flag2 && !ParentObject.HasTagOrProperty("CannotEquip")) { eventParameterGetInventoryActions.AddAction("AutoEquip", 'e', true, "&We&yquip (auto)", "CommandAutoEquipObject", 10); eventParameterGetInventoryActions.AddAction("DoEquip", 'E', true, "&WE&yquip (manual)", "CommandEquipObject"); } } if (ParentObject.GetPart <Physics>().IsAflame()) { eventParameterGetInventoryActions.AddAction("Firefight", 'f', false, "&Wf&yight fire", "CommandFightFire", 40); } } return(base.FireEvent(E)); }