From 3699a403cfeb71bdcb7e3fb0ff2f10a9401db554 Mon Sep 17 00:00:00 2001 From: Erik Lunna Date: Sun, 29 Oct 2023 13:51:37 +0100 Subject: [PATCH] Draw energy tech: Flame mages get bonus energy for being near lava, ice mages for being near ice. Instead of the usual 5 energy, they get 4d6 for each time they draw from one of these squares. --- src/tech.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/tech.c b/src/tech.c index 356c7880b..9e3507980 100644 --- a/src/tech.c +++ b/src/tech.c @@ -1749,13 +1749,19 @@ draw_energy(VOID_ARGS) break; case CLOUD: /* Air */ case TREE: /* Earth */ - case LAVAPOOL: /* Fire */ - case ICE: /* Water - most ordered form */ powbonus = 5; break; - case AIR: + case LAVAPOOL: /* Fire */ + if (Role_if(PM_FLAME_MAGE)) + powbonus = d(4, 6); + break; + case ICE: + if (Role_if(PM_ICE_MAGE)) + powbonus = d(4, 6); + break; + case AIR: /* Air */ case MOAT: /* Doesn't freeze */ - case WATER: + case WATER: /* Water - most ordered form */ powbonus = 4; break; case POOL: /* Can dry up */ @@ -1778,10 +1784,9 @@ draw_energy(VOID_ARGS) powbonus = -2; break; case GRAVE: - if (Role_if(PM_NECROMANCER)) { + if (Role_if(PM_NECROMANCER)) powbonus = (u.uenmax > 36 ? u.uenmax / 6 : 6); - break; - } + break; /* FALLTHROUGH */ case DEADTREE: powbonus = -4;