*/
static void monster_hits_player(struct World * world, char * dsc_monster);
-/* Decrement HP of "monster" hit by player, kill it if its HP hit zero; log the
- * whole action.
+/* Decrement HP of "monster" hit by player, kill it if its HP hit zero, create a
+ * corpse and increment player's score by the amount of hitpoints the monster
+ * started with; log the whole action.
*/
static void player_hits_monster(struct World * world, struct Monster * monster);
m_prev->map_obj.next = monster->map_obj.next;
}
}
+ uint8_t score = md->hitpoints_start;
+ world->score = world->score + score;
free(monster);
}
}