Cite as
dopewars source
Original
https://dopewars.sourceforge.io/
Pinned
benmwebb/dopewars @ d8bb8ee7bc5e260d80311e1a7630145bc74b5b6d
Accessed
2026-10-20
Licence
GPL-2.0-or-later (LICENCE; each source file's header allows “either version 2 of the License, or (at your option) any later version”). README.md: “dopewars is copyright (C) Ben Webb 1998-2022.”
Credit
Written by Ben Webb. AUTHORS credits Dan Wolf for playing the MS-DOS game to help re-engineer it; Phil Davis, Caroline Moore, Katherine Holt, Andrea Elliot-Smith, Owen Walsh, and Pete Winn for play testing; James Matthews for the Officer Bob code; and Mike Meyer, Matt Higgins, and Tony Brown for patches.
Notes
The date is the pinned commit's (“Don't use gtk_box_pack_end”). README.md calls this dopewars 1.6.2. The game logic is in src/dopewars.c (tables and defaults) and src/serverside.c (prices, events, interest); a single-player game runs the same server code locally.

Cited on

Claims (21)

In dopewars, each accepted jet applies the 10% debt rate to the current integer balance, so the balance includes prior interest in later updates.src/dopewars.c L108src/dopewars.h L294src/serverside.c L452–465Code
dopewars's credits say it derives from an MS-DOS game of the same name by an unknown author, which was based on John E. Dell's MS-DOS game Drug Wars.AUTHORS L1–3doc/index.html L43–45Developer
Ben Webb's first GPL release of dopewars, version 1.4.0, came out on 27 April 1999.NEWS L173–174Developer
dopewars's “antique” mode tries to keep to the original game as closely as possible.README.md L52–54Developer
By default, dopewars plays multiplayer games, connecting to a dopewars server.README.md L56–59Developer
Antique mode keeps the first six of the eight locations and drops the gun shop and the pub.src/dopewars.c L2449–2451src/dopewars.c L2474–2478Code
dopewars has 12 drugs, each with a price range, from Ludes at 11–60 to Cocaine at 15,000–29,000. Acid, Hashish, Ludes, and Weed can turn cheap; Cocaine, Heroin, Opium, and Speed can turn expensive.src/dopewars.c L714–734src/dopewars.h L255–260Verified
Each drug on sale gets a fresh price on every arrival, drawn uniformly from at least its MinPrice to below its MaxPrice; a price event then divides or multiplies one drug's price.src/dopewars.c L809–815src/serverside.c L3245–3250src/serverside.c L2400–2417Verified
Each visit puts a random number of drugs on sale, from the location's MinDrug to one less than its MaxDrug; the rest have no price that day.src/serverside.c L3239–3251Verified
The eight locations differ in police presence and in how many drugs are on sale, from Manhattan (police 90, 4–9 drugs) to the Ghetto (police 5, 8–11 drugs).src/dopewars.c L738–748src/dopewars.h L248–252Verified
Each visit has no price event with probability 0.30, one with 0.42, two with 0.266, and three with 0.014.src/serverside.c L3213–3219Verified
A price event picks a random drug that can turn; a cheap drug costs a quarter of a normal price, and an expensive one four times.src/serverside.c L3221–3237src/dopewars.c L751–756Verified
A dopewars game starts on 1 December 1984 with $2,000 cash, a $5,500 debt, and a trenchcoat that holds 100.src/dopewars.c L114src/dopewars.c L86–88src/dopewars.c L882Code
Each jet to another location takes one day, and asking to jet on the 31st turn ends the game, so a game has 31 days of trading.src/dopewars.c L226src/serverside.c L452–463Code
Each jet multiplies the loan shark's debt by 1.10, in integer arithmetic, so $5,500 left unpaid grows to $95,917 over 30 jets.src/dopewars.c L108src/serverside.c L464Verified
Each jet multiplies the bank balance by 1.05, so $2,000 deposited grows to $8,614 over 30 jets.src/dopewars.c L108src/serverside.c L466Verified
The dopewars loan shark, in the Bronx, only takes repayments and offers no new loans.src/serverside.c L500–507src/serverside.c L2350–2351src/dopewars.h L216Code
On arrival, dopewars rolls for an encounter, 24 in 100 below $1 million net worth, 39 in 115 above it, and 54 in 130 above $3 million.src/serverside.c L2315–2321Code
An encounter is an offer, a random event, or a police attack, and a location's police presence raises the share of attacks. Half of all offers are a helper who carries drugs, or a bigger trenchcoat in antique mode; the rest offer a gun, unless the game is sanitized or has no guns, the player already carries two more guns than helpers, or the drawn gun won't fit the coat, and then nothing is offered.src/serverside.c L2441–2459src/serverside.c L3163–3186Code
One random event in ten is a mugging that leaves 80 to 94 percent of the cash.src/serverside.c L3052–3058Code
In antique mode, half of all offers are a bigger trenchcoat for $200 to $299, and each one adds 10 to the coat's space.src/serverside.c L3164–3168src/serverside.c L64src/serverside.c L3545–3548Code