protected override void ResetRuntime() { TranspositionCooldown.Reset(); StoneficationCooldown.Reset(); StoneficationEffect.Reset(); StoneficationActive = false; }
public override void Intro(IntroCutscene.CoBegin__d Cutscene) { base.Intro(Cutscene); StoneficationCooldown.UpdateForIntro(Cutscene); StoneficationEffect.UpdateForIntro(Cutscene); TranspositionCooldown.UpdateForIntro(Cutscene); }
public override void MeetingEnd(ExileController Exile) { base.MeetingEnd(Exile); StoneficationActive = false; StoneficationCooldown.UpdateForExile(Exile); StoneficationEffect.UpdateForExile(Exile); TranspositionCooldown.UpdateForExile(Exile); DisableStonefication(); }
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); } }
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; }