5 HitPoints::HitPoints(Game::Handle<Game::Entity> e, const Setup &s):
6 BufferedComponent<HitPointsData>(e),
9 write().remaining_hits = setup.max_hits;
12 void HitPoints::take_damage(unsigned amount, unsigned type)
14 if(!(setup.vulnerable_to&(1<<type)))
18 d.remaining_hits = (amount<d.remaining_hits ? d.remaining_hits-amount : 0);