示例#1
0
        public BloodMoor(IGameState gameState, IEngineDataManager dataManager)
        {
            this.gameState  = gameState;
            this.difficulty = gameState.Difficulty;

            levelDetail = dataManager.Levels.First(x => x.LevelName == "Blood Moor");
        }
示例#2
0
 public PlayerInfo(string sName, ePlayerType eType, eDifficulty eDifficulty)
 {
     nID              = PlayerCnt++;
     this.sName       = sName;
     this.eType       = eType;
     this.eDifficulty = eDifficulty;
 }
 public FormSettings()
 {
     m_BoardSize          = eBoardSize.FourFour;
     m_ComputerDifficulty = eDifficulty.Easy;
     m_BoardRows          = k_DefaultBoardRows;
     m_BoardColumns       = k_DefaultBoardColumns;
     InitializeComponent();
     textBoxSecondPlayer.Text = k_ComputerName;
 }
示例#4
0
 void Awake()
 {
     DontDestroyOnLoad(gameObject);
     _turn = 0;
     SetPlayerCount(1);
     _scores = new int[2];
     EventManager.OnGameWon += IncrementScore;
     _soundOn    = true;
     _difficulty = eDifficulty.impossible;
 }
示例#5
0
        //--------------------------------------------------------------------------------------//
        //                              Run Game - Constractur                                  //
        //--------------------------------------------------------------------------------------//
        public OtheloGameLogic(byte i_BoardSize, string i_Player1Name, string i_Player2Name, bool i_IsPlayer2IsComputer, Player.eTeam i_Turn = Player.eTeam.Black, eDifficulty i_Difficulty = eDifficulty.Empty_AgainstHuman)
        {
            const bool v_Player1IsAlwaysNotComputer = false;

            m_Difficulty = i_Difficulty;
            m_Turn       = i_Turn;
            m_GamePanel  = new GamePanel(i_BoardSize);
            m_Player1    = new Player(i_Player1Name, v_Player1IsAlwaysNotComputer, Player.eTeam.Black);
            m_Player2    = new Player(i_Player2Name, i_IsPlayer2IsComputer, Player.eTeam.White);
            initializeChangeTeamPiecesMember();
        }
 public static void ChnageToNextDiff()
 {
     if (s_Difficulty == eDifficulty.easy)
     {
         s_Difficulty = eDifficulty.intermidiate;
     }
     else if (s_Difficulty == eDifficulty.intermidiate)
     {
         s_Difficulty = eDifficulty.hard;
     }
     else
     {
         s_Difficulty = eDifficulty.easy;
     }
 }
示例#7
0
        public void Initialize(string characterName, eHero hero, eSessionType sessionType, eDifficulty difficulty)
        {
            sessionManager = getSessionManager(sessionType);
            sessionManager.Initialize();

            sessionManager.OnSetSeed       += OnSetSeedEvent;
            sessionManager.OnLocatePlayers += OnLocatePlayers;
            sessionManager.OnPlayerInfo    += OnPlayerInfo;
            sessionManager.OnFocusOnPlayer += OnFocusOnPlayer;

            Difficulty = difficulty;

            mapInfo = new List <IMapInfo>();

            sceneManager.ChangeScene(eSceneType.Game);
            sessionManager.JoinGame(characterName, hero);
        }
        public IEnemyTypeDifficultyConfig GetDifficultyConfig(eDifficulty Difficulty)
        {
            switch (Difficulty)
            {
            case eDifficulty.HELL:
                return(HellDifficultyConfig);

            case eDifficulty.NIGHTMARE:
                return(NightmareDifficultyConfig);

            case eDifficulty.NORMAL:
                return(NormalDifficultyConfig);

            default:
                return(NormalDifficultyConfig);
            }
        }
        private void buttonComputerDifficulty_Click(object sender, EventArgs e)
        {
            switch (m_ComputerDifficulty)
            {
            case eDifficulty.Easy:
                buttonComputerDifficulty.Text = "Medium";
                m_ComputerDifficulty          = eDifficulty.Medium;
                break;

            case eDifficulty.Medium:
                buttonComputerDifficulty.Text = "Hard";
                m_ComputerDifficulty          = eDifficulty.Hard;
                break;

            case eDifficulty.Hard:
            default:
                buttonComputerDifficulty.Text = "Easy";
                m_ComputerDifficulty          = eDifficulty.Easy;
                break;
            }
        }
