Skip to content

Commit

Permalink
Fifth Anniversary
Browse files Browse the repository at this point in the history
  • Loading branch information
Joost8910 committed May 1, 2021
1 parent 9445cf8 commit 47ae624
Show file tree
Hide file tree
Showing 253 changed files with 9,242 additions and 1,789 deletions.
Binary file modified Buffs/EmberMinion.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Buffs/FrostEmberMinion.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 2 additions & 10 deletions Buffs/HavelBuff.cs
Expand Up @@ -10,16 +10,8 @@ public override void SetDefaults()
DisplayName.SetDefault("Stone Flesh");
Description.SetDefault("Reduces damage taken by 40%, mobility greatly reduced");
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
Main.debuff[Type] = true;
canBeCleared = false;
}

public override void Update(Player player, ref int buffIndex)
{
if (!player.GetModPlayer<JoostPlayer>().havelArmorActive)
{
player.DelBuff(buffIndex);
buffIndex--;
}
}
}
}
35 changes: 35 additions & 0 deletions Buffs/StormWyvernMinion.cs
@@ -0,0 +1,35 @@
using System;
using Terraria;
using Terraria.ModLoader;

namespace JoostMod.Buffs
{
public class StormWyvernMinion : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Storm Wyvern");
Description.SetDefault("The storm wyvern will fight for you");
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}

public override void Update(Player player, ref int buffIndex)
{
JoostPlayer modPlayer = (JoostPlayer)player.GetModPlayer(mod, "JoostPlayer");
if (player.ownedProjectileCounts[mod.ProjectileType("StormWyvernMinion")] > 0)
{
modPlayer.stormWyvernMinion = true;
}
if (!modPlayer.stormWyvernMinion)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file added Buffs/StormWyvernMinion.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Items/Armor/HavelHelm.cs
Expand Up @@ -39,7 +39,8 @@ public override bool DrawHead()

public override void UpdateArmorSet(Player player)
{
player.setBonus = "Press the Armor Ability key to reduce damage taken at the cost of mobility";
player.setBonus = "Press the Armor Ability key to reduce damage taken at the cost of mobility\n" +
"30 second duration";
player.GetModPlayer<JoostPlayer>().havelArmor = true;
}
public override void AddRecipes()
Expand Down
Binary file added Items/DivineMirror.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions Items/GilgBag.cs
Expand Up @@ -35,14 +35,10 @@ public override void OpenBossBag(Player player)
player.QuickSpawnItem(mod.ItemType("COTBBMusicBox"));
player.QuickSpawnItem(mod.ItemType("Gilgameshset"));
player.QuickSpawnItem(mod.ItemType("GenjiToken"), 2 + Main.rand.Next(2));
if (Main.rand.Next(2) == 0)
if (Main.rand.Next(4) == 0)
{
player.QuickSpawnItem(mod.ItemType("GilgameshMask"));
}
if (Main.rand.Next(3) == 0)
{
player.QuickSpawnItem(mod.ItemType("GilgameshTrophy"));
}


if (Main.rand.NextBool(100))
Expand Down
11 changes: 2 additions & 9 deletions Items/GrandCactusWormBag.cs
Expand Up @@ -31,18 +31,11 @@ public override void OpenBossBag(Player player)
{
player.QuickSpawnItem(mod.ItemType("CactusWormHook"));
player.QuickSpawnItem(mod.ItemType("LusciousCactus"), 10+Main.rand.Next(16));
if (Main.rand.Next(2) == 0)
{
player.QuickSpawnItem(mod.ItemType("DeoremMuaMusicBox"));
}
if (Main.rand.Next(3) == 0)
player.QuickSpawnItem(mod.ItemType("DeoremMuaMusicBox"));
if (Main.rand.Next(4) == 0)
{
player.QuickSpawnItem(mod.ItemType("GrandCactusWormMask"));
}
if (Main.rand.Next(5) == 0)
{
player.QuickSpawnItem(mod.ItemType("GrandCactusWormTrophy"));
}
}
}
}
2 changes: 1 addition & 1 deletion Items/HavelsGreatshield.cs
Expand Up @@ -14,7 +14,7 @@ public override void SetStaticDefaults()
DisplayName.SetDefault("Havel's Greatshield");
Tooltip.SetDefault("Reduces movement speed by 5%\n" +
"Right click to block attacks in front of you\n" +
"Blocking an attack reduces its damage by 80%\n" +
"Blocking an attack reduces its damage by an amount equal to the shield's damage\n" +
"Left click while blocking to shield bash");
}
public override void SetDefaults()
Expand Down
94 changes: 71 additions & 23 deletions Items/JoostGlobalItem.cs
Expand Up @@ -6,6 +6,8 @@
using Microsoft.Xna.Framework;
using Terraria.Enums;
using Terraria.DataStructures;
using Terraria.GameContent.Events;
using Microsoft.Xna.Framework.Graphics;

