Skip to content

Commit

Permalink
changes to facilitate testing DONT COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
ekaratzas committed Mar 2, 2024
1 parent 164e435 commit 3236ddb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ void monster::try_reproduce()
// add a decreasing chance of additional spawns when "catching up" an existing animal
int chance = -1;
while( true ) {
/*
if( *baby_timer > calendar::turn ) {
return;
}
Expand All @@ -505,22 +506,30 @@ void monster::try_reproduce()
}
}
}
*/

chance += 2;
season_match = true;
season_spawn = true;
female = true;
chance = 1;

bool friendly_parent = false;
if( type->in_category( "WILDLIFE" ) &&
attitude_to( get_player_character() ) == Attitude::A_FRIENDLY ) {
friendly_parent = true;
add_msg( _( "friendly parent babe! %s." ), disp_name() );
}
if( season_match && female && one_in( chance ) ) {
if( season_match && season_spawn && female && one_in( chance ) ) {
int spawn_cnt = rng( 1, type->baby_count );
if( type->baby_monster ) {
add_msg( _( "going to spawn friendly = %s." ), friendly_parent ? "yes" : "no" );
g->m.add_spawn( type->baby_monster, spawn_cnt, pos(), friendly_parent );
} else {
g->m.add_item_or_charges( pos(), item::spawn( type->baby_egg, *baby_timer, spawn_cnt ), true );
}
}
break;

*baby_timer += *type->baby_timer;
}
Expand Down

0 comments on commit 3236ddb

Please sign in to comment.