Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverShadowStar authored Nov 4, 2024
1 parent c6d993c commit 67add97
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 18 deletions.
1 change: 1 addition & 0 deletions src/character/char.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pyglet
import random
from src.utils import constants as con
from src.utils import constants as con
import genes
import needs

Expand Down
4 changes: 3 additions & 1 deletion src/character/genes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from ..utils import constants as con
import random


class DNA:
def __init__(self, gender=None, skin=None, height=None, body=None, hair=None, eyes=None, nose=None, mouth=None, ears=None):
self.gender = gender or {
Expand Down Expand Up @@ -58,7 +59,8 @@ def __init__(self, gender=None, skin=None, height=None, body=None, hair=None, ey

def __repr__(self):
return (f"DNA(gender={self.gender}, skin={self.skin}, height={self.height}, "
f"body={self.body}, hair={self.hair}, eyes={self.eyes}, nose={self.nose}, "
f"body={self.body}, hair={self.hair}, eyes={
self.eyes}, nose={self.nose}, "
f"mouth={self.mouth}, ears={self.ears})")

def __add__(self, other):
Expand Down
71 changes: 57 additions & 14 deletions src/character/personality.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

class Trait:
def __init__(self, name: str, age_group: str, trait_group: str, synergy: Dict, passive_effect: Optional[str] = None):

"""
Initialize a Trait object.
Parameters:
- name (str): The name of the trait.
- age_group (str): The age group when this trait was acquired (e.g., 'Child', 'Teen').
Expand All @@ -24,14 +23,13 @@ def __init__(self, name: str, age_group: str, trait_group: str, synergy: Dict, p
self.synergy: Dict = synergy
self.passive_effect: Optional[str] = passive_effect


def evolve(self, current_age_group: str) -> None:
"""
Evolve the current trait based on the character's current age group.
Parameters:
- current_age_group (str): The age group the character is currently in.
This function checks the predefined evolutions (in TRAIT_EVOLUTIONS) for the trait and updates it if applicable.
"""
self.current_age_group = current_age_group
Expand All @@ -44,10 +42,10 @@ def evolve(self, current_age_group: str) -> None:
def synergy_effect(self, other_trait: 'Trait') -> Optional[str]:
"""
Check if this trait synergizes with another trait.
Parameters:
- other_trait (Trait): Another trait object to compare against.
Returns:
- str: A description of the synergy effect, if one exists.
"""
Expand All @@ -56,11 +54,12 @@ def synergy_effect(self, other_trait: 'Trait') -> Optional[str]:
return synergy[1] # Return the synergy effect description
return None


class Personalitiy:
def __init__(self, age_group, traits=None):
"""
Initialize a Personality object.
Parameters:
- age_group (str): The current age group of the character.
- traits (dict): A dictionary of traits assigned to the character, organized by trait category.
Expand All @@ -71,10 +70,10 @@ def __init__(self, age_group, traits=None):
def generate(self):
"""
Generate traits for a character based on their age group.
This function selects traits from the predefined TRAITS list (positive, neutral, and negative)
for each trait category available to the given age group.
Returns:
- dict: A dictionary of generated traits organized by trait category.
"""
Expand All @@ -90,7 +89,7 @@ def generate(self):
def evolve_traits(self):
"""
Evolve all traits for the current age group.
This function iterates through all the traits a character has and checks if they can evolve
based on the current age group. If they can, they are updated accordingly.
"""
Expand All @@ -102,10 +101,54 @@ def evolve_traits(self):
def check_synergy(self, other):
"""
Check for synergy between the character's traits.
This function compares each trait with every other trait to see if any synergies exist,
and returns the synergy results.
Returns:
- list: A list of synergy effect descriptions.
"""
"""

class MBTI():
def __init__(self, name: str, trait_effect: Dict, compatibility: Dict, ):

"""Friendships: MBTI Compatibility Overview
Best Friends:
ENFP & INFJ: Deep emotional and intuitive bond, with a balance of creativity and wisdom.
ENTP & INTJ: Intellectual synergy; ENTP’s innovation complements INTJ’s strategic mind.
ISFJ & ESFJ: Loyal and nurturing, they share a focus on care and harmony.
ISFP & ESFP: Fun-loving and emotionally authentic, they connect over shared experiences.
Worst Enemies:
ESTJ & INFP: Clash between ESTJ’s practicality and INFP’s idealism and sensitivity.
ENTJ & ISFP: ENTJ’s forceful leadership may feel oppressive to ISFP’s values-driven, sensitive nature.
ISTJ & ENFP: ISTJ’s need for order contrasts with ENFP’s free-spirited, spontaneous nature.
Balanced but Challenging:
INTP & ENFJ: Intellectual vs. emotional focus; potential for growth but requires understanding.
ISTP & ESFJ: Pragmatic ISTP might clash with ESFJ’s social and emotional approach.
ISFJ & ENTP: Tradition and harmony (ISFJ) vs. challenge and spontaneity (ENTP).
Romantic Relationships: MBTI Compatibility Overview
Best Romance Partners:
INFJ & ENFP: Emotional depth and mutual growth, valuing personal development and intuition.
INTJ & ENFP: Opposites attract; ENFP's creativity softens INTJ’s logic, balancing emotional and strategic thinking.
ENTP & INFJ: Intellectual and emotional depth, creating a dynamic partnership.
ISFJ & ESFJ: Stable, nurturing relationships with shared values and loyalty.
Good but Challenging:
ENTJ & INFP: Strong attraction but potential conflict between ENTJ’s practicality and INFP’s idealism.
INTP & ESFJ: Analytical vs. emotional approach; can balance but requires effort.
ESTP & ISFJ: Adventure (ESTP) vs. stability (ISFJ); potential for excitement but may need compromise.
Struggling Pairings:
ISTJ & ENFP: Stability vs. spontaneity; a difficult match for long-term romance.
ESTJ & INFP: Practicality vs. emotional ideals often leads to misunderstanding.
ENTP & ISFJ: ENTP’s need for novelty clashes with ISFJ’s preference for tradition and security.
Balanced but Needs Effort:
ENFJ & ISTP: Opposite focuses (empathy vs. independence) that require communication.
INTP & ENFJ: Logical INTP and emotionally expressive ENFJ can thrive with mutual respect.
ENTP & ISTJ: Creative vs. orderly; potential to learn from each other with effort."""
6 changes: 3 additions & 3 deletions src/character/skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Skill:
def __init__(self, name: str, group: str, lvl: int = 0, exp: float = 0.0, max_lvl: int = 20):
"""
Initialize a skill object.
Parameters:
- name (str): The name of the skill.
- group (str): The catagory that the skill belongs to.
Expand Down Expand Up @@ -86,7 +86,7 @@ def lvl_up(self) -> None:
Music: Playing instruments or singing to boost morale or tell stories.
5. Social & Communication Skills
These skills are vital for building relationships within the tribe and beyond:
Bartering: Negotiating trades with other tribes or within the community.
Leadership: Inspiring others, making decisions for the tribe, and managing group morale.
Teaching: Passing down knowledge to younger generations, allowing skills to propagate within the tribe.
Expand All @@ -108,7 +108,7 @@ def lvl_up(self) -> None:
Spiritual Leadership: Guiding the tribe through religious or spiritual rituals, strengthening cultural identity.
8. Exploration & Navigation Skills
For navigating and understanding the broader game world:
Navigation: Finding paths through wilderness or biomes, potentially using stars or natural markers.
Cartography: Creating maps of explored areas for future reference and use by the tribe.
Swimming: Safely crossing bodies of water, either for exploration or survival.
Expand Down

0 comments on commit 67add97

Please sign in to comment.