Goblin Army

The Goblin Army, also known as the Goblin Invasion, is an event when unique Goblin enemies spawn, swarm a player's House, and attempt to break in and attack. A Goblin invasion has a 1 in 15 chance of occurring at any particular dawn, if the criteria stated below are met, or when the player uses a Goblin Battle Standard to summon it.

The size of the army is based on the count and health of the players within the game. There will be 100 Goblins, plus an additional 50 for each player that has a current health of 200 or more. In single player, the army will consist of 150 goblins, while in an 8-player game, with each player having 200 HP or more, it will spawn 500 Goblins. With the maximum of 255 players above 200 health, the maximum number of goblins in an invasion is 12,850.

In single-player, Goblin spawns will occur such that 7 will be on-screen at any given time. When the final wave of Goblins is on the screen, a message will appear saying, "The Goblin Army has been defeated!", and the theme music will return to normal.

Criteria
The criteria for a goblin invasion to occur is as follows:
 * You must have at least one person in the game with 200+ current life.
 * You must have smashed at least one Shadow Orb.
 * You must not have had an invasion within 7 in-game days.

Initial event
When a Goblin invasion is imminent, a message will appear: A Goblin Army is approaching from the [east/west]!

This message repeats 5 times. The direction specified in this message only pertains to the initial wave of Goblins, which spawns at the World's edge and travels to the player's original spawn point. Additional waves spawn immediately within the player's original spawn area. The directions are consistent with the rising and setting of the in-game Sun, rather than map directions; so the East is actually the left side of the World, and West is the right.

When the Goblin Army is about to begin spawning around the player's spawn point, the following message appears: The Goblin Army has arrived!

If the player is far away from their original spawn point, the Goblin Army will not actually begin spawning until the player returns.

Goblin types
The army will be made up of the following Goblin types:
 * Goblin Peon: A basic Goblin.
 * Goblin Sorcerer: A Caster-type enemy that fires a projectile which can travel through walls, and teleports.
 * Goblin Thief: A quicker Goblin that can also jump higher than others.
 * Goblin Warrior: A Goblin with more health, defense, and damage than others, that takes the most time to kill.

Most Goblins are capable of opening and/or breaking down your Doors. A broken-down Door appears as a thrown-away item, which you can pick up and Place again.

Strategies

 * If you have the Vilethorn, you can simply remain in your house, barricade all doors with blocks (any type), and attack the Goblins as they come within range of your Vilethorn. You will be safe from all attacks except for the Goblin Sorcerer, however they will always teleport close enough to hit with the Vilethorn (even if not on their initial spawn), and the Vilethorn will also repel their projectiles easily.
 * On an open, flat space, you can easily deal with the fighters (they won't jump around and will be lined up for multiple hits) and help you get to the Sorcerer and dodge/destroy their projectiles more easily.
 * Dig a pit deep enough so the Goblin Army cannot jump out, and buy about 80 grenades. Toss the grenades into the pit, and use a Minishark or other ranged weapon to take out the Goblin Sorcerers.
 * A more complex strategy requires several buckets of lava, and a long, flat space. Choose a point roughly in the middle of this space; this is where you will stand during the invasion. On either side of this space, dig a trench 1 block deep 10-12 wide. Use your lava buckets to fill these trenches (three buckets for a twelve block trench is usually sufficient). After filling the trenches, test the lava depth by throwing a single copper coin into the lava. If your coin disappears, lengthen your trench by one block. Repeat the coin test until it no longer disintegrates in the lava. Now check if you have enough lava to cause damage; you can test this either with yourself (make sure you have at minimum 101 health) or by luring a monster in. Once your trenches are sufficiently filled, place two wooden platforms in the air several blocks above the trenches; make sure you can see the entire platform from your center space! If your setup is correct, the goblin army will spawn offscreen and die harmlessly in your trenches, the Goblin Sorcerers will spawn on the wooden platforms, wide open for a ranged assault, and the entirety of the loot will be waiting for you to pick up from the traps.
 * It is possible to do the strategy above but without lava. All you need is a long flat surface and an elevated platform unable to be reached by any goblin. Assuming the Goblin Sorcerers do not spawn where you're standing, any ranged weapon and a fast swinging melee weapon should surfice to kill the majority. To make the job easier, collect the spiky balls that the Goblins drop to harm many Goblins at once.