Dwarf caves in all modes: neutral dwarves guard a hoard and sometimes a rune chest; the rune forge tower; imps repair towers before claiming
- 1-4 cave slots by map size, 50% each (at least one); knight treasure caves only where a mission places them - dwarves fight intruders near the cave, never chase far, heal at home, grow with distance and the player's army, never count for victory - rune chest: one free rune forge tower (chain bolt to three more enemies), upgradeable for gold, sold once it comes back (next mission / free play at once), unbuilt ones carry over - new tool (key N) shown in the tower menu while a rune tower can be built or upgraded Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d92b45a0b8
commit
9a9f04ae1f
17 files changed
+658
-32
No files matched your search
@@ -160,7 +160,7 @@ pub enum Tool {
|
||||
}
|
||||
|
||||
// New tools are appended so that existing key bindings ("tool<i>") keep their meaning
|
||||
pub const TOOLS: [Tool; 20] = [
|
||||
pub const TOOLS: [Tool; 21] = [
|
||||
Tool::Dig,
|
||||
Tool::Hand,
|
||||
Tool::Room(0),
|
||||
@@ -181,6 +181,7 @@ pub const TOOLS: [Tool; 20] = [
|
||||
Tool::Bridge,
|
||||
Tool::Room(7),
|
||||
Tool::Steel,
|
||||
Tool::Tower(TowerKind::Rune),
|
||||
];
|
||||
|
||||
|
||||
@@ -206,6 +207,7 @@ pub fn tool_info(t: Tool) -> ToolInfo {
|
||||
Tool::Tower(TowerKind::Arrow) => ("arrow", I_ARROW, None),
|
||||
Tool::Tower(TowerKind::Cannon) => ("cannon", I_CANNON, None),
|
||||
Tool::Tower(TowerKind::Magic) => ("magic", I_MAGIC, None),
|
||||
Tool::Tower(TowerKind::Rune) => ("rune", I_RUNE, None),
|
||||
Tool::Sell => ("sell", I_SELL, None),
|
||||
Tool::Flag => ("flag", I_FLAG, None),
|
||||
Tool::Lightning => ("lightning", I_BOLT, None),
|
||||
@@ -229,6 +231,10 @@ pub fn tool_cost(t: Tool, g: &Game) -> String {
|
||||
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::Steel => trf("cost.steel", &[STEEL_COST[0].to_string(), STEEL_COST[1].to_string()]),
|
||||
Tool::Tower(TowerKind::Rune) => {
|
||||
let s = tower_stats(TowerKind::Rune);
|
||||
trf("cost.rune", &[g.rune_available().to_string(), s.cost[1].to_string(), s.cost[2].to_string()])
|
||||
}
|
||||
Tool::Tower(k) => {
|
||||
let s = tower_stats(k);
|
||||
let mut c = trf("cost.tower", &[s.cost[0].to_string(), s.cost[1].to_string(), s.cost[2].to_string()]);
|
||||
@@ -246,7 +252,7 @@ pub const CATS: [(&str, &[usize]); 6] = [
|
||||
("cat.dig", &[0]),
|
||||
("cat.hand", &[1]),
|
||||
("cat.rooms", &[2, 3, 4, 5, 6, 12, 13, 18, 17]),
|
||||
("cat.towers", &[14, 15, 16]),
|
||||
("cat.towers", &[14, 15, 16, 20]),
|
||||
("cat.spells", &[9, 10, 11]),
|
||||
("cat.orders", &[8, 7, 19]),
|
||||
];
|
||||
@@ -654,6 +660,8 @@ impl Ui {
|
||||
if e.alive && !e.held {
|
||||
let c = if e.hero {
|
||||
Color::new(0.6, 0.85, 1.0, 1.0)
|
||||
} else if e.dwarf() {
|
||||
Color::new(0.85, 0.55, 0.25, 1.0)
|
||||
} else if e.rival() {
|
||||
if e.side == 2 {
|
||||
Color::new(0.3, 0.95, 0.4, 1.0)
|
||||
@@ -762,7 +770,7 @@ impl Ui {
|
||||
|
||||
// the open row of tools (wraps into several rows if needed)
|
||||
if let Some((c, x0, bw, bcols)) = popup {
|
||||
let tools = CATS[c].1;
|
||||
let tools: Vec<usize> = CATS[c].1.iter().copied().filter(|&i| g.tool_visible(i)).collect();
|
||||
let per_row = (((cols - 2) as f32 / bcols).floor() as usize).max(1).min(tools.len());
|
||||
let nrows = (tools.len() + per_row - 1) / per_row;
|
||||
let pw = per_row as f32 * bw + 2.0 * CW();
|
||||
@@ -1052,6 +1060,11 @@ pub fn hover_info(g: &Game, ent: Option<usize>, tile: Option<(i32, i32)>) -> Vec
|
||||
out.push((tr(["", "info.unconscious", "info.carried", "info.tortured"][e.captive.min(3) as usize]), RED));
|
||||
return out;
|
||||
}
|
||||
if e.dwarf() {
|
||||
out.push((tr("info.dwarf"), Color::new(0.9, 0.6, 0.3, 1.0)));
|
||||
out.push((tr("info.dwarf_neutral"), DIM));
|
||||
return out;
|
||||
}
|
||||
out.push((tr(job_name(e)), TXT));
|
||||
if e.hero {
|
||||
out.push((tr(if e.guard { "info.guard" } else { "info.intruder" }), BLUE));
|
||||
@@ -1136,6 +1149,10 @@ pub fn hover_info(g: &Game, ent: Option<usize>, tile: Option<(i32, i32)>) -> Vec
|
||||
out.push((tr("tile.shard"), RED));
|
||||
out.push((tr("tile.shard_info"), DIM));
|
||||
}
|
||||
Kind::RuneChest => {
|
||||
out.push((tr("tile.rune_chest"), BLUE));
|
||||
out.push((tr("tile.rune_chest_info"), DIM));
|
||||
}
|
||||
Kind::Gate => {
|
||||
out.push((tr("tile.gate"), BLUE));
|
||||
out.push((trf("info.hp", &[(g.gate_hp as i32).to_string(), (GATE_HP as i32).to_string()]), BLUE));
|
||||
|
||||
Reference in new issue
Block a user