Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulate relationship reciprocity 🤝 #15

Open
4 tasks done
noyainrain opened this issue Oct 25, 2022 · 0 comments
Open
4 tasks done

Simulate relationship reciprocity 🤝 #15

noyainrain opened this issue Oct 25, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@noyainrain
Copy link
Owner

noyainrain commented Oct 25, 2022

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
@noyainrain noyainrain added the enhancement New feature or request label Oct 25, 2022
@noyainrain noyainrain self-assigned this Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant