private void AddMinionImbue(Character c) { // determine imbue ImbueEffectPreset imbue = null; bool useAltImbue = UnityEngine.Random.Range(0, 99) > 49; if (c.ActiveMaxHealth < 250) // fire rag (202) or bolt rag (206) { int presetID = useAltImbue ? 206 : 202; imbue = ResourcesPrefabManager.Instance.GetEffectPreset(presetID) as ImbueEffectPreset; } else if (c.ActiveMaxHealth < 600) // fire varnish (203) or ethereal varnish (208) { int presetID = useAltImbue ? 208 : 203; imbue = ResourcesPrefabManager.Instance.GetEffectPreset(presetID) as ImbueEffectPreset; } else // infuse fire (217) or dark varnish (211) { int presetID = useAltImbue ? 211 : 217; imbue = ResourcesPrefabManager.Instance.GetEffectPreset(presetID) as ImbueEffectPreset; } // apply imbue if (c.CurrentWeapon is MeleeWeapon weapon) { c.CurrentWeapon.AddImbueEffect(imbue, 240); } else { MeleeWeapon w = c.Inventory.Pouch.GetContainedItems().Find(x => x.GetType() == typeof(MeleeWeapon)) as MeleeWeapon; w.AddImbueEffect(imbue, 240); } }