Source:New Character

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The source code of the Eamon utility program New Character.

Source

ProDOS Eamon Master

Date

1980s

Author

Donald Brown

License

The use of this item is permitted on the grounds that it's free or in the public domain.

0  REM   THE WONDERFUL WORLD OF
1  REM           EAMON
2  REM      'NEW.CHARACTER'
3  REM    CHARACTER GENERATOR
4  REM     AND INSTRUCTIONS
5  REM 
6  REM      BY DONALD BROWN
7  REM 
8  REM 5/7/91
10 D$ =  CHR$ (4)
12  ONERR  GOTO 16
14  PRINT D$"VERIFY UC": PRINT D$"-LCASE.KILLER"
16  POKE 216,0
20  DEF  FN R(X) =  INT (X *  RND (1) + 1)
30  DEF  FN A(X) =  FN R(X) +  FN R(X) +  FN R(X)
40  PRINT D$;"OPEN THE.ADVENTURER": PRINT D$;"READ THE.ADVENTURER": INPUT NAME$: PRINT D$;"CLOSE"
50  PRINT : PRINT "The Irishman says, 'First I must know": PRINT "whether ye be male or female. Which are": PRINT "ye  (hit 'M' for Male, 'F' for Female)?";
60  GET SEX$: IF SEX$ = "M" THEN 80
70  IF SEX$ <  > "F" THEN 60
80  PRINT SEX$: PRINT 
90  PRINT : PRINT "The Irishman walks away and in walks a": PRINT "tall man of possibly Elvish descent.": PRINT : PRINT "He studies you for a moment and says,": PRINT "'Here is a booklet of instructions for"
100  PRINT "you to read, and your prime attributes": PRINT "are--": PRINT 
105 VT =  PEEK (37) + 1
110 HD =  FN A(8):AG =  FN A(8):CH =  FN A(8)
120  PRINT "   Hardiness--";HD: PRINT "   Agility  --";AG: PRINT "   Charisma --";CH;"'": PRINT 
122 A$ = ""
125  IF HD + AG + CH < 39 THEN  GOSUB 600
126  IF A$ = "Y" THEN 110
127  IF CH < 10 OR HD < 10 OR AG < 10 THEN  GOSUB 600
128  IF A$ = "Y" THEN 110
130  PRINT "(HIT 'R' to read instructions, 'T' to      give them back)";
140  POKE  - 16368,0: GET A$: IF A$ = "T" THEN 500
150  IF A$ <  > "R" THEN 140
200  PRINT : HOME : PRINT "You read the instructions and they say--": PRINT "  INFORMATION ABOUT THE WORLD OF EAMON  "
210  PRINT : PRINT "You will have to buy a weapon. Your": PRINT "chance to hit with it will be the": PRINT "weapon complexity, plus your ability": PRINT "in that class, plus twice your agility.": PRINT 
220  PRINT "The five classes of weapons (and your": PRINT "current abilities with each) are--": PRINT "   Club/Mace       20%": PRINT "   Spear           10%": PRINT "   Axe              5%": PRINT "   Sword            0%": PRINT "   Bow            -10%": PRINT 
230  PRINT "Every time you score a hit in battle,": PRINT "your ability in the weapon class may go": PRINT "up by 2%, if a random number from 1-100": PRINT "is less than your chance to miss!": PRINT 
240  PRINT "(Hit any key to continue)";: POKE  - 16368,0: GET A$: PRINT : HOME 
250  PRINT "There are four armor types, and you may": PRINT "also carry a shield if you do not use": PRINT "a two-handed weapon.  These protections": PRINT "will absorb hits placed upon you(almost": PRINT "always!) but they lower your chance to"
260  PRINT "hit. The protections are--": PRINT : PRINT "Armor"; TAB( 15);"Hits Protect  Odds Adjust":: PRINT " None"; TAB( 18);"0"; TAB( 35);"- 0%": PRINT " Leather"; TAB( 18);1; TAB( 35);"-10%": PRINT " Chain"; TAB( 18);2; TAB( 35);"-20%"
270  PRINT " Plate"; TAB( 18);5; TAB( 35);"-60%": PRINT " Shield"; TAB( 18);1; TAB( 35);"- 5%": PRINT : PRINT : PRINT "You will develop an armour expertise,"
275  PRINT "which will go up when you hit a blow": PRINT "wearing armour and your expertise is": PRINT "less than the armour you are wearing."
280  PRINT "No matter how high your armour expertiseis, however, the net effect of armour": PRINT "will never increase your chance to hit.": PRINT 
290  PRINT "(Hit any key to continue)   ";: POKE  - 16368,0: GET A$: PRINT : HOME 
300  PRINT : PRINT "You can carry weights up to ten times": PRINT "your hardiness, or ";HD * 10;" Gronds.": PRINT "(A measure of weight, one Grond=10 Dos)": PRINT 
310  PRINT "Additionally, your hardiness tells how": PRINT "many points of damage you can survive.": PRINT "Therefore, you can be hit with ";HD: PRINT "1-point blows before you die.": PRINT 
320  PRINT "However, you will not be told how many": PRINT "blows you have taken.  you will be": PRINT "merely told things such as": PRINT : PRINT "   'Wow!  That one hurt!'": PRINT "or 'You don't feel very well'": PRINT 
330  PRINT "(Hit any key to continue)   ";: POKE  - 16368,0: GET A$: PRINT : HOME 
340  PRINT "Your charisma (";CH;") affects how citizens": PRINT "of Eamon react to you.  You affect a": PRINT "Monster's friendliness rating by your": PRINT "charisma less ten, difference times two": PRINT "(";(CH - 10) * 2;"%)": PRINT 
350  PRINT "You start off with 200 gold pieces,": PRINT "which you will want to spend on suppliesfor your first adventure.  You will get": PRINT "a lower price for items if your charismais high.": PRINT 
360  PRINT "After you begin to accumulate wealth,": PRINT "you may want to put some of your money": PRINT "into the bank, where it cannot be": PRINT "stolen.  However, it is a good idea to": PRINT "carry some gold with you for use in"
370  PRINT "bargaining and ransom situations.": PRINT : PRINT "(Hit any key to continue)  ";: POKE  - 16368,0: GET A$: PRINT : HOME 
380  PRINT "You may also hire a Wizard to teach you": PRINT "some magic spells. There are four": PRINT "spells you may learn."
385  PRINT : PRINT "Blast--hurt your enemies from a distanceHeal --remove damage from your body.": PRINT "Speed--double your dexterity for a time"
390  PRINT "Power--does something weird.  The exact": PRINT "       effect is unpredictable.": PRINT 
400  PRINT : PRINT "Other types of magic may work in variousadventures, and items may have special": PRINT "properties.  However, these will not": PRINT "work in other adventures than where theywere found.  Thus, it is best (and you"
410  PRINT "have no choice but to) sell all items": PRINT "found in adventures, except for weapons": PRINT "and armour.": PRINT 
420  PRINT "(Hit any key to continue)   ";: POKE  - 16368,0: GET A$
500  PRINT : HOME : PRINT "The man behind the desk takes back the": PRINT "instructions and says, 'It is now time": PRINT "for you to start your life.'  He makes": PRINT "an odd sign with his hand and says,": PRINT "'Live long and prosper.'": PRINT 
510  PRINT "You now wander into the Main Hall."
520  PRINT D$;"OPEN CHARACTERS,L150": PRINT D$;"READ CHARACTERS,R0": INPUT NC: FOR R = 1 TO NC: PRINT D$;"READ CHARACTERS,R";R: INPUT A$: IF A$ <  > "" THEN  NEXT : PRINT D$;"WRITE CHARACTERS,R0": PRINT NC + 1:R = NC + 1
530  PRINT D$;"WRITE CHARACTERS,R";R: PRINT NAME$
540  PRINT HD: PRINT AG: PRINT CH: FOR X = 1 TO 4: PRINT "0": NEXT 
550  PRINT "5": PRINT "-10": PRINT "20": PRINT "10": PRINT "0": PRINT "0": PRINT SEX$: PRINT "200": PRINT "0": PRINT "0"
560  FOR W = 1 TO 4: PRINT "NONE": PRINT "0": PRINT "0": PRINT "0,0": NEXT 
570  PRINT D$;"CLOSE"
580  PRINT D$;"OPEN THE.ADVENTURER": PRINT D$;"WRITE THE.ADVENTURER": PRINT NAME$: PRINT R: PRINT D$;"CLOSE"
590  PRINT D$;"RUN MAIN.HALL"
595  END 
600  REM  /// SUICIDE ROUTINE 
610  PRINT : PRINT "Your character is such a poor excuse": PRINT : PRINT "for an adventurer that we will allow": PRINT : PRINT "you to commit suicide. Enter 'Y' to": PRINT : PRINT "commit suicide, else 'N'";
620  POKE  - 16368,0: GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 620
630  PRINT : PRINT : IF A$ = "N" THEN  RETURN 
640  PRINT "We ressurrect you again and your prime": PRINT : PRINT "attributes are --": PRINT 
650  RETURN