mirror of
https://github.com/YouHaveTrouble/YHTMod.git
synced 2026-05-11 21:56:54 +00:00
Nerf katana teleport
This commit is contained in:
@@ -24,6 +24,11 @@ public class KatanaRedo : GlobalItem {
|
||||
|
||||
public override bool? UseItem(Item item, Player player) {
|
||||
if (item.type != ItemID.Katana || player.altFunctionUse != 2) return null;
|
||||
YhtPlayer yhtPlayer = player.GetModPlayer<YhtPlayer>();
|
||||
|
||||
if (yhtPlayer.katanaTeleportCooldown > 0) return null;
|
||||
yhtPlayer.katanaTeleportCooldown = 300;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; i++) {
|
||||
NPC npc = Main.npc[i];
|
||||
if (!npc.CanBeChasedBy()) continue;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace YHTMod;
|
||||
@@ -5,6 +6,11 @@ namespace YHTMod;
|
||||
public class YhtPlayer : ModPlayer {
|
||||
|
||||
public int arcaneMissle = 0;
|
||||
public int katanaTeleportCooldown = 0;
|
||||
|
||||
public override void PreUpdate() {
|
||||
this.katanaTeleportCooldown = Math.Max(this.katanaTeleportCooldown - 1, 0);
|
||||
}
|
||||
|
||||
public override void ResetEffects() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user