示例#10
0
    public override void OnInteraction(InteractableElement ie, Player p)
    {
        Lever l = ie as Lever;

        if (l != null)
        {
            if (currentDiff == eDifficulty.Easy)
            {
                currentDiff = eDifficulty.Normal;
            }
            else // (currentDiff == eDifficulty.Normal)
            {
                currentDiff = eDifficulty.Easy;
                l.SetState(Lever.eLeverState.Left);
            }

            //OnDifficultyChanged(currentDiff);
            UpdateText();
            OnDifficultyChanged(currentDiff);
        }
    }
示例#11
0
        private void button_Play_Click(object sender, EventArgs e)
        {
            //User input player name:
            m_Player1Name = Player1Name_TextBox.Text;

            //User input board size:
            if (radioButton_6X6.Checked)
            {
                m_BoardSize = eBoardSize.Small;
            }
            else if (radioButton_8X8.Checked)
            {
                m_BoardSize = eBoardSize.Medium;
            }
            else if (radioButton_10X10.Checked)
            {
                m_BoardSize = eBoardSize.Large;
            }

            //User input difficulty
            if (Easy_RadioButton.Checked)
            {
                m_Difficulty = eDifficulty.Easy;
            }
            else if (Medium_RadioButton.Checked)
            {
                m_Difficulty = eDifficulty.Medium;
            }
            else if (Hard_RadioButton.Checked)
            {
                m_Difficulty = eDifficulty.Hard;
            }

            FormClosing -= FormSinglePlayer_FormClosing;
            Close();
        }
示例#12
0
 public void ToggleDifficulty()
 {
     _difficulty = _difficulty == eDifficulty.impossible ? eDifficulty.possible : eDifficulty.impossible;
 }
