コード例 #1
0
 public override void Remove(GameObject Object)
 {
     CurrentEffectBoost = 0;
     NewEffectBoost     = 0;
     // XDidY(Object, "emerge", "from the depths", "!");
     StatShifter.RemoveStatShifts();
 }
コード例 #2
0
 public override bool WantTurnTick()
 {
     if (!ParentObject.HasEffect(x => DiseaseEffects.Contains(x.ClassName)))
     {
         return(true);
     }
     else if (ParentObject.HasEffect(x => DiseaseEffects.Contains(x.ClassName) && ParentObject.GetStatValue("Hitpoints") <= 1))
     {
         StatsShifted = true;
         --DailyCycleCount;
         if (DailyCycleCount <= 0)
         {
             StatShifter.SetStatShift(ParentObject, "Hitpoints", -1, true);
             DailyCycleCount += 2400;
             return(true);
         }
     }
     else if (!ParentObject.HasEffect(x => DiseaseEffects.Contains(x.ClassName)))
     {
         StatShifter.RemoveStatShifts();
         DailyCycleCount = 2400;
         return(true);
     }
     else if (ParentObject.HasEffect(x => DiseaseEffects.Contains(x.ClassName)) && ParentObject.GetStatValue("Hitpoints") <= 1)
     {
         ParentObject.Die(null, null, "Your form withers away to your pathogenic guest.");
     }
     return(base.WantTurnTick());
 }
 public override bool Mutate(GameObject go, int Level)
 {
     avBonus  = 1 + (int)Math.Ceiling((Decimal)(Level / 2));
     STRBonus = 1 + (int)Math.Ceiling((Decimal)(Level / 3));
     StatShifter.SetStatShift(target: ParentObject, statName: "AV", amount: avBonus, baseValue: true);
     StatShifter.SetStatShift(target: ParentObject, statName: "Strength", amount: STRBonus, baseValue: true);
     return(true);
 }
コード例 #4
0
        public override bool Apply(GameObject Object)
        {
            PlayWorldSound("swapstance", PitchVariance: 0f);
            DawnPulse(Object.CurrentCell);

            StatShifter.SetStatShift("DV", 1);
            return(true);
        }
コード例 #5
0
        public override bool Apply(GameObject Object)
        {
            StatShifter.SetStatShift("MoveSpeed", -10);

            PlayWorldSound("swapstance", PitchVariance: 0f);

            AstralTabbyPulse(Object.CurrentCell);
            return(true);
        }
        public override void Remove(GameObject Object)
        {
            StatShifter.RemoveStatShifts();
            if (Object.IsPlayer())
            {
                Popup.Show("Your chitinous skin has hardened.");
            }

            Object.FireEvent(Event.New("CommandChitinHarden"));
        }
コード例 #7
0
        public override void Remove(GameObject Object)
        {
            AddPlayerMessage("{{gray|The shroud of darkness about you disperses.}}");

            if (Object.HasPart("Blackout"))
            {
                Object.RemovePart <Blackout>();
            }
            StatShifter.RemoveStatShifts();
        }
コード例 #8
0
        public override bool Apply(GameObject Object)
        {
            var ParentMoveSpeed = Object.Statistics["MoveSpeed"].BaseValue;

            PlayWorldSound("swapstance", PitchVariance: 0f);
            SaltBackPulse(Object.CurrentCell);
            StatShifter.SetStatShift("MoveSpeed", 10);

            return(true);
        }
コード例 #9
0
 public override void Remove(GameObject Object)
 {
     RemoveMyActivatedAbility(ref this.GrappleCommand);
     RemoveMyActivatedAbility(ref this.TackleCommand);
     RemoveMyActivatedAbility(ref this.HipThrowCommand);
     RemoveMyActivatedAbility(ref this.SuplexCommand);
     RemoveMyActivatedAbility(ref this.SubdueCommand);
     RemoveMyActivatedAbility(ref this.RavageLimbCommand);
     RemoveMyActivatedAbility(ref this.WrestleCommand);
     StatShifter.RemoveStatShifts();
 }
