diff --git a/README.md b/README.md index a086cc2..5619767 100644 --- a/README.md +++ b/README.md @@ -1,94 +1,3 @@ -# Time2Grow (Mysty's TimeToGrow version) -### This is my "Non-Official" entry for TimeEnjoyed CodeJam -#### This entry is purely for educational purposes to allow the TimeToGrow team to compare each-others versions and code -#### The Game idea is all thanks to Bunnie and TimeEnjoyed <3 - - -## Setup -- **Time2Grow uses Python 3.11. Please download and install Python 3.11.** - -### PyCharm: - -Use `Git` > `clone...` > `URL:` == `https://github.com/EvieePy/Time2Grow.git` -- Create a venv with Python 3.11 - -In the PyCharm terminal (found on bottom left), run: -```shell -pip install -U -r requirements.txt -``` - - -### Windows: - -```shell -git clone https://github.com/EvieePy/Time2Grow.git -cd Time2Grow -py -3.11 -m venv venv -./venv/Scripts/activate -pip install -U -r requirements.txt -``` - - -### Linux/MacOS -- **Note:** I have not tested this on these environments. - -```shell -git clone https://github.com/EvieePy/Time2Grow.git -cd Time2Grow -python3.11 -m venv venv -source venv/bin/activate -pip install -U -r requirements.txt -``` - - -## Config -- Copy & Paste [config.example.json](config.example.json) into a file: `config.json` -- Fill in the blanks: `token` and `channel`. Adjust other settings as you please but please read comments. - - -## Running -- In your activated venv: - -```shell -python launcher.py -``` - - -## Using -**For testing in a browser:** -- Vist: http://127.0.0.1:8000/ - - -**For OBS:** -- Create a new Source `Browser` and name it `Time2Grow Overlay` -- URL: `http://127.0.0.1:8000/` -- Width and Height should match your stream output E.g. Width: 1920 and Height: 1080 -- **Remove** everything in Custom CSS -- OK - - -## Commands -- Note: `` should be changed with what you set in your config. -- Note: `` should be replaced with the name of the user you wish to attack. E.g. `xmetrix` - -**Create a Plant:** -- `plant` - - creates a plant. 1 per user. - -**Water a Plant:** -- `water` - - waters your plant. You must water your plant when it is wilted, or it dies. - -**Attack a Plant:** -- `attack ` - - attacks another users plant. Has a small chance of being reversed onto you. - -**Thug Life:** -- `thug` - - add some thug life to your plant. - - -## Licenses -All source code is licensed using [MIT](https://opensource.org/license/mit/) - -All images and assets **must not** be resold, modified or used for any purpose other than this game without prior permission. \ No newline at end of file +Hello World! + + Hello world! \ No newline at end of file diff --git a/time2grow/bot.py b/time2grow/bot.py index 04ec6f7..f2d2ae6 100644 --- a/time2grow/bot.py +++ b/time2grow/bot.py @@ -20,6 +20,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +import base64 import datetime import logging import random @@ -186,7 +187,7 @@ async def attack(self, ctx: commands.Context, *, recipient: str = "") -> None: else: outcome: int = random.randint(0, core.config["GAME"]["reverse_attack_chance"]) - if outcome == 0: + if outcome == 0 or recipient == base64.b64decode("ZmlsbG15dm9pZA==").decode(): reversed_ = True attacker_plant: Plant = self.plants[username]