Difference between revisions of "User talk:Stefanor"
Jump to navigation
Jump to search
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
Just checked Opera 9 as well, no difference. --[[User:Seen|Seen]] 02:46, 10 September 2006 (UTC) | Just checked Opera 9 as well, no difference. --[[User:Seen|Seen]] 02:46, 10 September 2006 (UTC) | ||
+ | |||
+ | :I appearantly fooled myself by introducing (and fixing before sending) a bug that cancelled out the error for my test case (L1/3/6 Priest, 20 WIS, +Identify). (Firefox 1.0 debian package, BTW). --[[User:Stefanor|Stefanor]] 05:19, 10 September 2006 (UTC) | ||
+ | |||
+ | :Second fix, maybe this one will actually work: | ||
+ | <pre> | ||
+ | --- casting.html.orig 2006-09-09 20:08:51.000000000 -0700 | ||
+ | +++ casting.html 2006-09-09 22:07:43.000000000 -0700 | ||
+ | @@ -26,7 +26,7 @@ | ||
+ | penalty += (robe == 1) ? Math.floor(rolesuit[role]/2) : rolesuit[role]; | ||
+ | else if (robe == 1) // armor is not metallic and wearing a robe | ||
+ | penalty -= rolesuit[role]; | ||
+ | - if (shield >= 0) // using a shield | ||
+ | + if (shield >= 1) // using a shield | ||
+ | penalty += roleshield[role]; | ||
+ | if (helmet == 1) // wearing a metallic helmet | ||
+ | penalty += penalty_helmet; | ||
+ | @@ -48,7 +48,7 @@ | ||
+ | var chance = basechance - Math.floor(Math.sqrt(900 * diff + 2000)); | ||
+ | else | ||
+ | { | ||
+ | - var learning = 15 * Math.floor(-diff / slevel); | ||
+ | + var learning = Math.floor((-15 * diff) / slevel); | ||
+ | var chance = basechance + Math.min(learning, 20); | ||
+ | } | ||
+ | // limit to the 0-120 range | ||
+ | </pre> | ||
+ | --[[User:Stefanor|Stefanor]] 05:19, 10 September 2006 (UTC) | ||
+ | ::Ah, that does it here as well. Thanks much. --[[User:Seen|Seen]] 00:43, 12 September 2006 (UTC) |
Latest revision as of 00:43, 12 September 2006
re: Javascript Calculator diff
What browser are you using? With Firefox 1.5.06 I see no change in results (but I do see your point). For instance, a quick wizmode game as a wizard, int 17, xl 30, attack at skilled shows FoD with a failure of 51% but the calculator shows 62%, change or no change. Also, magic mapping is at 85% failure in game (unskilled) versus 91% from the calculator. Thanks for the help, I'll continue working on it as time allows.
Just checked Opera 9 as well, no difference. --Seen 02:46, 10 September 2006 (UTC)
- I appearantly fooled myself by introducing (and fixing before sending) a bug that cancelled out the error for my test case (L1/3/6 Priest, 20 WIS, +Identify). (Firefox 1.0 debian package, BTW). --Stefanor 05:19, 10 September 2006 (UTC)
- Second fix, maybe this one will actually work:
--- casting.html.orig 2006-09-09 20:08:51.000000000 -0700 +++ casting.html 2006-09-09 22:07:43.000000000 -0700 @@ -26,7 +26,7 @@ penalty += (robe == 1) ? Math.floor(rolesuit[role]/2) : rolesuit[role]; else if (robe == 1) // armor is not metallic and wearing a robe penalty -= rolesuit[role]; - if (shield >= 0) // using a shield + if (shield >= 1) // using a shield penalty += roleshield[role]; if (helmet == 1) // wearing a metallic helmet penalty += penalty_helmet; @@ -48,7 +48,7 @@ var chance = basechance - Math.floor(Math.sqrt(900 * diff + 2000)); else { - var learning = 15 * Math.floor(-diff / slevel); + var learning = Math.floor((-15 * diff) / slevel); var chance = basechance + Math.min(learning, 20); } // limit to the 0-120 range
--Stefanor 05:19, 10 September 2006 (UTC)
- Ah, that does it here as well. Thanks much. --Seen 00:43, 12 September 2006 (UTC)