Exemple #1
0
        public void NonPlayerTargeter_GetTargetForNonPlayer_PlayerInRangeButNotInFov_DoesNotCallBack()
        {
            var playerLocation = new MapCoordinate(MAP_KEY, 0, 5);

            SetPosition(_player, playerLocation);
            _data.Range = 9;
            FovIs(new MapCoordinate("test", 4, 4));

            NonPlayerTargeter.GetTargetForNonPlayer(_systemContainer, _sender, _data, _callback);

            _callbackCoordinate.Should().BeEquivalentTo(UNUSED);
        }
Exemple #2
0
        public void NonPlayerTargeter_GetTargetForNonPlayer_FriendlySkill_TargetsSelfAndNotPlayer()
        {
            var playerLocation = new MapCoordinate(MAP_KEY, 0, 5);

            SetPosition(_player, playerLocation);
            _data.Range    = 9;
            _data.Friendly = true;
            FovIs(new MapCoordinate("test", 0, 5), _senderLocation);

            NonPlayerTargeter.GetTargetForNonPlayer(_systemContainer, _sender, _data, _callback);

            _callbackCoordinate.Should().BeEquivalentTo(_senderLocation);
        }
Exemple #3
0
        public void NonPlayerTargeter_GetTargetForNonPlayer_MeleeRange_HostileAndPlayerNotInRange_DoesNotCallBack()
        {
            var playerLocation = new MapCoordinate(MAP_KEY, 0, 2);

            SetPosition(_player, playerLocation);

            _data.Range = 0;

            FovIs(playerLocation);

            NonPlayerTargeter.GetTargetForNonPlayer(_systemContainer, _sender, _data, _callback);

            _callbackCoordinate.Should().BeEquivalentTo(UNUSED);
        }
Exemple #4
0
        public void NonPlayerTargeter_GetTargetForNonPlayer_MeleeRangeSkill_HostileAndPlayerInMelee_TargetsPlayer()
        {
            SetTargetableCells(
                new MapCoordinate(MAP_KEY, 0, 0),
                new MapCoordinate(MAP_KEY, 0, 1)
                );

            var playerLocation = new MapCoordinate(MAP_KEY, 0, 1);

            SetPosition(_player, playerLocation);
            _data.Range = 0;
            FovIs(new MapCoordinate("test", 0, 1));

            NonPlayerTargeter.GetTargetForNonPlayer(_systemContainer, _sender, _data, _callback);

            _callbackCoordinate.Should().BeEquivalentTo(playerLocation);
        }