public override void InitializeCombos() { StandCombo tsCombo = new StandCombo("Time Stop", ComboInput.Action1, ComboInput.Action2, ComboInput.Action2, ComboInput.Action3); tsCombo.OnActivate += TimeStop; tsCombo.Style = 1000; StandCombo offensiveTimeStop = new StandCombo("Offensive Time Stop", ComboInput.Up, ComboInput.Action1, ComboInput.Up, ComboInput.Action2); offensiveTimeStop.OnActivate += OffensiveTimeStop; offensiveTimeStop.Description = "Allows you to prepare a Quick Time Stop.\nAfter use, Right-Click on a location to teleport there.\nClicking on an Entity will cause you to teleport behind it."; offensiveTimeStop.Style = 1200; AddGlobalCombos(tsCombo, offensiveTimeStop); StandCombo slamDunk = new StandCombo("Road Roller", ComboInput.Up, ComboInput.Action1, ComboInput.Action2, ComboInput.Action3, ComboInput.Up); slamDunk.OnActivate += SlamDunk_OnActivate; slamDunk.Description = "Drops a Road Roller from hammerspace onto your Mouse Position.\nRoad Roller deals damage on impact and after it explodes"; slamDunk.Style = 500; StandCombo barrage = new StandCombo("Barrage", ComboInput.Action2, ComboInput.Action1, ComboInput.Action2); barrage.OnActivate += Barrage; barrage.Style = 1000; AddNormalCombos(slamDunk, barrage); }
public override void InitializeCombos() { StandCombo timeErase = new StandCombo("Court of the Crimson King", ComboInput.Action1, ComboInput.Action2, ComboInput.Action2, ComboInput.Action1); timeErase.OnActivate += TimeErase_OnActivate; timeErase.Description = "'Rips time apart, allowing you to slip out of it.'\nImmune to damage during this effect."; timeErase.Style = 250; StandCombo cut = new StandCombo("Evisceration", ComboInput.Action1, ComboInput.Up, ComboInput.Down); cut.OnActivate += Cut_OnActivate; cut.Description = "'Cuts a deep wound onto it's victims.'\nInflicts Laceration on hit targets.\nLaceration deals damage every 2 seconds.\nHitting Eviscerated enemies extends duration."; StandCombo donut = new StandCombo("Heart Ripper", ComboInput.Action1, ComboInput.Action2, ComboInput.Action2); donut.OnActivate += Donut_OnActivate; StandCombo offensiveSkip = new StandCombo("Time Rift", ComboInput.Up, ComboInput.Up, ComboInput.Action1); offensiveSkip.OnActivate += OffensiveTimeSkip; offensiveSkip.Description = "'Briefly cuts a rift in time, allowing you to relocate yourself instantly'.\nAfter activation, right click to teleport to the target location."; StandCombo barrage = new StandCombo("Barrage", ComboInput.Action2, ComboInput.Action1, ComboInput.Action2); barrage.OnActivate += Barrage; AddGlobalCombos(timeErase, offensiveSkip); AddNormalCombos(cut, donut, barrage); }
public override void HandlePacket(BinaryReader reader, int whoAmI) { PacketType type = (PacketType)reader.ReadByte(); switch (type) { case PacketType.SyncStand: byte playerNumber = reader.ReadByte(); string name = reader.ReadString(); TBARPlayer plr = TBARPlayer.Get(Main.player[playerNumber]); plr.PlayerStand = StandLoader.Instance.Get(name); if (IsServer) { plr.PlayerStand = StandLoader.Instance.Get(name); } break; case PacketType.UsedCombo: this.Logger.Debug("Combo packet received"); playerNumber = reader.ReadByte(); string comboName = reader.ReadString(); this.Logger.Debug($"Combo Name {comboName}"); plr = TBARPlayer.Get(Main.player[playerNumber]); plr.PlayerStand.ForceCombo(comboName, plr.player); if (IsServer) { StandCombo.SendPacket(plr.player, comboName, playerNumber); } break; case PacketType.StandChanged: playerNumber = reader.ReadByte(); name = reader.ReadString(); plr = TBARPlayer.Get(Main.player[playerNumber]); plr.PlayerStand = StandLoader.Instance.Get(name); if (IsServer) { plr.PlayerStand = StandLoader.Instance.Get(name); plr.SendStandChangedPacket(playerNumber); } break; case PacketType.RemoveTimeStopInstance: var timeStopIndex = reader.ReadInt32(); TimeStopManager.RemoveEffectAt(timeStopIndex); break; } }
public ComboPanel(StandCombo combo) { this.BackgroundColor = new Color(new Vector3(0.4f)) * 0.5f; Name = new UIText(combo.ComboName, 1f); Name.VAlign = Name.HAlign = 0.5f; DescriptionPanel = new UIPanel(); DescriptionPanel.Width.Set(WIDTH, 0); DescriptionPanel.Height.Set(OPEN_HEIGHT / 2 + 20, 0); DescriptionPanel.HAlign = 0.5f; DescriptionPanel.VAlign = 1f; DescriptionPanel.BackgroundColor = new Color(new Vector3(0.4f)) * 0.5f; UIText desc = new UIText("This combo lacks description.", 0.85f) { HAlign = 0.5f, VAlign = 0.05f }; if (combo.Description != null) { desc.SetText(combo.Description.SpliceText(40)); } DescriptionPanel.Append(desc); DescriptionPanel.RecalculateChildren(); Width.Set(WIDTH, 0); Height.Set(CLOSED_HEIGHT, 0); UIPanel namePanel = new UIPanel(); namePanel.Width.Set(WIDTH, 0); namePanel.Height.Set(CLOSED_HEIGHT * 0.25f, 0); namePanel.BackgroundColor = new Color(new Vector3(0.4f)) * 0.5f; namePanel.Append(Name); OnClick += new MouseEvent(Expand); for (int i = 0; i < combo.RequiredInputs.Count; i++) { ComboInput c = combo.RequiredInputs[i]; InputButton button = new InputButton(c); button.Top.Set(CLOSED_HEIGHT * 0.33f, 0); button.Left.Set(2 + ((button.Width.Pixels + 4) * i), 0); this.Append(button); } this.Append(namePanel); }
private static void AddStylePoints(TBARPlayer plr, StandCombo combo) { if (plr.LastUsedCombo == combo.ComboName) { plr.RepeatCount++; } else { plr.RepeatCount = 0; } plr.RepeatCountResetTimer = Global.SecondsToTicks(10); plr.LastUsedCombo = combo.ComboName; plr.AddStylePoints(combo.Style); }
public virtual void ForceCombo(string name, Player player) { StandCombo tryGlobalCombo = GlobalCombos.Find(x => x.ComboName == name); StandCombo tryNormalCombo = NormalCombos.Find(x => x.ComboName == name); if (tryNormalCombo != null) { tryNormalCombo.ForceActivate(player); return; } if (tryGlobalCombo != null) { tryGlobalCombo.ForceActivate(player); return; } }
public override void InitializeCombos() { StandCombo timeStop = new StandCombo("Time Stop", ComboInput.Action1, ComboInput.Action1, ComboInput.Action2); timeStop.OnActivate += StopTime; StandCombo upperCut = new StandCombo("Upper Cut", ComboInput.Up, ComboInput.Up, ComboInput.Action1); upperCut.OnActivate += UpperCut_OnActivate; StandCombo barrage = new StandCombo("Barrage", ComboInput.Action2, ComboInput.Action1, ComboInput.Action2); barrage.OnActivate += Barrage; StandCombo offensiveTimeStop = new StandCombo("Offensive Time Stop", ComboInput.Up, ComboInput.Action1, ComboInput.Up, ComboInput.Action2); offensiveTimeStop.OnActivate += OffensiveTimeStop; offensiveTimeStop.Description = "Allows you to prepare a Quick Time Stop.\nAfter use, Right-Click on a location to teleport there.\nClicking on an Entity will cause you to teleport behind it."; AddGlobalCombos(timeStop, offensiveTimeStop); AddNormalCombos(barrage, upperCut); }
public override void InitializeCombos() { StandCombo falconPunch = new StandCombo("Fist of Flaming Fury", ComboInput.Action1, ComboInput.Action1, ComboInput.Action2); falconPunch.OnActivate += FalconPunch_OnActivate; falconPunch.Style = 1000; StandCombo zxcursed = new StandCombo("Fireraze", ComboInput.Action1, ComboInput.Action2, ComboInput.Action3) { Description = "Releases Pillars of Flames in the direction you are facing" }; zxcursed.OnActivate += Zxcursed_OnActivate; zxcursed.Style = 500; StandCombo desrucxz = new StandCombo("Firequake", ComboInput.Action1, ComboInput.Action2, ComboInput.Action1) { Description = "Releases Pillars of Flames in both directions" }; desrucxz.OnActivate += Desrucxz_OnActivate; desrucxz.Style = 250; AddNormalCombos(falconPunch, zxcursed, desrucxz); }