<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using GGJ_2014.Levels;
using Microsoft.Xna.Framework.Input;
using GGJ_2014.Graphics;
using GGJ_2014.MenuSystemNS;

namespace GGJ_2014.Creatures
{
    class Player
        : Person
    {
        public const int EGG_TREE_VALUE = 5;
        public const int GOLDEN_EGG_VALUE = 10000;

        public const int INTERACT_LONG_LENGTH = 32;
        public const int INTERACT_SHORT_LENGTH = 16;

        public const float TREE_STRNGTH_VALUE = 0.002f;
        public const float TREE_COMPATION_VALUE = -0.00007f;

        public const int IDENTIFIER_POSITION_X = 10;
        public const int IDENTIFIER_POSITION_Y = 480;

        public static float Strength;
        public static float Compassion;
        public static float Luck;
        public static int Eggs;
        public static int Health;

        private Rectangle interactRectangle;
        private Interactable lastInteractor;
        private bool isInteracting = false;//When spacebar it hit
        private float numberOfTreesChopedThisTick = 0;
        private MenuBorderedTextItem interactIdentifier;

        public static bool PureEvil;

        public Player(Texture2D texture, Vector2 position)
            : base(texture, position)
        {
            interactRectangle = new Rectangle(0, 0, INTERACT_LONG_LENGTH, INTERACT_SHORT_LENGTH);
            SyncInteractCollider();
            Health = 100;
        }

        public override void HandleInput(KeyboardState keyState)
        {
            Direction direction = 0;
            direction = (keyState.IsKeyDown(Keys.W) || keyState.IsKeyDown(Keys.Up)) ? Direction.NORTH : direction;
            direction = (keyState.IsKeyDown(Keys.S) || keyState.IsKeyDown(Keys.Down)) ? Direction.SOUTH : direction;
            direction = (keyState.IsKeyDown(Keys.A) || keyState.IsKeyDown(Keys.Left)) ? Direction.WEST : direction;
            direction = (keyState.IsKeyDown(Keys.D) || keyState.IsKeyDown(Keys.Right)) ? Direction.EAST : direction;
            Walk(direction);

            isInteracting = keyState.IsKeyDown(Keys.Space);
            if (isInteracting)
            {
                UseObject();
            }
        }

        public override void Update(GameTime gameTime)
        {
            numberOfTreesChopedThisTick = Math.Max(numberOfTreesChopedThisTick - Strength / 8, 0);
            for (int i = 0; i < Level.GetInstance().EggList.Count; ++i)
            {
                if (Level.GetInstance().EggList[i].CanPickUpEgg && this.collisionBox.Intersects(Level.GetInstance().EggList[i].GetCollisionBox()))
                {
                    Health = Math.Min(Health += 1, PureEvil ? 250 : 100);
                    Eggs += Level.GetInstance().EggList[i].EggsGiven;
                    Level.GetInstance().EggList.RemoveAt(i);
                    --i;
                }
            }
            base.Update(gameTime);
            CheckForInteraction();


            if (Eggs >= 100000)
            {
                Console.WriteLine("WIN!");
                MenuSystem.GetInstance().SwitchToMenuScreenOfType(MenuScreenType.WIN_MENU);
            }
            if (Health < 1)
            {
                MenuSystem.GetInstance().SwitchToMenuScreenOfType(MenuScreenType.LOSE_MENU);
            }

            if (!PureEvil)
            {
                PureEvil = Compassion < -35.0f;

                if (PureEvil)
                {
                    Eggs += 20000;
                    Health +=(int)(Health*2.5);
                     MenuSystem.GetInstance()
                            .GetMenuScreenOfType(MenuScreenType.GAMEPLAY)
                            .AddControl(
                            new MenuBorderedTextItem(
                                new Vector2(Game1.POPUP_DISPLAY_POSITION_X, Game1.POPUP_DISPLAY_POSITION_Y),
                                Color.SpringGreen,
                                string.Format("You have a Compassion of {0:00}! You are pure evil!\n20000 Eggs Gained!\nHealth Regenerated to 250%", Compassion),
                                5.0f));
                    
                }

            }
<commit_msg>Updated Eggs needed to one million<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using GGJ_2014.Levels;
using Microsoft.Xna.Framework.Input;
using GGJ_2014.Graphics;
using GGJ_2014.MenuSystemNS;

namespace GGJ_2014.Creatures
{
    class Player
        : Person
    {
        public const int EGG_TREE_VALUE = 5;
        public const int GOLDEN_EGG_VALUE = 10000;

        public const int INTERACT_LONG_LENGTH = 32;
        public const int INTERACT_SHORT_LENGTH = 16;

        public const float TREE_STRNGTH_VALUE = 0.002f;
        public const float TREE_COMPATION_VALUE = -0.00007f;

        public const int IDENTIFIER_POSITION_X = 10;
        public const int IDENTIFIER_POSITION_Y = 480;

        public static float Strength;
        public static float Compassion;
        public static float Luck;
        public static int Eggs;
        public static int Health;

        private Rectangle interactRectangle;
        private Interactable lastInteractor;
        private bool isInteracting = false;//When spacebar it hit
        private float numberOfTreesChopedThisTick = 0;
        private MenuBorderedTextItem interactIdentifier;

        public static bool PureEvil;

        public Player(Texture2D texture, Vector2 position)
            : base(texture, position)
        {
            interactRectangle = new Rectangle(0, 0, INTERACT_LONG_LENGTH, INTERACT_SHORT_LENGTH);
            SyncInteractCollider();
            Health = 100;
        }

        public override void HandleInput(KeyboardState keyState)
        {
            Direction direction = 0;
            direction = (keyState.IsKeyDown(Keys.W) || keyState.IsKeyDown(Keys.Up)) ? Direction.NORTH : direction;
            direction = (keyState.IsKeyDown(Keys.S) || keyState.IsKeyDown(Keys.Down)) ? Direction.SOUTH : direction;
            direction = (keyState.IsKeyDown(Keys.A) || keyState.IsKeyDown(Keys.Left)) ? Direction.WEST : direction;
            direction = (keyState.IsKeyDown(Keys.D) || keyState.IsKeyDown(Keys.Right)) ? Direction.EAST : direction;
            Walk(direction);

            isInteracting = keyState.IsKeyDown(Keys.Space);
            if (isInteracting)
            {
                UseObject();
            }
        }

        public override void Update(GameTime gameTime)
        {
            numberOfTreesChopedThisTick = Math.Max(numberOfTreesChopedThisTick - Strength / 8, 0);
            for (int i = 0; i < Level.GetInstance().EggList.Count; ++i)
            {
                if (Level.GetInstance().EggList[i].CanPickUpEgg && this.collisionBox.Intersects(Level.GetInstance().EggList[i].GetCollisionBox()))
                {
                    Health = Math.Min(Health += 1, PureEvil ? 250 : 100);
                    Eggs += Level.GetInstance().EggList[i].EggsGiven;
                    Level.GetInstance().EggList.RemoveAt(i);
                    --i;
                }
            }
            base.Update(gameTime);
            CheckForInteraction();


            if (Eggs >= 1000000)
            {
                Console.WriteLine("WIN!");
                MenuSystem.GetInstance().SwitchToMenuScreenOfType(MenuScreenType.WIN_MENU);
            }
            if (Health < 1)
            {
                MenuSystem.GetInstance().SwitchToMenuScreenOfType(MenuScreenType.LOSE_MENU);
            }

            if (!PureEvil)
            {
                PureEvil = Compassion < -100.0f;

                if (PureEvil)
                {
                    Eggs += 250000;
                    Health +=(int)(Health*2.5);
                     MenuSystem.GetInstance()
                            .GetMenuScreenOfType(MenuScreenType.GAMEPLAY)
                            .AddControl(
                            new MenuBorderedTextItem(
                                new Vector2(Game1.POPUP_DISPLAY_POSITION_X, Game1.POPUP_DISPLAY_POSITION_Y),
                                Color.SpringGreen,
                                string.Format("You have a Compassion of {0:00}! You are pure evil!\n20000 Eggs Gained!\nHealth Regenerated to 250%", Compassion),
                                5.0f));
                    
                }

            }

{'fraction_non_alphanumeric': 0.0853544776119403, 'fraction_numerical': 0.022038246268656716, 'mean_word_length': 1.7793259883344135, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '405494', 'n_tokens_mistral': 2579, 'n_tokens_neox': 2320, 'n_words': 479}