Skip to content

Simulate relationship reciprocity 🤝 #15

Description

@noyainrain

Track the reciprocity level of the relationship to the player and make the pet nudge the player based on the reciprocity.

Depends on #14.

Draft

_F = TypeVar('_F', bound=Callable[..., object])

class Pet:
    """Level at which the relationship with the player feels completely reciprocal."""
    RECIPROCITY_MAX = 72

    """Current reciprocity level of the relationship to the player."""
    reciprocity: int

    @staticmethod
    def social(func: _F) -> _F:
        """Decorator to make a social interaction between the player and the pet.

        Social interactions influence the :attr:`reciprocity`.
        """

class Space:
    """
    .. describe:: space-nudge

       Dispatched when the pet nudges the player.
    """

class NudgeEvent(Event):
    """Event about a nudge from the pet."""

    """Intended activity emoji or ID of the furniture piece to engage with."""
    activity_id: str

    @staticmethod
    def parse(data: str) -> NudgeEvent: ...

    async def get_activity(self) -> Furniture | str:
        """Get the intended activity emoji or ID of the furniture piece to engage with."""

class FurnitureProperties(TypedDict):
    """Properties of a furniture piece."""

    """Indicates if the furniture piece is portable or fixed."""
    portable: bool

    # Future reference
    """Needed material."""
    material: list[str]

"""Properties of each furniture piece."""
FURNITURE_PROPERTIES: dict[str, FurnitureProperties]
⚾🐕 Feini drops the ⚾ item next to you and looks at you with anticipation. Woof! 😊

🪴🐕 Feini calls you over to the 🪴 furniture piece. Woof! 😊

🐕 Feini gently nudges you with its head. 😊

Tasks

  • Implement draft
  • Pet.tick(): Set activity in transaction
  • Pet.social(): Reset reciprocity with variation
  • update_pet_reciprocity(): Ignore if pet is hatched

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions