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

reworked Trait class and moved all trait init code to archetypes module #48

Merged
merged 5 commits into from Nov 27, 2015

Conversation

feend78
Copy link
Member

@feend78 feend78 commented Nov 20, 2015

This pull request addresses issues #33 and #34.

  • Flattened out some parts of the world directory; moved traits.py and archetypes.py into world
  • Reworked and enhanced Trait class significantly.
  • Removed nearly all trait management code from the Character typeclass (mod_stat, etc).
  • Updated Character typeclass at_object_create hook, and added the traits property as described in the traits module.
  • Moved individual archetype classes into archetypes module
  • Updated individual archetype class definitions to reflect new traits configuration
  • Created and updated module functions that will support chargen process: load_archetype, apply_archetype, validate_primary_traits, and calculate_secondary_traits
  • Changed functions in rulebook module to more accurately reflect OA dice rolls.
  • Created sheet and traits commands to view full character sheet or traits by group.
  • Docs and tests for everything I touched.

As we still don't have a chargen process built, there is some setup required to see the output of the commands. From inside Ainneve, you can initialize your character with:

@typeclass me = typeclasses.characters.Character
@py from world.archetypes import apply_archetype; apply_archetype(me, 'warrior')
@py me.traits.STR.base += 3; me.traits.PER.base += 1
@py me.traits.DEX.base += 1; me.traits.VIT.base += 3
@py from world.archetypes import calculate_secondary_traits; calculate_secondary_traits(me.traits)
sheet

created 'sheet' and 'traits' commands to view character traits
docs and tests for everything
… value to a trait key

added a test for this condition and consolidated some tests
the same character with two different `name` parameters to create
a dual archetype. May also be called with reset=True to remove
any existing archetype and initialize the character with only the
named one.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, I like this

replaced `+` shortcuts with `.actual`
updated tests
minor tweak to charsheet layout
added a README for the logs directory, as the Travis CI report shows errors starting Evennia after checkout because server/logs doesn't exist
@feend78
Copy link
Member Author

feend78 commented Nov 23, 2015

I removed the + operator documentation but left the code there.

I also added a server/logs/README.md file, because I noticed the Travis CI tests were not running because the logs directory was not present. Now, it looks like the tests are failing because of recent changes to sessions in core Evennia that are throwing errors in the evennia.utils.test_resources.EvenniaTest class used in the test modules.

@feend78
Copy link
Member Author

feend78 commented Nov 24, 2015

So I'm curious about the next steps. I assume @whitenoiseoss should review it, but then is it ready to merge?

@ergodicbreak
Copy link
Contributor

Thanks for resolving the testing issue; I think this is ready, I'll leave it open today for @whitenoiseoss but if he doesn't have time to look at it today I can merge tonight.

It looks like your other PRs are finished as well?

@feend78
Copy link
Member Author

feend78 commented Nov 24, 2015

I think #47 is ready too, but I kinda want to pull the starter equipment one back and resubmit it later. Now that there's a basis for working with Traits, I went ahead and started working on weapon/armor effects and abilities, and I'd like to include them before moving ahead with that one.

@feend78
Copy link
Member Author

feend78 commented Nov 26, 2015

Since this is still open, I want to include this one other idea I had that I think will be needed in character generation, and that the presumably EvMenu implementation shouldn't have to be calculating. It's fairly simple, and in line with keeping all Trait-related logic in archetypes.

whitenoiseoss added a commit that referenced this pull request Nov 27, 2015
reworked Trait class and moved all trait init code to archetypes module
@whitenoiseoss whitenoiseoss merged commit 580b833 into evennia:master Nov 27, 2015
@whitenoiseoss
Copy link
Contributor

I have merged this over giving it a fairly thorough look-through. For the OA rulebook, moving the traits off of character and onto archetype is a good call and will make things easier. The expansion to Traits is great.

@feend78 feend78 deleted the traits branch December 10, 2015 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants