Ejemplo n.º 1
0
 public static void OnClientCommand(SendingConsoleCommandEventArgs ev)
 {
     ev.Allow = false;
     if (ev.Name.ToLower().Equals("cr"))
     {
         SCP049AbilityController.CallZombieReinforcement(ev.Player, SCP049AbilityController.AbilityCooldown, ev);
     }
 }
Ejemplo n.º 2
0
        public static void OnFinishingRecall(FinishingRecallEventArgs ev)
        {
            // Check if round is still in progress
            if (!RoundSummary.RoundInProgress())
            {
                return;
            }

            // Counter for every player the Doctor has cured.
            SCP049AbilityController.CureCounter++;

            if (SCP049AbilityController.CureCounter == DocRework.config.MinCures)
            {
                // Notify the Doctor that the buff is now active.
                foreach (Player D in Player.List.Where(r => r.Role == RoleType.Scp049))
                {
                    D.HintDisplay.Show(new TextHint(DocRework.config.Translation_Passive_ActivationMessage, new HintParameter[] { new StringHintParameter("") }, null, 5f));
                }

                // Run the actual EngageBuff corouting every 5 seconds.
                Timing.RunCoroutine(SCP049AbilityController.EngageBuff(), "SCP049_Passive");
                Timing.RunCoroutine(SCP049AbilityController.StartCooldownTimer(), "SCP049_Active_Cooldown");
            }

            // Increase the percentage zombies get healed for by the HealthPercentageMultiplier if the config option is set to 1 (percentage of missing hp mode)
            if (DocRework.config.HealType == 1 && SCP049AbilityController.CureCounter > DocRework.config.MinCures)
            {
                SCP049AbilityController.HealAmountPercentage *= DocRework.config.HealPercentageMultiplier;
            }

            // Heal the doctor for the configured percentage if it's missing health if the config option for it is set to true
            if (AllowDocHeal)
            {
                SCP049AbilityController.ApplySelfHeal(ev.Scp049, MissingHealthPercentage);
            }
        }