Beispiel #1
0
        public static void CharacterBody_RecalculateStats(On.RoR2.CharacterBody.orig_RecalculateStats orig, CharacterBody self)
        {
            orig(self);

            if (self)
            {
                if (self.HasBuff(Survivor.Buffs.enrageBuff))
                {
                    self.armor += Core.Config.specialBonusArmor.Value;
                }
                if (self.HasBuff(Survivor.Buffs.earthshockBuff))
                {
                    float bonusSpeed      = self.moveSpeed * Core.Config.utilityBonusMoveSpeed.Value;
                    float bonusJumpHeight = self.jumpPower * Core.Config.utilityBonusJumpPower.Value;
                    self.moveSpeed += bonusSpeed;
                    self.jumpPower += bonusJumpHeight;
                }
                if (self.HasBuff(Survivor.Buffs.earthshockDebuff))
                {
                    self.moveSpeed *= States.Earthshock.debuffSlow;
                    if (!self.gameObject.GetComponent <Miscellaneous.AntiFlyingComponent>())
                    {
                        self.gameObject.AddComponent <Miscellaneous.AntiFlyingComponent>();
                    }
                }
            }
        }
Beispiel #2
0
 private void FixedUpdate()
 {
     //Tick up the stopwatch
     this.trackerUpdateStopwatch += Time.fixedDeltaTime;
     //If the stopwatch has gone on for .1 seconds...
     if (this.trackerUpdateStopwatch >= 1f / this.trackerUpdateFrequency)
     {
         //Reset the timer
         this.trackerUpdateStopwatch -= 1f / this.trackerUpdateFrequency;
         //Poisoncounter to 0 cause we haven't found any poisoned creatures yet
         this.poisonCounter = 0;
         //Spheresearch it
         foreach (HurtBox hurtBox in new SphereSearch
         {
             origin = characterBody.footPosition,
             radius = this.maxTrackingDistance,
             mask = LayerIndex.entityPrecise.mask
         }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(this.teamComponent.teamIndex)).OrderCandidatesByDistance().FilterCandidatesByDistinctHurtBoxEntities().GetHurtBoxes())
         {
             //Get the targets body component
             CharacterBody body = hurtBox.healthComponent.body;
             //Make sure they stats ain't brokeded
             body.RecalculateStats();
             //If they have either buff, tick up the counter
             if (body.HasBuff(RoR2Content.Buffs.Poisoned) || body.HasBuff(RoR2Content.Buffs.Blight))
             {
                 this.poisonCounter += 1;
             }
         }
         //Set the totalpoisoned count to what we found
         this.totalPoisoned = this.poisonCounter;
     }
 }
Beispiel #3
0
        private void GenericSkill_OnExecute(On.RoR2.GenericSkill.orig_OnExecute orig, GenericSkill self)
        {
            var           invCount = GetCount(self.characterBody);
            CharacterBody vBody    = self.characterBody;

            if (vBody.skillLocator.FindSkill(self.skillName))
            {
                if (invCount > 0)
                {
                    if (vBody.skillLocator.utility.Equals(self)) //is this redundant?
                    {
                        if (vBody.HasBuff(MachoBrace_Boost))     //should prevent weird stacking
                        {
                            vBody.RemoveBuff(MachoBrace_Boost);
                        }
                        vBody.AddBuff(MachoBrace_Boost);
                    }
                    else
                    {
                        if (vBody.HasBuff(MachoBrace_Boost))
                        {
                            vBody.RemoveBuff(MachoBrace_Boost);
                        }
                    }
                }
            }
            orig(self);
        }
        private void CharacterBody_RecalculateStats(On.RoR2.CharacterBody.orig_RecalculateStats orig, CharacterBody self)
        {
            orig(self);

            if (self)
            {
                if (self.HasBuff(Modules.Buffs.warcryBuff))
                {
                    float damageBuff = StaticValues.warcryDamageMultiplier * self.damage;
                    self.damage      += damageBuff;
                    self.attackSpeed += StaticValues.warcryAttackSpeedBuff;
                }

                if (self.HasBuff(Modules.Buffs.scepterWarcryBuff))
                {
                    float damageBuff = StaticValues.scepterWarcryDamageMultiplier * self.damage;
                    self.damage      += damageBuff;
                    self.attackSpeed += StaticValues.scepterWarcryAttackSpeedBuff;
                }

                if (self.HasBuff(Modules.Buffs.torporDebuff))
                {
                    self.moveSpeed   *= (1 - StaticValues.torporSlowAmount);
                    self.attackSpeed *= (1 - StaticValues.torporSlowAmount);
                }

                if (self.HasBuff(Modules.Buffs.scepterTorporDebuff))
                {
                    self.moveSpeed   *= (1 - StaticValues.scepterTorporSlowAmount);
                    self.attackSpeed *= (1 - StaticValues.scepterTorporSlowAmount);
                }
            }
        }
