<commit_before>﻿using System.Collections.Generic;
using System.Linq;
using HarryPotterUnity.Enums;

namespace HarryPotterUnity.Cards.Transfiguration.Items
{
    public class PhilosophersStone : BaseItem
    {
        public override bool CanPerformInPlayAction()
        {
            return Player.CanUseActions(2) && Player.IsLocalPlayer;
        }

        //TODO: Test This
        public override void OnInPlayAction(List<BaseCard> targets = null)
        {
            var allCards = Player.Discard.NonHealingCards;

            var lessons = allCards.Where(c => c.Type == Type.Lesson);
            var other = allCards.Where(c => c.Type != Type.Lesson);
            
            Player.InPlay.AddAll(lessons);
            Player.Deck.AddAll(other);<commit_msg>fix Philosopher's stone not exiting play on use<commit_after>﻿using System.Collections.Generic;
using System.Linq;
using HarryPotterUnity.Enums;

namespace HarryPotterUnity.Cards.Transfiguration.Items
{
    public class PhilosophersStone : BaseItem
    {
        public override bool CanPerformInPlayAction()
        {
            return Player.CanUseActions(2) && Player.IsLocalPlayer;
        }

        //TODO: Test This
        public override void OnInPlayAction(List<BaseCard> targets = null)
        {
            Player.Discard.Add(this);

            var allCards = Player.Discard.NonHealingCards;

            var lessons = allCards.Where(c => c.Type == Type.Lesson);
            var other = allCards.Where(c => c.Type != Type.Lesson);
            
            Player.InPlay.AddAll(lessons);
            Player.Deck.AddAll(other);
{'fraction_non_alphanumeric': 0.09458618543870566, 'fraction_numerical': 0.0012445550715619166, 'mean_word_length': 2.406779661016949, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '7394952', 'n_tokens_mistral': 475, 'n_tokens_neox': 458, 'n_words': 93}