コード例 #10
0
 public override bool Apply(GameObject Object)
 {
     movementSpeedDebuff = (int)((float)Object.Statistics["MoveSpeed"].BaseValue * 0.20f);
     StatShifter.SetStatShift("MoveSpeed", -movementSpeedDebuff);
     agilityDebuff = (int)((float)Object.Statistics["Agility"].BaseValue * 0.25f);
     StatShifter.SetStatShift("Agility", -agilityDebuff);
     if (Object.IsPlayer())
     {
         Popup.Show("Your husk encumbers you, you move 20% percent slower and your Agility is reduced by 25%.", true);
     }
     return(true);
 }
        public override bool Mutate(GameObject GO, int Level)
        {
            if (GO.Statistics.ContainsKey("AV"))
            {
                StatShifter.SetStatShift("AV", 1);
            }
            if (GO.Statistics.ContainsKey("AcidResistance"))
            {
                GO.Statistics["AcidResistance"].BaseValue += 5;
            }

            return(base.Mutate(GO, Level));
        }
コード例 #12
0
        public override void Remove(GameObject Object)
        {
            if (Object.HasEffect("Omniphase"))
            {
                Object.RemoveEffect("Omniphase");
            }
            if (Object.HasEffect("Rubbergum_Tonic"))
            {
                Object.RemoveEffect("Rubbergum_Tonic");
            }

            StatShifter.RemoveStatShifts();
        }
 public override bool ChangeLevel(int NewLevel)
 {
     StatShifter.DefaultDisplayName = "Chitin Skin";
     avBonus = 1 + (int)Math.Ceiling((Decimal)(NewLevel / 2));
     StatShifter.SetStatShift(target: ParentObject, statName: "AV", amount: avBonus, baseValue: true);
     STRBonus = 1 + (int)Math.Ceiling((Decimal)(NewLevel / 2));
     StatShifter.SetStatShift(target: ParentObject, statName: "Strength", amount: STRBonus, baseValue: true);
     if (ParentObject.HasEffect("SoftChitin"))
     {
         SoftChitin effect = ParentObject.GetEffect("SoftChitin") as SoftChitin;
         effect.setAVDebuff(avBonus, ParentObject);
     }
     return(base.ChangeLevel(NewLevel));
 }
        public override bool Apply(GameObject Object)
        {
            int StrengthDeBuff = (int)((float)Object.Statistics["Strength"].BaseValue / 2);

            movementSpeedBuff = (int)((float)Object.Statistics["MoveSpeed"].BaseValue * 0.25f);
            StatShifter.SetStatShift("MoveSpeed", -movementSpeedBuff);
            StatShifter.SetStatShift("AV", -avDebuff);
            StatShifter.SetStatShift("Strength", -StrengthDeBuff);
            if (Object.IsPlayer())
            {
                Popup.Show("Your chitin is currently soft and malleable, until it hardens you lose your natural AV bonus and half of your strength bonus, but now move slightly faster.", true);
            }
            return(true);
        }
コード例 #15
0
 public override bool Apply(GameObject Object)
 {
     StatShifter.SetStatShift("Ego", -2);
     if (Object.HasEffect("PsiSupression"))
     {
         PsiSupression PsiSupression = Object.GetEffect("PsiSupression") as PsiSupression;
         if (Duration > PsiSupression.Duration)
         {
             PsiSupression.Duration = Duration;
         }
         return(true);
     }
     return(false);
 }
コード例 #16
0
        public override bool Apply(GameObject Object)
        {
            if (Stat.Random(1, 100) < 50)
            {
                AddPlayerMessage("{{dark red|With a bloodchilling roar, you unleash your slumbering fury!}}");
            }

            RageSplat();

            var ParentAV = Object.Statistics["AV"].Value;
            var ParentDV = Object.Statistics["DV"].Value;

            PlayWorldSound("swapstance", PitchVariance: 0.5f);

            StatShifter.SetStatShift("AV", -(int)Math.Round(ParentAV * 0.5));
            StatShifter.SetStatShift("DV", -(int)Math.Round(ParentDV * 0.5));

            this.SlumberID = base.AddMyActivatedAbility("Slumber", "SlumberSleepCommand", "Power", "Fall into a deep slumber, regenerating your hitpoints.", "Z", null, false, false, true);

            return(true);
        }
