mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	ru:: display room name, player HP and enemy HP in the status line
This commit is contained in:
		| @@ -276,6 +276,7 @@ void boar::act() { | |||||||
|   } |   } | ||||||
|  |  | ||||||
| void boar::attacked(int dmg) { | void boar::attacked(int dmg) { | ||||||
|  |   current_target = this; | ||||||
|   reduce_hp(dmg); |   reduce_hp(dmg); | ||||||
|   if(destroyed) addMessage("You kill the wild boar."); else addMessage("You hit the wild boar."); |   if(destroyed) addMessage("You kill the wild boar."); else addMessage("You hit the wild boar."); | ||||||
|   auto dat = get_dat(); |   auto dat = get_dat(); | ||||||
|   | |||||||
| @@ -45,6 +45,8 @@ double mscale = 100; | |||||||
| bool non_hyperbolic; | bool non_hyperbolic; | ||||||
| bool one_room; | bool one_room; | ||||||
|  |  | ||||||
|  | struct entity *current_target; | ||||||
|  |  | ||||||
| struct ruwall { | struct ruwall { | ||||||
|   string name; |   string name; | ||||||
|   string glyph; |   string glyph; | ||||||
|   | |||||||
| @@ -257,6 +257,13 @@ void run() { | |||||||
|         else switch_mapmode_to(mapmode::poincare); |         else switch_mapmode_to(mapmode::poincare); | ||||||
|         }); |         }); | ||||||
|       if(cmode == mode::editmap) mouseovers = format("coordinates: %d %d (%.2lf)", mousepx, mousepy, double(get_scale_at(mousepy))); |       if(cmode == mode::editmap) mouseovers = format("coordinates: %d %d (%.2lf)", mousepx, mousepy, double(get_scale_at(mousepy))); | ||||||
|  |       if(cmode == mode::playing) { | ||||||
|  |         titlecolor = 0xFFFFFF; | ||||||
|  |         mouseovers = current_room->roomname; | ||||||
|  |         displayfr(vid.fsize, vid.fsize, 2, vid.fsize, "HP " + its(m.hp) + "/" + its(m.max_hp()), titlecolor, 0); | ||||||
|  |         if(current_target && current_target->existing) | ||||||
|  |         displayfr(vid.xres - vid.fsize, vid.fsize, 2, vid.fsize, "HP " + its(current_target->hp) + "/" + its(current_target->max_hp()) + " " + current_target->get_name(), titlecolor, 16); | ||||||
|  |         } | ||||||
|       draw_pentagon(); |       draw_pentagon(); | ||||||
|       break; |       break; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue