Auto-translated
It's simple – if you want to prevent artifacts from being taken from a hero, use SetHeroLootable("HeroName", nil).
If you want to implement a check, use IsHeroLootable("HeroName").
I tried SetHeroLootable, but it didn't work. I have two types of battles that are launched through a script, where the heroes have artifacts. One battle is launched through StartCombat, and the other is SiegeTown. In both cases, when I defeat the heroes, I receive their loot.
Maybe I need to write it in a separate function? Because I just put it in the general map code.