/// <summary> /// /// </summary> /// <param name="p">The <see cref="Player" /> that has the buff.</param> /// <param name="index">The index of the buff.</param> public override void Effects(Player p, int index) { base.Effects(p, index); if (--cd < 0) { cd = 0; } if (KState.Down(Keys.J) && KState.WasUp(Keys.J) && cd <= 0) { for (int i = 0; i < 10; i++) { ExtendedSpawning.NewDust(p.Hitbox, 15); } p.position = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition; Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 8); for (int i = 0; i < 10; i++) { ExtendedSpawning.NewDust(p.Hitbox, 15); } cd = CD_MAX; } }
/// <summary> /// When the <see cref="Player" /> is holding the <see cref="Item" />. /// </summary> /// <param name="p">The <see cref="Player" /> that is holding the <see cref="Item" />.</param> public override void HoldStyle(Player p) { base.HoldStyle(p); if (--tpCd < 0) { tpCd = 0; } if (--modeCd < 0) { modeCd = 0; } if (Main.mouseRight && Main.mouseRightRelease && modeCd <= 0) { UseMode++; if (UseMode > Mode.Underworld /* 6 */) { UseMode = 0; } Main.NewText("Mode changed: " + UseMode); modeCd = MODE_CD_MAX; } if (KState.Down(AvalonMod.ShadowMirrorHotkey) && KState.WasUp(AvalonMod.ShadowMirrorHotkey) && tpCd <= 0) { for (int i = 0; i < 10; i++) { ExtendedSpawning.NewDust(p.Hitbox, 15); } p.position = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition; Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 8); for (int i = 0; i < 10; i++) { ExtendedSpawning.NewDust(p.Hitbox, 15); } tpCd = TP_CD_MAX; } }
/// <summary> /// When the <see cref="Player" /> has the <see cref="Item" /> equipped. /// </summary> /// <param name="p"></param> public override void Effects(Player p) { base.Effects(p); if (KState.Down(AvalonMod.ShadowMirrorHotkey) && KState.WasUp(AvalonMod.ShadowMirrorHotkey) && tpCd <= 0) { for (int i = 0; i < 10; i++) { ExtendedSpawning.NewDust(p.Hitbox, 15); } p.position = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition; Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 8); for (int i = 0; i < 10; i++) { ExtendedSpawning.NewDust(p.Hitbox, 15); } } }
void U_MysticalTomes() { if (MWorld.localTome.IsBlank() || MWorld.localManager == null) { return; } MWorld.localTome.Effects(player); if (--skillCD <= 0) { skillCD = 0; } if (KState.Down(AvalonMod.TomeSkillHotkey) && skillCD <= 0) { MWorld.localManager.Activate(player); NetHelper.SendModData(modBase, NetMessages.ActivateSkill, Main.myPlayer); skillCD = MWorld.localManager.Cooldown; } }