Beispiel #5
0
        private static float GetArmorDelta(CharacterBody self)
        {
            float addedArmor = 0f;
            float lostArmor  = 0f;
            float count;

            if (self.HasBuff(RoR2Content.Buffs.AffixHaunted) && Configuration.AspectHauntedBaseArmorGain.Value > 0f)
            {
                count       = Catalog.GetStackMagnitude(self, RoR2Content.Buffs.AffixHaunted);
                addedArmor += Configuration.AspectHauntedBaseArmorGain.Value + Configuration.AspectHauntedStackArmorGain.Value * (count - 1f);
            }
            else if (self.HasBuff(RoR2Content.Buffs.AffixHauntedRecipient) && Configuration.AspectHauntedAllyArmorGain.Value > 0f)
            {
                addedArmor += Configuration.AspectHauntedAllyArmorGain.Value;
            }

            if (self.HasBuff(Catalog.Buff.AffixPlated) && Configuration.AspectPlatedBaseArmorGain.Value > 0f)
            {
                count       = Catalog.GetStackMagnitude(self, Catalog.Buff.AffixPlated);
                addedArmor += Configuration.AspectPlatedBaseArmorGain.Value + Configuration.AspectPlatedStackArmorGain.Value * (count - 1f);
            }

            if (self.HasBuff(Catalog.Buff.ZetHeadHunter))
            {
                addedArmor += Configuration.HeadHunterBuffArmor.Value * self.GetBuffCount(Catalog.Buff.ZetHeadHunter);
            }

            if (self.HasBuff(Catalog.Buff.ZetShredded))
            {
                lostArmor += Mathf.Abs(Configuration.AspectHauntedShredArmor.Value);
            }
            //if (self.teamComponent.teamIndex == TeamIndex.Player) lostArmor *= Configuration.AspectEffectPlayerDebuffMult.Value;

            return(addedArmor - lostArmor);
        }
        public override float RecalculateArmor(float baseValue, CharacterBody character)
        {
            float BaseArmor  = character.baseArmor + character.levelArmor * (character.level - 1);
            float BonusArmor = 0;

            if (character.HasBuff(BuffIndex.ArmorBoost))
            {
                BonusArmor += 200;
            }
            if (character.HasBuff(BuffIndex.Cripple))
            {
                BonusArmor -= 20;
            }
            float TotalArmor = BaseArmor + BonusArmor;

            TotalArmor += ModItemManager.GetBonusForStat(character, StatIndex.Armor);
            if (character.isSprinting)
            {
                TotalArmor += ModItemManager.GetBonusForStat(character, StatIndex.RunningArmor);
            }
            TotalArmor *= 1 + ModItemManager.GetMultiplierForStat(character, StatIndex.Armor);
            if (character.isSprinting)
            {
                TotalArmor *= 1 + ModItemManager.GetMultiplierForStat(character, StatIndex.RunningArmor);
            }
            return(TotalArmor);
        }
        public bool IsTickDamageEvent(DamageReportHandler damageReportHandler)
        {
            CharacterBody victim = damageReportHandler.Victim;

            EnsureIsCachedAndAlive(victim);

            if (!TickDebuffCache.ContainsKey(GetVictimNetworkUserId(victim)))
            {
                return(false);
            }

            switch (damageReportHandler.TickingDebuffIndex)
            {
            case (DotController.DotIndex.Burn):
                if (!victim.HasBuff(BuffIndex.OnFire) && IsCached(victim, DotController.DotIndex.Burn))
                {
                    RemoveDebuff(victim, DotController.DotIndex.Burn);
                    return(false);
                }
                return(CheckNew(victim, DotController.DotIndex.Burn));

            case (DotController.DotIndex.PercentBurn):
                if (!victim.HasBuff(BuffIndex.OnFire) && IsCached(victim, DotController.DotIndex.PercentBurn))
                {
                    RemoveDebuff(victim, DotController.DotIndex.PercentBurn);
                    return(false);
                }
                return(CheckNew(victim, DotController.DotIndex.PercentBurn));

            case (DotController.DotIndex.Bleed):
                if (!victim.HasBuff(BuffIndex.Bleeding) && IsCached(victim, DotController.DotIndex.Bleed))
                {
                    RemoveDebuff(victim, DotController.DotIndex.Bleed);
                    return(false);
                }
                return(CheckNew(victim, DotController.DotIndex.Bleed));

            case (DotController.DotIndex.Blight):
                if (!victim.HasBuff(BuffIndex.Blight) && IsCached(victim, DotController.DotIndex.Blight))
                {
                    RemoveDebuff(victim, DotController.DotIndex.Blight);
                    return(false);
                }
                return(CheckNew(victim, DotController.DotIndex.Blight));

            case (DotController.DotIndex.Poison):
                if (!victim.HasBuff(BuffIndex.Poisoned) && IsCached(victim, DotController.DotIndex.Poison))
                {
                    RemoveDebuff(victim, DotController.DotIndex.Poison);
                    return(false);
                }
                return(CheckNew(victim, DotController.DotIndex.Poison));

            default:
                return(false);
            }
        }
