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

[CR] [WIP] Pokemon functions #13182

Closed

Conversation

epsilon-phase
Copy link
Contributor

I have added support for items containing instances of monsters, and removing them from the world. I've added the pet carrier to accomplish this for the base game, and the pokeball for the mod.
The pet carrier acquires weight based on the size of the monster contained, and the pokeball doesn't, as seems appropriate for that mod.

I am unsure of adding the potion_act in iuse to the game, as most of my work has taken place upon the evolution code, which works fairly well for the pokemon mod, and the creature capture functions, which has left the healing item as a mere afterthought in comparison.

Anyway, I hope that this isn't horrifyingly broken.

This include the upgrade system based on experience, pikachu's evolutionary
line.
…into pokemon_functions

Fixed conflicts, and it does appear that my flag had been added previously by
Coolthulu.
Conflicts:
	src/ranged.cpp
…ant for

pokemon
Rewrote the capture function so that the monster ends up stored in the tags of
the item in question, rather than as a pointer. Works this time, for realz.
Fixed identification of stackable types for items containing monsters(now like
monsters stack with like).
Added a capability to release the monster in a specific direction, and a flag
for this sort of item which allows the item to be specified to not give that
choice, just like the manhacks. :)
…into pokemon_functions

Updated to latest master, necessary for merge later on.
…y with the

monster contained.
Took the table of weights from the items::weight method for calculating the
weight of corpses.
And fixed multiple typos that prevented it from actually coming to exist
@SilearFlare
Copy link

I oppose this mod with every fiber of my being.

@Coolthulhu
Copy link
Contributor

I think this would be better split into pet carrier part PR and the separate mod PR.

Pet carriers would be quite useful and could be extended into animal capture traps, but are probably mechanically "heavy" and thus may take a while to mergetest.

The pokemon themselves will require a totally separate discussion: less about mechanics and more about standards, copyrighted material etc.

}else{
if(it->has_flag("PLACE_RANDOMLY")){
std::vector<tripoint> valid;
for(int x=p->posx()-1;x<=p->posx()+1;x++){
Copy link
Contributor

Choose a reason for hiding this comment

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

Use for( const tripoint &pt : g->m.points_in_radius( p->pos, 1 ) ) { instead of double loop. It's clearer and easier to adjust.

@Coolthulhu
Copy link
Contributor

And finally: readability. Needs more spaces.

  • Each instruction should be indented by 0, 4, 8 etc. spaces. Not tabs, not 2 spaces, not 6 spaces. Exception is when you are lining them up to make a long broken line more readable.
  • Spaces around operators, like =

@epsilon-phase
Copy link
Contributor Author

Having worked a little bit on a function that I see as necessary, the pet carriers, I agree that the pokemon mod should get removed. It has issues with IP and I don't want to work on that part any more.
I wanted the mod to be possible, and to that end, there was a bit of functionality that I believe to be useful in the base game. Namely the pet carrier.

Also, I changed the name of the branch to remove the mod, so this pull request should be closed.

@@ -1192,6 +1192,7 @@ void item::io( Archive& archive )
archive.io( "techniques", techniques, io::empty_default_tag() );
archive.io( "item_tags", item_tags, io::empty_default_tag() );
archive.io( "contents", contents, io::empty_default_tag() );
// archive.io("monster",contained_monster,io::empty_default_tag());
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not needed, all item vars are stored automatically.

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

5 participants