Update main.py

Fix attacking/stuff
keep the one line functions/ifs please, it actually looks nicer