Beispiel #8
0
            public void Update()
            {
                if (!body || !body.transform)
                {
                    return;
                }

                if (NetworkServer.active)
                {
                    if (target)
                    {
                        HealthComponent healthComponent = target.healthComponent;
                        if (!target.HasBuff(buffDef) || !healthComponent || !healthComponent.alive)
                        {
                            ClearTarget();
                        }
                    }
                }

                stopwatch += Time.deltaTime;
                waveY      = Mathf.Sin(stopwatch * Mathf.PI * waveFrequency + waveOffset * Mathf.PI * 2) * waveAmplitude;

                if (target)
                {
                    leash.leashOrigin = target.corePosition + offset * target.radius + Vector3.up * waveY;
                    rotateToDirection.targetRotation = Util.QuaternionSafeLookRotation(target.corePosition - transform.position);
                }
                else
                {
                    leash.leashOrigin = body.corePosition + offset * body.radius + Vector3.up * waveY;
                    rotateToDirection.targetRotation = Quaternion.LookRotation(body.inputBank.aimDirection);
                }

                ItemDisplay  itemDisplay  = follower.GetComponent <ItemDisplay>();
                ModelLocator modelLocator = body.modelLocator;

                if (modelLocator)
                {
                    Transform modelTransform = modelLocator.modelTransform;
                    if (modelTransform)
                    {
                        CharacterModel characterModel = modelTransform.GetComponent <CharacterModel>();
                        if (characterModel)
                        {
                            itemDisplay.SetVisibilityLevel(characterModel.visibility);
                            foreach (CharacterModel.RendererInfo rendererInfo in itemDisplay.rendererInfos)
                            {
                                Renderer renderer = rendererInfo.renderer;
                                renderer.GetPropertyBlock(materialPropertyBlock);
                                materialPropertyBlock.SetFloat("_Fade", target ? 1f : 1f / body.inventory.GetItemCount(MysticsItemsContent.Items.MysticsItems_Spotter));
                                renderer.SetPropertyBlock(materialPropertyBlock);
                            }
                        }
                    }
                }
            }
Beispiel #9
0
 void FixedUpdate()
 {
     if (!characterBody.HasBuff(charmDef))
     {
         if (Overlay)
         {
             Destroy(Overlay);
         }
         enabled = false;
     }
 }
 private static void StatHooks_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
 {
     if (sender.HasBuff(Anger))
     {
         args.damageMultAdd += Config_Enrage_Damage;
     }
     if (sender.HasBuff(Jammed))
     {
         args.damageMultAdd      += curse.JammedDamageBoost;
         args.critAdd            += curse.JammedCritBoost;
         args.attackSpeedMultAdd += curse.JammedAttackSpeedBoost;
         args.moveSpeedMultAdd   += curse.JammedMoveSpeedBoost;
         args.baseHealthAdd      += curse.JammedHealthBoost;
     }
 }