コード例 #17
0
        public override bool Apply(GameObject Object)
        {
            PlayWorldSound("swapstance", PitchVariance: 0f);
            DawnPulse(Object.CurrentCell);

            int ParentsStrengthModifier = Object.Statistics["Strength"].Modifier;

            var ObjectBody   = Object.Body;
            var ObjectsHands = ObjectBody.GetPart("Hand");

            foreach (var p in ObjectsHands)
            {
                if (p.Equipped == null)
                {
                    ++CurrentFreeArmCount;
                }
            }

            int SaveDynamics = ParentsStrengthModifier * CurrentFreeArmCount;

            GrappleCommand = Object.AddActivatedAbility("Grapple", "wm-GrappleCommand", "Way of the Death-Dacca", "Take hold of an opponent, grappled opponents cannot move or make physical attacks and must make a saving-throw each round to escape your grapple. Grappling requires a free-hand and gains a bonus from each free-hand you have above the first. You lose your grip on an opponent if you move outside of their adjacent tiles or become they become somehow intangible. When grappling an enemy and sharing their cell, there is a chance an attack directed at you will be redirected to the other creature instead and you gain +2 to your AV.\n"
                                                        + "\nCurrent Save Towards Grappling: " + "{{cyan|" + SaveDynamics + "}}", Silent: true);

            TackleCommand = Object.AddActivatedAbility("Tackle", "wmTackleCommand", "Way of the Death-Dacca", "Charge and grapple an enemy.", Silent: true);

            //__________________________________________________________________________________

            WrestleCommand = Object.AddActivatedAbility("Wrestle", "wm-WrestleCommand", "Way of the Death-Dacca", "Use your strength to reposition a grappled enemy to an adjacent tile around you, if you force the enemy towards a wall or immovable structure, you will slam the enemy into the object instead, dealing scaled damage. If you force the enemy into a tile where another creature is occupying, the creature must make a saving-throw or stumble into an adjacent tile around them, they both also take a small amount of damage. ", Silent: true);

            HipThrowCommand = Object.AddActivatedAbility("Hip-Throw", "wm-HipThrowCommand", "Way of the Death-Dacca", "Throw an opponent you are grappling with intense force into a direction around you.", Silent: true);

            SuplexCommand = Object.AddActivatedAbility("Suplex", "wm-SuplexCommand", "Way of the Death-Dacca", "While grapplng an enemy, you can perform a powerful takedown, the enemy is slammed into the tile opposite thier position to you, dealing immense damage with a chance to stun and even decapitate the enemy. [Cost 10x Combo-Meter.]", Silent: true);

            SubdueCommand = Object.AddActivatedAbility("Subdue", "wm-SubdueCommand", "Way of the Death-Dacca", "Grappled enemy must pass a toughness saving-throw or be knocked unconscious.", Silent: true);

            RavageLimbCommand = Object.AddActivatedAbility("Ravage Limb", "wm-RavageLimbCommand", "Way of the Death-Dacca", "Enemy must pass a strength-saving throw vs your own, or have a limb be permanently damaged. [Cost 10x Combo-Meter.]", Silent: true);

            StatShifter.SetStatShift("AV", 2);
            return(true);
        }
コード例 #18
0
        public override bool Mutate(GameObject GO, int Level)
        {
            if (!ParentObject.HasPart("NotOriginalEntity"))
            {
                // Statshifter - Setting all stats for starting husk
                StatShifter.SetStatShift(ParentObject, "Ego", 6, true);
                StatShifter.SetStatShift(ParentObject, "Willpower", 6, true);
                StatShifter.SetStatShift(ParentObject, "Intelligence", 6, true);
                StatShifter.SetStatShift(ParentObject, "Strength", -6, true);
                StatShifter.SetStatShift(ParentObject, "Toughness", -6, true);
                StatShifter.SetStatShift(ParentObject, "Agility", -6, true);
            }
            if (!ParentObject.HasEffect <Disintegrating>())
            {
                ParentObject.ApplyEffect(new Disintegrating(9999));
            }

            ActivatedAbilities activatedAbilities = ParentObject.GetPart("ActivatedAbilities") as ActivatedAbilities;

            this.ActivatedAbilityID = activatedAbilities.AddAbility("Soulshunt", "CommandSoulShunt", "Mental Mutation", "Shunt the imprints of your victims' mind from their body, and assume the throne of their vessel.\n\n" + "Target makes a Willpower saving-throw vs your Ego Modifier {{light blue|(+10)}} or be shunted from its body; you assume control of the target's body permanently. Your new husk will wither over time. On a successful soulshunt you gain a 10% chance to increase your ego score by {{light blue|1}}." + "\n\n{{dark gray|Base cooldown: 2400}}", "(O)", null, false, false, false, false, false, false, false, false, -1);
            return(base.Mutate(GO, Level));
        }
