Rotghroth Rhapsody Prince of Kitties Posted March 2, 2009 Share Posted March 2, 2009 Is it possible to adjust the frequency of occasional effects, such as occasional bless, haste, curse, etc.? Could, for instance, I have an item that has a 1/10 chance per turn of blessing the party, or something really nasty that curses the wielder every single turn? The ability strength only seems to affect the strength of the effect, as opposed to the frequency. (If there's no way in the current BoE editor, maybe it should be added to OBoE...) Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted March 2, 2009 Share Posted March 2, 2009 In current BoE that would require invoking a scenario state, which is impossible for a normal item. You could do it for a special item though. Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Prince of Kitties Posted March 2, 2009 Author Share Posted March 2, 2009 Okay, thanks. FWIW, can anyone tell me what the chance is per turn of Occasional Bless, Occasional Haste, etc. activating? Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Quiconque Posted March 2, 2009 Share Posted March 2, 2009 I think it's something like 1/8 or 1/10. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted March 2, 2009 Share Posted March 2, 2009 It is in the source code, somewhere there, it will take a while to dig it out. You would be looking for the variable ability. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted March 15, 2009 Share Posted March 15, 2009 From the source file Combat.cpp, line 1,420: "if (get_ran(1,0,10) == 5) {" I read this as a 1 in 10 chance. The result of a random 1 die 10 roll must be exactly 5. Here is the get_ran function from global.cpp short get_ran (short times, short min, short max) { short store; short i, to_ret = 0; if ((max - min + 1) == 0) return 0; for (i = 1; i < times + 1; i++) { store = rand() % (max - min + 1); to_ret = to_ret + min + store; } return to_ret; } If min = 0 the expression (max - min + 1) = max + 1, thus here it means 10 + 1 = 11. Thus there is a 1 in 11 chance of the occasional effect happening. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.