Defending

Once players have begun battling, they can start to get attacked by other players. This makes a good defense very important.

## General Information

Players can lose resources to enemy attacks. These resources are the same as the ones gained from attacking: fungus, leaves, seeds and body parts.

Certain creatures are better for defending than attacking (see roles). Many players will have an attacking army setup and a defending army setup. The strongest or fastest creatures work best in defense positions. Bombardiers and Rhino beetles are usually preferred for defense.

The Defense tab shows the level of the player's soldier ants. The soldier level is different from the Queen's Chamber level. If the player has a Queen's Chamber level of 8, the soldier ants will be level 7. The current number of soldiers is shown here as well. If any soldiers have been killed, the defense tab will reflect this until soldiers have been bred to replace the ones that were lost.

Creatures that are defeated while defending will not be lost. Soldiers set to defend the colony can still be used in battles.

Tip: Getting a Venus Fly Trap helps a lot when defending the ant colony. Put some creatures near the fly trap's position to protect the flytrap from the attacker's ants.

## Assigning units

Click the 'Battle' button and select the 'Defense' tab.

In the Defense tab, players can assign the creatures that are in the active army slots to defend the colony from enemy players. Creatures in storage can't be placed in defense.

Creatures can be assigned to patrol three different areas:

1. Right outside the anthill
2. Inside the main corridor
3. Inside the Queen's chamber

Assign mechanics:

* To assign soldier ants, move the sliders to increase the percent or number of soldier ants in an area.
* To assign creatures, drag the creature icon to the image of the area where the creature is supposed to patrol.
* If a Venus flytrap has been purchased from the resin shop, it will appear near the soldier ant icon. It can't be moved from its location.
* Click 'assign' when finished to have the assigned ants and creatures defend the anthill when other players attack.

If a mistake is made in the placement of creatures or if a creature needs to be moved, click the 'Clear' button to start over. Once a creature has been placed in a location it can't be moved to a different one and the entire setup will have to be cleared in order to make changes.

The ant attacking button is used to enter a test battle against the player's own colony to see how good the defense arrangement is against other players. This is a fake battle only and no ants will be lost or resources gained from this battle.

Every time changes are made to the creatures in the active Army slots, the player will need to reassign creatures into the preferred locations. If creatures are not assigned, they will be placed randomly into one of the three defense areas. Any ants that are not assigned to a position will guard worker ants as they collect resources.

## You Were Attacked!

Other players can attack when the game is offline unless there is an active shield. If the player is attacked, there will be a "You were attacked!" notice upon logging in to the game with a list of attackers and attack outcomes.

### Victory

A 'Victory' means that the attacking player killed less than 50% of the player's defending forces. If there is a "Victory", the player will be awarded trophies and a pink pheromone. Some resources might be lost depending on the % of defending forces defeated. No shield will be awarded.

### Defeat

A 'Defeat" means that the attacking player killed 50% - 100% of the defending forces. If the defense is "Defeated", the player will lose resources, trophies and get a shield to protect against enemy attackers.

#### Lost resources

The amount of resources lost depends on the percent of defeated defending forces. With a 100% victory, the max amount of resources the first attacker can steal is 15% of food, leaves and seeds, and 5% of creature parts. This amount is decreased for victories less than 100%.

After the first attack, the longer the player is offline, the less resources will be available to attackers and the amount of resources other players can steal from you is reduced by half (50% of that 15%). This continues until eventually maxing out at a total loss of 30% of food, leaves and seeds, and 10% of creature parts. This means that attackers can't steal all of the player's resources no matter how long they are offline.

#### Attacks while online

*Special note about being attacked while 'online':*

* Under normal circumstances this should not happen. The game pings the server every few seconds, approximately every time progress is auto-saved. So, there are some specific scenarios where this does not happen, making the player appear as "offline" even when the game is not closed:
	+ Loss of internet connection for over 12 minutes.
	+ Game being in the background for over 12 minutes.
	+ Player being afk for over 12 minutes (no keys pressed during that time / device being unattended).

## Shields

Players receive shields when their defense is defeated. The shield length depends on the player's Leagues rank. The higher the league, the shorter the duration of the shield.

* Bronze League = 12 hours
* Silver League = 12 hours
* Gold League = 4 hours
* Platinum League = 2 hours
* Diamond League = 1 hour

Shields can be purchased with gems in the Gem Shop regardless of League level. Available shields are 12 hours, 24 hours, or 72 hours.

Entering a battle against another player will cancel the active shield and it will not be returned once the battle is over.