<commit_before>﻿using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;

public class Diffindo : GenericSpell {

    //private List<GenericCard> SelectedCards;

    public override void OnPlayAction()
    {
        //Move ALL invalid colliders to ignoreraycast layer
        _Player.DisableAllCards();
        _Player._OppositePlayer.DisableAllCards();
        
        //place valid cards in valid layer
        foreach(var card in _Player._OppositePlayer._InPlay.Cards) {
            card.Enable();
            card.gameObject.layer = Helper.VALID_CHOICE_LAYER;
        }

        var SelectedCards = new List<GenericCard>();
        StartCoroutine(WaitForPlayerInput(SelectedCards));
    }

    public override bool MeetsAdditionalPlayRequirements()
    {
        return _Player._OppositePlayer._InPlay.Cards.Count > 0;
    }

    public override void AfterInputAction(List<GenericCard> selectedCards)
    {
        if (selectedCards.Count == 1)
        {
            selectedCards[0].Enable();

            _Player._OppositePlayer._InPlay.Remove(selectedCards[0]);
            _Player._OppositePlayer._Discard.Add(selectedCards[0], 0.1f);

            //reset the layer for all the cards
            _Player._Deck.gameObject.layer = 0;
            _Player._OppositePlayer._Deck.gameObject.layer = 0;

            Helper.EnableCards(_Player._Hand.Cards);
            Helper.EnableCards(_Player._InPlay.Cards);
            Helper.EnableCards(_Player._OppositePlayer._Hand.Cards);
            Helper.EnableCards(_Player._OppositePlayer._InPlay.Cards);<commit_msg>refactor diffindo.cs<commit_after>﻿using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;

public class Diffindo : GenericSpell {

    //private List<GenericCard> SelectedCards;

    public override void OnPlayAction()
    {
        //Move ALL invalid colliders to ignoreraycast layer
        _Player.DisableAllCards();
        _Player._OppositePlayer.DisableAllCards();
        
        //place valid cards in valid layer
        foreach(var card in _Player._OppositePlayer._InPlay.Cards) {
            card.Enable();
            card.gameObject.layer = Helper.VALID_CHOICE_LAYER;
        }

        var SelectedCards = new List<GenericCard>();
        StartCoroutine(WaitForPlayerInput(SelectedCards));
    }

    public override bool MeetsAdditionalPlayRequirements()
    {
        return _Player._OppositePlayer._InPlay.Cards.Count > 0;
    }

    public override void AfterInputAction(List<GenericCard> selectedCards)
    {
        if (selectedCards.Count == 1)
        {
            selectedCards[0].Enable();

            _Player._OppositePlayer._InPlay.Remove(selectedCards[0]);
            _Player._OppositePlayer._Discard.Add(selectedCards[0], 0.1f);

            _Player.EnableAllCards();
            _Player._OppositePlayer.EnableAllCards();
{'fraction_non_alphanumeric': 0.09094052558782849, 'fraction_numerical': 0.005532503457814661, 'mean_word_length': 2.7137355584082155, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '932982', 'n_tokens_mistral': 855, 'n_tokens_neox': 795, 'n_words': 147}