Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion AdventurePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public void Apply(AdventurePlayer adventurePlayer)
adventurePlayer.Deaths = Deaths;
}
}

public sealed class ItemPickup(int[] items) : IPacket<ItemPickup>
{
public int[] Items { get; } = items;
Expand Down Expand Up @@ -624,6 +623,7 @@ public override void OnHurt(Player.HurtInfo info)
PvPImmuneTime = adventureConfig.Combat.StandardInvincibilityFrames;
}


public override bool OnPickup(Item item)
{
// FIXME: This could work for non-modded items, but I'm not so sure the item type ordinals are determinant.
Expand Down Expand Up @@ -682,4 +682,46 @@ public override string ToString()
{
return $"{Player.whoAmI}/{Player.name}/{DiscordUser?.Id}";
}
// Handles the set bonus effects
public class TikiArmorModPlayer : ModPlayer
{
public override void PostUpdateEquips()
{
// Check if wearing full Tiki Armor
if (Player.armor[0].type == ItemID.TikiMask &&
Player.armor[1].type == ItemID.TikiShirt &&
Player.armor[2].type == ItemID.TikiPants)
{
Player.maxMinions += 1;
Player.noKnockback = true;
}
}
}
public class ForceZoom : ModPlayer
{
// Configuration
private const float BaseMinimumZoom = 1.0f; // Normal minimum zoom (100%)
// Runtime variables
private float currentMinimumZoom;
private float playerZoomTarget;

public override void PostUpdate()
{
// 1. Determine current minimum based on equipment
currentMinimumZoom = Player.armor[0].type == ItemID.Goggles
? BaseMinimumZoom
: BaseMinimumZoom;

// 2. Get the player's current zoom target from the game
playerZoomTarget = Main.GameZoomTarget;

// 3. Enforce minimum zoom but allow zooming in beyond
if (playerZoomTarget < currentMinimumZoom)
{
Main.GameZoomTarget = currentMinimumZoom;
Main.GameViewMatrix.Zoom = new Vector2(currentMinimumZoom);
}

}
}
}
2 changes: 2 additions & 0 deletions Localization/en-US.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,5 @@ Mods: {
Bounty.CollectedAllMechanicalBossSouls: "[c/32FF82:Cries of tortured souls emanate from the Bounty Shop...]"
}
}

ArmorSetBonus.Tiki: Set bonus: Knockback immunity, increases whip range by 20% , +2 minion slots. Does not apply if name contains "ss"