Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
Dedicated bosses folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jofairden committed Oct 9, 2017
1 parent 64cc823 commit c381bfd
Show file tree
Hide file tree
Showing 169 changed files with 294 additions and 309 deletions.
4 changes: 4 additions & 0 deletions Changelogs/v1.3.2.5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Note:

Bosses:
- Fixed Paradox Titan (Titan Soul) and Wall of Shadows not registering as kill
- Fixed bosses being seen as defeated for new worlds

Worldgen:
- Removed many (read: at least a dozen) redundant loops iterating world chests (should speed up WorldGen)
Expand All @@ -18,5 +19,8 @@ WorldGen Chests:
- Fixed Ruin Chest generation and having content replaced
- Fixed Ice Chest generation and having content replaced

Other:
- Fixed silently Caught Exception: Index was outside the bounds of the array. at Tremor.NPCs.Bosses.CogLord.CogLordProbe.AI()

Code:
- Flags hideCode, hideResources and includeSource are no longer blocking unpacking. Unpack now to get the Tremor.dll
4 changes: 3 additions & 1 deletion NPCs/AndasBoss/Andas.cs → NPCs/Bosses/AndasBoss/Andas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
[AutoloadBossHead]
public class Andas : ModNPC
Expand Down Expand Up @@ -48,6 +48,8 @@ public override void SetDefaults()
const float Acceleration = 0.1f;
int Timer;
#endregion

//@todo
public override void AI()
{
npc.TargetClosest(true);
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Terraria;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
public class InfernoSkull : ModProjectile
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
public class MoltenSpirit : ModNPC
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Terraria;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
public class SpiritFire : ModProjectile
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
[AutoloadBossHead]
public class TrueAndas : ModNPC
{

public override void SetStaticDefaults()
{
DisplayName.SetDefault("True Andas");
Expand Down Expand Up @@ -48,6 +47,8 @@ public override void SetDefaults()
const float Acceleration = 0.15f;
int Timer;
#endregion

//@todo
public override void AI()
{
npc.TargetClosest(true);
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
public class UndeadWyrmBody : ModNPC
{

public override void SetStaticDefaults()
{
DisplayName.SetDefault("Undead Wyrm");
}

public override void SetDefaults()
{
npc.lifeMax = 1;
Expand All @@ -31,6 +31,7 @@ public override void SetDefaults()
npc.buffImmune[67] = true;
npc.lavaImmune = true;
}

public override void AI()
{
if (!Main.npc[(int)npc.ai[1]].active)
Expand All @@ -41,14 +42,17 @@ public override void AI()
npc.active = false;
}
}

public override bool CheckActive()
{
return false;
}

public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
return false;
}

public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D drawTexture = Main.npcTexture[npc.type];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
public class UndeadWyrmHead : ModNPC
{
Expand Down Expand Up @@ -89,6 +89,7 @@ public override void AI()
npc.netUpdate = true;
}
}

public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D drawTexture = Main.npcTexture[npc.type];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.NPCs.AndasBoss
namespace Tremor.NPCs.Bosses.AndasBoss
{
public class UndeadWyrmTail : ModNPC
{

public override void SetStaticDefaults()
{
DisplayName.SetDefault("Undead Wyrm");
Expand All @@ -32,10 +31,12 @@ public override void SetDefaults()
npc.buffImmune[67] = true;
npc.lavaImmune = true;
}

public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
return false;
}

public override void AI()
{
if (!Main.npc[(int)npc.ai[1]].active)
Expand All @@ -45,6 +46,7 @@ public override void AI()
npc.active = false;
}
}

public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D drawTexture = Main.npcTexture[npc.type];
Expand Down
4 changes: 2 additions & 2 deletions CogLord/NPCs/CogLord.cs → NPCs/Bosses/CogLord/CogLord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
// todo: redo
[AutoloadBossHead]
Expand Down Expand Up @@ -83,7 +83,7 @@ public override void ScaleExpertStats(int numPlayers, float bossLifeScale)

public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor)
{
spriteBatch.Draw(mod.GetTexture("CogLord/NPCs/CogLordBody"), npc.Center - Main.screenPosition, null, Color.White, 0f, new Vector2(44, -18), 1f, SpriteEffects.None, 0f);
spriteBatch.Draw(mod.GetTexture("NPCs/Bosses/CogLord/CogLordBody"), npc.Center - Main.screenPosition, null, Color.White, 0f, new Vector2(44, -18), 1f, SpriteEffects.None, 0f);
Texture2D drawTexture = Main.npcTexture[npc.type];
Vector2 origin = new Vector2((drawTexture.Width / 2) * 0.5F, (drawTexture.Height / Main.npcFrameCount[npc.type]) * 0.5F);
Vector2 drawPos = new Vector2(
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
public class CogLordArm : ModNPC
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
public class CogLordArmSecond : ModNPC
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Terraria;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

using Microsoft.Xna.Framework;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
public class CogLordCog : ModNPC
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
/*
* npc.ai[0] = Index of the Cog Lord boss in the Main.npc array.
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Terraria;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
/*
* npc.ai[0] = Index of the Cog Lord boss in the Main.npc array.
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
public class CogLordProbe : ModNPC
{
Expand Down Expand Up @@ -34,6 +34,12 @@ public override void SetDefaults()

public override void AI()
{
if (!NPC.AnyNPCs(mod.NPCType("CogLord")))
{
npc.active = false;
return;
}

npc.position += npc.velocity * 1.7f;
npc.rotation = Helper.rotateBetween2Points(npc.Center, Main.npc[(int)npc.ai[0]].Center);
while (npc.Distance(Main.npc[(int)npc.ai[0]].position) > 1000)
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Terraria.ID;
using Terraria.ModLoader;

namespace Tremor.CogLord.NPCs
namespace Tremor.NPCs.Bosses.CogLord
{
public class GogLordGog : ModNPC
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using Terraria;
using Terraria.ModLoader;

namespace Tremor.Items
namespace Tremor.NPCs.Bosses.CogLord.Items
{
public class CogLordBag : ModItem
{
public override void SetDefaults()
{

item.maxStack = 999;
item.consumable = true;
item.width = 24;
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Terraria.ModLoader;

namespace Tremor.Items
namespace Tremor.NPCs.Bosses.CogLord.Items
{
[AutoloadEquip(EquipType.Head)]
public class CogLordMask : ModItem
Expand Down
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Terraria.ModLoader;

namespace Tremor.Items
namespace Tremor.NPCs.Bosses.CogLord.Items
{
public class CogLordMusicBox : ModItem
{
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Terraria.ModLoader;

namespace Tremor.Items
namespace Tremor.NPCs.Bosses.CogLord.Items
{
public class CogLordTrophy : ModItem
{
Expand Down
File renamed without changes
5 changes: 2 additions & 3 deletions NPCs/Clamper.cs → NPCs/Bosses/Motherboard/Clamper.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

using Microsoft.Xna.Framework;

namespace Tremor.NPCs
namespace Tremor.NPCs.Bosses.Motherboard
{
public class Clamper : ModNPC
{
Expand Down
File renamed without changes
7 changes: 3 additions & 4 deletions NPCs/Clamper2.cs → NPCs/Bosses/Motherboard/Clamper2.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Terraria;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

using Microsoft.Xna.Framework;

namespace Tremor.NPCs
namespace Tremor.NPCs.Bosses.Motherboard
{
public class Clamper2 : ModNPC
{
Expand Down
File renamed without changes
Loading

0 comments on commit c381bfd

Please sign in to comment.