private void UpdateShrineDisplay(ShrineHealingBehavior self)
        {
            if (RoR2.SceneInfo.instance.sceneDef.stageOrder != 5)
            {
                return;
            }
            PurchaseInteraction pi = self.GetFieldValue <PurchaseInteraction>("purchaseInteraction");

            pi.costType = CostTypeIndex.Money;
            pi.cost     = GetDifficultyScaledCost(ResurrectionCost);//clientCost*useCount;
        }
        private void UpdateShrineDisplay(ShrineHealingBehavior self)
        {
            PurchaseInteraction pi = self.GetFieldValue <PurchaseInteraction>("purchaseInteraction");

            if (clientCost == BALANCED_MODE)
            {
                pi.costType = CostTypeIndex.None;
                pi.cost     = BALANCED_MODE;
                pi.GetComponent <HologramProjector>().displayDistance   = 0f;
                self.GetComponent <HologramProjector>().displayDistance = 0f;
            }
            else
            {
                pi.costType = CostTypeIndex.Money;
                pi.cost     = clientCost;
            }
        }
Exemple #3
0
        //Shrine of the Woods
        private static void ShrineHealingBehavior_AddShrineStack(On.RoR2.ShrineHealingBehavior.orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator)
        {
            orig(self, activator);
            var characterBody = activator.GetComponent <CharacterBody>();

            if (characterBody)
            {
                var inv = characterBody.inventory;
                if (inv)
                {
                    if (inv.GetItemCount(ExtraShrineRollItemIndex) > 0 && Util.CheckRoll(ItemProcChance * inv.GetItemCount(ExtraShrineRollItemIndex), characterBody.master))
                    {
                        self.InvokeMethod("SetWardEnabled", true);
                        var   healingWard   = self.GetFieldValue <HealingWard>("healingWard");
                        float networkradius = self.baseRadius += self.radiusBonusPerPurchase;
                        healingWard.Networkradius = networkradius;
                        Chat.AddMessage("<color=\"green\">Lucky Default Sphere <style=cShrine>has increased the healing shrine range an additonal time.</style>");
                    }
                }
            }
        }