diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..19235f8 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,45 @@ +``` + _____ _____ _ _ _______ __ _____ ____ _ _ + | __ \| __ \| | | |/ ____\ \ / /\ | __ \ / / /| || | + | | | | |__) | | | | | __ \ \ /\ / / \ | |__) | / / /_| || |_ + | | | | _ /| | | | | |_ | \ \/ \/ / /\ \ | _ / / / '_ \__ _| + | |__| | | \ \| |__| | |__| | \ /\ / ____ \| | \ \ / /| (_) | | | + |_____/|_| \_\\____/ \_____| \/ \/_/ \_\_| \_\/_/ \___/ |_| +``` + +CHANGELOG + +Version 1.02 - 5-November-2018 + + + +Changed licensed to Simplified BSD. + It's also on the disk as LICENSE. List it. + +Random Color Border + One of the things I wanted to do on the C64 port was take advantage of the SID chip and colors. I'm not quite at the point of feeling comfortable with that, plus it will be some work to make all the + colors work together, initial attempts looked funky. I settled for just having the border change randomly. For now. Future versions will focus on color and sound. + +Code Condensing + The orignal release was over 700 lines and had a lot of REMs. I took the time to condense the code down to as few lines as possible and removed REMs before importing it to the image. It's now just over 400 lines of code. The //e version condensed even further with the //e's longer line limit. + +Fixed the gaping cheat hole + I left a total massive bug in the game that made cheating a snap if you just punched in negative numbers. At first I wanted to play this off as an intended consequence; but it really wasn't. I could have taken the easy route and prevented all cheating, but I decided to add the extra lines to make a liberal "anti-cheat" policy. Most drugs will let you buy a limited number of negative drugs...it's random every day; but the game keeps track of how much you do this. If your cheat counter hits three; you can get booted out of the game. Trying to rob the bank with a negative deposit or scamming the loan-shark with a negative payment will have a severe impact on your cheat-counter but won't check how many times you've cheated. Trying to screw the loan shark, however, will automatically DOUBLE your debt!!! Trying to rob the bank or loan-shark doesn't check the cheat counter; this is by design. I'm not going to tell you exactly when it's triggered. + + There is also a small chance the bank will let you rob it blind! You can do this by using a negative amount for deposit, or trying to deposit more than what's in your wallet. Either way you'll either get money in your wallet or add a large amount to your bank account with your wallet's negative amount flipping to positive. + + Anything else I left open to accept negative numbers was probably done becuase I figured it would screw you over more than be a cheat...but if you find a way to abuse it...have fun. + +Police shoot when you run + I don't think the original TI game had them shoot at you when you tried to run; but I felt that should happen. I know..if you haven't even had the chance to buy a gun it makes things harder..oh well. Even in real life if you run they're going to probably shoot at you anyway. Welcome to the jungle. + +Changed how Inventory affects cops + Originally cops were triggered when the event hit one of three numbers and if your inventory was over 50. I've modified this based on half your free-space instead. + +Changed Health + You originally started at 0 and counted to 50; with cops adding 3 each time they hit you. You now start with 100, die at 0; and cops take 6 each time they hit. This brings the C64 port in line with the //e version. + +No More REMs + I was told these slowed things down more than it did on the A2 (that or no one cared on the A2); so the game code now has no REM statements at all. + + \ No newline at end of file diff --git a/LICENSE b/LICENSE index d199723..c0be790 100644 --- a/LICENSE +++ b/LICENSE @@ -1,674 +1,9 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 +Copyright 2018 Jay Moore - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Preamble +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - The GNU General Public License is a free, copyleft license for -software and other kinds of works. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - Drugwar2e - Copyright (C) 2018 Jay Moore - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Drugwar2e Copyright (C) 2018 Jay Moore - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/drugwar64.bas b/drugwar64.bas index 6294757..513aeaa 100644 --- a/drugwar64.bas +++ b/drugwar64.bas @@ -1,765 +1,402 @@ -10 rem drugwar64v101.bas - 29/10/2018 - 04h45 -20 rem drugwar/64 - version 1.01 -30 rem codebase: drugwar//e 1.03 -40 rem ported by: jay moore -50 rem "damn that was annoying" -60 rem 28-oct-2018 -70 rem copyright 2018 jay moore -80 rem released under gpl v3 -90 rem drugwar2e.sourceforge.io -100 rem twitter: _nq4t -110 poke 646,1 : poke 53281,0 : poke 53280,0 -120 rv=1.01 -130 goto 6960 -140 rem->titlebar -150 poke 214,0:poke 211,14:sys 58640 : ?"drugwar/64" -160 print chr$(18)" " -170 return -180 rem->wait -190 print -200 input "press enter to continue.";x$ -210 return -220 rem->twofifteen -230 poke 214,1 : poke 211,14:sys 58640 -240 return -250 rem->twosixteen -260 poke 214,1:poke 211,15:sys 58640 -270 return -280 rem->twoseventeen -290 poke 214,1:poke 211,16:sys 58640 -300 return -310 rem->twoeighteen -320 poke 214,1: poke 211,17:sys 58640 -330 return -340 rem->twonineteen -350 poke 214,1:poke 211,18:sys 58640 -360 return -370 rem->jetalthere -380 gosub 350:print chr$(18)"jet" -390 return -400 rem->timera -410 for j = 1 to 2500 -420 next j -430 k = int(rnd(2)+.5) -440 return -450 rem->timerb -460 for j = 1 to 1000 -470 next j -480 return -490 rem->timerc -500 for j = 1 to 2000 -510 next j -520 return -530 rem->howmuchbuy -540 print "you can afford ";j -550 print "you can carry ";f -560 rem->howmanybuy -570 print -580 input "how many? (enter 0 cancel): ";k -590 if k=0 goto 1200 -600 if k>f then print chr$(18)"you can't carry that much!" : goto 570 -610 if k>j then print chr$(18)"you can't afford that much!" : goto 570 -620 return -630 rem->howmuchsell -640 print "you can sell: ";j -650 print -660 rem->howmanysell -670 input "how many? (enter 0 to cancel.): ";k -680 if k>j then print "you don't have that many!" : goto 670 -690 if k=0 goto 1200 -700 return -710 rem->freespace -720 f=i-((g*5)+m+n+o+u+t+q) -730 return -740 rem->chase -750 gosub 230: print chr$(18)"being chased" -760 return -770 rem->gmod -780 gosub 260:print chr$(18)"game over" -790 return -800 rem->bronxcheck -810 if p$ = "the bronx" then return -820 print "you need to head to the bronx" -830 print "to take care of this business." -840 gosub 500 -850 goto 1200 -860 rem->daily -870 c=int(rnd(5)*12000+16000.5) -880 h=int(rnd(5)*7000+5000.5) -890 a=int((rnd(5)*34+10)*100+.5) -900 z=int((rnd(5)*42+33)*10+.5) -910 s=int((rnd(5)*15+7)*10+.5) -920 l=int((rnd(5)*4+1)*10+.5) -930 b=int(rnd(5)*20+.5) -940 d=d+1 -950 rem->checkday -960 if d >= 31 goto 7400 -970 return -980 rem->scorecalculate -990 k=(w+e)-v -1000 if k<0 then k=0 : return -1010 k=int(sqr((k/31.5)+.5)) -1020 if k>100 then k=100 -1030 return -1040 rem->gamestart -1050 w=2000 -1060 e=0 -1070 v=5000 -1080 p$="the bronx" -1090 g=0 -1100 i=100 -1110 m=0 -1120 n=0 -1130 o=0 -1140 u=0 -1150 t=0 -1160 q=0 -1170 gosub 870 -1180 goto 1200 -1190 rem->menu -1200 print chr$(147) -1210 gosub 720 -1220 gosub 150 -1230 poke 214,1:poke 211,3:sys 58640:print chr$(18)"day: "d -1240 poke 214,1:poke 211,17:sys 58640:print chr$(18)"location: "p$ -1250 print -1260 print "(c)heck prices" -1270 print "(t)renchcoat" -1280 print "(b)uy" -1290 print "(s)ell" -1300 print "(j)et" -1310 print "see (l)oan shark" -1320 print "(v)isit bank" -1330 print -1340 input "please make your selection: ";x$ -1350 if x$ = "c" goto 1440 -1360 if x$ = "t" goto 1580 -1370 if x$ = "b" goto 1720 -1380 if x$ = "s" goto 1930 -1390 if x$ = "j" goto 2170 -1400 if x$ = "l" goto 2420 -1410 if x$ = "v" goto 2560 -1420 goto 1200 -1430 rem->prices -1440 print chr$(147) -1450 gosub 150 -1460 gosub 320:print chr$(18)"prices" -1470 print -1480 print"cocaine:","$"c -1490 print"heroin:","$"h -1500 print"acid:","$"a -1510 print"weed:","$"z -1520 print"speed:","$"s -1530 print"ludes:","$"l -1540 print"wallet:","$"w -1550 gosub 190 -1560 goto 1200 -1570 rem->inventory -1580 print chr$(147) -1590 gosub 150 -1600 gosub 260 :print chr$(18)"trenchcoat" -1610 print -1620 print"cocaine:",m -1630 print"heroin:",n -1640 print"acid:",o -1650 print"weed:",u -1660 print"speed:",t -1670 print"ludes:",q -1680 print"free space:",f -1690 gosub 190 -1700 goto 1200 -1710 rem->buy -1720 print chr$(147) -1730 gosub 150 -1740 gosub 350: print chr$(18)"buy" -1750 print -1760 print"what do you want to buy?" -1770 print -1780 print "(c)ocaine" -1790 print "(h)eroin" -1800 print "(a)cid" -1810 print "(w)eed" -1820 print "(s)peed" -1830 print "(l)udes" -1840 input "enter selection: ";x$ -1850 if x$="c" goto 2700 -1860 if x$="h" goto 2790 -1870 if x$="a" goto 2880 -1880 if x$="w" goto 2970 -1890 if x$="s" goto 3060 -1900 if x$="l" goto 3150 -1910 goto 1200 -1920 rem->sell -1930 print chr$(147) -1940 gosub 150 -1950 gosub 320: print chr$(18)"sell" -1960 print -1970 print "what would you like to sell?" -1980 print -1990 print "(c)ocaine" -2000 print "(h)eroin" -2010 print "(a)cid" -2020 print "(w)eed" -2030 print "(s)peed" -2040 print "(l)udes" -2050 rem->sellsel -2060 input "enter selection: (0 to cancel)";x$ -2070 if x$="c" goto 3240 -2080 if x$="h" goto 3340 -2090 if x$="a" goto 3440 -2100 if x$="w" goto 3540 -2110 if x$="s" goto 3640 -2120 if x$="l" goto 3740 -2130 if x$="0" goto 1200 -2140 print "invalid selection!" -2150 goto 2060 -2160 rem->jet -2170 print chr$(147) -2180 gosub 150 -2190 gosub 380 -2200 print -2210 print "(b)ronx" -2220 print "(g)hetto" -2230 print "(c)entral park -2240 print "(m)anhattan" -2250 print "coney (i)sland" -2260 print "broo(k)lyn" -2270 print "(o)ops...stay!" -2280 input "where to dude? ";x$ -2290 if x$="b" then y$ = "the bronx" : goto 2380 -2300 if x$="g" then y$ = "the ghetto" : goto 2380 -2310 if x$="c" then y$ = "central park" : goto 2380 -2320 if x$="m" then y$ = "manhattan" : goto 2380 -2330 if x$="i" then y$ = "coney island" : goto 2380 -2340 if x$="k" then y$ = "brooklyn" : goto 2380 -2350 if x$="o" then goto 1200 -2360 goto 2170 -2370 rem->jetb -2380 if y$=p$ then goto 3840 -2390 p$ = y$ : y$ = "" -2400 goto 3930 -2410 rem->loan -2420 print chr$(147) -2430 gosub 150 -2440 gosub 260:print chr$(18)"loan shark" -2450 print -2460 gosub 810 -2470 print "your debt is: $";v -2480 print "you have: $";w -2490 print -2500 input "(r)epay, (b)orrow, (l)eave: ";x$ -2510 if x$ = "r" then goto 6540 -2520 if x$ = "b" then goto 6630 -2530 if x$ = "l" then goto 1200 -2540 goto 2420 -2550 rem->bank -2560 print chr$(147) -2570 gosub 150 -2580 gosub 230: print chr$(18)"bank o'murica" -2590 print -2600 gosub 810 -2610 print "your balance: $";e -2620 print "your wallet: $";w -2630 print -2640 input "(d)eposit, (w)ithdraw, (l)eave: ";x$ -2650 if x$ = "d" then goto 6760 -2660 if x$ = "w" then goto 6860 -2670 if x$ = "l" then goto 1200 -2680 goto 2560 -2690 rem->cokebuy -2700 print chr$(147) -2710 gosub 150 -2720 gosub 260: print chr$(18)"buy cocaine" -2730 print -2740 j=int(w/c) -2750 gosub 540 -2760 m=m+k : w=w-(c*k) -2770 goto 1200 -2780 rem->herbuy -2790 print chr$(147) -2800 gosub 150 -2810 gosub 260: print chr$(18)"buy heroin" -2820 print -2830 j=int(w/h) -2840 gosub 540 -2850 n=n+k : w=w-(h*k) -2860 goto 1200 -2870 rem->acidbuy -2880 print chr$(147) -2890 gosub 150 -2900 gosub 290:print chr$(18)"buy acid" -2910 print -2920 j=int(w/a) -2930 gosub 540 -2940 o=o+k : w=w-(a*k) -2950 goto 1200 -2960 rem->weedbuy -2970 print chr$(147) -2980 gosub 150 -2990 gosub 290: print chr$(18)"buy weed" -3000 print -3010 j=int(w/z) -3020 gosub 540 -3030 u=u+k : w=w-(z*k) -3040 goto 1200 -3050 rem->spdbuy -3060 print chr$(147) -3070 gosub 150 -3080 gosub 290: print chr$(18)"buy speed" -3090 print -3100 j=int(w/s) -3110 gosub 540 -3120 t=t+k : w=w-(s*k) -3130 goto 1200 -3140 rem->ludbuy -3150 print chr$(147) -3160 gosub 150 -3170 gosub 290: print chr$(18)"buy ludes" -3180 print -3190 j=int(w/l) -3200 gosub 540 -3210 q=q+k : w=w-(l*k) -3220 goto 1200 -3230 rem->cokesell -3240 print chr$(147) -3250 gosub 150 -3260 gosub 230:print chr$(18)"sell cocaine" -3270 print -3280 j=m -3290 gosub 640 -3300 m=m-k -3310 w=w+(c*k) -3320 goto 1200 -3330 rem->hersell -3340 print chr$(147) -3350 gosub 150 -3360 gosub 290:print chr$(18)"sell heroin" -3370 print -3380 j=n -3390 gosub 640 -3400 n=n-k -3410 w=w+(h*k) -3420 goto 1200 -3430 rem->acidsell -3440 print chr$(147) -3450 gosub 150 -3460 gosub 290: print chr$(18)"sell acid" -3470 print -3480 j=o -3490 gosub 640 -3500 o=o-k -3510 w=w+(a*k) -3520 goto 1200 -3530 rem->weedsell -3540 print chr$(147) -3550 gosub 150 -3560 gosub 290:print chr$(18)"sell weed" -3570 print -3580 j=u -3590 gosub 640 -3600 u=u-k -3610 w=w+(z*k) -3620 goto 1200 -3630 rem->spdsell -3640 print chr$(147) -3650 gosub 150 -3660 gosub 260:print chr$(18)"sell speed" -3670 print -3680 j=t -3690 gosub 640 -3700 t=t-k -3710 w=w+(s*k) -3720 goto 1200 -3730 rem->ludsell -3740 print chr$(147) -3750 gosub 150 -3760 gosub 260:print chr$(18)"sell ludes" -3770 print -3780 j=q -3790 gosub 640 -3800 q=q-k -3810 w=w+(l*k) -3820 goto 1200 -3830 rem->alreadythere -3840 print chr$(147) -3850 gosub 150 -3860 gosub 380 -3870 print -3880 print "you're already in:" -3890 print " ";p$ -3900 gosub 500 -3910 goto 2170 -3920 rem->subway -3930 print chr$(147) -3940 gosub 870 -3950 v=int(v*1.1+.5) -3960 e=int(e*1.06+.5) -3970 gosub 150 -3980 gosub 320:print chr$(18)"subway" -3990 print -4000 if b=1 then goto 4250 -4010 if b=2 then goto 4300 -4020 if b=3 then goto 4350 -4030 if b=4 then goto 4410 -4040 if b=5 then goto 4410 -4050 if b=6 then goto 4470 -4060 if b=7 then goto 4470 -4070 if b=8 then goto 4530 -4080 if b=9 then goto 4630 -4090 if b=10 then goto 4630 -4100 if b=11 then goto 4630 -4110 if b=12 then goto 6020 -4120 if b=13 then goto 6020 -4130 if b=14 then goto 6160 -4140 if b=15 then goto 6230 -4150 if b=16 then goto 6310 -4160 if b=17 then goto 6480 -4170 rem->nothinghappened -4180 rem->nothinghappens -4190 print -4200 print "welcome to ";p$ -4210 print -4220 gosub 500 -4230 goto 1200 -4240 rem->cheapludes -4250 print "rival dealers are selling cheap ludes!" -4260 l=2 -4270 gosub 500 -4280 goto 1200 -4290 rem->cheepweed -4300 print "weed prices have bottomed-out!" -4310 z=122 -4320 gosub 500 -4330 goto 1200 -4340 rem->pigheroin -4350 print "pigs are selling cheap heroin" -4360 print "from last week's raid!" -4370 h=int((rnd(9)*1150)+850.5) -4380 gosub 500 -4390 goto 1200 -4400 rem->heroinbust -4410 print "addicts are buying heroin" -4420 print "at outrageous prices!" -4430 h=int((rnd(9)*25000)+18000.5) -4440 gosub 500 -4450 goto 1200 -4460 rem->cokebust -4470 print "pigs made a big coke bust!" -4480 print "prices are outrageous!!!!" -4490 c=int((rnd(9)*60000)+80000.5) -4500 gosub 500 -4510 goto 1200 -4520 rem->mugged -4530 print "you got mugged!" -4540 print -4550 j=int(w/3) -4560 j=int(j*2) -4570 k=int(w-j) -4580 print "you lost $";k -4590 w=j -4600 gosub 500 -4610 gosub 1200 -4620 rem->cops -4630 k=m+n+u+o+t+p -4640 if k<50 then goto 4180 -4650 if b=9 then b = 2 -4660 if b=10 then b=4 -4670 if b=11 then b=5 -4680 print "it's the cops!" -4690 print -4700 print "officer hardass and ";b-1;" of his" -4710 print "deputies are after you!" -4720 print -4730 gosub 500 -4740 goto 4760 -4750 rem->police -4760 print chr$(147) -4770 gosub 150 -4780 gosub 750 -4790 print -4800 print -4810 print "view (g)uns" -4820 print "view (d)amage" -4830 print "(n)umber of pigs" -4840 print "(r)un" -4850 print "(f)ight" -4860 print -4870 input "what do you want to do? ";x$ -4880 if x$="g" goto 4950 -4890 if x$ = "d" goto 5050 -4900 if x$ = "n" goto 5170 -4910 if x$ = "r" goto 5280 -4920 if x$="f" goto 5450 -4930 goto 4760 -4940 rem->pgun -4950 print chr$(147) -4960 gosub 150 -4970 gosub 750 -4980 print -4990 print -5000 print "you have ";g;" guns. -5010 print -5020 gosub 190 -5030 goto 4760 -5040 rem->damage -5050 print chr$(147) -5060 gosub 150 -5070 gosub 750 -5080 print -5090 print -5100 print "your current damage is ";bb;"." -5110 print -5120 print "50 and you die!" -5130 print -5140 gosub 190 -5150 goto 4760 -5160 rem->ncops -5170 print chr$(147) -5180 gosub 150 -5190 gosub 750 -5200 print -5210 print -5220 print "there are ";b;" pigs still chasing you!" -5230 print -5240 print -5250 gosub 190 -5260 goto 4760 -5270 rem->run -5280 print chr$(147) -5290 gosub 150 -5300 gosub 750 -5310 print -5320 print -5330 print "running..." -5340 gosub 410 -5350 if k = 0 then print "you lost them in an alley!" : goto 5410 -5360 print "you can't shake them!" -5370 print -5380 gosub 190 -5390 goto 4760 -5400 rem->loserun -5410 print -5420 gosub 190 -5430 goto 1200 -5440 rem->fight -5450 if g>0 then goto 5510 -5460 print -5470 print "you don't have any guns!" -5480 gosub 190 -5490 goto 4760 -5500 rem->fightc -5510 print chr$(147) -5520 gosub 150 -5530 gosub 750 -5540 print -5550 print "you shoot!" -5560 gosub 410 -5570 if k=0 then goto 5600 -5580 print "you got one!" : b = b-1 : goto 5620 -5590 rem->miss -5600 print "you missed!" -5610 rem->next -5620 print -5630 print -5640 if b <= 0 then goto 5840 -5650 gosub 460 -5660 print "they're firing at you!" -5670 gosub 410 -5680 if k=0 then goto 5740 -5690 print "you've been hit!" -5700 bb=bb+3 -5710 if bb >= 50 goto 5790 -5720 goto 5760 -5730 rem->theymiss -5740 print "they missed!" -5750 rem->nexta -5760 gosub 190 -5770 goto 4760 -5780 rem->ded -5790 print -5800 print "you've been killed!" -5810 gosub 190 -5820 goto 7400 -5830 rem->allgone -5840 print "you killed all of them!" -5850 print -5860 gosub 410 -5870 j=int(((rnd(7)*1250)+750)+.5) -5880 w=w+j -5890 print "you found $";j;" on officer hardass'" -5900 print "carcass!" -5910 if w>=1200 then goto 5940 -5920 goto 1200 -5930 rem->doctor -5940 gosub 500 -5950 print -5960 print "will you pay $1000 for a doctor" -5970 input "to sew you up? (y/n)";x$ -5980 if x$ <> "y" then goto 1200 -5990 w=w-1000 -6000 bb=0 -6010 rem->gunbuy -6020 if w < 500 then goto 4180 -6030 gosub 720 -6040 if f < 5 then goto 4180 -6050 j=int((rnd(4)*2)+.5) -6060 if j = 0 then y$ = "baretta" -6070 if j = 1 then y$ = "saturday night special" -6080 if j = 2 then y$ = ".44 magnum" -6090 print "will you buy a ";y$ -6100 input "for $400? (y/n)";x$ -6110 if x$ <> "y" then goto 1200 -6120 g = g+1 -6130 w = w-400 -6140 goto 1200 -6150 rem->dedweed -6160 print "there's some weed here that smells" -6170 print "like good stuff!!" -6180 print -6190 input "will you smoke it? (y/n)";x$ -6200 if x$ = "y" then goto 7270 -6210 goto1200 -6220 rem->newcoat -6230 if w<300 then goto 4190 -6240 print "will you buy a new trenchcoat" -6250 input "with more pockets for $200? (y/n)";x$ -6260 if x$ <> "y" then goto 1200 -6270 i=i+10 -6280 w=w-200 -6290 goto 1200 -6300 rem->dedguy -6310 gosub 720 -6320 if f<8 then goto 4190 -6330 j=int((rnd(3)*7)+1.5) -6340 k=int(rnd(3)*5+.5) -6350 if k=0 then q=q+j : y$ = "ludes" -6360 if k=1 then t=t+j : y$ = "speed" -6370 if k=2 then u=u+j : y$ = "weed" -6380 if k=3 then o=o+j : y$ = "acid" -6390 if k=4 then n=n+j : y$ = "heroin" -6400 if k=5 then m=m+j : y$ = "cocaine" -6410 print "you found ";j;" units of" -6420 print " ";y$ -6430 print "on a dead dude in the subway!" -6440 print -6450 gosub 500 -6460 goto 1200 -6470 rem->homeacid -6480 print "the market has been flooded" -6490 print "with cheap home-made acid!" -6500 a=int((rnd(4)*550)+250.5) -6510 gosub 500 -6520 goto 1200 -6530 rem->payme -6540 input "repay how much? ";k -6550 if k>w then print:print "you don't have that much!" : gosub 460 : goto 2420 -6560 if k>v then print:print "you don't owe that much!" : gosub 460 : goto 2420 -6570 w=w-k -6580 v=v-k -6590 print:print "thank you." -6600 gosub 500 -6610 goto 1200 -6620 rem->borrow -6630 print -6640 input "how much do you want? ";k -6650 print -6660 j=int((rnd(10)*10000)+5000) -6670 if k>14000 then print "he's not that stupid!" : gosub 500 : goto 1200 -6680 if k > j then print "he doesn't feel like it." : gosub 460 : goto 1200 -6690 v=v+k -6700 w=w+k -6710 print -6720 print "here's your money." : print : print "remember, i break thumbs." -6730 gosub 500 -6740 goto 1200 -6750 rem->deposit -6760 print -6770 input "how much? ";j -6780 if j>w then print "you don't have that much cash." : goto 6760 -6790 e=e+j -6800 w=w-j -6810 print -6820 print "thank you for your deposit." -6830 gosub 500 -6840 goto 1200 -6850 rem->mymoney -6860 print -6870 input "how much? ";j -6880 if j>e then print "you don't have sufficient funds." : goto 6860 -6890 e=e-j -6900 w=w+j -6910 print -6920 print "thank you for your business." -6930 gosub 500 -6940 goto 1200 -6950 rem->instructions -6960 print chr$(147) -6970 poke 211,3:sys 58640:print "welcome to drugwar/64 version";rv -6980 poke 211,5:sys 58640: print "ported from drugwar//e v 1.03":?:?:?:?:? -6990 ?: ? : poke 211,5:sys 58640:? "based on the ti-basic clone of" -7000 poke 211,7:sys 58640:print "john e. dell's 1984 drugwar" -7010 poke 211,11:sys 58640:print "for ibm and trs-80":?:? -7020 ?:?:poke 211,6:sys 58640:?"applesoft version by jay moore" -7030 poke 211,10:sys 58640: print "c64 port by jay moore" -7040 poke 211,1 : poke 214,23 : sys 58640 -7050 input "would you like instructions? (y/n)";x$ -7060 j=rnd(-ti) -7070 if x$ = "y" then goto 7100 -7080 goto 1050 -7090 rem->inst -7100 print chr$(147) -7110 gosub 150 -7120 print -7130 print "this is a game of buying and selling." -7140 print "your goal is to pay off your debt and" -7150 print "make as much money as possible in a one" -7160 print "month period. prices fluctuate every day" -7170 print "and interest on your loan is calculated as well." -7180 print:print "if you deal too heavily, you'll attract the attention" -7190 print "of the police." -7200 print -7210 print "commands are entered using the letter" -7220 print "highlighted (l)ike (s)o. y is yes and" -7230 print "anything counts as no." -7240 gosub 190 -7250 goto 1050 -7260 rem->weedend -7270 print chr$(147) -7280 gosub 150 -7290 gosub 230: print chr$(18)"smoke weed" -7300 print "you hallucinate on the wildest trip" -7310 print "of your life, stumble on to the tracks," -7320 print "and get creamed by a train!" -7330 print -7340 print -7350 poke 211,7:sys 58640:? "just say no to drugs!" -7360 gosub 500 -7370 gosub 460 -7380 goto 7540 -7390 rem->endgame -7400 print chr$(147) -7410 gosub 150 -7420 gosub 990 -7430 gosub 780 -7440 print -7450 print "your score on a scale of 1 to 100: ";k -7460 print -7470 input "would you like to play again? (y/n)";x$ -7480 if x$ = "y" then goto 1050 -7490 print "thanks for playing." -7500 print "remember, watch your back." -7510 print "have a nice day!" -7520 end -7530 rem->ironicend -7540 print chr$(147) -7550 gosub 150 -7560 gosub 780 -7570 print -7580 print "you died from smoking weed." -7590 print -7600 print -7610 gosub 500: print"see? games are totally fake." -7620 print -7630 input "would you like to play again? ";x$ -7640 if x$= "y" then goto 1050 -7650 end +1 +2 poke646,1:poke53281,0:poke53280,0:rv=1.02:goto358: +3 +4 poke53280,int(rnd(1)*16) +5 poke214,0:poke211,15:sys58640:?"drugwar/64" +6 ?chr$(18)" ":return +7 +8 j=rnd(-ti):return +9 +10 ?:input"press enter to continue.";x$:return +11 +12 poke214,1:poke211,14:sys58640:return +13 +14 poke214,1:poke211,15:sys58640:return +15 +16 poke214,1:poke211,16:sys58640:return +17 +18 poke214,1:poke211,17:sys58640:return +19 +20 poke214,1:poke211,18:sys58640:return +21 +22 gosub20:?chr$(18)"jet":return +23 +24 forj=1to2500:nextj:k=int(rnd(1)+.5):return +25 +26 forj=1to1000:nextj:return +27 +28 forj=1to2000:nextj:return +29 +30 ?"you can afford ";j:?"you can carry ";f +31 +32 ?:input"how many?(enter 0 cancel):";k:ifk=0goto74 +33 ifkfthen?chr$(18)"you can't carry that much!":goto32 +36 ifk>jthen?chr$(18)"you can't afford that much!":goto32 +37 return +38 +39 ?"you can sell:";j:? +40 +41 input"how many?(enter 0 to cancel.):";k +42 ifk>jthen?"you don't have that many!":goto41 +43 ifk=0goto74 +44 return +45 +46 f=i-((g*5)+m+n+o+u+t+q):return +47 +48 gosub12:?chr$(18)"being chased":return +49 +50 gosub14:?chr$(18)"game over":return +51 +52 ifp$="the bronx"thenreturn +53 ?"you need to be in the bronx":?"to take care of this business." +54 gosub28:goto74 +55 +56 c=int(rnd(1)*12000+16000.5):h=int(rnd(1)*7000+5000.5) +57 a=int((rnd(1)*34+10)*100+.5):z=int((rnd(1)*42+33)*10+.5) +58 s=int((rnd(1)*15+7)*10+.5):l=int((rnd(1)*4+1)*10+.5) +59 b=int(rnd(1)*20+.5):d=d+1:ac=int(((rnd(1)*10)+1)*-1):ifad>0thenad=ad-1 +60 +61 ifd>=31goto392 +62 return +63 +64 k=(w+e)-v:ifk<0thenk=0:return +65 k=int(sqr((k/31.5)+.5)):ifk>100thenk=100 +66 return +67 +68 w=2000:e=0:v=5000:p$="the bronx":g=0:i=100:m=0:n=0:o=0:u=0:t=0:q=0 +69 d=0:bb=100:gosub56:goto74 +70 +71 ifad>=3thengoto381 +72 return +73 +74 ?chr$(147):gosub46:gosub4:poke214,1:poke211,3:sys58640:?chr$(18)"day:"d +75 poke214,1:poke211,17:sys58640:?chr$(18)"location:"p$:?:?"(c)heck prices" +76 ?"(t)renchcoat":?"(b)uy":?"(s)ell":?"(j)et" +77 ?"(l)oan shark":?"(v)isit bank":? +78 input "please make your selection:";x$ +79 ifx$="c"goto88 +80 ifx$="t"goto92 +81 ifx$="b"goto96 +82 ifx$="s"goto107 +83 ifx$="j"goto121 +84 ifx$="l"goto137 +85 ifx$="v"goto145 +86 goto74 +87 +88 ?chr$(147):gosub4:gosub18:?chr$(18)"prices":?:?"cocaine:","$"c +89 ?"heroin:","$"h:?"acid:","$"a:?"weed:","$"z:?"speed:","$"s:?"ludes:","$"l +90 ?"wallet:","$"w:gosub10:goto74 +91 +92 ?chr$(147):gosub4:gosub14:?chr$(18)"trenchcoat":?:?"cocaine:",m +93 ?"heroin:",n:?"acid:",o:?"weed:",u:?"speed:",t:?"ludes:",q:?"free space:";f +94 gosub10:goto74 +95 +96 ?chr$(147):gosub4:gosub20:?chr$(18)"buy":? +97 ?"what do you want to buy?":?:?"(c)ocaine":?"(h)eroin":?"(a)cid" +98 ?"(w)eed":?"(s)peed":?"(l)udes":?:input"enter selection:";x$ +99 ifx$="c"goto153 +100 ifx$="h"goto156 +101 ifx$="a"goto159 +102 ifx$="w"goto162 +103 ifx$="s"goto165 +104 ifx$="l"goto168 +105 goto74 +106 +107 ?chr$(147):gosub4:gosub18:?chr$(18)"sell":? +108 ?"what would you like to sell?":?:?"(c)ocaine":?"(h)eroin":?"(a)cid" +109 ?"(w)eed":?"(s)peed":?"(l)udes":? +110 +111 input"enter selection:(0 to cancel)";x$ +112 ifx$="c"goto171 +113 ifx$="h"goto174 +114 ifx$="a"goto177 +115 ifx$="w"goto180 +116 ifx$="s"goto183 +117 ifx$="l"goto186 +118 ifx$="0"goto74 +119 ?"invalid selection!":goto111 +120 +121 ?chr$(147):gosub4:gosub22:?:?"(b)ronx":?"(g)hetto":?"(c)entral park +122 ?"(m)anhattan":?"coney (i)sland":?"broo(k)lyn":?"(o)ops...stay!":? +123 input "where to dude";x$ +124 ifx$="b"theny$="the bronx":goto134 +125 ifx$="g"theny$="the ghetto":goto134 +126 ifx$="c"theny$="central park":goto134 +127 ifx$="m"theny$="manhattan":goto134 +128 ifx$="i"theny$="coney island":goto134 +129 ifx$="k"theny$="brooklyn":goto134 +130 ifx$="o"thengoto74 +131 if x$="coptest" then b=5:g=1:goto238 +132 goto121 +133 +134 ify$=p$thengoto189 +135 p$=y$:y$="":goto192 +136 +137 ?chr$(147):gosub4:gosub14:?chr$(18)"loan shark":?:gosub52 +138 ?"your debt is:$";v:?"you have:$";w:? +139 input"(r)epay, (b)orrow, (l)eave:";x$ +140 ifx$="r"goto334 +141 ifx$="b"goto339 +142 ifx$="l"goto74 +143 goto137 +144 +145 ?chr$(147):gosub4:gosub12:?chr$(18)"bank o'murica":?:gosub52 +146 ?"your balance:$";e:?"your wallet:$";w:? +147 input"(d)eposit, (w)ithdraw, (l)eave:";x$ +148 ifx$="d"goto346 +149 ifx$="w"goto353 +150 ifx$="l"goto74 +151 goto145 +152 +153 ?chr$(147):gosub4:gosub14:?chr$(18)"buy cocaine" +154 ac=0:?:j=int(w/c):gosub30:m=m+k:w=w-(c*k):goto74 +155 +156 ?chr$(147):gosub4:gosub14:?chr$(18)"buy heroin" +157 ac=0:?:j=int(w/h):gosub30:n=n+k:w=w-(h*k):goto74 +158 +159 ?chr$(147):gosub4:gosub16:?chr$(18)"buy acid" +160 ?:j=int(w/a):gosub30:o=o+k:w=w-(a*k):goto74 +161 +162 ?chr$(147):gosub4:gosub16:?chr$(18)"buy weed" +163 ?:j=int(w/z):gosub30:u=u+k:w=w-(z*k):goto74 +164 +165 ?chr$(147):gosub4:gosub16:?chr$(18)"buy speed" +166 ?:j=int(w/s):gosub30:t=t+k:w=w-(s*k):goto74 +167 +168 ?chr$(147):gosub4:gosub16:?chr$(18)"buy ludes" +169 ?:j=int(w/l):gosub30:q=q+k:w=w-(l*k):goto74 +170 +171 ?chr$(147):gosub4:gosub12:?chr$(18)"sell cocaine" +172 ?:j=m:gosub39:m=m-k:w=w+(c*k):goto74 +173 +174 ?chr$(147):gosub4:gosub16:?chr$(18)"sell heroin" +175 ?:j=n:gosub39:n=n-k:w=w+(h*k):goto74 +176 +177 ?chr$(147):gosub4:gosub16:?chr$(18)"sell acid" +178 ?:j=o:gosub39:o=o-k:w=w+(a*k):goto74 +179 +180 ?chr$(147):gosub4:gosub16:?chr$(18)"sell weed":?:j=u +181 gosub39:u=u-k:w=w+(z*k):goto74 +182 +183 ?chr$(147):gosub4:gosub14:?chr$(18)"sell speed":?:j=t +184 gosub39:t=t-k:w=w+(s*k):goto74 +185 +186 ?chr$(147):gosub4:gosub14:?chr$(18)"sell ludes":?:j=q +187 gosub39:q=q-k:w=w+(l*k):goto74 +188 +189 ?chr$(147):gosub4:gosub22:? +190 ?"you're already in:":?" ";p$:gosub28:goto121 +191 +192 ?chr$(147):gosub56:v=int(v*1.1+.5):e=int(e*1.06+.5):gosub4:gosub18 +193 ?chr$(18)"subway":? +194 ifb=1goto214 +195 ifb=2goto216 +196 ifb=3goto218 +197 ifb=4goto221 +198 ifb=5goto221 +199 ifb=6goto224 +200 ifb=7goto224 +201 ifb=8goto227 +202 ifb=9goto230 +203 ifb=10goto230 +204 ifb=11goto230 +205 ifb=12goto297 +206 ifb=13goto297 +207 ifb=14goto308 +208 ifb=15goto313 +209 ifb=16goto319 +210 ifb=17goto331 +211 +212 poke211,8:sys58640:?:?"welcome to ";p$:?:gosub28:goto74 +213 +214 ?"rival dealers are selling cheap ludes!":l=2:gosub28:goto74 +215 +216 ?"weed prices have bottomed-out!":z=122:gosub28:goto74 +217 +218 ?"pigs are selling cheap heroin":?"from last week's raid!" +219 h=int((rnd(1)*1150)+850.5):gosub28:goto74 +220 +221 ?"addicts are buying heroin":?"at outrageous prices!" +222 h=int((rnd(1)*25000)+18000.5):gosub28:goto74 +223 +224 ?"pigs made a big coke bust!":?"prices are outrageous!!!!" +225 c=int((rnd(1)*60000)+80000.5):gosub28:goto74 +226 +227 ?"you got mugged!":?:j=int(w/3):j=int(j*2):k=int(w-j) +228 ?"you lost $";k:w=j:gosub28:gosub74 +229 +230 gosub 46 +231 iff>i/2thengoto212 +232 ifb=9thenb=2 +233 ifb=10thenb=4 +234 ifb=11thenb=5 +235 ?"it's the cops!":?:?"officer hardass and ";b-1;" of his" +236 ?"deputies are after you!":?:gosub28 +237 +238 ?chr$(147):gosub4:gosub48:?:?:?"view (g)uns":?"view (d)amage" +239 ?"(n)umber of pigs":?"(r)un":?"(f)ight":? +240 input"what do you want to do?";x$ +241 ifx$="g"goto248 +242 ifx$="d"goto252 +243 ifx$="n"goto256 +244 ifx$="r"goto260 +245 ifx$="f"goto266 +246 goto238 +247 +248 ?chr$(147):gosub4:gosub48:?:? +249 ifg=1then?"you have 1 gun.":gosub10:goto238 +250 ?"you have ";g;" guns.":?:gosub10:goto238 +251 +252 ?chr$(147):gosub4:gosub48 +253 ?:?:?"your current health is ";bb;".":? +254 ?"0 and you die!":?:gosub10:goto238 +255 +256 ?chr$(147):gosub4:gosub48 +257 ifb=1then?:?:?"there is 1 pig still chasing you!":?:?:gosub10:goto238 +258 ?:?:?"there are ";b;" pigs still chasing you!":?:?:gosub10:goto238 +259 +260 ?chr$(147):gosub4:gosub48:?:?:?"running...":gosub24 +261 ifk=0then?"you lost them in an alley!":goto264 +262 ?"you can't shake them!":?:goto275 +263 +264 ?:gosub10:goto74 +265 +266 ifg>0goto269 +267 ?:?"you don't have any guns!":gosub10:goto238 +268 +269 ?chr$(147):gosub4:gosub48:?:?"you shoot!":gosub24 +270 ifk=0goto273 +271 ?"you got one!":?:?:b=b-1:goto275 +272 +273 ?"you missed!":?:? +274 +275 ifb<=0goto288 +276 gosub26:?"they're firing at you!":gosub24 +277 ifk=0goto282 +278 ?"you've been hit!":bb=bb-6 +279 ifbb<=0goto286 +280 goto284 +281 +282 ?"they missed!" +283 +284 gosub28:goto238 +285 +286 ?:?"you've been killed!":gosub10:goto392 +287 +288 ?"you killed all of them!":?:gosub24:j=int(((rnd(1)*1250)+750)+.5) +289 w=w+j:?"you found $";j;" on officer hardass'":?"carcass!" +290 ifw>=1200goto293 +291 goto74 +292 +293 gosub28:?:?"will you pay $1000 for a doctor":input"to sew you up?(y/n)";x$ +294 ifx$<>"y"goto74 +295 w=w-1000:bb=0:goto74 +296 +297 ifw<500goto212 +298 gosub46 +299 iff<5goto212 +300 j=int((rnd(1)*2)+.5) +301 ifj=0then y$="baretta" +302 ifj=1then y$="saturday night special" +303 ifj=2then y$=".44 magnum" +304 ?"will you buy a ";y$:input"for $400?(y/n)";x$ +305 ifx$<>"y"goto74 +306 g=g+1:w=w-400:goto74 +307 +308 ?"there's some weed here that smells" +309 ?"like good stuff!!":?:input"will you smoke it?(y/n)";x$ +310 ifx$="y"goto385 +311 goto74 +312 +313 ifw<300goto212 +314 ?"will you buy a new trenchcoat" +315 input"with more pockets for $200?(y/n)";x$ +316 ifx$<>"y"goto74 +317 i=i+10:w=w-200:goto74 +318 +319 gosub46:iff<8goto212 +320 j=int((rnd(1)*7)+1.5):k=int(rnd(1)*5+.5) +321 ifk=0thenq=q+j:y$="ludes" +322 ifk=1thent=t+j:y$="speed" +323 ifk=2thenu=u+j:y$="weed" +324 ifk=3theno=o+j:y$="acid" +325 ifk=4thenn=n+j:y$="heroin" +326 ifk=5thenm=m+j:y$="cocaine" +327 ?"you found ";j;" units of ";y$ +328 ?"on a dead dude in the subway!":? +329 gosub28:goto74 +330 +331 ?"the market has been flooded":?"with cheap home-made acid!" +332 a=int((rnd(1)*550)+250.5):gosub28:goto74 +333 +334 input"repay how much?";k +335 ifk>wthen?:?"you don't have that much!":gosub26:goto137 +336 if k>v then?:?"you don't owe that much!":gosub26:goto137 +337 w=w-k:v=v-k:?:?"thank you.":gosub28:goto74 +338 +339 ?:input"how much do you want?";k:?:j=int((rnd(1)*10000)+5000) +340 ifk<0then?"trying to rob me? double debt!":ad=ad+3:v=v*2:gosub28:goto74 +341 ifk>14000then?"he's not that stupid!":gosub28:goto74 +342 ifk>jthen?"he doesn't feel like it.":gosub26:goto74 +343 v=v+k:w=w+k:?:?"here's your money.":?:?" +344 gosub28:goto74 +345 +346 ?:k=int((rnd(1)*100)+1):input"how much?";j:ifk=64goto350 +347 ifj<0then?"you tried to rob the bank, but failed!":ad=ad+3:gosub26:goto74 +348 ifj>wthen?"you don't have that much cash.":goto346 +349 +350 e=e+j:w=w-j:?:?"thank you for your deposit.":ifw<0thenw=w*-1 +351 gosub28:goto74 +352 +353 ?:input"how much?";j: +354 ifj<0then?chr$(18)"try making a deposit, idiot.":goto26:goto145 +355 ifj>ethen?"you don't have sufficient funds.":goto353 +356 e=e-j:w=w+j:?:?"thank you for your business.":gosub28:goto74 +357 +358 ?chr$(147):poke211,3:sys58640:?"welcome to drugwar/64 version";rv +359 poke211,9:sys58640:?"ported from drugwar//e":?:?:?:?:?:?:? +360 poke211,5:sys58640:?"based on the ti-basic clone of" +361 poke211,7:sys58640:?"john e. dell's 1984 drugwar" +362 poke211,11:sys58640:?"for ibm and trs-80":?:?:?:? +363 poke211,6:sys58640:?"applesoft version by jay moore" +364 poke211,10:sys58640:?"c64 port by jay moore":poke211,1:poke214,23:sys58640 +365 input "would you like instructions?(y/n)";x$:gosub8 +366 ifx$="y"thengoto369 +367 goto68 +368 +369 ?chr$(147):gosub4:gosub8:? +370 ?"this is a game of buying and selling." +371 ?"your goal is to pay off your debt and" +372 ?"make as much money as possible in a one" +373 ?"month period. prices change every day" +374 ?"and interest on your loan is calculated as well." +375 ?:?"deal too heavily and you'll attract the" +376 ?"attention of the police.":? +377 ?"commands are entered using the letter" +378 ?"highlighted (l)ike (s)o. y is yes and" +379 ?"anything counts as no.":gosub10:goto68 +380 +381 ?chr$(147):poke211,7:poke214,9:sys58640:?"put a quarter in your ass":gosub26 +382 poke211,6:sys58640:?"'cause you played yourself!":gosub28 +383 poke214,18:poke211,10:sys58640:?"don't cheat so much.":end +384 +385 ?chr$(147):gosub4:gosub12:?chr$(18)"smoke weed" +386 ?"you hallucinate on the wildest trip" +387 ?"of your life, stumble on to the tracks," +388 ?"and get creamed by a train!":?:? +389 poke211,7:sys58640:?"just say no to drugs!" +390 gosub28:gosub26:goto398 +391 +392 ?chr$(147):gosub4:gosub64:gosub50:? +393 ?"your score on a scale of 1 to 100:";k +394 ?:input "would you like to play again?(y/n)";x$:if x$="y" then goto68 +395 ?"thanks for playing.":?" +396 end +397 +398 ?chr$(147):gosub4:gosub50 +399 ?:?"you died from smoking weed.":?:?:gosub28 +400 ?"see? games are totally fake.":?:input "would you like to play again?";x$ +401 ifx$="y"thengoto68 +402 end diff --git a/drugwar64.baz b/drugwar64.baz index f0b1622..8872443 100644 --- a/drugwar64.baz +++ b/drugwar64.baz @@ -1,836 +1,480 @@ -rem Drugwar/64 - Version 1.01 -rem Codebase: Drugwar//e 1.03 -rem Ported by: Jay Moore -rem "Damn that was annoying" -rem 28-OCT-2018 -rem Copyright 2018 Jay Moore -rem Released under GPL v3 -rem drugwar2e.sourceforge.io -rem twitter: _nq4t - poke 646,1 : poke 53281,0 : poke 53280,0 {set border,bg,text colors} - rv=1.01 - goto @instructions {because we're sticking subroutines up here} + poke646,1:poke53281,0:poke53280,0:rv=1.02:goto@instructions:REM DRUGWAR64 1.02 £titlebar {this literally just draws the game title at the top of the screen} - poke 214,0:poke 211,14:sys 58640 : ?"drugwar/64" - print CHR$(18)" " - return + poke53280,int(rnd(1)*16) + poke214,0:poke211,15:sys58640:?"drugwar/64" + ?CHR$(18)" ":return +£seed + j=RND(-TI):return £wait {ubiquitious "Press ENTER to continue} - print - input "Press enter to continue.";x$ - return + ?:input"Press enter to continue.";x$:return £twofifteen - POKE 214,1 : poke 211,14:sys 58640 - return + poke214,1:poke211,14:sys58640:return £twosixteen - POKE 214,1:poke 211,15:sys 58640 - return + poke214,1:poke211,15:sys58640:return £twoseventeen - POKE 214,1:poke 211,16:sys 58640 - return + poke214,1:poke211,16:sys58640:return £twoeighteen - POKE 214,1: poke 211,17:sys 58640 - return + poke214,1:poke211,17:sys58640:return £twonineteen - POKE 214,1:poke 211,18:sys 58640 - return + poke214,1:poke211,18:sys58640:return £jetalthere - gosub @twonineteen:print CHR$(18)"Jet" - return + gosub@twonineteen:?CHR$(18)"Jet":return £timera - for j = 1 to 2500 - next j - k = int(rnd(2)+.5) - return + forj=1to2500:nextj:k=int(rnd(1)+.5):return £timerb - for j = 1 to 1000 - next j - return + forj=1to1000:nextj:return £timerc - for j = 1 to 2000 - next j - return + forj=1to2000:nextj:return [ "Common logic" has been moved to buy/sell subroutines. This has cleaned the code up a bit ] £howmuchbuy {some common purchase code} - print "You can afford ";j - print "You can carry ";f + ?"You can afford ";j:?"You can carry ";f £howmanybuy - print - input "How many? (Enter 0 cancel): ";k - if K=0 goto @menu - if k>f THEN print CHR$(18)"You can't carry that much!" : goto @howmanybuy - if k>j THEN print CHR$(18)"You can't afford that much!" : goto @howmanybuy + ?:input"How many?(Enter 0 cancel):";k:ifK=0goto@menu + ifkfTHEN?CHR$(18)"You can't carry that much!":goto@howmanybuy + ifk>jTHEN?CHR$(18)"You can't afford that much!":goto@howmanybuy return £howmuchsell {common sell code} - print "You can sell: ";j - print + ?"You can sell:";j:? £howmanysell - input "How many? (Enter 0 to cancel.): ";k - If k>j then print "You don't have that many!" : goto @howmanysell - if K=0 goto @menu + input"How many?(Enter 0 to cancel.):";k + Ifk>jthen?"You don't have that many!":goto@howmanysell + ifK=0goto@menu return £freespace - f=i-((g*5)+m+n+o+u+t+q) - return + f=i-((g*5)+m+n+o+u+t+q):return £chase - gosub @twofifteen: print CHR$(18)"Being Chased" - return + gosub@twofifteen:?CHR$(18)"Being Chased":return £gmod - gosub @twosixteen:print chr$(18)"Game Over" - return + gosub@twosixteen:?chr$(18)"Game Over":return £bronxcheck - if p$ = "THE BRONX" then return - print "you need to head to the bronx" - print "to take care of this business." - gosub @timerc - goto @menu + ifp$="THE BRONX"thenreturn + ?"you need to be in the bronx":?"to take care of this business." + gosub@timerc:goto@menu £daily {randomizes drug prices, adds a day, calculates interests, checks day number} - c=int(rnd(5)*12000+16000.5) - h=int(rnd(5)*7000+5000.5) - a=int((rnd(5)*34+10)*100+.5) - z=int((rnd(5)*42+33)*10+.5) - s=int((rnd(5)*15+7)*10+.5) - l=int((rnd(5)*4+1)*10+.5) - b=int(rnd(5)*20+.5) - d=d+1 + c=int(rnd(1)*12000+16000.5):h=int(rnd(1)*7000+5000.5) + a=int((rnd(1)*34+10)*100+.5):z=int((rnd(1)*42+33)*10+.5) + s=int((rnd(1)*15+7)*10+.5):l=int((rnd(1)*4+1)*10+.5) + b=int(rnd(1)*20+.5):d=d+1:ac=int(((rnd(1)*10)+1)*-1):ifad>0thenad=ad-1 £checkday {so I can check the day by itself} - if D >= 31 GOTO @endgame + ifD>=31GOTO@endgame return £scorecalculate - k=(w+e)-v - if k<0 THEN k=0 : return - k=int(sqr((k/31.5)+.5)) - if k>100 then k=100 + k=(w+e)-v:ifk<0THENk=0:return + k=int(sqr((k/31.5)+.5)):ifk>100thenk=100 return £gamestart {set wallet, debt, location, inventory space, zero out inventory} - w=2000 - e=0 - v=5000 - p$="The Bronx" - g=0 - i=100 - m=0 - n=0 - o=0 - u=0 - t=0 - q=0 - gosub @daily {the only time we'll call this outside of the subway} - goto @menu {the real start of the game} + w=2000:e=0:v=5000:p$="The Bronx":g=0:i=100:m=0:n=0:o=0:u=0:t=0:q=0 + d=0:bb=100:gosub@daily:goto@menu + +£cheater + ifad>=3thengoto@threestrikes + return £menu {main menu. everything should loop back here} - PRINT CHR$(147) - gosub @freespace - gosub @titlebar - POKE 214,1:POKE 211,3:SYS 58640:print CHR$(18)"Day: "D - POKE 214,1:POKE 211,17:SYS 58640:print CHR$(18)"Location: "p$ - print - print "(C)heck Prices" - print "(T)renchcoat" - print "(B)uy" - print "(S)ell" - print "(J)et" - print "See (L)oan shark" - print "(V)isit Bank" - print - input "Please make your selection: ";x$ - if x$ = "C" goto @prices - if x$ = "T" goto @inventory - if x$ = "B" goto @buy - if x$ = "S" goto @sell - if x$ = "J" goto @jet - if x$ = "L" goto @loan - if x$ = "V" goto @bank - {if x$="debug" goto @debug} - goto @menu + ?CHR$(147):gosub@freespace:gosub@titlebar:poke214,1:poke211,3:sys58640:?CHR$(18)"Day:"D + poke214,1:poke211,17:sys58640:?CHR$(18)"Location:"p$:?:?"(C)heck Prices" + ?"(T)renchcoat":?"(B)uy":?"(S)ell":?"(J)et" + ?"(L)oan shark":?"(V)isit Bank":? + input "Please make your selection:";x$ + ifx$="C"goto@prices + ifx$="T"goto@inventory + ifx$="B"goto@buy + ifx$="S"goto@sell + ifx$="J"goto@jet + ifx$="L"goto@loan + ifx$="V"goto@bank + {if x$="debug" goto@debug} + goto@menu [ £debug -print "Testing Screen" -print -print "(w)allet,(g)uns,(v)debt,(e)savings,(i)nventory space" +?"Testing Screen" +? +?"(w)allet,(g)uns,(v)debt,(e)savings,(i)nventory space" input "What to change?";db$ input "To?";dx -if db$ = "w" then w=dx -if db$ = "g" then g=dx +if db$="w" then w=dx +if db$="g" then g=dx if db$="v" then v=dx if db$="e" then e=dx if db$="i" then i=dx -goto @menu +goto@menu ] £prices - PRINT CHR$(147) - gosub @titlebar - gosub @twoeighteen:print CHR$(18)"Prices" - print - print"cocaine:","$"c - print"heroin:","$"h - print"acid:","$"a - print"weed:","$"z - print"speed:","$"s - print"ludes:","$"l - print"wallet:","$"w - gosub @wait - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twoeighteen:?CHR$(18)"Prices":?:?"cocaine:","$"c + ?"heroin:","$"h:?"acid:","$"a:?"weed:","$"z:?"speed:","$"s:?"ludes:","$"l + ?"wallet:","$"w:gosub@wait:goto@menu £inventory - PRINT CHR$(147) - gosub @titlebar - gosub @twosixteen :print CHR$(18)"Trenchcoat" - print - print"cocaine:",m - print"heroin:",n - print"acid:",o - print"weed:",u - print"speed:",t - print"ludes:",q - print"free space:",f - gosub @wait - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twosixteen:?CHR$(18)"Trenchcoat":?:?"cocaine:",m + ?"heroin:",n:?"acid:",o:?"weed:",u:?"speed:",t:?"ludes:",q:?"free space:";f + gosub@wait:goto@menu £buy - PRINT CHR$(147) - gosub @titlebar - gosub @twonineteen: print CHR$(18)"Buy" - print - print"What do you want to buy?" - print - print "(C)ocaine" - print "(H)eroin" - print "(A)cid" - print "(W)eed" - print "(S)peed" - print "(L)udes" - input "Enter Selection: ";x$ - if x$="c" goto @cokebuy - if x$="h" goto @herbuy - if x$="a" goto @acidbuy - if x$="w" goto @weedbuy - if x$="s" goto @spdbuy - if x$="l" goto @ludbuy - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twonineteen:?CHR$(18)"Buy":? + ?"What do you want to buy?":?:?"(C)ocaine":?"(H)eroin":?"(A)cid" + ?"(W)eed":?"(S)peed":?"(L)udes":?:input"Enter Selection:";x$ + ifx$="c"goto@cokebuy + ifx$="h"goto@herbuy + ifx$="a"goto@acidbuy + ifx$="w"goto@weedbuy + ifx$="s"goto@spdbuy + ifx$="l"goto@ludbuy + goto@menu £sell - PRINT CHR$(147) - gosub @titlebar - gosub @twoeighteen: print CHR$(18)"Sell" - print - print "What would you like to sell?" - print - print "(C)ocaine" - print "(H)eroin" - print "(A)cid" - print "(W)eed" - print "(S)peed" - print "(L)udes" + ?CHR$(147):gosub@titlebar:gosub@twoeighteen:?CHR$(18)"Sell":? + ?"What would you like to sell?":?:?"(C)ocaine":?"(H)eroin":?"(A)cid" + ?"(W)eed":?"(S)peed":?"(L)udes":? £sellsel - input "Enter Selection: (0 to cancel)";x$ - if x$="c" goto @cokesell - if x$="h" goto @hersell - if x$="a" goto @acidsell - if x$="w" goto @weedsell - if x$="s" goto @spdsell - if x$="l" goto @ludsell - if x$="0" goto @menu - print "Invalid Selection!" - goto @sellsel + input"Enter Selection:(0 to cancel)";x$ + ifx$="c"goto@cokesell + ifx$="h"goto@hersell + ifx$="a"goto@acidsell + ifx$="w"goto@weedsell + ifx$="s"goto@spdsell + ifx$="l"goto@ludsell + ifx$="0"goto@menu + ?"Invalid Selection!":goto@sellsel £jet - PRINT CHR$(147) - gosub @titlebar - gosub @jetalthere - print - print "(B)ronx" - print "(G)hetto" - print "(C)entral Park - print "(M)anhattan" - print "Coney (I)sland" - print "Broo(K)lyn" - print "(O)ops...stay!" - input "Where to dude? ";x$ - if x$="B" then y$ = "The Bronx" : GOTO @jetb {we can use strings} - if x$="G" then y$ = "The Ghetto" : GOTO @jetb - if x$="C" then y$ = "Central Park" : GOTO @jetb - if x$="M" then y$ = "Manhattan" : goto @jetb - if x$="I" then y$ = "Coney Island" : goto @jetb - if x$="K" then y$ = "Brooklyn" : goto @jetb - if x$="O" then goto @menu - {if x$="COPTEST" then b = 5 : goto @police} - goto @jet + ?CHR$(147):gosub@titlebar:gosub@jetalthere:?:?"(B)ronx":?"(G)hetto":?"(C)entral Park + ?"(M)anhattan":?"Coney (I)sland":?"Broo(K)lyn":?"(O)ops...stay!":? + input "Where to dude";x$ + ifx$="B"theny$="The Bronx":GOTO@jetb {we can use strings} + ifx$="G"theny$="The Ghetto":GOTO@jetb + ifx$="C"theny$="Central Park":GOTO@jetb + ifx$="M"theny$="Manhattan":goto@jetb + ifx$="I"theny$="Coney Island":goto@jetb + ifx$="K"theny$="Brooklyn":goto@jetb + ifx$="O"thengoto@menu + {if x$="COPTEST" then b=5:g=1:goto@police} + goto@jet £jetb - {input "event: ";ev testing/debug} - if y$=p$ then goto @alreadythere {more advanced thatn Bronx only on TI} - p$ = y$ {it's valid, copy it and move along} : y$ = "" - goto @subway + {input "event:";ev testing/debug} + ify$=p$thengoto@alreadythere + p$=y$:y$="":goto@subway £loan - PRINT CHR$(147) - gosub @titlebar - Gosub @twosixteen:print CHR$(18)"Loan Shark" - print - gosub @bronxcheck - print "Your debt is: $";v - print "You have: $";w - print - input "(R)epay, (B)orrow, (L)eave: ";X$ - If X$ = "R" THEN goto @payme - If X$ = "B" Then goto @borrow - If X$ = "L" then goto @Menu - goto @loan + ?CHR$(147):gosub@titlebar:Gosub@twosixteen:?CHR$(18)"Loan Shark":?:gosub@bronxcheck + ?"Your debt is:$";v:?"You have:$";w:? + input"(R)epay, (B)orrow, (L)eave:";X$ + IfX$="R"goto@payme + IfX$="B"goto@borrow + IfX$="L"goto@Menu + goto@loan £bank - PRINT CHR$(147) - gosub @titlebar - gosub @twofifteen: print CHR$(18)"Bank O'Murica" - print - gosub @bronxcheck - print "Your balance: $";e - print "Your wallet: $";w - print - INPUT "(D)EPOSIT, (W)ITHDRAW, (L)EAVE: ";X$ - if x$ = "d" then goto @deposit - if x$ = "w" then goto @mymoney - if x$ = "l" then goto @menu - {if x$ = eg$ then goto @egg} - goto @bank + ?CHR$(147):gosub@titlebar:gosub@twofifteen:?CHR$(18)"Bank O'Murica":?:gosub@bronxcheck + ?"Your balance:$";e:?"Your wallet:$";w:? + INPUT"(D)EPOSIT, (W)ITHDRAW, (L)EAVE:";X$ + ifx$="d"goto@deposit + ifx$="w"goto@mymoney + ifx$="l"goto@menu + {if x$=eg$ then goto@egg} + goto@bank £cokebuy - PRINT CHR$(147) - gosub @titlebar - gosub @twosixteen: print CHR$(18)"Buy Cocaine" - print - j=int(w/c) {calculate how many we can buy} - gosub @howmuchbuy - m=m+k : w=w-(c*k) {when the subroutine sends us back when the purchase is valid} - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twosixteen:?CHR$(18)"Buy Cocaine" + ac=0:?:j=int(w/c):gosub@howmuchbuy:m=m+k:w=w-(c*k):goto@menu £herbuy - PRINT CHR$(147) - gosub @titlebar - gosub @twosixteen: print CHR$(18)"Buy Heroin" - print - j=int(w/h) - gosub @howmuchbuy - n=n+k : w=w-(h*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twosixteen:?CHR$(18)"Buy Heroin" + ac=0:?:j=int(w/h):gosub@howmuchbuy:n=n+k:w=w-(h*k):goto@menu £acidbuy - PRINT CHR$(147) - gosub @titlebar - gosub @twoseventeen:print CHR$(18)"Buy Acid" - print - j=int(w/a) - gosub @howmuchbuy - o=o+k : w=w-(a*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twoseventeen:?CHR$(18)"Buy Acid" + ?:j=int(w/a):gosub@howmuchbuy:o=o+k:w=w-(a*k):goto@menu £weedbuy - PRINT CHR$(147) - gosub @titlebar - gosub @twoseventeen: print CHR$(18)"Buy Weed" - print - j=int(w/z) - gosub @howmuchbuy - u=u+k : w=w-(z*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twoseventeen:?CHR$(18)"Buy Weed" + ?:j=int(w/z):gosub@howmuchbuy:u=u+k:w=w-(z*k):goto@menu £spdbuy - PRINT CHR$(147) - gosub @titlebar - gosub @twoseventeen: print CHR$(18)"Buy Speed" - print - j=int(w/s) - gosub @howmuchbuy - t=t+k : w=w-(s*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twoseventeen:?CHR$(18)"Buy Speed" + ?:j=int(w/s):gosub@howmuchbuy:t=t+k:w=w-(s*k):goto@menu £ludbuy - PRINT CHR$(147) - gosub @titlebar - gosub @twoseventeen: print CHR$(18)"Buy Ludes" - print - j=int(w/l) - gosub @howmuchbuy - q=q+k : w=w-(l*k) - goto @menu - + ?CHR$(147):gosub@titlebar:gosub@twoseventeen:?CHR$(18)"Buy Ludes" + ?:j=int(w/l):gosub@howmuchbuy:q=q+k:w=w-(l*k):goto@menu £cokesell - PRINT CHR$(147) - gosub @titlebar - gosub @twofifteen:print CHR$(18)"Sell Cocaine" - print - j=m {write amount to variable} - gosub @howmuchsell {some buy logic} - m=m-k {sub sends back here if valid, adjusts inventory} - w=w+(c*k) {adds money to wallet} - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twofifteen:?CHR$(18)"Sell Cocaine" + ?:j=m:gosub@howmuchsell:m=m-k:w=w+(c*k)::goto@menu £hersell - PRINT CHR$(147) - gosub @titlebar - gosub @twoseventeen:print CHR$(18)"Sell Heroin" - print - j=n - gosub @howmuchsell - n=n-k - w=w+(h*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twoseventeen:?CHR$(18)"Sell Heroin" + ?:j=n:gosub@howmuchsell:n=n-k:w=w+(h*k):goto@menu £acidsell - PRINT CHR$(147) - gosub @titlebar - gosub @twoseventeen: print CHR$(18)"Sell Acid" - print - j=o - gosub @howmuchsell - o=o-k - w=w+(a*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twoseventeen:?CHR$(18)"Sell Acid" + ?:j=o:gosub@howmuchsell:o=o-k:w=w+(a*k):goto@menu £weedsell - PRINT CHR$(147) - gosub @titlebar - gosub @twoseventeen:print CHR$(18)"Sell Weed" - print - j=u - gosub @howmuchsell - u=u-k - w=w+(z*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twoseventeen:?CHR$(18)"Sell Weed":?:j=u + gosub@howmuchsell:u=u-k:w=w+(z*k):goto@menu £spdsell - PRINT CHR$(147) - gosub @titlebar - gosub @twosixteen:print CHR$(18)"Sell Speed" - print - j=t - gosub @howmuchsell - t=t-k - w=w+(s*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twosixteen:?CHR$(18)"Sell Speed":?:j=t + gosub@howmuchsell:t=t-k:w=w+(s*k):goto@menu £ludsell - PRINT CHR$(147) - gosub @titlebar - gosub @twosixteen:print CHR$(18)"Sell Ludes" - print - j=q - gosub @howmuchsell - q=q-k - w=w+(l*k) - goto @menu + ?CHR$(147):gosub@titlebar:gosub@twosixteen:?CHR$(18)"Sell Ludes":?:j=q + gosub@howmuchsell:q=q-k:w=w+(l*k):goto@menu £alreadythere - PRINT CHR$(147) - gosub @titlebar - gosub @jetalthere - print - print "You're already in:" - print " ";p$ - gosub @timerc - goto @jet + ?CHR$(147):gosub@titlebar:gosub@jetalthere:? + ?"You're already in:":?" ";p$:gosub@timerc:goto@jet £subway - PRINT CHR$(147) - gosub @daily - {b=ev debugging code} - V=int(V*1.1+.5) {loan calculation} - E=int(E*1.06+.5) {savings calculation} - gosub @titlebar - gosub @twoeighteen:print CHR$(18)"Subway" - print - if b=1 then goto @cheapludes - if b=2 then goto @cheepweed - if b=3 then goto @pigheroin - if b=4 then goto @heroinbust - if b=5 then goto @heroinbust - if b=6 then goto @cokebust - if b=7 then goto @cokebust - if b=8 then goto @mugged - if b=9 then goto @cops - if b=10 then goto @cops - if b=11 then goto @cops - if b=12 then goto @gunbuy - if b=13 then goto @gunbuy - if b=14 then goto @dedweed - if b=15 then goto @newcoat - if b=16 then goto @dedguy - if b=17 then goto @homeacid -£nothinghappened + ?CHR$(147):gosub@daily:V=int(V*1.1+.5):E=int(E*1.06+.5):gosub@titlebar:gosub@twoeighteen + ?CHR$(18)"Subway":? + ifb=1goto@cheapludes + ifb=2goto@cheepweed + ifb=3goto@pigheroin + ifb=4goto@heroinbust + ifb=5goto@heroinbust + ifb=6goto@cokebust + ifb=7goto@cokebust + ifb=8goto@mugged + ifb=9goto@cops + ifb=10goto@cops + ifb=11goto@cops + ifb=12goto@gunbuy + ifb=13goto@gunbuy + ifb=14goto@dedweed + ifb=15goto@newcoat + ifb=16goto@dedguy + ifb=17goto@homeacid + £nothinghappens - print {the only way you should wind up here is if nothing happens} - print "Welcome to ";p$ {i hope} - print - gosub @timerc - goto @menu + poke211,8:sys58640:?:?"Welcome to ";p$:?:gosub@timerc:goto@menu £cheapludes - print "Rival dealers are selling cheap ludes!" - l=2 - gosub @timerc - goto @menu + ?"Rival dealers are selling cheap ludes!":l=2:gosub@timerc:goto@menu £cheepweed - print "Weed prices have bottomed-out!" - z=122 - gosub @timerc - goto @menu + ?"Weed prices have bottomed-out!":z=122:gosub@timerc:goto@menu £pigheroin - print "Pigs are selling cheap heroin" - print "from last week's raid!" - h=int((rnd(9)*1150)+850.5) - gosub @timerc - goto @menu + ?"Pigs are selling cheap heroin":?"from last week's raid!" + h=int((rnd(1)*1150)+850.5):gosub@timerc:goto@menu £heroinbust - print "Addicts are buying heroin" - print "at outrageous prices!" - h=int((rnd(9)*25000)+18000.5) - gosub @timerc - goto @menu + ?"Addicts are buying heroin":?"at outrageous prices!" + h=int((rnd(1)*25000)+18000.5):gosub@timerc:goto@menu £cokebust - print "Pigs made a big coke bust!" - print "Prices are outrageous!!!!" - c=int((rnd(9)*60000)+80000.5) {the infamous line 930} - gosub @timerc - goto @menu + ?"Pigs made a big coke bust!":?"Prices are outrageous!!!!" + c=int((rnd(1)*60000)+80000.5):gosub@timerc:goto@menu £mugged - print "You got mugged!" - print - j=int(w/3) - j=int(j*2) - k=int(w-j) - print "You lost $";k - w=j - gosub @timerc - gosub @menu + ?"You got mugged!":?:j=int(w/3):j=int(j*2):k=int(w-j) + ?"You lost $";k:w=j:gosub@timerc:gosub@menu £cops - k=m+n+u+o+t+p {cops only active when inventory > 50} + gosub @freespace [ my improved revisions will likely add some additional conditions on how/when we run cops ] - if k<50 then goto @nothinghappened - if b=9 then b = 2 - if b=10 then b=4 - if b=11 then b=5 - print "It's the cops!" - print - print "Officer Hardass and ";B-1;" of his" - print "deputies are after you!" - print - gosub @timerc - goto @police + iff>i/2thengoto@nothinghappens + ifb=9thenb=2 + ifb=10thenb=4 + ifb=11thenb=5 + ?"It's the cops!":?:?"Officer Hardass and ";B-1;" of his" + ?"deputies are after you!":?:gosub@timerc £police - PRINT CHR$(147) - gosub @titlebar - gosub @chase - print - print - print "View (G)uns" - print "View (D)amage" - print "(N)umber of pigs" - print "(R)un" - print "(F)ight" - print - input "What do you want to do? ";x$ - if x$="G" goto @pgun - if x$ = "D" goto @damage - if x$ = "N" goto @ncops - if x$ = "R" goto @run - if X$="F" goto @fight - goto @police + ?CHR$(147):gosub@titlebar:gosub@chase:?:?:?"View (G)uns":?"View (D)amage" + ?"(N)umber of pigs":?"(R)un":?"(F)ight":? + input"What do you want to do?";x$ + ifx$="G"goto@pgun + ifx$="D"goto@damage + ifx$="N"goto@ncops + ifx$="R"goto@run + ifX$="F"goto@fight + goto@police £pgun - PRINT CHR$(147) - gosub @titlebar - gosub @chase - print - print - print "You have ";g;" guns. - print - gosub @wait - goto @police + ?CHR$(147):gosub@titlebar:gosub@chase:?:? + Ifg=1then?"You have 1 gun.":gosub@wait:goto@police + ?"You have ";g;" guns.":?:gosub@wait:goto@police £damage - PRINT CHR$(147) - gosub @titlebar - gosub @chase - print - print - print "Your current damage is ";bb;"." - print - print "50 and you die!" - print - gosub @wait - goto @police + ?CHR$(147):gosub@titlebar:gosub@chase + ?:?:?"Your current health is ";bb;".":? + ?"0 and you die!":?:gosub@wait:goto@police £ncops - PRINT CHR$(147) - gosub @titlebar - gosub @chase - print - print - print "There are ";b;" pigs still chasing you!" - print - print - gosub @wait - goto @police + ?CHR$(147):gosub@titlebar:gosub@chase + Ifb=1then?:?:?"There is 1 pig still chasing you!":?:?:gosub@wait:goto@police + ?:?:?"There are ";b;" pigs still chasing you!":?:?:gosub@wait:goto@police £run - PRINT CHR$(147) - gosub @titlebar - gosub @chase - print - print - print "RUNNING..." - gosub @timera - if k = 0 then print "You lost them in an alley!" : goto @loserun - print "You can't shake them!" - print - gosub @wait - goto @police + ?CHR$(147):gosub@titlebar:gosub@chase:?:?:?"RUNNING...":gosub@timera + ifk=0then?"You lost them in an alley!":goto@loserun + ?"You can't shake them!":?:goto@next £loserun - print - gosub @wait - goto @menu + ?:gosub@wait:goto@menu £fight - if g>0 then goto @fightc - print - print "YOU DON'T HAVE ANY GUNS!" - gosub @wait - goto @police + ifg>0goto@fightc + ?:?"YOU DON'T HAVE ANY GUNS!":gosub@wait:goto@police £fightc - PRINT CHR$(147) - gosub @titlebar - gosub @chase - print - print "You shoot!" - gosub @timera - If K=0 THEN GOTO @miss - print "You got one!" : b = b-1 : goto @next + ?CHR$(147):gosub@titlebar:gosub@chase:?:?"You shoot!":gosub@timera + IfK=0GOTO@miss + ?"You got one!":?:?:b=b-1:goto@next £miss - print "You missed!" + ?"You missed!":?:? £next - print - print - If b <= 0 THEN goto @allgone - gosub @timerb - print "They're firing at you!" - gosub @timera - if k=0 then goto @theymiss - print "You've been hit!" - bb=bb+3 - if bb >= 50 goto @ded - goto @nexta + Ifb<=0goto@allgone + gosub@timerb:?"They're firing at you!":gosub@timera + ifk=0goto@theymiss + ?"You've been hit!":bb=bb-6 + ifbb<=0goto@ded + goto@nexta £theymiss - print "They missed!" + ?"They missed!" £nexta - gosub @wait - goto @police + gosub@timerc:goto@police £ded - print - print "You've been killed!" - gosub @wait - goto @endgame + ?:?"You've been killed!":gosub@wait:goto@endgame £allgone - print "You killed all of them!" - print - gosub @timera - j=int(((rnd(7)*1250)+750)+.5) - w=w+j - print "You found $";j;" on officer Hardass'" - print "carcass!" - if w>=1200 then goto @doctor - goto @menu + ?"You killed all of them!":?:gosub@timera:j=int(((rnd(1)*1250)+750)+.5) + w=w+j:?"You found $";j;" on officer Hardass'":?"carcass!" + ifw>=1200goto@doctor + goto@menu £doctor - gosub @timerc - print - print "Will you pay $1000 for a doctor" - input "to sew you up? (Y/N)";x$ - if X$ <> "Y" then goto @menu - w=w-1000 - bb=0 + gosub@timerc:?:?"Will you pay $1000 for a doctor":input"to sew you up?(Y/N)";x$ + ifX$<>"Y"goto@menu + w=w-1000:bb=0:goto@menu £gunbuy - if w < 500 THEN goto @nothinghappened - gosub @freespace - if f < 5 THEN goto @nothinghappened - j=int((rnd(4)*2)+.5) - if j = 0 then y$ = "Baretta" - if j = 1 then y$ = "Saturday Night Special" - if j = 2 then y$ = ".44 Magnum" - print "Will you buy a ";y$ - input "for $400? (Y/N)";x$ - if x$ <> "Y" then goto @menu - g = g+1 - w = w-400 - {i = i-5} - goto @menu + ifw<500goto@nothinghappens + gosub@freespace + iff<5goto@nothinghappens + j=int((rnd(1)*2)+.5) + ifj=0then y$="Baretta" + ifj=1then y$="Saturday Night Special" + ifj=2then y$=".44 Magnum" + ?"Will you buy a ";y$:input"for $400?(Y/N)";x$ + ifx$<>"Y"goto@menu + g=g+1:w=w-400:goto@menu + £dedweed {don't smoke the weed} - print "There's some weed here that smells" - print "like good stuff!!" - print - input "Will you smoke it? (Y/N)";X$ - If X$ = "Y" THEN GOTO @weedend + ?"There's some weed here that smells" + ?"like good stuff!!":?:input"Will you smoke it?(Y/N)";X$ + IfX$="Y"GOTO@weedend goto@menu £newcoat - if w<300 then goto @nothinghappens {only if you can afford it} - print "Will you buy a new trenchcoat" - input "with more pockets for $200? (Y/N)";X$ - if X$ <> "Y" then goto @menu - i=i+10 - w=w-200 - goto @menu + ifw<300goto@nothinghappens + ?"Will you buy a new trenchcoat" + input"with more pockets for $200?(Y/N)";X$ + ifX$<>"Y"goto@menu + i=i+10:w=w-200:goto@menu £dedguy - gosub @freespace - If f<8 THEN goto @nothinghappens {only if you have enough freespace} - j=int((rnd(3)*7)+1.5) - k=int(rnd(3)*5+.5) - if k=0 THEN q=q+j : y$ = "Ludes" - if k=1 THEN t=t+j : y$ = "Speed" - if k=2 THEN u=u+j : y$ = "Weed" - if k=3 THEN o=o+j : y$ = "Acid" - if k=4 THEN n=n+j : y$ = "Heroin" - if k=5 THEN m=m+j : y$ = "Cocaine" - print "You found ";j;" units of" - print " ";y$ - print "on a dead dude in the subway!" - print - gosub @timerc - goto @menu + gosub@freespace:Iff<8goto@nothinghappens + j=int((rnd(1)*7)+1.5):k=int(rnd(1)*5+.5) + ifk=0THENq=q+j:y$="Ludes" + ifk=1THENt=t+j:y$="Speed" + ifk=2THENu=u+j:y$="Weed" + ifk=3THENo=o+j:y$="Acid" + ifk=4THENn=n+j:y$="Heroin" + ifk=5THENm=m+j:y$="Cocaine" + ?"You found ";j;" units of ";y$ + ?"on a dead dude in the subway!":? + gosub@timerc:goto@menu + £homeacid - print "The market has been flooded" - print "with cheap home-made acid!" - a=int((rnd(4)*550)+250.5) - gosub @timerc - goto @menu + ?"The market has been flooded":?"with cheap home-made acid!" + a=int((rnd(1)*550)+250.5):gosub@timerc:goto@menu £payme - INPUT "Repay how much? ";k - IF k>w THEN PRINT:PRINT "YOU DON'T HAVE THAT MUCH!" : GOSUB @timerb : GOTO @LOAN - IF k>v THEN PRINT:PRINT "YOU DON'T OWE THAT MUCH!" : GOSUB @timerb : GOTO @LOAN - W=W-k - v=v-k - PRINT:PRINT "THANK YOU." - GOSUB @timerc - GOTO @MENU + INPUT"Repay how much?";k + IFk>wTHEN?:?"YOU DON'T HAVE THAT MUCH!":GOSUB@timerb:GOTO@LOAN + IF k>v THEN?:?"YOU DON'T OWE THAT MUCH!":GOSUB@timerb:GOTO@LOAN + W=W-k:v=v-k:?:?"THANK YOU.":GOSUB@timerc:GOTO@MENU + £borrow - print - Input "How much do you want? ";K - print - j=int((rnd(10)*10000)+5000) - if K>14000 then print "He's not that stupid!" : gosub @timerc : goto @menu - if K > J then print "He doesn't feel like it." : gosub @timerb : goto @menu - v=v+k - w=w+k - print - print "Here's your money." : PRINT : PRINT "Remember, I break thumbs." - gosub @timerc - goto @menu + ?:Input"How much do you want?";K:?:j=int((rnd(1)*10000)+5000) + ifk<0then?"trying to rob me? double debt!":ad=ad+3:v=v*2:gosub@timerc:goto@menu + ifK>14000then?"He's not that stupid!":gosub@timerc:goto@menu + ifK>Jthen?"He doesn't feel like it.":gosub@timerb:goto@menu + v=v+k:w=w+k:?:?"Here's your money.":?:?"Remember, I break thumbs." + gosub@timerc:goto@menu £deposit - print - INPUT "How much? ";j - If j>w then print "You don't have that much cash." : goto @deposit - e=e+j - w=w-j - print - Print "Thank you for your deposit." - gosub @timerc - goto @menu + ?:k=int((rnd(1)*100)+1):INPUT"How much?";j:ifk=64goto@chaching + ifj<0then?"You tried to rob the bank, but failed!":ad=ad+3:gosub@timerb:goto@menu + Ifj>wthen?"You don't have that much cash.":goto@deposit +£chaching + e=e+j:w=w-j:?:?"Thank you for your deposit.":ifw<0thenw=w*-1 + gosub@timerc:goto@menu [ £egg - print "You found the easter egg!" - print - print "$1,000,000 has been deposited in to your account." - gosub @timerc - goto @bank + ?"You found the easter egg!" + ? + ?"$1,000,000 has been deposited in to your account." + gosub@timerc + goto@bank ] + £mymoney - print - INPUT "How much? ";j - If j>e then print "You don't have sufficient funds." : goto @mymoney - e=e-j - w=w+j - print - print "Thank you for your business." - gosub @timerc - goto @menu + ?:INPUT"How much?";j: + ifj<0then?chr$(18)"Try making a deposit, idiot.":goto@timerb:goto@bank + Ifj>ethen?"You don't have sufficient funds.":goto@mymoney + e=e-j:w=w+j:?:?"Thank you for your business.":gosub@timerc:goto@menu £instructions - PRINT CHR$(147) - poke 211,3:sys 58640:print "welcome to drugwar/64 version";rv - poke 211,5:sys 58640: print "ported from drugwar//e v 1.03":?:?:?:?:? - ?: ? : poke 211,5:sys 58640:? "based on the ti-basic clone of" - poke 211,7:sys 58640:print "john e. dell's 1984 drugwar" - poke 211,11:sys 58640:print "for ibm and trs-80":?:? - ?:?:poke 211,6:sys 58640:?"applesoft version by jay moore" - poke 211,10:sys 58640: print "c64 port by jay moore" - poke 211,1 : poke 214,23 : sys 58640 - input "would you like instructions? (y/n)";x$ - j=RND(-TI) {c64} - {j =RND(-1 *(PEEK(78)+256*PEEK(79))) - applesoft} - If X$ = "Y" THEN GOTO @inst - GOTO @gamestart + ?CHR$(147):poke211,3:sys58640:?"welcome to drugwar/64 version";rv + poke211,9:sys58640:?"ported from drugwar//e":?:?:?:?:?:?:? + poke211,5:sys58640:?"based on the ti-basic clone of" + poke211,7:sys58640:?"john e. dell's 1984 drugwar" + poke211,11:sys58640:?"for ibm and trs-80":?:?:?:? + poke211,6:sys58640:?"applesoft version by jay moore" + poke211,10:sys58640:?"c64 port by jay moore":poke211,1:poke214,23:sys58640 + input "would you like instructions?(y/n)";x$:gosub@seed {c64} + {j=RND(-1 *(PEEK(78)+256*PEEK(79))) - applesoft} + IfX$="Y"THENGOTO@inst + GOTO@gamestart £inst - PRINT CHR$(147) - gosub @titlebar - print - print "This is a game of buying and selling." - print "Your goal is to pay off your debt and" - print "make as much money as possible in a one" - print "month period. Prices fluctuate every day" - print "and interest on your loan is calculated as well." - print:print "If you deal too heavily, you'll attract the attention" - PRINT "of the police." - print - print "Commands are entered using the letter" - print "highlighted (L)ike (S)o. Y is yes and" - print "anything counts as no." - gosub @wait - goto @gamestart + ?CHR$(147):gosub@titlebar:gosub@seed:? + ?"This is a game of buying and selling." + ?"Your goal is to pay off your debt and" + ?"make as much money as possible in a one" + ?"month period. Prices change every day" + ?"and interest on your loan is calculated as well." + ?:?"Deal too heavily and you'll attract the" + ?"attention of the police.":? + ?"Commands are entered using the letter" + ?"highlighted (L)ike (S)o. Y is yes and" + ?"anything counts as no.":gosub@wait:goto@gamestart + +£threestrikes + ?CHR$(147):poke211,7:poke214,9:sys58640:?"Put a quarter in your ass":gosub@timerb + poke211,6:sys58640:?"'Cause you played yourself!":gosub@timerc + poke214,18:poke211,10:sys58640:?"Don't cheat so much.":end + £weedend - PRINT CHR$(147) - gosub @titlebar - gosub @twofifteen: print CHR$(18)"SMOKE Weed" - print "You hallucinate on the wildest trip" - print "of your life, stumble on to the tracks," - print "and get creamed by a train!" - print - print - poke 211,7:sys 58640:? "Just say NO to drugs!" - gosub @timerc - gosub @timerb - goto @ironicend + ?CHR$(147):gosub@titlebar:gosub@twofifteen:?CHR$(18)"SMOKE Weed" + ?"You hallucinate on the wildest trip" + ?"of your life, stumble on to the tracks," + ?"and get creamed by a train!":?:? + poke211,7:sys58640:?"Just say NO to drugs!" + gosub@timerc:gosub@timerb:goto@ironicend £endgame - PRINT CHR$(147) - gosub @titlebar - gosub @scorecalculate - gosub @gmod - print - print "Your score on a scale of 1 to 100: ";k - print - input "Would you like to play again? (Y/N)";x$ - if x$ = "Y" then goto @gamestart - print "Thanks for playing." - print "Remember, watch your back." - print "Have a nice day!" - end + ?CHR$(147):gosub@titlebar:gosub@scorecalculate:gosub@gmod:? + ?"Your score on a scale of 1 to 100:";k + ?:input "Would you like to play again?(Y/N)";x$:if x$="Y" then goto@gamestart + ?:?:?"Remember to watch your back":?"Thanks for playing" + ?"and have a nice day.":end £ironicend - PRINT CHR$(147) - gosub @titlebar - gosub @gmod - print - print "You died from smoking weed." - print - print - gosub @timerc: print"See? Games are totally fake." - print - input "Would you like to play again? ";x$ - if x$= "Y" THEN GOTO @GAMESTART + ?CHR$(147):gosub@titlebar:gosub@gmod + ?:?"You died from smoking weed.":?:?:gosub@timerc + ?"See? Games are totally fake.":?:input "Would you like to play again?";x$ + ifx$="Y"THENGOTO@GAMESTART end + + + diff --git a/drugwar64.d64 b/drugwar64.d64 index 355073f..54b6861 100644 Binary files a/drugwar64.d64 and b/drugwar64.d64 differ diff --git a/drugwar64.zip b/drugwar64.zip index 2e65f85..70c6c4c 100644 Binary files a/drugwar64.zip and b/drugwar64.zip differ diff --git a/licensecode.txt b/licensecode.txt new file mode 100644 index 0000000..22493e9 --- /dev/null +++ b/licensecode.txt @@ -0,0 +1,52 @@ +2 ?"license contained in list" +3 end +4 rem copyright 2018 jay moore +5 rem +6 rem redistribution and use in +7 rem source and binary forms, +8 rem with or without modification, +9 rem are permitted provided that +10 rem the following conditions are +11 rem met: +12 rem +13 rem 1. redistributions of source +14 rem code must retain the above +15 rem copyright notice, this list of +16 rem conditions and the following +17 rem disclaimer. +18 rem +19 rem 2. redistributions in binary +20 rem form must reproduce the above +21 rem copyright notice, this list of +22 rem conditions and the following +23 rem disclaimer in the documentation +24 rem and/or other materials provided +25 rem with the distribution. +26 rem +27 rem this software is provided by +28 rem the copyright holders and +29 rem contributors "as is" and any +30 rem express or implied warranties, +31 rem including, but not limited to, +32 rem the implied warranties of +33 rem merchantability and fitness +34 rem for a particular purpose are +35 rem disclaimed. in no event shall +36 rem the copyright holder or +37 rem contributors be liable for any +38 rem direct, indirect, incidental, +39 rem special, exemplary, or +40 rem consequential damages +41 rem (including, but not limited to, +42 rem procurement of substitute goods +43 rem or services; loss of use, data, +44 rem or profits; or business +45 rem interruption) however caused +46 rem and on any theory of liability, +47 rem whether in contract, strict +48 rem liability, or tort (including +49 rem negligence or otherwise) +50 rem arising in any way out of the +51 rem use of this software, even if +52 rem advised of the possibility of +53 rem such damage. \ No newline at end of file diff --git a/readme.md b/readme.md index 54fb8b1..efe10e9 100644 --- a/readme.md +++ b/readme.md @@ -5,11 +5,11 @@ | | | | _ /| | | | | |_ | \ \/ \/ / /\ \ | _ / / / '_ \__ _| | |__| | | \ \| |__| | |__| | \ /\ / ____ \| | \ \ / /| (_) | | | |_____/|_| \_\\____/ \_____| \/ \/_/ \_\_| \_\/_/ \___/ |_| -``` - The "Other" Commodies Exchange Game for the C64 - Copyright 2018 Jay Moore - A FOSS Game - http://gitlab.com/dewdude/drugwar64 - http://gitlab.com/dewdude/drugwar2e + + The "Other" Commodies Exchange Game for the C64 + Copyright 2018 Jay Moore - A FOSS Game + http://gitlab.com/dewdude/drugwar64 + http://gitlab.com/dewdude/drugwar2e Contents: About @@ -17,7 +17,7 @@ Instructions Files Updates Support - +```` --- About: @@ -103,16 +103,37 @@ Files: Your DRUGWAR64.ZIP package contains the following file: DRUGWAR64.d64 - Disk image containing DRUGWAR - drugwar64v101.bas - Commodore BASIC source - drugwar64v101.baz - the Virtual Basic file used to generate the C64 BASIC - README.txt - This readme file - -These files are also available indvidually in the repository. + drugwar64.bas - Commodore BASIC source + drugwar64.baz - the Virtual Basic file used to generate the C64 BASIC + README.md - This readme file + LICENSE - 2-Clause BSD License (Simplified BSD License) + +These files are also available indvidually in the repository. Please not that in accordance with usual +C64 scene behavior; versions are also available outside of the repository. These disk images have the +version number in the filename. Images download from the repository share the same name and are always +updated. Older versions may be available from the repository as well. --- -Updates - +Updates - See CHANGELOG for complete details. + +5-NOV-2018: Version 1.02 + + Changed license to Simplified BSD License + Added random color border since I couldn't decide on text coloring. + Code Condensing: + Removed all REM statements + Combined lines to reduce from 749 to just over 400. + Fixed the gaping cheat hole + Added some special anti-cheat stuff to let you cheat a little. + Can also punish you and boot you from game. + Police shoot at you when you run. + Changed how inventory affects cops + It's now half freespace vs just 50. + Changed how health is handled + Starts at 100, goes down to 0. Police do 2x damage to compensate. + Removed rogue "CLEAR" from Applesoft port. + 29-OCT-2018: Version 1.01 Inital release of C64 Port. Based off Drugwar//e 1.03 code.