Beispiel #11
0
 private void RecalculateStats_On(HooksCore.RoR2.CharacterBody.RecalculateStats.Orig orig, CharacterBody self)
 {
     orig(self);
     if (self && self.inventory)
     {
         if (self.HasBuff(RW_armorBuff))
         {
             self.armor += 75f;
         }
         if (self.HasBuff(RW_flameChargeBuff))
         {
             self.barrierDecayRate *= barrierDecayMult;
         }
     }
 }
Beispiel #12
0
 private void Evt_TILER2GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
 {
     if (sender.HasBuff(healBuff))
     {
         args.regenMultAdd += regenMod;
     }
     if (sender.HasBuff(attackBuff))
     {
         args.attackSpeedMultAdd += attackMod;
     }
     if (sender.HasBuff(speedBuff))
     {
         args.moveSpeedMultAdd += speedMod;
     }
 }
 private void ClearBuffs(CharacterBody body)
 {
     if (body.HasBuff(SniperContent.spotterBuff))
     {
         body.RemoveBuff(SniperContent.spotterBuff);
     }
     if (body.HasBuff(SniperContent.spotterStatDebuff))
     {
         body.RemoveBuff(SniperContent.spotterStatDebuff);
     }
     if (body.HasBuff(SniperContent.spotterScepterBuff))
     {
         body.RemoveBuff(SniperContent.spotterScepterBuff);
     }
 }
Beispiel #14
0
 private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, R2API.RecalculateStatsAPI.StatHookEventArgs args)
 {
     if (sender.HasBuff(buffDef))
     {
         args.moveSpeedMultAdd += moveSpeedBuff / 100f;
     }
 }
        public override void OnEnter()
        {
            base.OnEnter();

            if (NetworkServer.active)
            {
                ReadOnlyCollection <TeamComponent> teamMembers = TeamComponent.GetTeamMembers(base.teamComponent.teamIndex);
                Vector3 position = base.transform.position;
                for (int i = 0; i < teamMembers.Count; i++)
                {
                    CharacterBody component = teamMembers[i].GetComponent <CharacterBody>();
                    if (component)
                    {
                        if (base.characterBody.skillLocator.utility.stock > 0 && !component.HasBuff(BuffIndex.EngiShield) && !component.HasBuff(BuffIndex.ElephantArmorBoost))
                        {
                            component.AddTimedBuff(BuffIndex.EngiShield, 3f);
                            component.AddTimedBuff(BuffIndex.Immune, 3f);
                            component.AddTimedBuff(BuffIndex.ElephantArmorBoost, 6f);

                            HealthComponent component2 = component.GetComponent <HealthComponent>();
                            if (component2)
                            {
                                component2.RechargeShieldFull();
                            }

                            base.skillLocator.utility.DeductStock(1);
                        }
                    }
                }
            }

            base.OnExit();
            base.outer.SetNextStateToMain();
        }
        private void CharacterBody_RecalculateStats(On.RoR2.CharacterBody.orig_RecalculateStats orig, CharacterBody self)
        {
            orig(self);

            if (self)
            {
                if (self.HasBuff(Modules.Buffs.scaredDebuff))
                {
                }
                if (self.HasBuff(Modules.Buffs.scaredBuildingDebuff))
                {
                    self.attackSpeed = 0f;
                    self.moveSpeed   = 0f;
                }
            }
        }
Beispiel #17
0
 private void CharacterBody_FixedUpdate(Action <RoR2.CharacterBody> orig, CharacterBody self)
 {
     orig(self);
     if (self.HasBuff(this.buffIndex))
     {
     }
 }
Beispiel #18
0
 public static void PlayCloakDamageSound(CharacterBody cb)
 {
     if (cb && cb.HasBuff(ModContentPack.cloakDamageBuff))
     {
         Util.PlaySound("Play_BanditReloaded_cloakdamage", cb.gameObject);
     }
 }