namespace JoostMod.Items
{
Expand All @@ -19,13 +21,36 @@ public class JoostGlobalItem : GlobalItem
public int maxHealth = 0;
public int lifeRegen = 0;
public int fishingPower = 0;
public Texture2D glowmaskTex = null;
public Color glowmaskColor = Color.White;
public override bool InstancePerEntity
{
get
{
return true;
}
}
public override void PostDrawInInventory(Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D tex = glowmaskTex;
if (tex != null)
{
drawColor = glowmaskColor;
spriteBatch.Draw(tex, position, frame, drawColor, 0f, origin, scale, SpriteEffects.None, 0f);
}
}
public override void PostDrawInWorld(Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Texture2D tex = glowmaskTex;
if (tex != null)
{
float x = (float)(item.width / 2f - tex.Width / 2f);
float y = (float)(item.height - tex.Height);
lightColor = glowmaskColor;
alphaColor = lightColor;
spriteBatch.Draw(tex, new Vector2(item.position.X - Main.screenPosition.X + (float)(tex.Width / 2) + x, item.position.Y - Main.screenPosition.Y + (float)(tex.Height / 2) + y + 2f), new Rectangle?(new Rectangle(0, 0, tex.Width, tex.Height)), lightColor, rotation, new Vector2((float)(tex.Width / 2), (float)(tex.Height / 2)), scale, SpriteEffects.None, 0f);
}
}
public override GlobalItem Clone(Item item, Item itemClone)
{
JoostGlobalItem myClone = (JoostGlobalItem)base.Clone(item, itemClone);
Expand Down Expand Up @@ -182,29 +207,52 @@ public override void OpenVanillaBag(string context, Player player, int arg)
}
public static float LegendaryDamage()
{
float damageMult = 1f + //1
(NPC.downedSlimeKing ? 0.25f : 0f) + //1.25
(NPC.downedBoss1 ? 0.25f : 0f) + //1.5
(NPC.downedBoss2 ? 0.25f : 0f) + //1.75
(NPC.downedQueenBee ? 0.25f : 0f) + //2
(NPC.downedBoss3 ? 0.25f : 0f) + // 2.25
(JoostWorld.downedCactusWorm ? 0.25f : 0f) + //2.5
(Main.hardMode ? 0.5f : 0f) + //3
(NPC.downedMechBoss1 ? 1f : 0f) + //4
(NPC.downedMechBoss2 ? 1f : 0f) + //5
(NPC.downedMechBoss3 ? 1f : 0f) + //6
(NPC.downedPlantBoss ? 1f : 0f) + //7
(NPC.downedGolemBoss ? 1f : 0f) + //8
(NPC.downedFishron ? 1f : 0f) + //9
(NPC.downedAncientCultist ? 1f : 0f) + //10
(NPC.downedTowerNebula ? 1f : 0f) + //11
(NPC.downedTowerSolar ? 1f : 0f) + //12
(NPC.downedTowerVortex ? 1f : 0f) + //13
(NPC.downedTowerStardust ? 1f : 0f) + //14
(NPC.downedMoonlord ? 6f : 0f) + //20
(JoostWorld.downedJumboCactuar ? 15f : 0f) + //35
(JoostWorld.downedSAX ? 15f : 0f) + //50
(JoostWorld.downedGilgamesh ? 15f : 0f); //65
float damageMult = 1f + //1
(JoostWorld.downedPinkzor ? 0.05f : 0f) + //1.05
(JoostWorld.downedRogueTomato ? 0.05f : 0f) + //1.1
(JoostWorld.downedWoodGuardian ? 0.05f : 0f) + //1.15
(NPC.downedSlimeKing ? 0.1f : 0f) + //1.25
(JoostWorld.downedFloweringCactoid ? 0.05f : 0f) + //1.3
(NPC.downedGoblins ? 0.1f : 0f) + //1.4
(NPC.downedBoss1 ? 0.1f : 0f) + //1.5
(JoostWorld.downedICU ? 0.1f : 0f) + //1.6
(NPC.downedBoss2 ? 0.1f : 0f) + //1.7
(JoostWorld.downedSporeSpawn ? 0.1f : 0f) + //1.8
(DD2Event.DownedInvasionT1 ? 0.1f : 0f) + //1.9
(NPC.downedQueenBee ? 0.1f : 0f) + //2
(JoostWorld.downedRoc ? 0.1f : 0f) + //2.1
(NPC.downedBoss3 ? 0.2f : 0f) + //2.3
(JoostWorld.downedSkeletonDemoman ? 0.2f : 0f) + //2.5
(JoostWorld.downedCactusWorm ? 0.2f : 0f) + //2.7
(JoostWorld.downedImpLord ? 0.2f : 0f) + //2.9
(Main.hardMode ? 0.35f : 0f) + //3.25
(NPC.downedPirates ? 0.25f : 0f) + //3.5
(JoostWorld.downedStormWyvern ? 0.5f + 0.25f : 0f) +//4.25 TEMP add Queen Slime to Storm Wyvern and Mech Bosses | 4
//(Queen Slime ? 1f : 0f) + // | 5
(NPC.downedMechBoss1 ? 1f + 0.25f : 0f) + //5.5 | 6
(NPC.downedMechBoss2 ? 1f + 0.25f: 0f) + //6.75 | 7
(NPC.downedMechBoss3 ? 1f + 0.25f: 0f) + //8
//(DD2Event.DownedInvasionT2 ? 2f : 0f) + // DD2Event Bools are bugged until tmod 1.4 | 10
(NPC.downedPlantBoss ? 2f + 2f : 0f) + //12 TEMP add T2 OOA completion to Plantera
(NPC.downedGolemBoss ? 3f : 0f) + //15
(NPC.downedFishron ? 3f : 0f) + //18
(NPC.downedMartians ? 3f : 0f) + //21
(NPC.downedHalloweenTree ? 1.5f : 0f) + //22.5
(NPC.downedHalloweenKing ? 1.5f : 0f) + //24
(NPC.downedChristmasTree ? 1.5f : 0f) + //25.5
(NPC.downedChristmasSantank ? 1.5f : 0f) + //27
(NPC.downedChristmasIceQueen ? 1.5f : 0f) + //28.5
//(Empress of Light ? 3.5f : 0f) + // | 32
//(DD2Event.DownedInvasionT3 ? 4f : 0f) + // DD2Event Bools are bugged until tmod 1.4 | 36
(NPC.downedAncientCultist ? 1f + 3.5f : 0f) + //33 TEMP add Empress calculation to Cultist | 37
(NPC.downedTowerNebula ? 1f + 1f : 0f) + //35 TEMP add Betsy completion to pillars | 38
(NPC.downedTowerSolar ? 1f + 1f : 0f) + //37 | 39
(NPC.downedTowerVortex ? 1f + 1f : 0f) + //39 | 40
(NPC.downedTowerStardust ? 1f + 1f : 0f) + //41 | 41
(NPC.downedMoonlord ? 9f : 0f) + //50
(JoostWorld.downedJumboCactuar ? 10f : 0f) + //60
(JoostWorld.downedSAX ? 10f : 0f) + //70
(JoostWorld.downedGilgamesh ? 10f : 0f); //80
return damageMult;
}
}
Expand Down
6 changes: 1 addition & 5 deletions Items/JumboCactuarBag.cs
Expand Up @@ -35,14 +35,10 @@ public override void OpenBossBag(Player player)
player.QuickSpawnItem(mod.ItemType("CactuarShield"));
player.QuickSpawnItem(mod.ItemType("Cactustoken"), 1 + Main.rand.Next(2));
player.QuickSpawnItem(mod.ItemType("DecisiveBattleMusicBox"));
if (Main.rand.Next(2) == 0)
if (Main.rand.Next(4) == 0)
{
player.QuickSpawnItem(mod.ItemType("JumboCactuarMask"));
}
if (Main.rand.Next(3) == 0)
{
player.QuickSpawnItem(mod.ItemType("JumboCactuarTrophy"));
}
}
}
}
Binary file added Items/PinapplePizza.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions Items/Placeable/FifthAnniversary.cs
@@ -0,0 +1,29 @@
using Terraria.ModLoader;