コード例 #19
0
        public override bool Mutate(GameObject GO, int Level)
        {
            ACModifier = 0;
            DVModifier = 1;
            StatShifter.SetStatShift("MoveSpeed", 5);
            SerpentileTail = GameObject.create("Serpentine Tail");
            BodyPart firstPart = this.ParentObject.GetPart <Body>().GetFirstPart(this.BodyPartType);

            if (firstPart != null)
            {
                firstPart.Equipped?.UnequipAndRemove();
                firstPart.Equip(SerpentileTail);

                firstPart.DefaultBehaviorBlueprint = "Serpentine Tail";
                firstPart.DefaultBehavior          = SerpentileTail;
                // this.ParentObject.FireEvent(Event.New("CommandForceEquipObject", "Object", this.SerpentileTail, "BodyPart", firstPart).SetSilent(true));
                // Armor part = this.SerpentileTail.GetPart<Armor>();
                // part.AV = this.ACModifier;
                // part.DV = this.DVModifier;
            }
            this.ActivatedAbilitiesID = base.AddMyActivatedAbility("Constrict", "CommandConstrict", "Physical Mutation", "Coil around and crush your enemies.", "@", null, false, false, false, false, false);
            this.ChangeLevel(Level);
            return(base.Mutate(GO, Level));
        }
コード例 #20
0
 public override bool AddSkill(GameObject GO)
 {
     StatShifter.SetStatShift("Speed", 10);
     return(true);
 }
コード例 #21
0
 public override bool Unmutate(GameObject GO)
 {
     StatShifter.RemoveStatShifts();
     base.RemoveMyActivatedAbility(ref this.ActivatedAbilitiesID);
     return(base.Unmutate(GO));
 }
コード例 #22
0
 public override bool Apply(GameObject Object)
 {
     StatShifter.SetStatShift("Willpower", -8);
     return(true);
 }
コード例 #23
0
 public override void Remove(GameObject Object)
 {
     StatShifter.RemoveStatShifts();
 }
コード例 #24
0
        public override bool FireEvent(Event E)
        {
            if (E.ID == "DefenderAfterAttackMissed" && ParentObject.HasEffect("AstralTabbyStance"))
            {
                var Defender = E.GetGameObjectParameter("Defender");
                var Weapon   = E.GetGameObjectParameter("Weapon");

                // AddPlayerMessage("Defender: " + Defender);

                if (Defender == ParentObject)
                {
                    var MMAComboAccess = ParentObject.GetPart <WM_MMA_CombinationStrikesI>();

                    MMAComboAccess.CurrentComboICounter++;
                    MMAComboAccess.UpdateCounter();
                }
            }
            else if (E.ID == "AttackerHit" && ParentObject.HasEffect("AstralTabbyStance"))
            {
                Damage Damage = E.GetParameter <Damage>("Damage");
                Damage.Amount = (int)Math.Floor(Damage.Amount * 0.75);
            }
            else if (E.ID == "BeginTakeAction" && ParentObject.HasEffect <AstralTabbyStance>())
            {
                // AddPlayerMessage("Log: Beginning Take Action");
                var ParentCell = ParentObject.CurrentCell.GetLocalAdjacentCells();
                // AddPlayerMessage("Log: Acquired Cells");
                foreach (var C in ParentCell)
                {
                    // AddPlayerMessage("Log: Starting Foreach");
                    if (C.HasObjectWithPart("Combat") && !C.HasObjectWithPart("FlankerReader_PAT"))
                    {
                        // AddPlayerMessage("Found Combat Targets");
                        var ObjectCheck = C.GetFirstObjectWithPart("Combat");
                        // AddPlayerMessage("Log: Getting Combat Targets");

                        if (!ObjectCheck.HasPart("FlankerReader_PAT"))
                        {
                            // AddPlayerMessage("Log: Adding FlankerCheckParts");
                            ObjectCheck.AddPart <FlankerReader_PAT>();


                            // AddPlayerMessage("Log: Added Flanker Part");
                            var ConfirmedObject = ObjectCheck.GetPart <FlankerReader_PAT>();
                            ConfirmedObject.Check = true;


                            // AddPlayerMessage("Log: Confriming Object Flanker Pass");
                            if (ConfirmedObject.Check != false)
                            {
                                FlankersAboundDuration = 3;
                                ParentObject.Statistics["DV"]._Value += 1;
                                Targeted              = true;
                                FlankerAccumBonus    += 1;
                                ConfirmedObject.Check = false;
                            }
                        }
                        // AddPlayerMessage("Log: Completed begin take action.");
                        break;
                    }
                    else
                    if (Targeted == true)
                    {
                        Targeted = false;
                    }
                }
            }
            else if (E.ID == "TargetedForMissileWeapon" && ParentObject.HasEffect <AstralTabbyStance>())
            {
                GameObject Attacker = E.GetGameObjectParameter("Attacker");
                GameObject Defender = E.GetGameObjectParameter("Defender");

                if (Defender == ParentObject)
                {
                    Targeted = true;
                    StatShifter.SetStatShift("DV", +ParentObject.Statistics["Agility"].Modifier + (ParentObject.Statistics["Level"].BaseValue / 8));
                }
            }
            else if (E.ID == "EndTurn" && ParentObject.HasEffect <AstralTabbyStance>())
            {
                // AddPlayerMessage("Log: Firing Endturn.");
                if (FlankersAboundDuration > 0 && Targeted == false)
                {
                    // AddPlayerMessage("Log: Duration Countdown.");
                    --FlankersAboundDuration;
                }
                else if (Targeted == false && FlankersAboundDuration <= 0)
                {
                    // AddPlayerMessage("Log: Resetting Stats");

                    ParentObject.Statistics["DV"]._Value -= FlankerAccumBonus;
                    FlankerAccumBonus = 0;
                    Targeted          = false;
                }
                else if (Targeted == true && StatShifter != null)
                {
                    StatShifter.RemoveStatShifts();
                }

                AddPlayerMessage("Log: Targeted: " + Targeted);
                AddPlayerMessage("FlankersAboundDuration: " + FlankersAboundDuration);
            }
            return(base.FireEvent(E));
        }
