Wood: giant mushrooms underground, felled by imps; wooden bridges and doors cost wood
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c5adc3e902
commit
398bb95681
28 files changed
+447
-31
No files matched your search
@@ -288,8 +288,8 @@ pub fn tool_cost_static(t: Tool) -> String {
|
||||
match t {
|
||||
Tool::Spell(sp) => trf("cost.mana", &[(sp.cost() as i32).to_string()]),
|
||||
Tool::Trap(k) => trf("cost.work", &[(k.work() as i32).to_string()]),
|
||||
Tool::Bridge => trf("cost.bridge", &[BRIDGE_COST[0].to_string(), BRIDGE_COST[1].to_string()]),
|
||||
Tool::Drawbridge => trf("cost.gold_tile", &[DRAWBRIDGE_COST.to_string()]),
|
||||
Tool::Bridge => trf("cost.bridge", &[BRIDGE_COST[0].to_string(), (crate::wood::BRIDGE_WOOD as i32).to_string(), BRIDGE_COST[1].to_string()]),
|
||||
Tool::Drawbridge => trf("cost.drawbridge", &[DRAWBRIDGE_COST[0].to_string(), (crate::wood::DRAWBRIDGE_WOOD as i32).to_string(), DRAWBRIDGE_COST[1].to_string()]),
|
||||
Tool::Steel => trf("cost.steel", &[STEEL_COST[0].to_string(), STEEL_COST[1].to_string()]),
|
||||
Tool::Tower(TowerKind::Rune) => {
|
||||
let s = tower_stats(TowerKind::Rune);
|
||||
@@ -314,8 +314,8 @@ pub fn tool_cost(t: Tool, g: &Game) -> String {
|
||||
Tool::Lightning => trf("cost.mana", &["50".into()]),
|
||||
Tool::Heal => trf("cost.mana", &["60".into()]),
|
||||
Tool::Summon => trf("cost.mana", &[(g.summon_cost() as i32).to_string()]),
|
||||
Tool::Bridge => trf("cost.bridge", &[BRIDGE_COST[0].to_string(), BRIDGE_COST[1].to_string()]),
|
||||
Tool::Drawbridge => trf("cost.gold_tile", &[DRAWBRIDGE_COST.to_string()]),
|
||||
Tool::Bridge => trf("cost.bridge", &[BRIDGE_COST[0].to_string(), (crate::wood::BRIDGE_WOOD as i32).to_string(), BRIDGE_COST[1].to_string()]),
|
||||
Tool::Drawbridge => trf("cost.drawbridge", &[DRAWBRIDGE_COST[0].to_string(), (crate::wood::DRAWBRIDGE_WOOD as i32).to_string(), DRAWBRIDGE_COST[1].to_string()]),
|
||||
Tool::Steel => trf("cost.steel", &[STEEL_COST[0].to_string(), STEEL_COST[1].to_string()]),
|
||||
Tool::Tower(TowerKind::Rune) => {
|
||||
let s = tower_stats(TowerKind::Rune);
|
||||
@@ -622,6 +622,7 @@ impl Ui {
|
||||
}
|
||||
let mut segs: Vec<Vec<Part>> = vec![
|
||||
gold_seg,
|
||||
vec![txt(tr("hud.wood"), WOOD_C), Part::Gap, txt((g.wood.floor() as i32).to_string(), TXT)],
|
||||
vec![txt(tr("hud.mana"), MANA), Part::Gap, Part::Bar(g.mana / g.mana_max(), MANA), Part::Gap, txt(format!("{:<3}", g.mana as i32), TXT)],
|
||||
vec![txt(tr("hud.core"), RED), Part::Gap, Part::Bar(g.core_hp / CORE_HP, RED)],
|
||||
vec![txt(tr("hud.creatures"), TXT), Part::Gap, txt(format!("{}/{}", g.creature_count(), cap), TXT)],
|
||||
@@ -1418,6 +1419,9 @@ impl Ui {
|
||||
}
|
||||
|
||||
// Info text for the unit or tile under the mouse (first line = title)
|
||||
// the colour of wood in the interface
|
||||
const WOOD_C: Color = Color::new(0.78, 0.56, 0.32, 1.0);
|
||||
|
||||
// fire and wear of a bridge tile
|
||||
fn bridge_state(g: &Game, i: usize, out: &mut Vec<(String, Color)>) {
|
||||
if g.burning(i) {
|
||||
@@ -1565,6 +1569,12 @@ pub fn hover_info(g: &Game, ent: Option<usize>, tile: Option<(i32, i32)>) -> Vec
|
||||
out.push((tr(state), BLUE));
|
||||
bridge_state(g, i, &mut out);
|
||||
}
|
||||
Kind::Mushroom | Kind::Tree => {
|
||||
let tree = t.kind == Kind::Tree;
|
||||
out.push((tr(if tree { "tile.tree" } else { "tile.mushroom" }), WOOD_C));
|
||||
let wood = if tree { crate::wood::WOOD_TREE } else { crate::wood::WOOD_MUSHROOM };
|
||||
out.push((trf("tile.plant_info", &[(wood as i32).to_string()]), DIM));
|
||||
}
|
||||
Kind::Obsidian => {
|
||||
out.push((tr("tile.obsidian"), FRAME_HI));
|
||||
let left = g.bridgework.cooled.iter().find(|c| c.0 == i).map_or(0.0, |c| c.1);
|
||||
|
||||
Reference in new issue
Block a user