Traders come through the portal and sell rune plans, rare creatures, wood and mana
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
74837f1c34
commit
4c9fbe47e4
24 files changed
+406
-3
No files matched your search
@@ -1508,6 +1508,13 @@ pub fn hover_info(g: &Game, ent: Option<usize>, tile: Option<(i32, i32)>) -> Vec
|
||||
if let Some(j) = ent {
|
||||
let e = &g.ents[j];
|
||||
let s = st(e.kind);
|
||||
// the trader: his offer, the price and how long he waits
|
||||
if let Some((key, price, left)) = g.trader_offer(e.id) {
|
||||
out.push((tr(s.name), GOLD));
|
||||
out.push((trf("trader.info", &[tr(key), (price as i32).to_string()]), FRAME_HI));
|
||||
out.push((trf("trader.left", &[(left.ceil() as i32).to_string()]), DIM));
|
||||
return out;
|
||||
}
|
||||
out.push((trf("info.level", &[tr(s.name), e.level.to_string()]), if e.hero { BLUE } else { FRAME_HI }));
|
||||
out.push((trf("info.rank", &[tr(&format!("rank.{}", e.level.clamp(1, 10)))]), GOLD));
|
||||
out.push((trf("info.hp", &[(e.hp.max(0.0) as i32).to_string(), (e.max_hp as i32).to_string()]), GREEN));
|
||||
|
||||
Reference in new issue
Block a user