コード例 #25
0
 public override void Remove(GameObject Object)
 {
     this.RemoveMyActivatedAbility(ref SlumberID, Object);
     StatShifter.RemoveStatShifts();
 }
コード例 #26
0
 public override void Remove(GameObject Object)
 {
     // XDidY(Object, "emerge", "from the depths", "!");
     StatShifter.RemoveStatShifts();
 }
コード例 #27
0
        public override bool FireEvent(Event E)
        {
            if (E.ID == "AttackerHit" && ParentObject.HasEffect("DawnStance"))
            {
                if (ParentObject.HasPart("WM_MMA_SureStrikes"))
                {
                    var MMAComboSSAccess = ParentObject.GetPart <WM_MMA_SureStrikes>();

                    //Handles damage scaling.

                    if (BonusSureStrike <= 10)
                    {
                        ++BonusSureStrike;
                    }
                    MMAComboSSAccess.UpdateCounter();
                }
                else
                {
                    try
                    {
                        var    salthopperDamageSystem = ParentObject.GetPart <WM_MMA_PathSaltHopper>();
                        Damage Damage   = E.GetParameter <Damage>("Damage");
                        var    Attacker = ParentObject;


                        if (salthopperDamageSystem.NegEffectsCollectiveTI.Any(Attacker.HasEffect))
                        {
                            Damage.Amount = (int)Math.Round(Damage.Amount * 1.15f);
                        }
                        else if (salthopperDamageSystem.NegEffectsCollectiveTII.Any(Attacker.HasEffect))
                        {
                            Damage.Amount = (int)Math.Round(Damage.Amount * 1.45f);
                        }
                        else if (salthopperDamageSystem.NegEffectsCollectiveTIII.Any(Attacker.HasEffect))
                        {
                            Damage.Amount = (int)Math.Round(Damage.Amount * 2.5f);
                        }
                        else
                        {
                            Damage.Amount = (int)Math.Round(Damage.Amount * 1.0f);
                        }
                    }
                    catch
                    {
                    }
                }
            }
            else if (E.ID == "CommandSureStrikes" && ParentObject.HasEffect("DawnStance"))
            {
                try
                {
                    var MMAComboAccess = ParentObject.GetPart <WM_MMA_SureStrikes>();

                    MMAComboAccess.FistPenBonus = +BonusSureStrike;
                    BonusSureStrike             = 0;
                    MMAComboAccess.UpdateCounter();
                }
                catch
                {
                    BonusSureStrike = 0;
                }
            }
            else if (E.ID == "CommandSureStrikes")
            {
                try
                {
                    var MMAComboAccess = ParentObject.GetPart <WM_MMA_SureStrikes>();

                    MMAComboAccess.FistPenBonus = +BonusSureStrike;
                    BonusSureStrike             = 0;
                    MMAComboAccess.UpdateCounter();
                }
                catch
                {
                    BonusSureStrike = 0;
                }
            }
            else if (E.ID == "PerformMeleeAttack" && ParentObject.HasEffect("DawnStance"))
            {
                int HitBonus = E.GetIntParameter("HitBonus");

                HitBonus = +1;
            }
            if (E.ID == "GetDefenderHitDice" && ParentObject.HasEffect("DawnStance") && ParentObject.HasSkill("WM_MMA_PathSaltBack"))
            {
                // AddPlayerMessage("dawnSaltBack Defender Block Begins");
                // GameObject Attacker = E.GetGameObjectParameter("Attacker");
                var Owner = ParentObject;

                var SaltBackBlockSystem = ParentObject.GetPart <WM_MMA_PathSaltBack>();

                Body            body  = Owner.GetPart("Body") as Body;
                List <BodyPart> hands = body.GetPart("Hand");
                var             hand  = body.GetPrimaryWeaponOfTypeOnBodyPartOfType("DefaultMartialFist", "Hand");

                int FistShieldAV = ParentObject.StatMod("Toughness", 1) + (ParentObject.Statistics["Level"].BaseValue / 4);
                if (SaltBackBlockSystem.SpecialFistCollective.Any(Owner.HasEquippedObject))
                {
                    SaltBackBlockSystem.PSBArmorBonus = 1;
                }

                if (Owner.GetShield() != null)
                {
                    // AddPlayerMessage("SaltBackHalf Shield Returned Null");
                    return(true);
                }
                if (E.HasParameter("ShieldBlocked"))
                {
                    // AddPlayerMessage("SaltBackHalf Blocked ParameterSet");
                    return(true);
                }
                if (!Owner.CanMoveExtremities(null, false, false, false))
                {
                    // AddPlayerMessage("SaltBackHalf CanMove Check");
                    return(true);
                }
                // AddPlayerMessage("SaltBackHalf Block Attempt Random Int");
                if (Stat.Random(1, 100) <= 15 + (5 * (ParentObject.Statistics["Level"].BaseValue / 5)))
                {
                    // AddPlayerMessage("SaltBackHalf SaltBack Status");

                    E.SetParameter("ShieldBlocked", true);

                    // AddPlayerMessage("SaltBackHalf Damage");

                    if (Owner.IsPlayer())
                    {
                        IComponent <GameObject> .AddPlayerMessage("You deflect an attack with your " + ParentObject.Equipped + "!" + "(" + FistShieldAV + " AV)", 'g');
                    }
                    else
                    {
                        Owner.ParticleText(string.Concat(new object[]
                        {
                            "{{",
                            IComponent <GameObject> .ConsequentialColor(Owner, null),
                            "|Block! (+",
                            FistShieldAV +
                            " AV)}}"
                        }), ' ', false, 1.5f, -8f);
                    }
                    E.SetParameter("AV", E.GetIntParameter("AV", 0) + FistShieldAV);
                }
            }
            if (E.ID == "BeginTakeAction" && ParentObject.HasEffect("DawnStance") && ParentObject.HasSkill("WM_MMA_PathAstralTabby"))
            {
                var ParentCell = ParentObject.CurrentCell.GetLocalAdjacentCells();

                foreach (var C in ParentCell)
                {
                    if (C.HasCombatObject())
                    {
                        FlankersAboundBnsDuration = 7;

                        StatShifter.SetStatShift("Speed", -2);
                    }
                }
            }
            if (E.ID == "EndTurn" && ParentObject.HasEffect("DawnStance"))
            {
                if (FlankersAboundBnsDuration > 0)
                {
                    --FlankersAboundBnsDuration;
                }
                else
                {
                    StatShifter.RemoveStatShifts();
                }

                var MMAComboAccess = ParentObject.GetPart <WM_MMA_SureStrikes>();
                MMAComboAccess.UpdateCounter();
            }
            return(base.FireEvent(E));
        }
