public void NoviceStancer()
 {
     if (!ParentObject.HasSkill("WM_MMA_MasterStanceSwap"))
     {
         ParentObject.UseEnergy(1000);
     }
 }
        public override bool HandleEvent(ModifyAttackingSaveEvent E)
        {
            var Parent   = E.Attacker == ParentObject;
            var Defender = E.Defender;

            if (Parent && ParentObject.HasPart("MartialBody") && ParentObject.HasSkill("WM_MMA_CombinationStrikesII"))
            {
                E.NaturalRoll += (CurrentComboICounter / 2);
                E.Roll        += (CurrentComboICounter / 2);
            }

            return(base.HandleEvent(E));
        }
Esempio n. 3
0
        public override bool ChangeLevel(int NewLevel)
        {
            if (!ParentObject.HasSkill("Survival"))
            {
                ParentObject.AddSkill("Survival");
                if (!ParentObject.HasSkill("Survival_Camp"))
                {
                    ParentObject.AddSkill("Survival_Camp");
                }
            }

            return(base.ChangeLevel(NewLevel));
        }
        public override bool AddSkill(GameObject GO)
        {
            this.DismissStanceID = base.AddMyActivatedAbility("Dismiss Stance", "DismissStanceCommand", "Skill", "Whenever you launch an attack with either your bare hands or natural weapon.", "*", null, false, false, true);

            if (!ParentObject.HasSkill("WM_MMA_MartialStances"))
            {
                if (!ParentObject.HasSkill("WM_MMA_PathDawnGlider"))
                {
                    ParentObject.AddSkill("WM_MMA_PathDawnGlider");
                }
            }

            return(true);
        }
        public override bool RemoveSkill(GameObject GO)
        {
            if (ParentObject.HasSkill("WM_MMA_PathDawnGlider"))
            {
                ParentObject.RemoveSkill("WM_MMA_PathDawnGlider");
            }

            GO.RemoveActivatedAbility(ref DismissStanceID);
            GO.RemoveActivatedAbility(ref DawnStanceID);
            GO.RemoveActivatedAbility(ref SaltBackStanceID);
            GO.RemoveActivatedAbility(ref SlumberStanceID);
            GO.RemoveActivatedAbility(ref SaltHopperStanceID);
            GO.RemoveActivatedAbility(ref AstralTabbyStanceID);
            GO.RemoveActivatedAbility(ref DeathDaccaStanceID);
            return(true);
        }
