pytemon 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. pytemon-0.1.0/LICENSE +21 -0
  2. pytemon-0.1.0/PKG-INFO +74 -0
  3. pytemon-0.1.0/README.md +46 -0
  4. pytemon-0.1.0/pyproject.toml +118 -0
  5. pytemon-0.1.0/pytemon/__init__.py +6 -0
  6. pytemon-0.1.0/pytemon/battle/__init__.py +0 -0
  7. pytemon-0.1.0/pytemon/battle/battle_actions.py +1161 -0
  8. pytemon-0.1.0/pytemon/battle/battle_ui.py +324 -0
  9. pytemon-0.1.0/pytemon/buildings.py +1362 -0
  10. pytemon-0.1.0/pytemon/cheat_commands.py +761 -0
  11. pytemon-0.1.0/pytemon/data/__init__.py +73 -0
  12. pytemon-0.1.0/pytemon/data/move_data.py +1684 -0
  13. pytemon-0.1.0/pytemon/data/pokemon_data.py +1391 -0
  14. pytemon-0.1.0/pytemon/data/trainer_data.py +1214 -0
  15. pytemon-0.1.0/pytemon/data/type_chart.py +83 -0
  16. pytemon-0.1.0/pytemon/engine/__init__.py +5 -0
  17. pytemon-0.1.0/pytemon/engine/battle_engine.py +889 -0
  18. pytemon-0.1.0/pytemon/evolution.py +237 -0
  19. pytemon-0.1.0/pytemon/exploration.py +764 -0
  20. pytemon-0.1.0/pytemon/fishing.py +208 -0
  21. pytemon-0.1.0/pytemon/game_state.py +366 -0
  22. pytemon-0.1.0/pytemon/gym_system.py +615 -0
  23. pytemon-0.1.0/pytemon/hm_tm_system.py +431 -0
  24. pytemon-0.1.0/pytemon/items.py +766 -0
  25. pytemon-0.1.0/pytemon/locations.py +545 -0
  26. pytemon-0.1.0/pytemon/models.py +169 -0
  27. pytemon-0.1.0/pytemon/pc_system.py +340 -0
  28. pytemon-0.1.0/pytemon/pokedex.py +494 -0
  29. pytemon-0.1.0/pytemon/stats.py +231 -0
  30. pytemon-0.1.0/pytemon/terminal.py +1594 -0
  31. pytemon-0.1.0/pytemon/terminal.tcss +1351 -0
  32. pytemon-0.1.0/pytemon/ui/__init__.py +0 -0
  33. pytemon-0.1.0/pytemon/ui/battle_mixin.py +761 -0
  34. pytemon-0.1.0/pytemon/ui/building_mixin.py +640 -0
  35. pytemon-0.1.0/pytemon/ui/displays.py +1046 -0
  36. pytemon-0.1.0/pytemon/ui/formatters.py +123 -0
  37. pytemon-0.1.0/pytemon/ui/game_flow_mixin.py +438 -0
  38. pytemon-0.1.0/pytemon/ui/menus.py +643 -0
  39. pytemon-0.1.0/pytemon/ui/panel_mixin.py +965 -0
  40. pytemon-0.1.0/pytemon/ui/text_animation.py +93 -0
