Checking a List

I have two scripts. One called “BaseMonster” and another called “MonstersMoves”. Both are attached the to prefab for the monster. I’m trying to have “MonstersMoves” read “BaseMonster” and dig into a List inside the “BaseMonster” script. It needs to see if that List already contains a move and if it does NOT, and the “Level” variable that’s also in “BaseMonster” is a certain level then add the move to the list. (The moves are scrips themselves. What I’m resulting in…is that it just keeps adding the move to the list non-stop. What am I doing wrong? The C# code below is from the “MonstersMoves” script.

	public List<BaseMove> moves;

	void Awake(){
		moves = gameObject.GetComponent<BaseMonster>().monstersMoves;
	}

	void Update(){
		SetupMoves(gameObject.GetComponent<BaseMonster>().Level);
	}

	private void SetupMoves(int level){
		if(level == 1 && !moves.Contains(new Scratch())){
			moves.Add(new Scratch());
		}

Solved it myself. The problem was that I was checking the List for a NEW instance Scratch each time. By adding an instance of Scratch at the beginning as a variable, I solved the problem.

public List<BaseMove> moves;
public int level;
public Scratch scratch = new Scratch();
 
    void Awake(){
        moves = gameObject.GetComponent<BaseMonster>().monstersMoves;
        level = gameObject.GetComponent<BaseMonster>().Level;
    }
 
    void Update(){
        SetupMoves(level);
    }
 
    private void SetupMoves(int level){
        if(level >= 1 && !moves.Contains(scratch)){
            moves.Add(scratch);
        }
}