Beispiel #19
0
 /// <summary>
 /// Safely removes a buff from the target character body
 /// </summary>
 /// <param name="buffToRemove">The buff you want to safely remove</param>
 /// <param name="body">The body you safely want to remove a buff from.</param>
 public static void SafeRemoveBuff(BuffDef buffToRemove, CharacterBody body)
 {
     if (body && body.HasBuff(buffToRemove))
     {
         body.RemoveBuff(buffToRemove);
     }
 }
Beispiel #20
0
 private void Mustache_StatCoefficients(CharacterBody sender, RecalculateStatsAPI.StatHookEventArgs args)
 {
     if (sender && sender.HasBuff(Buffs.MustacheBuff))
     {
         args.baseRegenAdd += RegenAmount.Value + RegenAmountPerStack.Value * (GetCount(sender) - 1);
     }
 }
Beispiel #21
0
 private void Thallium_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
 {
     if (sender.HasBuff(poisonBuff))
     {
         args.moveSpeedMultAdd -= slowMultiplier;
     }
 }
Beispiel #22
0
        public DamageInfo CalculateNewDamage(DamageInfo damageInfo)
        {
            //TODO: Replace the curseCount with a buff that can be displayed to user
            damageInfo.damage *= 1 + (curseMultiplier * curseCount);

            CharacterBody testBody = null;

            if (damageInfo.attacker)
            {
                testBody = damageInfo.attacker.GetComponent <CharacterBody>();
            }
            else if (damageInfo.inflictor)
            {
                testBody = damageInfo.inflictor.GetComponent <CharacterBody>();
            }

            //Try and capture the affix type of the attacker/inflictor
            foreach (AffixTracker tracker in affixTrackers)
            {
                //Set the curse flag if its a match
                if (testBody && testBody.isElite && testBody.HasBuff(tracker.buffIndex))
                {
                    mostRecentAttackIndex = tracker.buffIndex;
                    //Chat.AddMessage("Most Recent Damage Type Was : " + tracker.affixNameTag);
                    break;
                }
            }
            return(damageInfo);
        }
        public override void OnEnter()
        {
            base.OnEnter();

            if (base.teamComponent && NetworkServer.active)
            {
                ReadOnlyCollection <TeamComponent> teamMembers = TeamComponent.GetTeamMembers(base.teamComponent.teamIndex);
                Vector3 position = base.transform.position;
                for (int i = 0; i < teamMembers.Count; i++)
                {
                    CharacterBody component = teamMembers[i].GetComponent <CharacterBody>();
                    if (component)
                    {
                        if (base.characterBody.skillLocator.utility.stock > 0 && !component.HasBuff(BuffIndex.EngiTeamShield))
                        {
                            component.AddTimedBuff(BuffIndex.EngiTeamShield, 8f);
                            component.AddTimedBuff(BuffIndex.TeslaField, 2f);

                            HealthComponent component2 = component.GetComponent <HealthComponent>();
                            if (component2)
                            {
                                component2.RechargeShieldFull();
                            }

                            base.skillLocator.utility.DeductStock(1);
                        }
                    }
                }
            }
        }
 private void AddSpeedReward(CharacterBody sender, StatHookEventArgs args)
 {
     if (sender.HasBuff(SpeedBuff))
     {
         args.moveSpeedMultAdd += moveSpeedPercentageBonusPerBuffStack * sender.GetBuffCount(SpeedBuff);
     }
 }
Beispiel #25
0
        private static void ModifyCrit(CharacterBody self)
        {
            float addedCrit = 0f;

            if (self.HasBuff(Catalog.Buff.ZetHeadHunter))
            {
                addedCrit += Configuration.HeadHunterBuffCritChance.Value * self.GetBuffCount(Catalog.Buff.ZetHeadHunter);
            }

            if (addedCrit > 0f)
            {
                Inventory inventory = self.inventory;
                if (inventory)
                {
                    if (inventory.GetItemCount(DLC1Content.Items.ConvertCritChanceToCritDamage) == 0)
                    {
                        self.crit += addedCrit;
                    }
                    else
                    {
                        self.critMultiplier += addedCrit * 0.01f;
                    }
                }
            }
        }
Beispiel #26
0
 public void FixedUpdate()
 {
     if (characterBody && characterBody.HasBuff(BuffIndex.ClayGoo))
     {
         characterBody.rigidbody.velocity += Vector3.up * 20f;
     }
 }
