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