The Goblin Army is a horde of unique Goblin enemy characters, consisting of 5 different variations, who have a 1/15 chance of invading on a particular day or night, provided a player has achieved a certain level of advancement in the game (see Conditions).

The total Goblin invasion will consist of 80 Goblins plus 40 Goblins for each player in the world with 200+ possible health. They spawn in waves of about 5-8 at a time. Although they can be incredibly difficult to defeat, a Goblin attack can be a welcome event, as they provide a good amount of items (some rather rare) in a fairly short amount of time. In total, the Goblin Army will drop 250-500 Spiky Balls, and sometimes the Harpoon, though this is semi-rare. Unfortunately, they do not provide many coins.

Most goblin monsters (besides the Sorcerer) can both open and break down doors. When a door is broken down, it appears as a thrown-away item on the ground that can be picked up again by a player and replaced. One way to keep goblins from breaking a door is to place a block behind the door.

When the Goblin Army event starts, a warning message will appear on the bottom-left of the screen that reads, A Goblin Army Is Approaching From The West/East!. The warning repeats 3 times to ensure the player is aware of the event, though the warning may appear less than that if the player is in the middle of a boss battle on the night prior to the attack, or if the player reaches 200 maximum health shortly before nightfall. When the goblins arrive, a new message will appear: The goblin army has arrived! along with a change in music. When the last wave of Goblins is on the screen, this message reads: A goblin army has been defeated! However, Goblins still alive and on screen will continue to attack you until you or they are dead.

After defeating The Goblin Army, there is a possibility for there to be another Goblin Invasion after 7 or more Terraria Days.
Goblin armies will not spawn on either the Hallow or the Corruption and NPCs will not move in during a goblin invasion.

Types

Goblin Peon - A basic goblin with no special abilities or defense. They are considerably more vulnerable to knockback than the other goblins, being knocked back a lot even by weapons such as the Muramasa.

Goblin Sorcerer - A goblin variant that does not walk, but can teleport, and fires purple fireball projectiles that travel through walls. Their projectiles can be stopped midair with any weapon. They have very low health and defense, but tend to teleport behind walls, making them difficult to kill with most weapons. They are best defeated with weapons that travel through walls, like the Vilethorn or the Nettle Burst.

Goblin Thief - A goblin variant that moves faster, jumps higher, and breaks down doors faster than other goblins and most other typical walking enemies. Despite their name, they cannot steal from containers.

Goblin Warrior - A goblin variant that has much higher defense and health than other goblins, making them take the longest to kill. They are also slightly larger and much more resistant to knockback than the other kinds of goblins. However, they are also by far the slowest, so staying back and shooting at them from a distance won't be too difficult.

Goblin Archer - A goblin variant that first appeared in the 1.1 update for Terraria and that can shoot arrows at the player. When it has a clear line of sight, it takes a few seconds before it fires. This can be recognized when it's charging the bow it is holding. Hitting it while it is charging the bow will make it fumble, not firing the arrow.

Goblin Summoner - A goblin variant that is a Hardmode enemy for the goblin army. It summons Shadowflame Apparitions to attack the player. It drops Shadowflame-themed weapons, which apply a Shadowflame debuff, causing 5 damage per second.

Notes

East/West is on the left/right side of the screen, respectively. The sun "rises" on the left side of your screen, thus beginning dawn. The Goblins will move to an area in which they can spawn from the stated side towards the original spawn point (for singleplayer). Once the Army has arrived, the Goblins will spawn near you so long as you are within the battle area.

NPCs will not respawn if they die until you have defeated the Goblin Invasion. Running about a hundred feet away from your home can prevent NPC deaths.

Goblin Invasions and Blood Moons can occur at the same time. If this occurs, you will not be attacked by Zombies while the Goblin Army is still undefeated.

Exiting your world during a Goblin Invasion will not result in the Goblins disappearing. The next time you log in, the Goblins will remain around the original spawn point.

Before the Goblin Army arrives, the player can go kill them before their arrival.

Strategies

Build 2 massive pits around the spawn / player base to hold the ground based goblins in, and ready your best weapons and armor to thin the ranks. Take out the sorcerers first, then thin the ranks of the ground walkers by standing at one side of a pit and firing at the goblins. Be careful not to fall in. With this tactic, a new player can defeat them with minimal casualties while still profiting off the new gear. Once you've went through 1 goblin army a good strategy is to throw spiky balls in the pit and that will cause mass amounts of damage with out even fighting. Of course, players with access to explosives could simply throw a few grenades in, which would quickly clear out such a pit without damaging the walls.

