A downloadable game

Dungeoneer 128 - Looting D'Ataer Ror

Target system: C128

Programming language: BASIC 7.0 (built-in)

Program length: 10 BASIC lines of 80 chars (when abbreviated)

Program size: 672 Bytes on disk

Author: Wilfried Elmenreich



=== Gameplay ===

When you are in a fight, select the opponent you want to attack by pressing the respective number key. When you win, you will get a message that you are the one who successfully made it out of D'Ataer Ror.

== Story ==

You are a young adventure looking for quests that give you gold! You don't mind the risk. When others say it is too dangerous, it is the path you chose.

You get hired by the mayor of a small village to slay a dragon that lives in the nearby cave of D'Ataer Ror. The dragon is terrorizing the village and has eaten the mayor's dog. The villagers are poor and cowardly. So all you get is a half-decent sword and armor, and you have to go alone. Before you leave, you get some advice from the villagers.

=== Barmaid Baerbel ===

"You are not the first to try this, and I have seen many adventurers entering the cave. And only so few came back. From those who made it out alive, I heard some stories. The cave is not only populated by the dragon! A lot of fierce creatures dwell in the cave passages. They have their territories, and I can give you a map to pass through those areas on the shortest way. Follow the Goblins first, but beware, they might attack you. But you look like a decent fighter, so the Goblins should not pose a problem for you. But mind the Ogres, they are much stronger. Sneak on then through a large dark cavern, but don't wake the bats! If you can avoid the Orc patrols, all that is left are some spiderwebs before you enter the dragon cave. A piece of cake!"

"So you mean it's easy?"

"No, I want to offer you a piece of cake" the barmaid puts a delicious cream slice on the table before you. "It's on the house! Since you go alone and unprepared, you will die for sure! But being well fed you have at least a chance to recover between fights."

=== Blacksmith Bjoern ===

You visit the Blacksmith to have him sharpen your sword. "Where did you get that sword?" he asks.

"I ... found it on a mission," I reply. The mission was to plunder an adventurer's tent while he was drunk.

"This sword is special" he mumbles

"Oh great!" 

"It is heavier than a normal sword but less sharp and less hard. You could cut soft cheese with it, but I would not recommend it since the metal contains lead."

"Can you fix it?"

"Nobody can fix this 'sword', but I can try my best to sharpen and harden it. You will still have a decent chance to hit the monsters, but it will be hard work!"

"Good news, that is!"

=== Barbar Barbara ===

Barbara the Barbar looks at you despicably and then sits down on a sturdy chair. Now that she is sitting, you are almost taller than her.

"Another on going to the caves?" she asks.

"Yes, Ma'am. Do you have any fighting tips for me?" you say.

"I have survived many battles," she says, "not because I am tall and strong and quick, which is true. No, because of this," she tips at her helmet.

"Because you headbutt your opponents?" you ask.

"No, because I fight smart. For example, when I stand up to multiple opponents, I tax them according to the damage they can do to me. Always kill the strongest opponent first. Then kill all others in a single strike" she makes a wide movement with her arm, almost knocking you over.

"And yes, a headbutt also helps now and then," she adds and bids you farewell.

=== Bankclerk Bernd ===

"Do you want to open an account, sir?" Bernd asks you the moment you enter the bank.

"Not yet. I still need to kill the dragon and loot her gold," you reply, in an effort to sound confident.

"If I may offer an advice," Bernd speaks exaltedly. "Always check the carcasses. Not only dragons. In a cave like D'Ataer Ror, even spiders or rats sometimes carry gold. They accumulate it when they eat the fallen adventurers."

"Thanks for the hint!" you say. "I gotta go now. The cave and its gold are awaiting me.

=== The cave ===

You leave the village behind and travel to the cave entrance. In a moment of clearness, you decide to skip this adventure for now, all those stories indicate that your chances are all but good.

You decide to RUN. You hack the keys into the keyboard, but then you ENTER.

That's where the game starts. 

Enjoy and survive!


== Program explanation ==

=== Listing ===

