
-----------------------------------
diablo
Thu Nov 18, 2004 11:15 am

battles in an rpg
-----------------------------------
i am making an RPG an my code is *almost* finished
but when i merged all my programs *(i did each individual area(battle,locations, shopping,etc) in their own mini-program)* it ran okay..for the most part.
my code is as follows for the problem:
procedure castleofbarbaotem
    var gen4health : int
    var gen4atk : int
    var gen4def : int
    put "you are wandering in the Castle Of Barbaotem"
    put "when you suddenly encounter..."
    delay (2500)
    randint (num4, 1, 20)
    if (num4 = 1) then
        put " ...Doom Gaurd! "
        enemyhealth := 200
        enemyatk := 80
        enemydef := 80
        battle