An even more effective strategy is to create lava moats that kill but do not destroy items on either side of your original spawn. Due to the fact that Goblin Peons, Thieves, and Warriors spawn off screen, they will most often come charging from either side, ending up in your lava. This significantly aids both yours and the NPC's survival, as you will only need to deal with the Sorcerers; and occasionally one of the other 4 types of goblins.

Another way is to stay on the top of your building and keep using your flail (Ball O' Hurt, Blue Moon, Sunfury, Harpoon) or another weapon with good knockback downwards, preventing goblins from climbing up and make casualties. The only problem you will face using these tactics are the teleporting goblin sorcerers. Flails and spear weapons are very effective on flat surfaces because they hit multiple goblins (and you will often face over 5 at a time.) and have a long range.

Yet another useful strategy to prevent anything except goblin sorcerers from getting in (if you don't have access to lava/don't want to use it), is to create a tower (see the House Defense section) on the edges of your home as the only way to get in and out of it. Being too high up for anything to reach it, this will only work if you have a Magic Mirror (in conjunction with a bed,) a Shiny Red Balloon, a Cloud in a Bottle, Rocket Boots, or Grappling Hook/Ivy Whip. You can then hit them with your bow/gun/magic items/flail/boomerang with impunity. (almost.)

Yet another tactic, particularly if the player has been caught off-guard or far from home when the warning of the Goblin Army is sounded is to exclusively use Vilethorn. By barricading the doors of the house, the player can sit in relative safety while cutting down the Goblin soldiers with ease. Vilethorn's barbs pass through the walls and hit every enemy in its path multiple times. Additionally, they can 'stun-lock' Goblin Sorcerers, preventing them from using their purple fireball spell, which poses the only danger to the player in their own house. While the damage and range of Vilethorn is somewhat lacking in comparison to the higher-tier weapons and spells, it can still slay the nuisance Goblin Sorcerers in one blow, and makes short work of the stronger Goblins. With their tendency to drop mana-replenishing stars, it's unlikely for the player to run out of mana to use Vilethorn, particularly if they kill the Goblins close to the walls of their home.

An easy strategy that only requires a little bit of prep is to create a minecart rail that goes a few hundered blocks to the East and/or West of where you want to fight the army. Then all you need to do is ride back and forth along the rail, and any goblins that are on the rail will be instantly killed by your minecart. Make sure that all points of the minecart are touching the ground/ near the ground, or else the goblins won't get hit. This is a fairly cost effective stratagy, as 30 iron and 30 wood make 999 Minecart Tracks, and for the rest, you just need some dirt.

If you don't have too much health, but want to fight, you can take out a few goblins, then throw the spiky balls at the others. First, the spiky balls act as throwable weapons, but then, it serves as a spike to the goblins. If you keep this up, no goblin should be able to attack you, as the close ranged goblins will run into the spikes, while the sorcerers will teleport into spikes if you threw enough. You should be able to take them down with little health lost, as for the archers, return the fire, or if you threw enough spiky balls, they will simply find a place to fire, a decent distance away from you, can then step into the spiky balls.

If you think you are already ready without a strategy, you may quickly run to where the Goblin Army spawns. If it says that it is coming from the east, go to the left side of the world. If it says that it is coming from the west, go to the right side of the world. Before it gets close to your house (you may fight there if you don't have NPCs in or if you don't mind having them die since they will respawn), you should kill them all in a place far away. The sorcerers would target you, not the NPCs, so it's good if your main place is crowded with NPCs and you want to keep them away.

A good trick is to fill up on ammo and get a Minishark, or a Megashark once you've activated Hard Mode. Using a Demon Scythe is very effective if aimed right and getting a water staff is good as it hits groups.
An easy way to fight them is with a Crimson Rod. Use it above your door (use Spikey Balls to) and that will hold them off for a while. You should stay near and protect your Nurse NPC for this may keep you alive for some time!

A great strategy is to use the Bee Gun and move left and right, the bees will seek out any goblins and because there are so many you can collect the mana crystals they drop to infinitely destroy them. This is very cost effective if you fought the Queen Bee and got the Bee Gun drop as all it costs is mana.