示例#13
0
        public EnemyState MakeEnemyState(int id, eDifficulty difficulty, Random rand)
        {
            // does not correspond to any particular enemy in the actual data, just for testing
            EnemyTypeConfig config = new EnemyTypeConfig(
                InternalName: "TestEnemy",
                Name: "TestEnemy1",
                Type: "Skeleton",
                Descriptor: "",
                BaseId: 1,
                PopulateId: 1,
                Spawned: true,
                Beta: false,
                Code: "SK",
                ClientOnly: false,
                NoMap: false,
                SizeX: 2,
                SizeY: 2,
                Height: 3,
                NoOverlays: false,
                OverlayHeight: 2,
                Velocity: 3,
                RunVelocity: 6,
                CanStealFrom: false,
                ColdEffect: 50,
                Rarity: true,
                MinimumGrouping: 2,
                MaximumGrouping: 5,
                BaseWeapon: "1hs",
                AIParams: new int[] { 75, 85, 9, 50, 0 },
                Allied: false,
                IsNPC: false,
                IsCritter: false,
                CanEnterTown: false,
                HealthRegen: 80,
                IsDemon: false,
                IsLarge: false,
                IsSmall: false,
                IsFlying: false,
                CanOpenDoors: false,
                SpawningColumn: 0,
                IsBoss: false,
                IsInteractable: false,
                IsKillable: true,
                CanBeConverted: true,
                HitClass: 3,
                HasSpecialEndDeath: false,
                DeadCollision: false,
                CanBeRevivedByOtherMonsters: true,
                AppearanceConfig: new EnemyTypeAppearanceConfig(
                    HasDeathAnimation: true,
                    HasNeutralAnimation: true,
                    HasWalkAnimation: true,
                    HasGetHitAnimation: true,
                    HasAttack1Animation: true,
                    HasAttack2Animation: false,
                    HasBlockAnimation: true,
                    HasCastAnimation: false,
                    HasSkillAnimation: new bool[] { false, false, false, false },
                    HasCorpseAnimation: false,
                    HasKnockbackAnimation: true,
                    HasRunAnimation: true,
                    HasLifeBar: true,
                    HasNameBar: false,
                    CannotBeSelected: false,
                    CanCorpseBeSelected: false,
                    BleedType: 0,
                    HasShadow: true,
                    LightRadius: 0,
                    HasUniqueBossColors: false,
                    CompositeDeath: true,
                    LightRGB: new byte[] { 255, 255, 255 }
                    ),
                CombatConfig: new EnemyTypeCombatConfig(
                    ElementalAttackMode: 4,
                    ElementalAttackType: eDamageTypes.PHYSICAL,
                    ElementalOverlayId: 0,
                    ElementalChance: 0,
                    ElementalMinDamage: 0,
                    ElementalMaxDamage: 0,
                    ElementalDuration: 0,
                    MissileForAttack: new int[] { 0, 0 },
                    MissileForSkill: new int[] { 0, 0, 0, 0, },
                    MissileForCase: 0,
                    MissileForSequence: 0,
                    CanMoveAttack: new bool[] { false, false },
                    CanMoveSkill: new bool[] { false, false, false, false },
                    CanMoveCast: false,
                    IsMelee: true,
                    IsAttackable: true,
                    MeleeRange: 0,
                    SkillType: new int[] { 0, 0, 0, 0 },
                    SkillSequence: new int[] { 0, 0, 0, 0 },
                    SkillLevel: new int[] { 0, 0, 0, 0 },
                    IsUndeadWithPhysicalAttacks: true,
                    IsUndeadWithMagicAttacks: false,
                    UsesMagicAttacks: false,
                    ChanceToBlock: 20,
                    DoesDeathDamage: false,
                    IgnoredBySummons: false
                    ),
                NormalDifficultyConfig: new EnemyTypeDifficultyConfig(
                    Level: 5,
                    DamageResist: 0,
                    MagicResist: 0,
                    FireResist: 0.5,
                    LightResist: 0,
                    ColdResist: 0,
                    PoisonResist: 0,
                    MinHP: 10,
                    MaxHP: 15,
                    AC: 3,
                    Exp: 100,
                    AttackMinDamage: new int[] { 5, 0 },
                    AttackMaxDamage: new int[] { 10, 0 },
                    AttackChanceToHit: new int[] { 35, 0 },
                    Skill1MinDamage: 0,
                    Skill1MaxDamage: 0,
                    Skill1ChanceToHit: 0,
                    TreasureClass: new string[] { "Swarm 1", "Act 2 Champ A", "Act 2 Unique A", "" }
                    ),
                NightmareDifficultyConfig: new EnemyTypeDifficultyConfig(
                    Level: 10,
                    DamageResist: 0,
                    MagicResist: 0,
                    FireResist: 0.5,
                    LightResist: 0.5,
                    ColdResist: 0,
                    PoisonResist: 0,
                    MinHP: 20,
                    MaxHP: 25,
                    AC: 3,
                    Exp: 1000,
                    AttackMinDamage: new int[] { 5, 0 },
                    AttackMaxDamage: new int[] { 10, 0 },
                    AttackChanceToHit: new int[] { 35, 0 },
                    Skill1MinDamage: 0,
                    Skill1MaxDamage: 0,
                    Skill1ChanceToHit: 0,
                    TreasureClass: new string[] { "Swarm 1", "Act 3 Champ A", "Act 3 Unique A", "" }
                    ),
                HellDifficultyConfig: new EnemyTypeDifficultyConfig(
                    Level: 15,
                    DamageResist: 0,
                    MagicResist: 0,
                    FireResist: 0.5,
                    LightResist: 0.5,
                    ColdResist: 0.5,
                    PoisonResist: 0,
                    MinHP: 30,
                    MaxHP: 45,
                    AC: 3,
                    Exp: 10000,
                    AttackMinDamage: new int[] { 5, 0 },
                    AttackMaxDamage: new int[] { 10, 0 },
                    AttackChanceToHit: new int[] { 35, 0 },
                    Skill1MinDamage: 0,
                    Skill1MaxDamage: 0,
                    Skill1ChanceToHit: 0,
                    TreasureClass: new string[] { "Swarm 2", "Act 4 Champ A", "Act 4 Unique A", "" }
                    )
                );

            EnemyState en = new EnemyState("Fallen", id, 0, 0, config, difficulty, rand);

            return(en);
        }
