protected override void ActivateLocally(Character _affectedCharacter, object[] _infos) { if (SummonManager.Instance == null) { return; } if (SummonManager.Instance.FindWeakestSummon(_affectedCharacter.UID) is Character summonChar && summonChar.isActiveAndEnabled) { // change blast position to the summon's position _infos[0] = summonChar.transform.position; base.ActivateLocally(_affectedCharacter, _infos); // kill the summon summonChar.Stats.ReceiveDamage(999f); // fix for cooldown not working on this skill for some reason var skill = this.ParentItem as Skill; At.SetValue(Time.time, typeof(Skill), skill, "m_lastActivationTime"); At.SetValue(-1, typeof(Skill), skill, "m_lastCooldownProgress"); // plague aura interaction if (PlagueAuraProximityCondition.IsInsidePlagueAura(summonChar.transform.position)) { // if you're inside a plague aura, detonate resets your Summon cooldown. if (_affectedCharacter.Inventory.SkillKnowledge.GetItemFromItemID(8890103) is Skill summonSkill) { summonSkill.ResetCoolDown(); } } } }
protected override void ActivateLocally(Character _affectedCharacter, object[] _infos) { if (SummonManager.Instance == null) { return; } bool armyOfDeathLearned = _affectedCharacter.Inventory.SkillKnowledge.IsItemLearned(8890108); int MaxSummons = armyOfDeathLearned ? NecromancyBase.settings.Summon_MaxSummons_WithArmyOfDeath : NecromancyBase.settings.Summon_MaxSummons_NoArmyOfDeath; if (SummonManager.Instance.SummonedCharacters.ContainsKey(_affectedCharacter.UID)) { var list = SummonManager.Instance.SummonedCharacters[_affectedCharacter.UID]; if (list.Count == MaxSummons) { if (SummonManager.Instance.FindWeakestSummon(_affectedCharacter.UID) is Character summon) { SummonManager.DestroySummon(summon); } } } // custom health cost for casting _affectedCharacter.Stats.UseBurntHealth = NecromancyBase.settings.Summon_BurnsHealth; float healthcost = NecromancyBase.settings.Summon_HealthCost * _affectedCharacter.Stats.MaxHealth; _affectedCharacter.Stats.ReceiveDamage(healthcost); _affectedCharacter.Stats.UseBurntHealth = true; // only host should do this if (!PhotonNetwork.isNonMasterClientInRoom) { var uid = UID.Generate().ToString(); //int sceneViewID = PhotonNetwork.AllocateSceneViewID(); bool insidePlagueAura = PlagueAuraProximityCondition.IsInsidePlagueAura(_affectedCharacter.transform.position); // The main stuff happens here SummonManager.Instance.SummonSpawn(_affectedCharacter, uid, insidePlagueAura); } }
protected override void ActivateLocally(Character _affectedCharacter, object[] _infos) { if (SummonManager.Instance == null) { return; } if (SummonManager.Instance.FindWeakestSummon(_affectedCharacter.UID) is Character summonChar) { bool insideSigil = PlagueAuraProximityCondition.IsInsidePlagueAura(_affectedCharacter.transform.position); float healSummon = insideSigil ? 0.66f : 0.33f; // restores HP to the summon summonChar.Stats.AffectHealth(summonChar.ActiveMaxHealth * healSummon); // add status effects summonChar.StatusEffectMngr.AddStatusEffect(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Rage"), null); summonChar.StatusEffectMngr.AddStatusEffect(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Possessed"), null); summonChar.StatusEffectMngr.AddStatusEffect(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Speed Up"), null); if (insideSigil) { // add decay imbue summonChar.CurrentWeapon.AddImbueEffect(ResourcesPrefabManager.Instance.GetEffectPreset(211) as ImbueEffectPreset, 180f); } } else { //_affectedCharacter.CharacterUI.ShowInfoNotification("You need a summon to do that!"); //// refund the cooldown //if (this.ParentItem is Skill skill) //{ // skill.ResetCoolDown(); // float manacost = m_affectedCharacter.Stats.GetFinalManaConsumption(new Tag[] { Tag.None }, ManaCost); // _affectedCharacter.Stats.SetMana(m_affectedCharacter.Stats.CurrentMana + manacost); //} } }