Nerf katana teleport

This commit is contained in:
2023-01-28 22:02:59 +01:00
parent 8a9730f61f
commit e300c3cddb
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -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;