namespace JoostMod.Items.Placeable
{
public class FifthAnniversary : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Joostmod's Fifth Anniversary");
Tooltip.SetDefault("'Face reveal'");
}
public override void SetDefaults()
{
item.width = 50;
item.height = 34;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.value = 500000;
item.rare = 8;
item.createTile = mod.TileType("FifthAnniversary");
item.placeStyle = 0;
}
}
}
Binary file added Items/Placeable/FifthAnniversary.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Items/Placeable/FourthAnniversary.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Items/Placeable/FrostFurnace.cs
Expand Up @@ -22,7 +22,7 @@ public override void SetDefaults()
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.rare = 3;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 3, 0);
item.createTile = mod.TileType("FrostFurnace");
item.placeStyle = 0;
Expand Down
2 changes: 1 addition & 1 deletion Items/Placeable/SandstoneFurnace.cs
Expand Up @@ -22,7 +22,7 @@ public override void SetDefaults()
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.rare = 3;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 3, 0);
item.createTile = mod.TileType("SandstoneFurnace");
item.placeStyle = 0;
Expand Down
11 changes: 8 additions & 3 deletions Items/Quest/ImpLord.cs
@@ -1,3 +1,6 @@
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;

namespace JoostMod.Items.Quest
Expand All @@ -6,16 +9,18 @@ public class ImpLord : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Thick Imp Tail");
DisplayName.SetDefault("Fiery Imp Tail");
Tooltip.SetDefault("Quest item for the Hunt Master");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 8));
ItemID.Sets.ItemNoGravity[item.type] = true;
}

public override void SetDefaults()
{
item.questItem = true;
item.maxStack = 1;
item.width = 20;
item.height = 20;
item.width = 42;
item.height = 42;
item.uniqueStack = true;
item.rare = -11;
}
Expand Down
Binary file modified Items/Quest/ImpLord.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions Items/Quest/StormWyvern.cs
@@ -0,0 +1,28 @@
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;

namespace JoostMod.Items.Quest
{
public class StormWyvern : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Storm Wyvern Soul");
Tooltip.SetDefault("Quest item for the Hunt Master");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 8));
ItemID.Sets.ItemNoGravity[item.type] = true;
}

public override void SetDefaults()
{
item.questItem = true;
item.maxStack = 1;
item.width = 42;
item.height = 42;
item.uniqueStack = true;
item.rare = -11;
}
}
}
Binary file added Items/Quest/StormWyvern.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Items/Rewards/RocWings.cs
Expand Up @@ -24,7 +24,7 @@ public override void SetDefaults()
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.wingTimeMax = 45;
player.wingTimeMax = 30;
player.GetModPlayer<JoostPlayer>().rocWings = true;
}

Expand Down

0 comments on commit 47ae624

Please sign in to comment.