Esempio n. 6
0
        public override bool FireEvent(Event E)
        {
            if (E.ID == "EntityHasSwappedBodies")
            {
                if (!ParentObject.HasSkill("Survival"))
                {
                    ParentObject.AddSkill("Survival");
                    if (!ParentObject.HasSkill("Survival_Camp"))
                    {
                        ParentObject.AddSkill("Survival_Camp");
                    }
                }
                if (IsOriginalEntity == false)
                {
                    IsOriginalEntity = true;
                }
            }

            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 override bool HandleEvent(AttackerDealingDamageEvent E)
        {
            try
            {
                var Parent = E.Actor == ParentObject;
                var Target = E.Object;

                Body body = ParentObject.GetPart("Body") as Body;

                var ParentsAgility = ParentObject.StatMod("Ego");
                var ParentsLevel   = ParentObject.Statistics["Level"].BaseValue;

                List <BodyPart> hands = body.GetPart("Hand");

                if (E.Actor == ParentObject && (E.Weapon.HasPart("MartialConditioningFistMod") || E.Weapon.Blueprint == "DefaultMartialFist" || E.Weapon.HasPart("NaturalGear") || E.Weapon.HasPropertyOrTag("WeaponUnarmed")))
                {
                    // AddPlayerMessage("Accessing Damage System.s");

                    foreach (BodyPart hand in hands)
                    {
                        try
                        {
                            // AddPlayerMessage("Accessing Damage System. A");

                            if (Parent && Target.HasPart("Brain") && Target.HasPart("Combat"))
                            {
                                var FistDamage = E.Damage.Amount;

                                E.Damage.Amount = (int)Math.Round(E.Damage.Amount + ((CurrentComboICounter * 0.025) * E.Damage.Amount));
                            }
                            else if (Stat.Random(1, 100) < CurrentComboICounter && Parent && hand.DefaultBehavior.HasPart("MartialConditioningFistMod") && ParentObject.HasSkill("WM_MMA_CombinationStrikesII") && Target.HasPart("Brain") && Target.HasPart("Combat"))
                            {
                                E.Damage.Amount = (int)Math.Round(E.Damage.Amount + ((CurrentComboICounter * 0.050) * E.Damage.Amount));
                            }
                        }
                        catch
                        {
                            return(base.HandleEvent(E));
                        }
                    }
                }
            }
            catch
            { }
            return(base.HandleEvent(E));
        }
        public override bool HandleEvent(GetAttackerHitDiceEvent E)
        {
            var Weapon   = E.Weapon;
            var Parent   = E.Attacker == ParentObject;
            var Defender = E.Defender;
            var PenBonus = E.PenetrationBonus;

            if (Parent && (E.Weapon.HasPart("MartialConditioningFistMod") || E.Weapon.Blueprint == "DefaultMartialFist" || E.Weapon.HasPart("MartialConditioningFistMod") || E.Weapon.HasPart("NaturalGear") || E.Weapon.HasPropertyOrTag("WeaponUnarmed")) && ParentObject.HasSkill("WM_MMA_CombinationStrikesIII") && Defender.HasPart("Brain") && Defender.HasPart("Combat"))
            {
                E.PenetrationBonus += (CurrentComboICounter / 3);
            }

            return(base.HandleEvent(E));
        }
        public override bool FireEvent(Event E)
        {
            if (E.ID == "CommandApplyInjector")
            {
                // Exit if frozen
                if (!ParentObject.CheckFrozen())
                {
                    if (ParentObject.IsPlayer())
                    {
                        Popup.Show("You are frozen!");
                    }
                    return(false);
                }

                // get all injectors, or exit if none
                Body BodyObj = ParentObject.GetPart <Body>();
                List <GameObject> Injectors = BodyObj == null ? null : BodyObj.GetEquippedObjects(InjectorFilter);
                if (Injectors == null || Injectors.Count == 0)
                {
                    if (ParentObject.IsPlayer())
                    {
                        Popup.Show("Equip at least one usable injector in a hand!");
                    }
                    return(false);
                }

                // check if valid target
                Cell Cell = PickDirection();
                if (Cell != null)
                {
                    // Get all valid targets, respecting phasing/flying/light
                    List <GameObject> Targets = Cell.GetObjectsWithPartReadonly("Brain");
                    // Remove hostile targets
                    Targets.RemoveAll(T => T.pBrain.IsHostileTowards(ParentObject));

                    if (Targets.Count == 0)
                    {
                        if (ParentObject.IsPlayer())
                        {
                            Popup.Show("No valid target!");
                        }
                        return(false);
                    }

                    // We have a valid target!  Check if in combat.
                    GameObject Target = Targets[0];
                    foreach (GameObject Injector in Injectors)
                    {
                        if (Target.AreHostilesNearby())                         // Make a attack against DV before injecting
                        {
                            // Lifted from Combat.cs
                            int Roll     = Stat.Random(1, 20);
                            int BaseRoll = Roll;
                            // we don't include movement bonuses in this roll since it's an ability activation
                            Roll += ParentObject.GetIntProperty("HitBonus", 0);

                            if (Injector != null)
                            {
                                Roll += Injector.GetIntProperty("HitBonus", 0);
                            }

                            int AgilityMod = ParentObject.StatMod("Agility");
                            Roll += AgilityMod;
                            Event RollEvent = Event.New("RollMeleeToHit");
                            RollEvent.AddParameter("Weapon", Injector);
                            RollEvent.AddParameter("Damage", 0);
                            RollEvent.AddParameter("Defender", Target);
                            RollEvent.AddParameter("Result", Roll);
                            RollEvent.AddParameter("Skill", "ShortBlades");
                            RollEvent.AddParameter("Stat", "Agility");
                            Injector?.FireEvent(RollEvent);
                            RollEvent.ID = "AttackerRollMeleeToHit";
                            Injector?.FireEvent(RollEvent);
                            Roll = RollEvent.GetIntParameter("Result");
                            Event DVEvent = Event.New("GetDefenderDV");
                            DVEvent.AddParameter("Weapon", Injector);
                            DVEvent.AddParameter("Damage", 0);
                            DVEvent.AddParameter("Defender", Target);
                            DVEvent.AddParameter("NaturalHitResult", BaseRoll);
                            DVEvent.AddParameter("Result", Roll);
                            DVEvent.AddParameter("Skill", "ShortBlades");
                            DVEvent.AddParameter("Stat", "Agility");
                            DVEvent.AddParameter("DV", Stats.GetCombatDV(Target));
                            Target.FireEvent(DVEvent);
                            DVEvent.ID = "WeaponGetDefenderDV";
                            Injector?.FireEvent(DVEvent);
                            // for masterwork mod, plus natural attacker/defender bonuses/penalties
                            int   NaturalHitBonus      = 0;
                            Event NaturalHitBonusEvent = Event.New("GetNaturalHitBonus", "Result", NaturalHitBonus);
                            Injector.FireEvent(NaturalHitBonusEvent);

                            NaturalHitBonusEvent.ID = "AttackerGetNaturalHitBonus";
                            ParentObject.FireEvent(NaturalHitBonusEvent);
                            NaturalHitBonusEvent.ID = "DefenderGetNaturalHitBonus";
                            Target.FireEvent(NaturalHitBonusEvent);
                            NaturalHitBonus = NaturalHitBonusEvent.GetIntParameter("Result");
                            if (BaseRoll + NaturalHitBonus < 20 && Roll <= DVEvent.GetIntParameter("DV"))                             // no autohit
                            {
                                // Chance to fumble, dropping the injector
                                string Color = "&r";

                                int Diff = DVEvent.GetIntParameter("DV") - Roll;
                                if (Stat.Random(1, 20) + AgilityMod <= Diff)
                                {
                                    // fumble!!!
                                    if (ParentObject.IsPlayer())
                                    {
                                        IPart.AddPlayerMessage(Color + "You miss, dropping the " + Injector.DisplayName + "!");
                                    }
                                    ParentObject.FireEvent(Event.New("Unequipped", "UnequippingObject", Injector));
                                    Event UnequipEvent = Event.New("PerformDrop", "Object", Injector);
                                    UnequipEvent.bSilent = E.bSilent;
                                    ParentObject.FireEvent(UnequipEvent);
                                }
                                else
                                {
                                    if (ParentObject.IsPlayer())
                                    {
                                        IPart.AddPlayerMessage(Color + "You miss with the " + Injector.DisplayName + "!");
                                    }
                                }
                                continue;
                            }
                        }

                        IPart.AddPlayerMessage("&gYou apply the " + Injector.DisplayName + " to " + Target.ShortDisplayName + "!");

                        // no hostiles or didn't miss - fire the injector
                        Injector.FireEvent(Event.New("ApplyTonic", "Target", Target, "Attacker", ParentObject));
                        Injector.Destroy((string)null, false, false);
                    }

                    // Deal with energy cost - reduced by short blades skill
                    int EnergyCost = 1000;
                    if (ParentObject.HasSkill("ShortBlades_Expertise"))
                    {
                        EnergyCost = 750;
                    }
                    ParentObject.UseEnergy(EnergyCost, "Physical Skill");
                    return(true);
                }
            }
            return(false);
        }
Esempio n. 11
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 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));
        }