pytemon-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark Moberts
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pytemon-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.1
2
+ Name: pytemon
3
+ Version: 0.1.0
4
+ Summary: Interactive Pokemon game library for the terminal, built with Textual TUI
5
+ Home-page: https://github.com/MobyNL/pytemon
6
+ License: MIT
7
+ Keywords: pokemon,game,tui,terminal,textual,interactive
8
+ Author: Mark Moberts
9
+ Author-email: markmoberts@gmail.com
10
+ Requires-Python: >=3.9,<4.0
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Games/Entertainment :: Role-Playing
22
+ Classifier: Topic :: Terminals
23
+ Requires-Dist: rich (>=13.7.0,<14.0.0)
24
+ Requires-Dist: textual (>=0.73.0,<0.74.0)
25
+ Project-URL: Repository, https://github.com/MobyNL/pytemon
26
+ Description-Content-Type: text/markdown
27
+
28
+ # pytemon
29
+
30
+ Python Pokemon game library with interactive terminal UI.
31
+
32
+ ## Overview
33
+
34
+ `pytemon` is a pure Python library that implements an interactive Pokemon game using the [Textual](https://textual.textualize.io/) TUI framework. It contains the full game engine — exploration, battles, items, gyms, evolution, and a rich terminal interface.
35
+
36
+ The [rf-pytemon](../rf-pytemon/) sibling project wraps this library as a Robot Framework keyword library.
37
+
38
+ ## Setup
39
+
40
+ ```bash
41
+ cd pytemon/
42
+ poetry install
43
+ ```
44
+
45
+ ## Run the game directly
46
+
47
+ ```bash
48
+ poetry run python run_terminal.py
49
+ ```
50
+
51
+ ## Run unit tests
52
+
53
+ ```bash
54
+ poetry run pytest tests/ --tb=short -v --cov=pytemon --cov-report=term-missing
55
+ ```
56
+
57
+ ## Project structure
58
+
59
+ ```
60
+ pytemon/
61
+ ├── pytemon/ # The Python package
62
+ │ ├── terminal.py # Textual TUI app
63
+ │ ├── game_state.py # Central game state
64
+ │ ├── exploration.py # Movement and encounters
65
+ │ ├── buildings.py # Pokemon Center, Pokemart, etc.
66
+ │ ├── battle/ # Battle UI and actions
67
+ │ ├── data/ # Pokemon, move, trainer data
68
+ │ ├── engine/ # Core battle engine
69
+ │ └── ui/ # TUI mixin modules
70
+ ├── tests/ # Pytest unit tests
71
+ ├── run_terminal.py # Direct launcher
72
+ └── pyproject.toml
73
+ ```
74
+
@@ -0,0 +1,46 @@
1
+ # pytemon
2
+
3
+ Python Pokemon game library with interactive terminal UI.
4
+
5
+ ## Overview
6
+
7
+ `pytemon` is a pure Python library that implements an interactive Pokemon game using the [Textual](https://textual.textualize.io/) TUI framework. It contains the full game engine — exploration, battles, items, gyms, evolution, and a rich terminal interface.
8
+
9
+ The [rf-pytemon](../rf-pytemon/) sibling project wraps this library as a Robot Framework keyword library.
10
+
11
+ ## Setup
12
+
13
+ ```bash
14
+ cd pytemon/
15
+ poetry install
16
+ ```
17
+
18
+ ## Run the game directly
19
+
20
+ ```bash
21
+ poetry run python run_terminal.py
22
+ ```
23
+
24
+ ## Run unit tests
25
+
26
+ ```bash
27
+ poetry run pytest tests/ --tb=short -v --cov=pytemon --cov-report=term-missing
28
+ ```
29
+
30
+ ## Project structure
31
+
32
+ ```
33
+ pytemon/
34
+ ├── pytemon/ # The Python package
35
+ │ ├── terminal.py # Textual TUI app
36
+ │ ├── game_state.py # Central game state
37
+ │ ├── exploration.py # Movement and encounters
38
+ │ ├── buildings.py # Pokemon Center, Pokemart, etc.
39
+ │ ├── battle/ # Battle UI and actions
40
+ │ ├── data/ # Pokemon, move, trainer data
41
+ │ ├── engine/ # Core battle engine
42
+ │ └── ui/ # TUI mixin modules
43
+ ├── tests/ # Pytest unit tests
44
+ ├── run_terminal.py # Direct launcher
45
+ └── pyproject.toml
46
+ ```
@@ -0,0 +1,118 @@
1
+ [tool.poetry]
2
+ name = "pytemon"
3
+ version = "0.1.0"
4
+ description = "Interactive Pokemon game library for the terminal, built with Textual TUI"
5
+ authors = ["Mark Moberts <markmoberts@gmail.com>"]
6
+ license = "MIT"
7
+ readme = "README.md"
8
+ homepage = "https://github.com/MobyNL/pytemon"
9
+ repository = "https://github.com/MobyNL/pytemon"
10
+ keywords = ["pokemon", "game", "tui", "terminal", "textual", "interactive"]
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Environment :: Console",
14
+ "Intended Audience :: Developers",
15
+ "Intended Audience :: End Users/Desktop",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.9",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Topic :: Games/Entertainment :: Role-Playing",
23
+ "Topic :: Terminals",
24
+ ]
25
+ packages = [{include = "pytemon"}]
26
+
27
+ [tool.poetry.dependencies]
28
+ python = "^3.9"
29
+ textual = "^0.73.0"
30
+ rich = "^13.7.0"
31
+
32
+ [tool.poetry.group.dev.dependencies]
33
+ pytest = "^8.0"
34
+ pytest-cov = "^7.0"
35
+ ruff = "^0.4"
36
+ mypy = "^1.10"
37
+ pytest-asyncio = ">=0.23,<1.0"
38
+
39
+ [build-system]
40
+ requires = ["poetry-core"]
41
+ build-backend = "poetry.core.masonry.api"
42
+
43
+ # ---------------------------------------------------------------------------
44
+ # Pytest
45
+ # ---------------------------------------------------------------------------
46
+ [tool.pytest.ini_options]
47
+ testpaths = ["tests"]
48
+ python_files = ["test_*.py"]
49
+ python_classes = ["Test*"]
50
+ python_functions = ["test_*"]
51
+ asyncio_mode = "auto"
52
+ addopts = [
53
+ "--tb=short",
54
+ "--strict-markers",
55
+ "-v",
56
+ ]
57
+
58
+ # ---------------------------------------------------------------------------
59
+ # Ruff — linting + formatting
60
+ # ---------------------------------------------------------------------------
61
+ [tool.ruff]
62
+ target-version = "py39"
63
+ line-length = 100
64
+ src = ["pytemon", "tests"]
65
+
66
+ [tool.ruff.lint]
67
+ select = [
68
+ "E", # pycodestyle errors
69
+ "W", # pycodestyle warnings
70
+ "F", # pyflakes
71
+ "I", # isort
72
+ "B", # flake8-bugbear
73
+ "UP", # pyupgrade
74
+ "N", # pep8-naming
75
+ "C4", # flake8-comprehensions
76
+ "RUF", # ruff-specific rules
77
+ ]
78
+ ignore = [
79
+ "E501", # line too long (handled by formatter)
80
+ "B008", # do not perform function calls in default arguments
81
+ "RUF012", # mutable class attributes (common in game code)
82
+ "UP006", # use `list` instead of `List` — kept for Python 3.8 compat
83
+ "UP007", # use `X | Y` for union type — kept for Python 3.8 compat
84
+ "UP035", # import from `typing` — kept for Python 3.8 compat
85
+ ]
86
+
87
+ [tool.ruff.lint.isort]
88
+ known-first-party = ["pytemon"]
89
+
90
+ [tool.ruff.format]
91
+ quote-style = "double"
92
+ indent-style = "space"
93
+
94
+ # ---------------------------------------------------------------------------
95
+ # Mypy — static type checking
96
+ # ---------------------------------------------------------------------------
97
+ [tool.mypy]
98
+ python_version = "3.9"
99
+ warn_return_any = true
100
+ warn_unused_configs = true
101
+ ignore_missing_imports = true
102
+
103
+ # ---------------------------------------------------------------------------
104
+ # Coverage
105
+ # ---------------------------------------------------------------------------
106
+ [tool.coverage.run]
107
+ source = ["pytemon"]
108
+ omit = [
109
+ "pytemon/terminal.py",
110
+ "pytemon/ui/text_animation.py",
111
+ ]
112
+
113
+ [tool.coverage.report]
114
+ exclude_lines = [
115
+ "pragma: no cover",
116
+ "def __repr__",
117
+ "if TYPE_CHECKING:",
118
+ ]
@@ -0,0 +1,6 @@
1
+ """pytemon — Python Pokemon game library."""
2
+
3
+ from .game_state import GameState
4
+
5
+ __version__ = "0.1.0"
6
+ __all__ = ["GameState"]
File without changes