private bool TryMove(int newX, int newY, World world, bool teleport = false) { if (!world.ValidBlock(newX, newY)) return false; Tuple<int, int> acres = world.ConvertToAcre(newX, newY); ExplorerConstants.Items.IDS newBlockItem = world.GetTopObject(newX, newY); ItemBlueprint newBlockInfo = ExplorerConstants.Items.AllBlueprints[newBlockItem]; //First, go ahead and just get the item if we have autopickup turned on if (newBlockInfo.CanAutoPickup && GetOption(PlayerOptions.Autopickup) && !world.InLockedArea(LockID, acres.Item1, acres.Item2) && newBlockInfo.StaminaRequired <= stamina && world.PickupObject(newX, newY)) { GetItem(newBlockItem); } //If we still can't occupy the space, we need to stop if (!world.PlayerCanPass(newX, newY) && !(newBlockItem == ExplorerConstants.Items.IDS.Gate && world.GetOwner(acres.Item1, acres.Item2) == playerID)) return false; if (!teleport && stamina < newBlockInfo.StaminaRequired) return false; BlockX = newX; BlockY = newY; //Assume we moved one space if (!teleport) { stepsTaken++; EquippedSteps++; stamina -= newBlockInfo.StaminaRequired; } if(world.SetExplorer(playerID, acres.Item1, acres.Item2)) score+=ExplorerConstants.Player.ExploreScore; return true; }