コード例 #28
0
 public override bool Unmutate(GameObject GO)
 {
     StatShifter.RemoveStatShifts();
     return(base.Unmutate(GO));
 }
コード例 #29
0
        public override bool FireEvent(Event E)
        {
            if (E.ID == "AIGetOffensiveMutationList")
            {
                int intParameter = E.GetIntParameter("Distance");
                if (intParameter <= 1 & IsMyActivatedAbilityCoolingDown(ActivatedAbilityID, ParentObject))
                {
                    GameObject gameObjectParameter2 = E.GetGameObjectParameter("Target");
                    if (gameObjectParameter2.PhaseAndFlightMatches(ParentObject))
                    {
                        List <AICommandList> list = E.GetParameter("List") as List <AICommandList>;
                        list.Add(new AICommandList("CommandSoulShunt", 1));
                    }
                }
            }
            if (E.ID == "DamageFromDecay")
            {
                int DegradateLevel = ParentObject.Stat("Level");

                if (!ParentObject.MakeSave("Toughness", (28 + DegradateLevel), null, null, "Husk Deterioration"))
                {
                    // StatShifter.SetStatShift(ParentObject, "Hitpoints", -Stat.Random(0, 3), true);
                    ParentObject.Statistics["Hitpoints"].BaseValue -= Stat.Random(0, 3);
                }
            }
            else if (E.ID == "ApplyingTonic")
            {
                if (E.GetParameter <GameObject>("Tonic").Blueprint == "UbernostrumTonic" && SetCounterUberAptitude <= 0)
                {
                    UbernostrumScaling = (int)Math.Round(Stat.Random(0.10f, 0.30f) * ParentObject.GetStatValue("Hitpoints", 1));

                    StatShifter.SetStatShift(ParentObject, "Hitpoints", UbernostrumScaling, true);
                    SetCounterUberAptitude += 1;
                }
                else if (E.GetParameter <GameObject>("Tonic").Blueprint == "UbernostrumTonic" && SetCounterUberAptitude > 0)
                {
                    UbernostrumScaling  = (int)Math.Round(Stat.Random(0.10f, 0.30f) * ParentObject.GetStatValue("Hitpoints", 1));
                    UbernostrumScaling -= (int)Math.Round(UbernostrumScaling * (SetCounterUberAptitude + 0.10));

                    StatShifter.SetStatShift(ParentObject, "Hitpoints", UbernostrumScaling, true);
                    SetCounterUberAptitude += 1;
                }
            }
            else if (E.ID == "EndTurn")
            {
                if (HuskWeakeningDuration > 0)
                {
                    --HuskWeakeningDuration;
                    if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.7)
                    {
                        ParentObject.FireEvent(Event.New("DebuffsFromDecay"));
                    }
                    else if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.3)
                    {
                        ParentObject.FireEvent(Event.New("DebuffsFromDecay"));
                    }
                    else if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.1)
                    {
                        ParentObject.FireEvent(Event.New("DebuffsFromDecay"));
                    }
                    else if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.05)
                    {
                        ParentObject.FireEvent(Event.New("DebuffsFromDecay"));
                    }
                }
                else if (ParentObject.Statistics["Hitpoints"].BaseValue <= 1)
                {
                    if (ParentObject.IsPlayer())
                    {
                        ParentObject.Die(null, null, "As your husk crumbles to dust, so do your last tethers to world as your form radiates away.", Force: false);
                    }
                }
                if (!ParentObject.HasEffect <Disintegrating>())
                {
                    ParentObject.ApplyEffect(new Disintegrating(9999));
                }
            }
            else if (E.ID == "CommandSoulShunt")
            {
                ActivatedAbilities activatedAbilities = ParentObject.GetPart("ActivatedAbilities") as ActivatedAbilities;
                activatedAbilities.GetAbility(ActivatedAbilityID).Cooldown = 24000;
                SoulShunt();
                var HuskCurrentToughness = ParentObject.Stat("Toughness");
                HuskWeakeningDuration = 1200 * Math.Min(1, HuskCurrentToughness);
            }
            else if (E.ID == "DebuffsFromDecay")
            {
                var OwnersStrength  = ParentObject.Stat("Strength");
                var OwnersToughness = ParentObject.Stat("Toughness");
                var OwnersAgility   = ParentObject.Stat("Agility");

                if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.6)
                {
                }
                else if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.5)
                {
                    StatShifter.SetStatShift(ParentObject, "Strength", -((int)Math.Round(OwnersStrength * 0.2)), false);
                    StatShifter.SetStatShift(ParentObject, "Toughness", -((int)Math.Round(OwnersToughness * 0.2)), false);
                    StatShifter.SetStatShift(ParentObject, "Agility", -((int)Math.Round(OwnersAgility * 0.2)), false);
                }
                else if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.3)
                {
                    StatShifter.SetStatShift(ParentObject, "Strength", -((int)Math.Round(OwnersStrength * 0.4)), false);
                    StatShifter.SetStatShift(ParentObject, "Toughness", -((int)Math.Round(OwnersToughness * 0.4)), false);
                    StatShifter.SetStatShift(ParentObject, "Agility", -((int)Math.Round(OwnersAgility * 0.4)), false);
                }
                else if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.1)
                {
                    StatShifter.SetStatShift(ParentObject, "Strength", -((int)Math.Round(OwnersStrength * 0.6)), false);
                    StatShifter.SetStatShift(ParentObject, "Toughness", -((int)Math.Round(OwnersToughness * 0.6)), false);
                    StatShifter.SetStatShift(ParentObject, "Agility", -((int)Math.Round(OwnersAgility * 0.6)), false);
                }
                else if (HuskWeakeningDuration >= HuskWeakeningDuration * 0.05)
                {
                    StatShifter.SetStatShift(ParentObject, "Strength", -((int)Math.Round(OwnersStrength * 0.8)), false);
                    StatShifter.SetStatShift(ParentObject, "Toughness", -((int)Math.Round(OwnersToughness * 0.8)), false);
                    StatShifter.SetStatShift(ParentObject, "Agility", -((int)Math.Round(OwnersAgility * 0.8)), false);
                }
                else if (HuskWeakeningDuration <= 0)
                {
                    HuskWeakeningDuration = (int)Math.Round(HuskWeakeningDuration * 0.7);
                }
            }
            else if (E.ID == "SuccessfulDethroning")
            {
                GameObject OriginalBody = E.GetGameObjectParameter("OriginalBody");

                var SkillAccess  = OriginalBody.GetPart <Skills>();
                var SkillListing = SkillAccess.SkillList;

                var CreatureTier          = OriginalBody.GetTier();
                var PrimaryFaction        = OriginalBody.GetPrimaryFaction();
                var FactionVar            = Factions.get(PrimaryFaction);
                var NewBodyPrimaryFaction = OriginalBody.GetPrimaryFaction();

                var ParentIntelligenceSkillAward = (ParentObject.BaseStat("Intelligence") - 10) * 4;

                ParentObject.FireEvent(Event.New("EntityHasSwappedBodies"));

                if (!ParentObject.HasSkill("Survival"))
                {
                    ParentObject.AddSkill("Survival");
                    if (!ParentObject.HasSkill("Survival_Camp"))
                    {
                        ParentObject.AddSkill("Survival_Camp");
                    }
                }

                foreach (var k in SkillListing)
                {
                    ParentObject.GetStat("SP").BaseValue += ParentIntelligenceSkillAward;
                }
                if (FactionVar.Visible)
                {
                    try
                    {
                        XRL.Core.XRLCore.Core.Game.PlayerReputation.modify(PrimaryFaction, -CreatureTier * 50, true);
                    }
                    catch
                    {
                        return(true);
                    }
                }

                if (OriginalBody != null)
                {
                    // AddPlayerMessage("Original Body: " + OriginalBody + ".");
                    // AddPlayerMessage("Parent Body: " + ParentObject + ".");

                    if (!ParentObject.HasProperName)
                    {
                        ParentObject.DisplayName = OriginalBody.DisplayNameOnly;
                        OriginalBody.DisplayName = Names.NameMaker.MakeName(ParentObject);
                    }
                    else
                    {
                        var NewName = ParentObject.DisplayNameOnly;
                        ParentObject.DisplayName = OriginalBody.DisplayNameOnly;
                        OriginalBody.DisplayName = NewName;
                    }
                    OriginalBody.GetAngryAt(ParentObject, -100);

                    PlayWorldSound("soulshunt");

                    var DifferenceVar = ParentObject.StatMod("Ego") - OriginalBody.StatMod("Ego");
                    DifferenceVar *= 5;

                    if (Stat.Random(1, 100) <= DifferenceVar && IsPlayer())
                    {
                        if (Popup.ShowYesNo("You feel the remnants of tender light pulsating within your new husk, would you like to imprint these codings upon your own animus?", false, DialogResult.Yes) == DialogResult.Yes)
                        {
                            StatShifter.SetStatShift(ParentObject, "Ego", 1, true);
                        }
                        else
                        {
                            Popup.Show("You cast the remnants away.");
                        }
                    }
                }
            }

            return(base.FireEvent(E));
        }
 public void setAVDebuff(int avDebuff, GameObject ParentObject)
 {
     this.avDebuff = avDebuff;
     StatShifter.SetStatShift(ParentObject, "AV", -avDebuff);
 }