0 n$(0)="you":a(0)=10:d(0)=10:h(0)=100:deffnr(x)=int(x*rnd(0)+x):color0,1:color4,1
1 readn$,n,a,d,h:fori=1ton:n$(i)=n$:a(i)=2+fnr(a):d(i)=fnr(d):h(i)=fnr(h):next
2 print"{cyn}":o=0:forc=0to9:on-(h(c)>0)gosub5:next:ifo=1thenprint"{grn}healing..":h(0)=h(0)+fnr(50):goto1
3 print"{cyn}attack who?":getkeyd$:d=val(d$):ifdandh(d)>0thena=0:gosub6:elseprint"pass"
4 d=0:fora=1to10:on-(h(a)>0)gosub6:next:goto2
5 printc;n$(c),"hp"h(c),"att"a(c),"def"d(c)"{red}":o=o+1:return
6 r=d(d)-2*a(a)*rnd(0):r=int(r*5*(r<0)):print"{lred}"n$(a)" attack(s) "n$(d)" for"r"damage
7 h(d)=h(d)-r:ifh(d)<1thenprintn$(d)"{red} is dead":l=rnd(0):ifd=0thenprint"{gry2}you had{yel}"g"coins":end
8 l=int(l*20):ifltheng=g+l:print"{yel}you loot"l"coins":l=0:return:else:return:datagoblin,4,4,4,7
9 dataogre,3,6,5,9,bat,6,3,8,2,orc,2,6,8,10,spider,6,4,6,9,dragon,1,7,7,100

Program listing with abbreviated commands (max. 80 chars per line, color codes are not well represented in this listing):

0n$(0)="you":a(0)=10:d(0)=10:h(0)=100:deffnr(x)=int(x*rnd(0)+x):colO0,1:colO4,1
1readn$,n,a,d,h:fori=1ton:n$(i)=n$:a(i)=2+fnr(a):d(i)=fnr(d):h(i)=fnr(h):next
2?".":o=0:fOc=0to9:on-(h(c)>0)goS5:nE:ifo=1tH?"^healing..":h(0)=h(0)+fnr(50):gO1
3?".attack who?":getkeyd$:d=val(d$):ifdandh(d)>0tHa=0:gosub6:else?"pass"
4d=0:fora=1to10:on-(h(a)>0)gosub6:next:goto2
5printc;n$(c),"hp"h(c),"att"a(c),"def"d(c)"\":o=o+1:return
6r=d(d)-2*a(a)*rnd(0):r=int(r*5*(r<0)):?"V"n$(a)" attack(s) "n$(d)" for"r"damage
7h(d)=h(d)-r:ifh(d)<1tH?n$(d)"\ is dead":l=rN(0):ifd=0tH?"Xyou had."g"coins":end
8l=int(l*20):ifltHg=g+l:?".you loot"l"coins":l=0:reT:eL:reT:dAgoblin,4,4,4,7
9dataogre,3,6,5,9,bat,6,3,8,2,orc,2,6,8,10,spider,6,4,6,9,dragon,1,7,7,100

=== Code explanation ===

Line 0 does some initializations

Line 1 is executed every time the adventure enters a new part of the cave

Line 2-4 contains the overall game loop for a battle

Line 5 is a subroutine for printing the names and stats of each active actor.

Line 6-8 is a subroutine for handling an attack move and a possible kill. If the player is killed, this routine also does the game over part.

Line 9 (and a part of line 8) contain the monster definitions (name, number of monsters, attack value, defense value, hitpoints) stored in DATA lines. Those data lines can be defined anywhere in the code, so line 4 could have been used to add another opponent. But I think the game is already hard enough.

Download

Download
dungeoneer128.d64 170 kB
Download
dungeoneer128.txt 7.1 kB

Install instructions

== Usage ==

The game runs well under 40 column or 80 column mode.

===Real hardware===

1. Dust off your C128 and turn it on

2. Insert Disk

3. Load program

4. Type Esc+X to switch to 80 character screen (optional)

5. Type RUN and play

=== Emulator ===

1. Pull disk image over C128 emulator (e.g. VICE x128)

2. Load program unless already done automatically

4. Type Esc+X to switch to 80 character screen (optional)

5. Type RUN and play

Leave a comment

Log in with itch.io to leave a comment.