Here is a list of ways I challenge various aspects of my PCs in my DF game, and to a degree in my past fantasy game, too.
I've tried to break them up by category.
- meteoric pins in locks and trap triggers to stop lockpicking spells.
- No Mana Zones to cut down "spells on" and take magic out of an encounter.
- Magic Resistant creatures.
- Low Mana Zones to futz with recovery of FP and casting of spells.
- High-paced fights or successive combats to reduce the ability to recover FP.
- Dispel Magic and Counterspell using foes to directly attack PC spells.
- anti-magic materials and paints to reduce the ability to tunnel through walls and floors.
- meteoric weapons to deal with all-or-nothing defenses like Missile Shield or Blocking spells.
- foes with specifically anti-magical powers that bypass common magic defenses.
- decoy targets to draw false (or useless) positives from Scrying spells.
- Scryguard and Scrywall and Teleport Shield (when not in DF) to counter magic on a specific target or area.
- foe with Missile Shield.
- Homogenous and Unliving and Diffuse foes to counter Implaing and Piercing damage.
- high-Dodge foes.
- foes with shields.
- short-range encounters.
- windy areas.
Melee (especially high-skill, high-damage melee)
- foes with Blocking spells or automatically successful defense-like powers.
- ranged-attack foes.
- flying foes, especially combined with ranged attack.
- physical damage-immune creatures or ones with Supernatural Durability (Achilles' Heel: Damage from spells).
- foes with damaging auras triggered by melee attack or in a tight radius.
- Foes with Fragile (Explosive).
- Foes with Binding vs. weapon attacks.
- Diffuse foes, especially with unparryable attacks - Swarms!
- Insubstantial foes.
- bad footing and or dangerous footing.
- specific weapon immunities.
- places you can only reach by crawling or crouching, coupled with melee foes.
- Foes lacking weak points.
- Foes with tiny, tiny weak points.
- Foes who can ignore Feints, Deceptive Attacks, etc. (Berserkers, generally)
- Darkness, Bad Footing, etc.
- Invisible foes.
- Armor piercing weapons.
- Cosmic (Ignores DR) damage.
- Electrical attacks.
- Attacks with armor-ignoring followups.
- Very high damage attacks.
- Corrosion attacks.
- Rust monsters!
- Skilled foes who can Feint or Deceptive Attack.
- Cosmic (No defenses) attacks.
- Area attacks.
- Surprise attacks from behind.
- Invisible foes.
Other (catch all for other challenges)
- obstacles you can only pass singly (ropes to climb, narrow tunnels to crawl down, etc.)
- especially difficult to spot traps, even as far as invisible ones unspottable without magic.
- especially difficult to disarm/open traps/locks.
- thick doors (often metal) and thick walls to make forcing/smashing less attractive.
- puzzles that challenge the character and player.
I'm sure there are others, but that's a good list of things I've done to challenge the players and their PCs.
Why do these things?
Because with great power comes great challenges. Magic is a universal tool, but it doesn't mean it needs to be all powerful. Omnicompetent wizards are fine as long as they aren't omnipotent.
I also see all of these as logical results of the existence of these powers. In a world where people can turn invisible and wave a hand at your locks and open them, you'll want to have No Mana Zones and anti-magic locks to foil that, just like you'll have especially difficult locks to open to foil mundane lockpickers. You'll have anti-air defenses to counter flying creatures. You'll have armor-piercing weapons in a world were people can armor up beyond a reasonable chance of being hurt.
I deploy these even when the aspect they are meant to counter is lacking. So even if the party wizard doesn't have Lockmaster there are safeguards against it in some places. Even if the wizard doesn't have scrying spells there are lots of Scryguards and Scrywalls up. Even if the party doesn't have anyone with Flight there are low-ceiling areas to stop flying. All of these things would logically foil existing powers, so they exist and get used, where appropriate. The more secure the place, the tougher the foe, the more well-guarded the treasure, the more of these challenges will show up.
People still get to use their cool powers, and revel in the fun of having them. The knights still get to wade through high-damage attacks and cut down massive monsters that shrug off lesser warriors or bash doors down. The mages get to detect treasure and create whirlwinds and set rooms aflame with magic. The scouts still get hordes of creatures flying or at range so they can show off their bow skills. You really do get to play with your toys. But that doesn't mean the world bends over backwards for you; having those cool abilities and high levels of skill means you also get to face the challenges that would stymie a lesser adventurer. And sometimes you get counters that shut you down completely, and force you (the player, and the PC) to find another way around the problem.
These don't come up all at once.
That probably needs to be said. I use these in different combinations, singly, and in varying frequency. Many foes, areas, doors, locks, tunnels, etc. lack any and all of these features.
Not All Challenges Are Equal
This is important.
Some of these - No Mana Zones, ranged attack flyers vs. melee fighters, homogenous high-DR foes vs. archers, etc. - are total shutdowns. The PC that is shut down needs to find something else to do, because their main power is basically gone. This is the peak of challenge levels.
Others are just making your job harder, and if you succeed, making you seem more often. They can also allow others to step up and show some teamwork, make you pull out backup skills, or make the player come up with something really clever to overcome.
Short version: Most of the time you can showcase your main abilities. Maybe 1/5 to 1/4 of the time, you can't. Some fraction of that time, you can't even use them. And this is part of the fun.