Hi at all. I enjoyed playing ToME for a while now after starting with Angband a while ago.
One thing I noticed for the git version is that it does not enable the
gtk2 interface. I always prefered it over the x11 interface (it has scrollbars). I am not very comfortable with cmake. Any hints on howto enable gtk2?
***WARNING: The following discusses bugs in the code and thus is inherently (a bit) spoily ***
I also found some bugs in the display of mimicry shapeshift skills. Maybe this can be updated at least for the git version. I did not know where to put them so I just post it here.
1. The duration of the shapeshift power is not printed correctly. This one is pretty clear. I did not manage to attach the patch file so it is just included in the text:
Code: Select all
--- cmd7.c 2010-05-03 12:13:14.942367986 +0200
+++ cmd7.c 2010-05-03 12:15:34.239005668 +0200
@@ -92,7 +92,7 @@
switch (power)
{
case 0:
- strnfmt(p, 80, " dur %d", k_info[o_ptr->k_idx].pval2 + get_skill_scale(SKILL_MIMICRY, 70));
+ strnfmt(p, 80, " dur %d", k_info[o_ptr->k_idx].pval2 + get_skill_scale(SKILL_MIMICRY, 1000));
break;
case 1:
strnfmt(p, 80, " dur %d+d20", 10 + plev);
Notice that this is only a display error. Ingame the result is correct. Probably it was changed in the other place and forgotten here.
2. I also noticed that mimicry shapeshifting is a bit weird in respect to failures (and display of them). You might or might not consider this as a bug - and I do not have a clean solution for this. There are two sources of fail:
(i) The mimicry skill can fail. If this happens you don't even try to shapeshift and you might suffer from side effects such as stunning ...
(ii) If (i) succeeded the shapeshift can fail - turning you into an abomination in the process.
The game only displays the failure rate for case (i). The failure rate for case (ii) is hidden (though it can be estimated ingame without risk by trying a lot of times in town).
Very likely if you have half-decent dexterity failure rate (i) will be very low. Since (i) is displayed this might make you believe that it is safe to shapeshift when it is not. I wondered for a very long time why my shapeshifts went wrong so often despite my failure rate being at 1 or 2 percent.
I think the game should display the second failure rate (here you might disagree). I made a quick dirty hack such that the game now displays the combined failure rate of (i) and (ii). I must warn you that I am not very good at C programming and it is poorly tested though.
Code: Select all
--- cmd7.c 2010-05-03 12:15:34.239005668 +0200
+++ cmd7.c 2010-05-03 12:37:45.078887502 +0200
@@ -109,6 +109,28 @@
}
}
+static int get_mimic_chance(int mimic)
+{
+ s32b chance;
+
+ call_lua("get_mimic_info", "(d,s)", "d", mimic, "level", &chance);
+ chance *= 3;
+
+ chance -= get_skill_scale(SKILL_MIMICRY, 150);
+ chance -= 3 * adj_mag_stat[p_ptr->stat_ind[A_DEX]];
+
+ if (chance < 2) chance = 2;
+
+ /* Stunning makes spells harder */
+ if (p_ptr->stun > 50) chance += 25;
+ else if (p_ptr->stun) chance += 15;
+
+ /* Always a 5 percent chance of working */
+ if (chance > 95) chance = 95;
+
+ /* Return the chance */
+ return (chance);
+}
/*
* Allow user to choose a magic power.
@@ -248,6 +270,19 @@
/* Always a 5 percent chance of working */
if (chance > 95) chance = 95;
+ /* HACK: Display 'right' fail for mimicry shapeshift fail including the abomination failure */
+ if (!(strcmp(spell.name,"Mimic"))&&(!p_ptr->mimic_form))
+ {
+ object_type *o_ptr;
+ int mimic_fail = 0;
+ o_ptr = &p_ptr->inventory[INVEN_OUTER];
+ if ((o_ptr->tval != TV_CLOAK) || (o_ptr->sval != SV_MIMIC_CLOAK)) mimic_fail = 100;
+ else mimic_fail = get_mimic_chance(o_ptr->pval2);
+ chance = 100 - (100-chance)*(100-mimic_fail)/100;
+ }
+
/* Get info */
power_info(comment, i);
@@ -760,28 +795,6 @@
}
-static int get_mimic_chance(int mimic)
-{
- s32b chance;
-
- call_lua("get_mimic_info", "(d,s)", "d", mimic, "level", &chance);
- chance *= 3;
-
- chance -= get_skill_scale(SKILL_MIMICRY, 150);
- chance -= 3 * adj_mag_stat[p_ptr->stat_ind[A_DEX]];
-
- if (chance < 2) chance = 2;
-
- /* Stunning makes spells harder */
- if (p_ptr->stun > 50) chance += 25;
- else if (p_ptr->stun) chance += 15;
-
- /* Always a 5 percent chance of working */
- if (chance > 95) chance = 95;
-
- /* Return the chance */
- return (chance);
-}
void do_cmd_mimic_lore()
While I am at it: The equipment and inventory rules can not be correctly added ingame still. Here is the fix:
Code: Select all
--- lib/core/auto.lua 2010-05-03 12:12:42.242356601 +0200
+++ lib/core/auto.lua 2010-05-03 13:30:18.035301550 +0200
@@ -810,9 +810,11 @@
function auto_aux:add_child(sel)
-- <rule> and <not> contain only one match
if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "not") and auto_aux.rule[1] then return end
+ if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "equipment") and auto_aux.rule[1] then return end
+ if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "inventory") and auto_aux.rule[1] then return end
-- Only <and> and <or> can contain
- if auto_aux.rule.label ~= "rule" and auto_aux.rule.label ~= "and" and auto_aux.rule.label ~= "or" and auto_aux.rule.label ~= "not" then return end
+ if auto_aux.rule.label ~= "rule" and auto_aux.rule.label ~= "and" and auto_aux.rule.label ~= "or" and auto_aux.rule.label ~= "not" and auto_aux.rule.label ~= "equipment" and auto_aux.rule.label ~= "inventory" then return end
-- get it
local r = auto_aux.types_desc[sel][3]()