master
Jay 6 years ago
parent 01decde2af
commit 6b5f50b65a

@ -1,5 +1,5 @@
[
Drugwar //e beta-4
Drugwar //e beta-5
(c) 2018 Jay Moore
Licensed under GPLv3
]
@ -15,7 +15,7 @@ Licensed under GPLv3
print "You can afford ";j
print "You can carry ";fs
print chr$(10)
input "How many? (Enter 0 to return to menu.)";k
input "How many? (Enter 0 cancel): ";k
gosub @nobuysell
return
£howmuchsell {common sell code}
@ -32,7 +32,7 @@ Checking valid freespace for buying can be put here too. But
lines that reference a specific drug are still in normal code.
]
£howmanysell
input "How many? (Enter 0 to return to menu.)";k
input "How many? (Enter 0 to cancel.): ";k
If k>j then print "You don't have that many!" : goto @howmanysell {this should work according to my testing}
gosub @nobuysell
return
@ -44,7 +44,7 @@ lines that reference a specific drug are still in normal code.
print chr$(10)
return
£freespace {I'll probably call this from more than the menu}
fs=in-((ci+hi+ai+wi+si+li)+(gn*5))
fs=int(in-(ci+hi+ai+wi+si+li)+(gn*5))
return
£daily {randomizes drug prices, adds a day, calculates interests, checks day number}
c=int(rnd(1)*12000+16000)
@ -55,8 +55,8 @@ lines that reference a specific drug are still in normal code.
l=int((rnd(1)*4+1)*10)
b=int(rnd(1)*20)
d=d+1
ls=ls*1.1
sa=sa*1.06
ls=int(ls*1.1)
sa=int(sa*1.06)
£checkday {so I can check the day by itself}
if D >= 31 GOTO @endgame
return
@ -110,20 +110,20 @@ lines that reference a specific drug are still in normal code.
£mugged
print "You got mugged!"
print chr$(10)
ms=wa/3
ms=ms*2
ml=wa-ms
ms=int(wa/3)
ms=int(ms*2)
ml=int(wa-ms)
print "You lost $";ml
wa=ms
gosub @wait
gosub @menu
£cops
we=C+H+W+A+S+L
we=CI+HI+WI+AI+SI+LI
[
my improved revisions will likely add some additional
conditions on how/when we run cops
]
if we<50 then return {no return since last gosub means this should work}
if we<50 then return
print "It's the cops!"
print chr$(10)
print "Just kidding!"
@ -141,9 +141,9 @@ conditions on how/when we run cops
print "Will you buy a ";ax$
input "for $400? (Y/N)";re$
if re$ <> "Y" then goto @menu
gn = gn+1
wa = wa-400
fs = fs-5
gn = int(gn+1)
wa = int(wa-400)
fs = int(fs-5)
goto @menu
£dedweed
print "There's some weed here that smells"
@ -157,8 +157,8 @@ conditions on how/when we run cops
print "Will you buy a new trenchcoat"
input "with more pockets for $200? (Y/N)";X$
if X$ <> "Y" then goto @menu
in=in+10
wa=wa-200
in=int(in+10)
wa=int(wa-200)
goto @menu
£dedguy
If fs<8 THEN return
@ -473,6 +473,7 @@ works.
goto @jet
£subway
home
gosub @daily
gosub @titlebar
inverse:print" SUBWAY ":normal
@ -556,6 +557,7 @@ works.
print chr$(10)
print "At least you didn't die from smoking"
print "that weed in the subway. Good job."
gosub @anticheat
end
£ironicend
@ -567,5 +569,22 @@ works.
print "in a game about drug dealing."
print chr$(10)
print "Well, thanks for playing."
gosub @anticheat
end
£anticheat {clears out all variables at endgame to force a start-over}
wa=2000
sa=0
ls=5000
d=0 {daily subroutine adds a day}
ph$="The Bronx"
gn=0
dp=0
in=100
ci=0
hi=0
ai=0
wi=0
si=0
li=0
return
Loading…
Cancel
Save