Fence

==Description==
Fences are a buildable in Raid Maps. They can be used to redirect enemies and force them to take certain routes. 
See the Mechanics and Diagram sections of this page for further details as to how fences work and how to use them properly.
	
*Their HP makes it possible to use them to stall for some extra time, as enemies usually take some time to break them.
*Very cheap to place and upgrade.
*No limit for fences.
*Fences can be sold after the boss spawns on the final wave to get extra Mana if needed since enemies cannot change their route once spawned even if the fences are removed.	
*Weaker fences become almost useless if not upgraded by the corresponding wave intermissions due to enemies simply breaking them down rather than pathfinding around them.
*Can take damage from some explosive enemies.
==Upgrades==
Level	Appearance	Mana Cost	Hitpoints	Upgrade Intermission Wave
1 	 	70 	50 	14 (All difficulties)
2 	 	100 	400 	21 (Easy)
20 (Medium)
23 (Hard)
3 	 	250 	1000 	27 (Medium and Hard)
4 	 	350 	3000 	33 (Hard)
5 	 	500 	10000 	N/A
==Brick==
In the April Fools 2022 event, fences are replaced with bricks. They also replace fences on the Build to Survive map. They cannot be upgraded, but come with a full health restore at the start of each wave.
Level	Appearance	Mana Cost	Hitpoints	Upgrade Intermission Wave	Extra
1 	 	100 	500 	N/A 	Hitpoints are fully restored at the start of each wave.
== Mechanics ==
Forcing enemies to take longer routes as well as forcing them to be within range of your towers for longer is an extremely powerful mechanic, and mastering it can make raid maps significantly easier. Learn how to maze!
*Stronger enemies will simply destroy fences rather than follow the path created by them, but this can be nullified by upgrading the fences. Fences can be upgraded up to level 5, with each upgrade increasing the fence's health as well as increasing the threshold of which enemies will attempt to simply break them down instead of going around. Max level fences force all enemies to go around them regardless of .
*Fence upgrade intermissions occur between certain waves, and serve as way to force players to upgrade fences. Any fences that are a lower level than the current intermission level will be completely unable to reroute enemies, as every single enemy, regardless of strength, will attempt to break through them. Additionally, since enemies cannot change their chosen route after spawning, fences placed during waves can and will be attacked by enemies if they're in the way of the enemy's original pathing, regardless of the fence's level.
*Attempting to trap enemies by completely cutting off any path to the exit will result in enemies breaking down fences regardless of level or strength. It is heavily recommended to avoid this technique as it is not effective and will not even help stalling an enemy's path by placing a fence in front of it, as most enemies on later waves can break fences instantly.
==Diagrams==
At the start of every round all enemies will calculate the shortest way to the end.
If any walls are currently present, they will remap their path to get to the end, going around fences.
If there's any walls that block the way to the end, with no available path to it, they will break the wall that leads to the shortest way to the map.
Weaker enemies will follow weaker walls. Stronger enemies will always try to break weaker walls if its more convenient for them (Always remember to upgrade your fences to prevent this!)
==Trivia==
*Fences are able to be damaged and destroyed by explosive enemies like Bombies, Big Bombies, Lava Zombies, and Bomb Eggs when they explode.
**Bombies, Lava Zombies, & Bomb Eggs do 100 damage to walls, while Big Bombies do 300.
*On Pirate Panic Hard mode, upgrade intermissions for levels 2-4 appear 1 wave later.
*Brick replaces the Fence on Build to Survive.
==Update Log==
05/31/2020
*Fences were added to the game
06/13/2020
*Fence upgrade intermissions added
*Stronger enemies no longer destroy weaker fences unless it is past the wave intermissions
08/03/2020
*Level 2 Cost decreased 160 -> 140
*Level 3 Cost decreased 430 -> 350
*Level 4 Cost decreased 650 -> 500
*Level 5 Cost decreased 850 -> 700
08/31/2020
*Placement Cost decreased 80 -> 70
*Level 2 Cost decreased 140 -> 100
*Level 3 Cost decreased 350 -> 250
*Level 4 Cost decreased 500 -> 350
*Level 5 Cost decreased 700 -> 500
06/05/2021
*Fence upgrade intermission text made more noticeable
06/25/2022
*Now has a global limit of ⚠️ 40
06/25/2022
*Global limit removed
__NOEDITSECTION____INDEX____NONEWSECTIONLINK__
Category:Buildables