public abstract class AbstractCharacterFactory
{
    protected IDoActivity behaviour;
    protected AbstractCharacterFactory() { }
    public abstract BaseBehaviour CreateCharacterBehaviour(NPC npc);
}

public class DumbDefenderFactory : AbstractCharacterFactory
{
    public DumbDefenderFactory()
    {
        behaviour = new DumbDefenderBehaviour();
    }

    public override BaseBehaviour CreateCharacterBehaviour(NPC npc)
    {
        return new DumbDefender(npc);
    }
}

public class DumbAttackerFactory : AbstractCharacterFactory
{
    public DumbAttackerFactory()
    {
        behaviour = new DumbAttackerBehaviour();
    }

    public override BaseBehaviour CreateCharacterBehaviour(NPC npc)
    {
        return new DumbAttacker(npc);
    }
}

public class HumanFactory : AbstractCharacterFactory
{
    public HumanFactory()
    {
        behaviour = new HumanBehaviour();
    }

    public override BaseBehaviour CreateCharacterBehaviour(NPC npc)
    {
        return new Human(npc);
    }
}