Eight new spells: seer's eye, cave-in, haste, stoneskin, gold rain, invisibility, plague, quake
- researched in the library (and unlocked in the campaign), in the spells menu with own icons and a radius under the pointer - haste speeds up everything a creature does, stoneskin halves damage, invisible creatures are ignored by enemies and towers until they attack (drawn see-through), plague spreads among enemies, quake hurts and stuns enemies only, cave-in turns floor back into earth - particles for every spell Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a54316c86e
commit
7f4d5ca7b4
11 files changed
+532
-12
No files matched your search
@@ -158,10 +158,11 @@ pub enum Tool {
|
||||
Bridge,
|
||||
Steel,
|
||||
Trap(crate::traps::TrapKind),
|
||||
Spell(crate::spells::Spell),
|
||||
}
|
||||
|
||||
// New tools are appended so that existing key bindings ("tool<i>") keep their meaning
|
||||
pub const TOOLS: [Tool; 32] = [
|
||||
pub const TOOLS: [Tool; 40] = [
|
||||
Tool::Dig,
|
||||
Tool::Hand,
|
||||
Tool::Room(0),
|
||||
@@ -194,6 +195,14 @@ pub const TOOLS: [Tool; 32] = [
|
||||
Tool::Trap(crate::traps::TrapKind::WoodDoor),
|
||||
Tool::Trap(crate::traps::TrapKind::IronDoor),
|
||||
Tool::Trap(crate::traps::TrapKind::MagicDoor),
|
||||
Tool::Spell(crate::spells::Spell::Eye),
|
||||
Tool::Spell(crate::spells::Spell::CaveIn),
|
||||
Tool::Spell(crate::spells::Spell::Haste),
|
||||
Tool::Spell(crate::spells::Spell::Stoneskin),
|
||||
Tool::Spell(crate::spells::Spell::GoldRain),
|
||||
Tool::Spell(crate::spells::Spell::Invisible),
|
||||
Tool::Spell(crate::spells::Spell::Plague),
|
||||
Tool::Spell(crate::spells::Spell::Quake),
|
||||
];
|
||||
|
||||
|
||||
@@ -218,6 +227,7 @@ pub fn tool_info(t: Tool) -> ToolInfo {
|
||||
Tool::Room(7) => ("aerie", T_AERIE, Some(7)),
|
||||
Tool::Room(_) => ("forge", T_FORGE, Some(8)),
|
||||
Tool::Trap(k) => (k.id(), I_TRAPS + crate::traps::TRAP_KINDS.iter().position(|&t| t == k).unwrap_or(0) as u32, None),
|
||||
Tool::Spell(sp) => (sp.id(), I_SPELLS + crate::spells::SPELLS.iter().position(|&t| t == sp).unwrap_or(0) as u32, None),
|
||||
Tool::Tower(TowerKind::Arrow) => ("arrow", I_ARROW, None),
|
||||
Tool::Tower(TowerKind::Cannon) => ("cannon", I_CANNON, None),
|
||||
Tool::Tower(TowerKind::Magic) => ("magic", I_MAGIC, None),
|
||||
@@ -240,6 +250,7 @@ pub fn tool_info(t: Tool) -> ToolInfo {
|
||||
// costs that do not depend on the game (bestiary)
|
||||
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::Steel => trf("cost.steel", &[STEEL_COST[0].to_string(), STEEL_COST[1].to_string()]),
|
||||
@@ -261,7 +272,7 @@ pub fn tool_cost_static(t: Tool) -> String {
|
||||
|
||||
pub fn tool_cost(t: Tool, g: &Game) -> String {
|
||||
match t {
|
||||
Tool::Trap(_) => tool_cost_static(t),
|
||||
Tool::Trap(_) | Tool::Spell(_) => tool_cost_static(t),
|
||||
Tool::Room(r) => trf("cost.gold_tile", &[ROOM_COST[r].to_string()]),
|
||||
Tool::Lightning => trf("cost.mana", &["50".into()]),
|
||||
Tool::Heal => trf("cost.mana", &["60".into()]),
|
||||
@@ -291,7 +302,7 @@ pub const CATS: [(&str, &[usize]); 7] = [
|
||||
("cat.rooms", &[2, 3, 4, 5, 6, 12, 13, 18, 21, 17]),
|
||||
("cat.towers", &[14, 15, 16, 20]),
|
||||
("cat.traps", &[22, 23, 24, 25, 26, 27, 28, 29, 30, 31]),
|
||||
("cat.spells", &[9, 10, 11]),
|
||||
("cat.spells", &[9, 10, 11, 32, 33, 34, 35, 36, 37, 38, 39]),
|
||||
("cat.orders", &[8, 7, 19]),
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user