Beispiel #27
0
        private void Extinguish(CharacterBody characterBody)
        {
            if (characterBody.HasBuff(BuffIndex.OnFire))
            {
                Chat.AddMessage("cured " + characterBody.GetUserName());
                characterBody.ClearTimedBuffs(BuffIndex.OnFire);

                if (DotController.dotControllerLocator.TryGetValue(characterBody.gameObject.GetInstanceID(), out DotController dotController))
                {
                    //var burnEffectController = dotController.burnEffectController;
                    var dotStacks = dotController.dotStackList;

                    int i     = 0;
                    int count = dotStacks.Count;
                    while (i < count)
                    {
                        if (dotStacks[i].dotIndex == DotController.DotIndex.Burn ||
                            dotStacks[i].dotIndex == DotController.DotIndex.Helfire ||
                            dotStacks[i].dotIndex == DotController.DotIndex.PercentBurn)
                        {
                            dotStacks[i].damage = 0f;
                            dotStacks[i].timer  = 0f;
                        }
                        i++;
                    }
                }
            }
        }
        public override float RecalculateDamage(float baseValue, CharacterBody character)
        {
            float BaseDamage = character.baseDamage + character.levelDamage * (character.level - 1);

            BaseDamage += ModItemManager.GetBonusForStat(character, StatIndex.Damage);

            float DamageBoost      = 0;
            int   DamageBoostCount = character.inventory ? character.inventory.GetItemCount(ItemIndex.BoostDamage) : 0;

            if (DamageBoostCount > 0)
            {
                DamageBoost += DamageBoostCount * DamageBoost;
            }
            DamageBoost -= 0.05f * character.GetBuffCount(BuffIndex.BeetleJuice);

            if (character.HasBuff(BuffIndex.GoldEmpowered))
            {
                DamageBoost += 1;
            }

            float DamageMult = DamageBoost + (character.CalcLunarDaggerPower());

            DamageMult += ModItemManager.GetMultiplierForStat(character, StatIndex.Damage);
            return(BaseDamage * DamageMult);
        }
Beispiel #29
0
        private void On_GEMOnHitEnemy(On.RoR2.GlobalEventManager.orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
        {
            orig(self, damageInfo, victim);
            if (!NetworkServer.active || !damageInfo.attacker)
            {
                return;
            }

            CharacterBody body = damageInfo.attacker.GetComponent <CharacterBody>();

            if (!body || !body.HasBuff(pillageBuff))
            {
                return;
            }

            CharacterMaster chrm = body.master;

            if (!chrm)
            {
                return;
            }

            int mamt = Run.instance.GetDifficultyScaledCost(body.GetBuffCount(pillageBuff));

            if (Compat_ShareSuite.enabled && Compat_ShareSuite.MoneySharing())
            {
                Compat_ShareSuite.GiveMoney((uint)mamt);
            }
            else
            {
                chrm.GiveMoney((uint)mamt);
            }
        }
Beispiel #30
0
            void OnEnable()
            {
                //ContactDamageCooldown = ContactDamageCooldownFull;
                characterBody = gameObject.GetComponent <CharacterBody>();
                if (!characterBody)
                {
                    _logger.LogError("No characterbody found for jammed enemy!");
                    return;
                }
                if (!characterBody.HasBuff(Shared.Buffs.BuffsController.Jammed))
                {
                    characterBody.AddBuff(Shared.Buffs.BuffsController.Jammed);
                }
                if (characterBody.inventory && characterBody.inventory.GetItemCount(CurseController.isJammedItem) == 0)
                {
                    characterBody.inventory.GiveItem(CurseController.isJammedItem);
                }
                ModelLocator modelLocator = gameObject.GetComponent <ModelLocator>();

                if (modelLocator)
                {
                    if (!fireEffect)
                    {
                        fireEffect = Object.Instantiate <GameObject>(instance.jammedFire, modelLocator.modelTransform.Find("ROOT").transform);
                        //fireEffect.transform.parent = modelLocator.modelTransform;
                    }
                }
                var deathBehaviour = gameObject.GetComponent <CharacterDeathBehavior>();

                if (deathBehaviour)
                {
                    characterDeathBehavior = deathBehaviour;
                }
            }