step to xp
This commit is contained in:
@@ -168,6 +168,10 @@ impl Game {
|
||||
// TODO fight the monster
|
||||
self.player.change_life(-1);
|
||||
m.decrease_life(1);
|
||||
// monster died, player gains experience
|
||||
if m.is_dead() {
|
||||
self.player.gain_experience(m.get_experience_gain());
|
||||
}
|
||||
return m.is_dead();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user