English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am creating an if style book, where you have to go page to page keeping track of things like hitpoints, gold and fight.

Along the way you will get into fights with monsters. I need a fighting system. Ideas:

Random Number gen (1-4) + Level (0-6) = "Attack score" this takes off an amount of hitpoints from the foe. Then the foe does the same against you.

I would like to be able to "run" from the monster to another "page". This is a Random Number gen to decide whether the hero gets away (to stop people from running away from every fight) (1=run away, 2,3,4 = not being able to run away)

If the hero wins a fight he may win a trophy. Is it possible for to put the trophy in a list and new trophies are added to that list as the hero wins them. At the end of each adventure there will be a trophy showing so each trophy will have a hidden number assigned to it. Depending on the total would depend on what you get in the next adventure.

Can you give me examples on how to do this?

2007-05-20 21:59:31 · 2 answers · asked by funsevuk 2 in Computers & Internet Programming & Design

2 answers

Being an old D&D player:

When "running away" there is a penality for turning you back on an enemy. Either decrease defensive points of increase the opponents attack points. Also turning an running causes the player to lose initative in attacking in essence the opponent gets a free shot at you.

Attack points are generated by not only Random number and level but are modified by the health score and type of weapon.

Defense points are modified by health , level and weapon vunerability. In other words defense depens on the type of weapon, edged blades vs. blunt (mace) or projectile (arrow)

To generate random numbers use the following:

dim upperbound, lowerbound as integer

randomize
randomvalue = CInt(Int((upperbound - lowerbound + 1) * Rnd() + lowerbound))

The randomize command will ensure that the random numbers do not repeat in the same sequence each time the program is run. You must call it at least once to prevent the same sequences from being called. RND calls psuedo random numbers from a list, Randomize moves the pointer in this list to some arbitrary point.

To use the above code simply set the upper and lower boundaries to you desired limits ( 1 to 4 for example)

2007-05-21 00:01:44 · answer #1 · answered by MarkG 7 · 0 0

The express edition is cut down for personal use, to get used to the package and for you to learn to program. If you want to make applications for other people you will either have to buy the Pro edition, learn C, C++ or something similar and get a compiler. I know VB is easy to learn but MS need to make some money for their efforts... pitiful though they may be sometimes.

2016-04-01 00:07:33 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers