Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Text Adventures

Message
Posted: 15th Aug 2003 13:01
This might interest a few people.

I am working on a text adventure. I have been working from an Ian Livingstone book. The City of Thieves. All I need help on is the combat. You have some dice. I have been using rnd(6) or rnd(12) depending on the dice, 6 for 1 die and 12 for two dice.

I now have a battle coming up in the book. How would I code this?

Any help much appreciated.
Posted: 16th Aug 2003 03:07
rnd(12) for 2 dice will not give you an acurrate representation of 2 dice rolling. Example: You are much more likely to roll a 7(6&1,5&2,4&3) then you are a 12(6&6).

"Computers in the future may weigh no more then
1.5 tons.
- Popular Mechanics, 1949
Posted: 16th Aug 2003 06:51 Edited at: 16th Aug 2003 21:57

RND(5) + RND(5) + 2 should do it

"All programmers are playwrites and all computers are lousy actors" -Anon
Posted: 16th Aug 2003 18:11
I'd suggest
rnd(5) + rnd(5) + 2
since it's real hard to roll a 0 or a 1 with two dice.

____________________________________________
Surrealist writing toy -- http://www.iconpoet.com
Posted: 16th Aug 2003 21:57
Oops. I forgot DB's random numbers start at 0.

"All programmers are playwrites and all computers are lousy actors" -Anon