示例#14
0
 public void ToggleDifficulty()
 {
     _difficulty = _difficulty == eDifficulty.impossible ? eDifficulty.possible : eDifficulty.impossible;
 }
示例#15
0
 void Awake()
 {
     DontDestroyOnLoad(gameObject);
     _turn = 0;
     SetPlayerCount(1);
     _scores = new int[2];
     EventManager.OnGameWon += IncrementScore;
     _soundOn = true;
     _difficulty = eDifficulty.impossible;
 }
示例#16
0
 private void DifficultyChanged(eDifficulty newDiff)
 {
     currentPage       = 0;
     currentDifficulty = newDiff;
     UpdateEnigmas();
 }
示例#17
0
        public EnemyState(string name, int id, float x, float y,
                          IEnemyTypeConfig EnemyConfig, eDifficulty Difficulty, Random Rand)
            : base(name, id, 0, 0, x, y)
        {
            this.EnemyConfig = EnemyConfig;
            IEnemyTypeDifficultyConfig difficultyConfig = EnemyConfig.GetDifficultyConfig(Difficulty);

            CreatedDifficulty = Difficulty;

            int maxhp = Rand.Next(difficultyConfig.MinHP, difficultyConfig.MaxHP + 1);

            Health          = new Stat(0, maxhp, maxhp, true);
            ExperienceGiven = difficultyConfig.Exp;
            Level           = difficultyConfig.Level;

            // stats
            AttackRating    = new Stat[2];
            AttackRating[0] = new Stat(0, difficultyConfig.AttackChanceToHit[0], difficultyConfig.AttackChanceToHit[0], false);
            AttackRating[1] = new Stat(0, difficultyConfig.AttackChanceToHit[1], difficultyConfig.AttackChanceToHit[1], false);

            DefenseRating = new Stat(0, EnemyConfig.CombatConfig.ChanceToBlock, EnemyConfig.CombatConfig.ChanceToBlock, false);

            HealthRegen = new Stat(0, EnemyConfig.HealthRegen, EnemyConfig.HealthRegen, true);

            // handle immunities / resistances
            SetResistance(eDamageTypes.COLD, difficultyConfig.ColdResist);
            SetResistance(eDamageTypes.FIRE, difficultyConfig.FireResist);
            SetResistance(eDamageTypes.MAGIC, difficultyConfig.MagicResist);
            SetResistance(eDamageTypes.PHYSICAL, difficultyConfig.DamageResist);
            SetResistance(eDamageTypes.POISON, difficultyConfig.PoisonResist);
            SetResistance(eDamageTypes.LIGHTNING, difficultyConfig.LightningResist);
            // interestingly, monsters don't actually have immunity flags
            // TODO: should we treat a resistance of 1 differently?
            // should a resistance of 1 be an immunity (e.g. the main difference is that
            // effects / debuffs couldn't reduce the resistance below 100%)

            // handle flags
            if (EnemyConfig.IsBoss)
            {
                AddFlag(eMobFlags.BOSS);
            }
            if (EnemyConfig.IsCritter)
            {
                AddFlag(eMobFlags.CRITTER);
            }
            if (EnemyConfig.IsNPC)
            {
                AddFlag(eMobFlags.NPC);
            }
            if (EnemyConfig.IsLarge)
            {
                AddFlag(eMobFlags.LARGE);
            }
            if (EnemyConfig.IsSmall)
            {
                AddFlag(eMobFlags.SMALL);
            }
            if (EnemyConfig.IsInteractable)
            {
                AddFlag(eMobFlags.INTERACTABLE);
            }
            if (!EnemyConfig.IsKillable)
            {
                AddFlag(eMobFlags.INVULNERABLE);
            }
            if (EnemyConfig.IsDemon)
            {
                AddFlag(eMobFlags.DEMON);
            }
            if (EnemyConfig.CombatConfig.IgnoredBySummons)
            {
                AddFlag(eMobFlags.IGNORED_BY_SUMMONS);
            }
            AddFlag(eMobFlags.ENEMY);
        }