Пример #1
0
 protected override void ResetRuntime()
 {
     TranspositionCooldown.Reset();
     StoneficationCooldown.Reset();
     StoneficationEffect.Reset();
     StoneficationActive = false;
 }
Пример #2
0
        public override void Intro(IntroCutscene.CoBegin__d Cutscene)
        {
            base.Intro(Cutscene);

            StoneficationCooldown.UpdateForIntro(Cutscene);
            StoneficationEffect.UpdateForIntro(Cutscene);
            TranspositionCooldown.UpdateForIntro(Cutscene);
        }
Пример #3
0
        public override void MeetingEnd(ExileController Exile)
        {
            base.MeetingEnd(Exile);

            StoneficationActive = false;
            StoneficationCooldown.UpdateForExile(Exile);
            StoneficationEffect.UpdateForExile(Exile);
            TranspositionCooldown.UpdateForExile(Exile);

            DisableStonefication();
        }
Пример #4
0
        public override void DoAction(ActionType Type, bool Dead, ref bool Acted)
        {
            if (Dead || !IsLocalPlayer())
            {
                return;
            }

            if (Type == ActionType.PRIMARY)
            {
                if (!StoneficationCooldown.IsReady())
                {
                    return;
                }

                var Targets = CalculateStoneficationTargets().ToArray();
                ExtraNetwork.Send(CustomRPC.MageStonefication, Writer => {
                    Writer.WriteBytesAndSize(Targets);
                });
                EnableStonefication(Targets);
                Acted = true;
            }
            else if (Type == ActionType.SIDE)
            {
                if (!TranspositionCooldown.IsReady())
                {
                    return;
                }

                var Partner = PlayerControl.AllPlayerControls.ToArray()
                              .Where(Control => Control.PlayerId != Player.PlayerId &&
                                     !Control.Data.IsDead)
                              .ToList().RandomItem();
                if (Partner == null)
                {
                    return;
                }

                ExtraNetwork.Send(CustomRPC.MageTransposition, Writer => {
                    Writer.Write(Partner.PlayerId);
                });
                Transposition(Partner);
            }
        }
Пример #5
0
        public void EnableStonefication(IEnumerable <byte> Targets)
        {
            ExtraResources.STONE_AURA.OneTimeAnimate(Player.transform);

            foreach (var TargetId in Targets)
            {
                var Target = PlayerTools.GetPlayerById(TargetId);
                if (Target == null || Target.Compare(Player))
                {
                    continue;
                }

                Target.moveable = false;
                RecolorPlayer(Target, true);
            }

            StoneficationCooldown.Use();
            StoneficationActive = true;
        }