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

[RDY] Replaced add_spawn with place_spawn #22847

Merged
merged 2 commits into from
Feb 2, 2018

Conversation

ZhilkinSerg
Copy link
Contributor

Fixes #3951.

What was changed:

  • all add_spawn function calls were replaced with place_spawn function calls;
  • several monster groups were added to monstergroup.json;
  • some magic numbers were replaced with SEEX/SEEY defines;
  • some inappropriate usages of SEEX were replaced with SEEY.

@@ -605,12 +588,12 @@ void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int tur

//1-2 per overmap, very bad day for low level characters
if (one_in(10000)) {
m->add_spawn(mon_jabberwock, 1, SEEX, SEEY); // fixme add to monster_group?
m->place_spawns( mongroup_id( "GROUP_JABBERWOCK_ONLY" ), 1, 0, 0, SEEX, SEEY, 1 );
Copy link
Contributor

Choose a reason for hiding this comment

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

The chance of those spawns is still hard coded, shouldn't that be part of the monster group?

And I think you changed the location of the spawn slight: previously it was in the middle (at 12,12) of the 24x24 map that is used for mapgen. Now it's somewhere in the upper left 12x12 area. But this is probably not important as the monsters will move around anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The chance of those spawns is still hard coded, shouldn't that be part of the monster group?

Hmm, I guess it could be changed to: m->place_spawns( mongroup_id( "GROUP_JABBERWOCK_ONLY" ), 1000, 0, 0, SEEX, SEEY, 1 );

Most of this will eventually moved from cpp to json.

And I think you changed the location of the spawn slight: previously it was in the middle (at 12,12) of the 24x24 map that is used for mapgen. Now it's somewhere in the upper left 12x12 area. But this is probably not important as the monsters will move around anyway.

Yes, it should probably be changed to 0, 0, SEEX * 2 - 1, SEEY * 2 -1.

Will address that in separate PR.

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.

3 participants