This is an attempt to make a version reminiscent of the original DrugLord.exe that was written by Phil Erwin (FantasyWare Inc 1991-93). This version is written as a bash script trying to stick to only GNU coreutils.
- ποΈ 8 Major Cities with different price multipliers
- π 6 Drug Types with varying prices and volatility (Ludes, Weed, Cocaine, Heroin, Meth, Ecstasy)
βοΈ Travel System with fluctuating costs and price adjustments- πΉ Dynamic Price Fluctuation for both drugs and travel costs
- π― Volatility-Based Travel Costs (longer distances = higher volatility)
- π Police Encounters and random events
- π₯ Hospital System with dynamic healing costs and emergency fees
- π¦ Banking System with savings accounts and loans with daily interest
- π² Random Events System with 10 different events including warehouse incidents, market floods, personal drama, and reputation-based encounters
- πΎ Enhanced Save/Load System with backup and integrity validation
- π¨ Colored Terminal Output for enhanced visual experience
- β Comprehensive Input Validation and error handling
Run the game with:
./druglord.sh- π View Stats & Inventory
- πͺ View Market Prices
- π [B]uy Drugs (or press 'b')
- π° [S]ell Drugs (or press 's')
βοΈ [T]ravel to Another City (or press 't')- π₯ [H]ospital (Heal) (or press 'h')
- π¦ Bank (Savings & Loans)
- β° Next Day
- πΎ Save Game
- π Load Game
- β Quit
Quick Navigation: Use [bsth] for Buy, Sell, Travel, Hospital
The game features 6 different drug types with varying prices, volatility, and market characteristics:
- π Ludes - $5 base price (cheapest, very stable)
- πΏ Weed - $10 base price (low volatility)
- π Ecstasy - $25 base price (medium-low volatility)
- π§ͺ Meth - $30 base price (medium volatility)
- π Cocaine - $50 base price (high volatility)
- π Heroin - $80 base price (very high volatility)
- Ludes: Cheapest drug in all cities ($4-$6 range)
- Volatility: Ranges from 3 (ludes) to 20 (heroin)
- City Multipliers: Prices adjust based on location
- Market Fluctuation: All drugs experience price changes over time
- Low-Risk Trading: Ludes and weed for steady, safe profits
- High-Risk Trading: Heroin and cocaine for potential big gains
- Market Timing: Volatile drugs require careful timing
- Inventory Management: Balance between safe and risky investments
The game now features dynamic travel costs that fluctuate in real-time, similar to drug prices:
- Seattle: 25 (Very High) - Longest distance, most price swings
- Los Angeles: 20 (High) - Longer distance, significant fluctuations
- Las Vegas: 18 (Medium-High) - Moderate distance, notable changes
- New York, Denver: 15 (Medium) - Average volatility
- Miami: 12 (Low-Medium) - Shorter distance, smaller changes
- Chicago: 10 (Low) - Close distance, stable prices
- Boston: 8 (Very Low) - Shortest distance, most stable
- Travel costs fluctuate each time you view the travel menu
- Costs are bounded between 50%-200% of their base values
- Market pressure helps costs return toward base values over time
- Longer distance cities have higher volatility and more dramatic price changes
- The system adds strategic depth to travel planning and timing
- Costs update dynamically when accessing the travel menu
- Visual indicator shows "
βοΈ Travel costs fluctuate in real-time!" - All travel cost data is saved and loaded with your game progress
The game features a comprehensive random events system that adds unpredictability and excitement to gameplay:
- Events occur when you advance to the next day (option 8)
- Each event has a ~5% chance of occurring (1 out of 20 possible outcomes)
- Events are city-specific and can dramatically affect local drug prices
- Some events have special conditions (e.g., snitch event requires reputation > 11)
- π° Found Money - Discover $100-$600 on the street
- πΈ Got Robbed - Lose $50-$250 to street criminals
- π³ Loan Shark Demands - Forced $200 debt increase
- πΈ Debt Payment - Automatic $50-$150 debt reduction
- β€οΈ Health Boost - Gain 10 health points (capped at 100)
- π₯ Warehouse Fire - Local warehouse burns down, causing supply shortage
- π Warehouse Raid - Police raid local warehouse, disrupting supply
- π’ Market Flooded - Ship arrives with massive drug supply, causing price crash
- π Girlfriend Weed Incident - Your girlfriend destroys all your weed inventory
- π¨ Snitch Event - A snitch demands payment or threatens to go to police (requires reputation > 11)
- Price Increases (Fire/Raid): 1.1x to 3.3x original price
- Price Decreases (Flooded): 0.25x to 0.75x original price
- Affected Drugs: 1-4 random drugs per event
- Duration: Permanent until next price fluctuation
- City-Specific: Only affects drugs in your current city
- Trigger Condition: Only occurs when reputation > 11
- Demand: 10-25% of your current money
- Intimidation Cost: 10 + (0.2-0.4 Γ reputation) points
- Choices:
- Pay Off: Lose money + increase police heat
- Intimidate: Lose reputation + no police heat increase
- Consequences: Failure to handle results in automatic police heat increase
- Risk Management: Events can create both opportunities and threats
- Market Timing: Plan your trades around potential disruptions
- City Selection: Some cities may be more prone to certain events
- Financial Planning: Unexpected costs and windfalls require adaptation
- Reputation Management: High reputation brings both benefits and risks
The game features a comprehensive hospital system for health management:
- Only accessible when health is below 100
- Three treatment options with different costs and effects
- Dynamic pricing based on current health level
- Emergency fees for critical health conditions
- π Full Treatment - Restores health to 100
- π©Ή Partial Treatment - Restores 25 health points
- π Basic Treatment - Restores 10 health points
- Base cost: $50
- Cost per health point: $10
- Emergency fees:
- Health < 20: +$200 emergency fee
- Health < 50: +$100 emergency fee
- Health 80: Full treatment = $250
- Health 30: Full treatment = $850 (includes emergency fee)
- Health 10: Full treatment = $1,150 (includes emergency fee)
The game features a comprehensive banking system for financial management:
- π° Savings Account: Earn 5% daily interest on deposits
- π³ Loan System: Borrow money at 15% daily interest
- π Financial Tracking: Monitor all banking activities
- β° Daily Processing: Automatic interest calculation each day
- Interest Rate: 5% per day (compound interest)
- Deposit/Withdraw: Full control over savings
- Example: $1000 savings = $50 interest per day
- Interest Rate: 15% per day (high risk)
- Flexible Terms: Choose loan amount and repayment days
- Overdue Penalty: Converts to general debt if not repaid
- Example: $1000 loan = $150 interest per day
- π° Deposit Money - Add cash to savings account
- πΈ Withdraw Money - Remove money from savings
- π³ Take Loan - Borrow money with interest
- π΅ Pay Loan - Make loan payments
- π View Banking Details - See all financial information
- πͺ Leave Bank - Exit banking menu
- Savings Interest: Automatically added each day
- Loan Interest: Automatically compounded each day
- Overdue Loans: Convert to general debt if not repaid
- Visual Feedback: Shows interest earned/owed each day
- Risk vs Reward: High loan interest vs steady savings growth
- Cash Flow Management: Balance between cash, savings, and loans
- Timing: Critical for loan repayment to avoid penalties
- Compound Growth: Savings grow exponentially over time
druglord/
βββ druglord.sh # Main game script
βββ README.md # This documentation
βββ CHANGELOG.md # Version history and updates
βββ lib/ # Library directory
βββ colors.sh # Color functions and ANSI escape codes
βββ data.sh # Game data arrays and initial state
βββ game.sh # Core game mechanics and logic
βββ menus.sh # All menu functions (buy, sell, travel)
βββ random_events.sh # Random events system and event functions
βββ save.sh # Save and load game functionality
βββ utils.sh # Utility functions and display functions
- All ANSI color functions (red, green, yellow, blue, etc.)
- Bold and dim text formatting
- Used throughout the game for visual appeal
- Game state variables (MONEY, DEBT, DAY, etc.)
- Drug arrays (names, prices, volatility, inventory) - 6 drug types including ludes
- City system data (names, price multipliers, travel costs)
- Travel cost volatility and base cost arrays
- Banking system variables (savings, loans, interest rates)
- Initial game state setup
- Core game mechanics (buy_drug, sell_drug)
- Price fluctuation algorithms (drugs and travel costs)
- Travel cost fluctuation system with volatility
- Police encounters and random events
- Banking system with daily interest processing
- Game over conditions and day progression
- Main menu display
- Buy drugs menu with price indicators and max purchase calculations
- Sell drugs menu
- Travel menu with city selection and fluctuating costs
- Hospital menu with healing options and dynamic pricing
- Banking menu with savings and loan management
- Save game state to file with automatic backup creation
- Load game state from file with integrity validation
- Handles all game variables and arrays (including travel cost data)
- Automatic backup restoration on save failures
- Random events system that triggers when advancing to the next day
- 10 different random events including warehouse fires, police raids, market floods, and personal drama
- Price manipulation events that affect drug costs in current city (both increases and decreases)
- Financial events (found money, robbery, debt changes)
- Health and reputation events
- Personal events that affect inventory and relationships
- Conditional events based on player stats (reputation, inventory)
- Screen clearing and header display
- Stats and inventory display functions
- City initialization and price calculations
- Enhanced market price display with columnar format and trend indicators
bash- Shell interpreterbc- Basic calculator for floating point math- Standard GNU coreutils (shuf, etc.)
For detailed information about recent updates, bug fixes, and new features, see CHANGELOG.md.
- Multiple save files
- Guns for fights
- Pockets / Bags for holding more (planned as a random event)
Bank system for loans and interestβ COMPLETED- .....And more
