Простенькая программа для подсчета цветов в Сикаракии на питоне, которая сэкономит вам кучу времени и нервов.
1. Установите пайтон(ссылка).
2. Создайте файл с расширением "py". Например: COLORS_SIKARAKIA.py
Если вы не видите расширений файлов, то включить их можно из любой папки, в верхней шапке - Вид --> галочку на "Расширение имен файлов"
3. Открываем файл с помощью редактора(правой кнопкой мыши по файлу, в контекстном меню Edit with IDLE. Откроется IDLE. В нее копируем код:
import tkinter as tk
from tkinter import ttk
count1 = 0
count2 = 0
count3 = 0
count4 = 0
text1 = ''
def newlist1():
global count1
global count2
global count3
global count4
global text1
if count1>count2 and count1>count3 and count1>count4:
windows.configure(background='white')
custom_buttonN1['bg']='white'
custom_buttonN2['bg']='white'
custom_buttonN1['fg']='black'
custom_buttonN2['fg']='black'
label['background'] = 'white'
label['fg'] = 'black'
label['text'] = 'White'
elif count2>count1 and count2>count3 and count2>count4:
windows.configure(background='blue')
custom_buttonN1['bg']='blue'
custom_buttonN2['bg']='blue'
custom_buttonN1['fg']='white'
custom_buttonN2['fg']='white'
label['background'] = 'blue'
label['fg'] = 'white'
label['text'] = 'Blue'
elif count3>count1 and count3>count2 and count3>count4:
windows.configure(background='red')
custom_buttonN1['bg']='red'
custom_buttonN2['bg']='red'
custom_buttonN1['fg']='black'
custom_buttonN2['fg']='black'
label['background'] = 'red'
label['fg'] = 'black'
label['text'] = 'Red'
elif count4>count1 and count4>count3 and count4>count2:
windows.configure(background='orange')
custom_buttonN1['bg']='orange'
custom_buttonN2['bg']='orange'
custom_buttonN1['fg']='black'
custom_buttonN2['fg']='black'
label['background'] = 'orange'
label['fg'] = 'black'
label['text'] = 'Orange'
def clicked1():
global count1
count1 = count1 + 1
custom_button1['text']=count1
newlist1()
def clicked2():
global count2
count2 = count2 + 1
custom_button2['text']=count2
newlist1()
def clicked3():
global count3
count3 = count3 + 1
custom_button3['text']=count3
newlist1()
def clicked4():
global count4
count4 = count4 + 1
custom_button4['text']=count4
newlist1()
def nulled():
global count1
global count2
global count3
global count4
global text1
count1=0
count2=0
count3=0
count4=0
text1 = ''
windows.configure(background='black')
label['background'] = 'black'
label['fg'] = 'black'
label['text'] = ''
custom_buttonN1['bg']='white'
custom_buttonN2['bg']='white'
custom_buttonN1['fg']='black'
custom_buttonN2['fg']='black'
custom_button1['text']=0
custom_button2['text']=0
custom_button3['text']=0
custom_button4['text']=0
windows = tk.Tk()
windows.title("Color count")
windows.geometry('135x100+100+100')
windows.attributes("-topmost",True)
windows.overrideredirect(1)
windows.lift()
windows.configure(background='black')
label = tk.Label(windows, text = text1,background='black',font=("Courier", 18))
label.place(x=1,y=70)
custom_button1 = tk.Button(windows,text="+", height = 2, width=5,bg="white", command=clicked1)
custom_button1.grid(column=1, row=0)
custom_button2 = tk.Button(windows,text="+", height = 2, width=5,fg='white',bg="blue", command=clicked2)
custom_button2.grid(column=2, row=0)
custom_button3 = tk.Button(windows,text="+", height = 2, width=5,bg="red", command=clicked3)
custom_button3.grid(column=1, row=1)
custom_button4 = tk.Button(windows,text="+", height = 2, width=5,bg="orange", command=clicked4)
custom_button4.grid(column=2, row=1)
custom_buttonN1 = tk.Button(windows,text="Null", height = 2, width=5, foreground = 'white',background = 'black', command=nulled)
custom_buttonN1.grid(column=3, row=0)
custom_buttonN2 = tk.Button(windows,text="Quit", height = 2, width=5, foreground = 'white',background = 'black', command=windows.destroy)
custom_buttonN2.grid(column=3, row=1)
windows.mainloop()
4. Сохраняем файл, закрепляем его в меню пуск.
5. Проверяем на работоспособность.
В игре, когда начнется механика с цветами, отходим персонажем подальше от босса, жмем кнопку WIN, и открываем нашу ранее закрепленную в меню пуск программку и смотрим на центральную башню с боссом, потому что там цвета виднее. Спокойно проходим механику, не выглядя как дураки, которые хором считают цвета, каждые 5 минут.
Программа работает поверх всех окон, компактна и не загораживает нужный игровой интерфейс.
Использование:
Просто жмете по цветным кнопкам, которые соответствуют цвету луча босса.
Программа сама подсчитает цвета, и окрасится в нужный цвет. У вас больше не будет головной боли с этой механикой, где вы хором считаете цвета и часто сбиваетесь, в дальнейшем не зная, куда идти точно.
Во второй раз просто жмете null, тем самым обнулив значения и повторив действия выше.
В чем плюс прохождения с этой мини-программкой:
- Обычно когда игроки считают цвета, они отходят и не бьют босса, а с этой программой только 1 человек отойдет от босса, чтобы не получать урон и спокойно выполнит этот этап. За эту механику, четверо других игроков нанесут ощутимо больше урона боссу, нежели вы бы дружно считали цвета.
Вы наверняка думаете в чем подвох?
В том, что игроки по сей день не могут пройти эту механику с первого раза.
Удачного прохождения, мой друг.
Автору подписка, лайкулю и "спасибо" в комментах.