2024-05-09 02:11:16 +00:00
|
|
|
from adventure.models.entity import Attributes, Room
|
2024-05-06 01:17:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
def hot_room(room: Room, attributes: Attributes):
|
|
|
|
"""
|
|
|
|
If the room is hot, actors should get hotter.
|
|
|
|
"""
|
|
|
|
|
|
|
|
for actor in room.actors:
|
|
|
|
actor.attributes["hot"] = "hot"
|
|
|
|
|
|
|
|
return attributes
|
|
|
|
|
|
|
|
|
|
|
|
def cold_room(room: Room, attributes: Attributes):
|
|
|
|
"""
|
|
|
|
If the room is cold, actors should get colder.
|
|
|
|
"""
|
|
|
|
|
|
|
|
for actor in room.actors:
|
|
|
|
actor.attributes["cold"] = "cold"
|
|
|
|
|
|
|
|
return attributes
|