ee915bd7c1
Add a doc string and a terminal newline
2022-05-12 20:40:40 -07:00
ce63c825b0
Move all the logging to log.py and prefix all the log names with "erynrl"
2022-05-12 20:40:15 -07:00
5d4e0cff3d
Rename the launch config
2022-05-12 20:29:44 -07:00
f6fe9d0f09
Move the roguebasin package to erynrl
2022-05-12 09:05:27 -07:00
cc6c701c59
Move first steps scripts to their own directory
2022-05-12 09:02:53 -07:00
1244c97493
Move the VS Code workspace to LYARLFGG
2022-05-12 09:02:15 -07:00
0e917ac111
Move the ai log config to ERROR level
2022-05-12 08:59:36 -07:00
7a5f131973
Log AI for entities that are visible to the hero to the ai
logger
2022-05-12 08:59:24 -07:00
95cc3034b8
Clean up unused imports in ai.py
2022-05-12 08:58:51 -07:00
da3d30872b
Add logging action handling in a tree-like fashion
...
These logs are available in the actions.tree logger. They'll print a helpful
list of actions and their results in a tree-like way.
For example:
```
2022-05-12 08:57:57 actions.tree: Processing Hero Actions
2022-05-12 08:57:57 actions.tree: |-> @[(x:4, y:6)][30/30]
2022-05-12 08:57:57 actions.tree: | |-> BumpAction toward (δx:-1, δy:1) by @[(x:4, y:6)][30/30] => success=False done=False alternate=WalkAction[@]
2022-05-12 08:57:57 actions.tree: | `-> WalkAction toward (δx:-1, δy:1) by @[(x:3, y:7)][30/30] => success=True done=True alternate=None
2022-05-12 08:57:57 actions.tree: Processing Entity Actions
2022-05-12 08:57:57 actions.tree: |-> Orc with 10/10 hp at (x:4, y:5)
2022-05-12 08:57:57 actions.tree: | |-> BumpAction toward (δx:-1, δy:1) by Orc with 10/10 hp at (x:4, y:5) => success=False done=False alternate=WalkAction[o]
2022-05-12 08:57:57 actions.tree: | `-> WalkAction toward (δx:-1, δy:1) by Orc with 10/10 hp at (x:3, y:6) => success=True done=True alternate=None
2022-05-12 08:57:57 actions.tree: |-> Orc with 10/10 hp at (x:5, y:5)
2022-05-12 08:57:57 actions.tree: | |-> BumpAction toward (δx:-1, δy:1) by Orc with 10/10 hp at (x:5, y:5) => success=False done=False alternate=WalkAction[o]
2022-05-12 08:57:57 actions.tree: | `-> WalkAction toward (δx:-1, δy:1) by Orc with 10/10 hp at (x:4, y:6) => success=True done=True alternate=None
```
2022-05-12 08:56:15 -07:00
d236b827cd
Move most of the basic actions logs to debug (probably just for now)
2022-05-12 08:55:22 -07:00
4084d98efd
Clean up Action processing a little bit
...
- Sort entities by their Euclidean distance to the hero so actions from entities
near the hero are processed first
- Fewer local variables for cleaner reading
- Pass hero into the RegerateRoomsAction, which was causing a pylint error
2022-05-12 08:53:26 -07:00
70c17b6235
Condense the declaration of engine.hero; add a FIXME
2022-05-12 08:49:46 -07:00
e4f8aa5e80
Clean up the __str__ for a few Action subclasses
2022-05-12 08:48:28 -07:00
6f1d68db20
Update the logging config
2022-05-12 08:46:59 -07:00
e9db004a7a
Add Point.euclidean_distance_to()
...
Does what it says on the tin.
2022-05-12 08:46:45 -07:00
99ca090448
Remove a newline
2022-05-11 08:08:47 -07:00
a4adbcca85
Add RenderOrder to Entity
...
This enum dictates what order an entity
will be rendered in.
2022-05-11 07:59:54 -07:00
7820adf057
Generate entities in rooms at different locations
...
Prior to this change, entities in rooms would always be spawned on the
same tile.
2022-05-11 07:57:28 -07:00
c9b86271d3
Remove these two logging messages
...
They aren't serving a good purpose.
2022-05-11 07:55:47 -07:00
2762933c83
Configure logging with logging_config.json
...
See https://docs.python.org/3/library/logging.config.html for details on
the schema for this file.
2022-05-11 07:52:35 -07:00
8849a9de73
Allow 'hp' as a valid variable name
2022-05-11 07:50:35 -07:00
bc46856117
Every action needs an actor, even ExitAction
2022-05-08 23:45:20 -07:00
17bad9fd4d
Don't try to Melee entities that don't block movement
2022-05-08 23:43:33 -07:00
7d871e52a9
Copy the entities set into a list before iterating it so there's no risk of modifying the array while iterating
2022-05-08 23:43:08 -07:00
cef1ad25cb
Small cleanup of log statement
2022-05-08 23:42:36 -07:00
c0c8584f45
Implement is_adjacent_to and direction_to_adjacent_point on Point
2022-05-08 23:42:24 -07:00
2266511ec5
Implement attacking and reducing hit points
...
Attacks are computed with attack_power and defense. When an Actor dies,
a DieAction is produced and possibly also a DropItemAction.
2022-05-08 23:41:54 -07:00
aae1251660
Rename Action.entity -> Action.actor
2022-05-08 23:40:33 -07:00
b604ff30ec
Implement a basic AI for HostileMonster
...
This AI will walk randomly around the dungeon (pausing periodically) and
if the Hero comes into view, will b-line and attack
2022-05-08 23:38:48 -07:00
1f750a0c7c
Add an Item subclass of Entity for instances of items on the map
2022-05-08 23:37:31 -07:00
e8b2729353
Add blocks_movement to the Entity class
2022-05-08 23:36:56 -07:00
a13ef89832
Add an Item type class and a Corpse item type
2022-05-08 23:36:13 -07:00
021b82c93a
Add an Actor subclass of Entity
...
Make Hero and Monster subclasses of Actor
2022-05-08 23:35:47 -07:00
7653df1e3f
Add Action.success() and Action.failure() helper methods to produce results for straight success and failure
2022-05-08 23:34:09 -07:00
46e1a42060
Let Entity.ai produce its own Actions!
2022-05-08 10:03:28 -07:00
6bb5d819bf
Lots of comment and type documentation in object.py
2022-05-08 09:56:21 -07:00
e1562b2b2b
Add a Fighter component to the Hero
2022-05-08 09:55:56 -07:00
ee0e4b1dba
Instantiate Monsters with a HostileEnemy AI
2022-05-08 09:55:10 -07:00
550cde6a8f
Allow "ai" as a variable name
2022-05-08 09:54:24 -07:00
687511d69e
Add an ai attribute to Entity
2022-05-08 09:54:08 -07:00
49b48ec7a8
Add a HostileEnemy AI component
2022-05-08 09:48:22 -07:00
cf9ec2d17e
Move Monster to the object module
2022-05-08 09:48:05 -07:00
cf0b120fad
Add a Fighter component that tracks hit points, attack power, defense, etc
2022-05-08 09:46:32 -07:00
f5a8a55182
Add WaitAction to the class hierarchy
2022-05-08 08:55:08 -07:00
a9ebc38078
Update the Makefile to use .venv as the virtual env directory
2022-05-08 08:54:54 -07:00
4f7e477b24
Add a WaitAction and trigger it with .
2022-05-07 22:34:43 -07:00
85423e739c
Remove the shbang from map.py
2022-05-07 17:44:30 -07:00
eea49ed3c1
Resolve all the pylint warnings in geometry
2022-05-07 12:37:35 -07:00
427e7c8e84
Remove some unused imports
2022-05-07 12:28:02 -07:00