Attack immunity
A number of cards have effects that make you immune to your opponent's Attacks. While there exist other ways of mitigating the impacts of certain attacks, such as trashing incoming junk using Watchtower, cards providing attack immunity completely nullify all types of attack. Such cards are often just called "Moats", in reference to Moat from the base set.
Attack immunity only works against Attack cards if it is in force as the attack is played. In the case of Duration attacks such as Swamp Hag, if your opponent plays their attack before you put attack immunity into effect, you will still suffer the effects of the attack.
Noble Brigand also performs its attack when it is bought. Attack immunity does not block the attack in this case, as buying Noble Brigand is not playing it. Haunted Castle and Ill-Gotten Gains have on-gain effects that similarly cannot be blocked.
Some cards can have effects that can feel like attacks but are not. Examples include Masquerade and Possession. Only cards with the Attack type can be blocked. On the other hand, some Attack cards have beneficial effects in addition to their harmful ones, such as Soothsayer, or effects that are usually harmful that might be beneficial in a specific case (e.g., a discard attack allowing you to discard a Tunnel). Attack immunity blocks all effects of an opponent's Attack card, even if you want to be affected by them.
Attack immunity does not prevent you from using Reaction cards that trigger when an opponent plays an Attack card, such as Diplomat or Horse Traders. That is because these cards are not conditional on you being affected by the attack, merely that an Attack card was played.
List of cards
Gallery