If your talking about the Dark Savior, it's quite simple. Build your base near a goldmine. The Dark Savior can't open doors, and each goldmine is surrounded by walls and a door (except the top right and bottom right goldmines, they're under a different category, ad i wouldn't go there if your new)
So build your base by one of the goldmines, incise the walls. Dark Savior can't open doors, so as long as you close the door behind you, (If your melee, just train someone at your base to close it behind you) and voila, Dark Savior wont attack your base. cant do anything about him running around without killing him though...well theirs ways, but meh, just stick with building inside a walled goldmine and you'll be fine.