2024-03-24 12:01:41 +01:00
|
|
|
import Srodek
|
|
|
|
|
2024-03-24 12:14:23 +01:00
|
|
|
|
|
|
|
#w przyszłości trzeba przenieść definicję środków do innego pliku inicjalizującego
|
2024-03-23 23:17:51 +01:00
|
|
|
class Akcja:
|
|
|
|
srodki = [] #lista obiektów klasy Srodek
|
2024-03-24 19:19:49 +01:00
|
|
|
benefits = [] #lista przechowująca benefity płynące z wykonania akcji
|
|
|
|
|
2024-03-23 23:19:38 +01:00
|
|
|
def __init__(self, typ):
|
|
|
|
self.typ = typ
|
|
|
|
if self.typ == "nawodnienie":
|
2024-03-24 13:10:02 +01:00
|
|
|
self.srodki.append(Srodek.Srodek(1, "woda", "woda"))
|
|
|
|
self.srodki.append(Srodek.Srodek(1.5, "powerade", "woda")) #nawadnia lepiej niż woda
|
2024-03-24 19:19:49 +01:00
|
|
|
self.benefits.append(typ)
|
|
|
|
self.benefits.append(100)
|
2024-03-23 23:19:38 +01:00
|
|
|
if self.typ == "zyznosc":
|
2024-03-24 13:10:02 +01:00
|
|
|
self.srodki.append(Srodek.Srodek(2, "obornik", "nawoz"))
|
|
|
|
self.srodki.append(Srodek.Srodek(3, "azotan", "nawoz"))
|
|
|
|
self.srodki.append(Srodek.Srodek(4, "wapno", "nawoz"))
|
|
|
|
self.srodki.append(Srodek.Srodek(5, "superfosfat", "nawoz"))
|
2024-03-24 19:19:49 +01:00
|
|
|
self.benefits.append(typ)
|
|
|
|
self.benefits.append(100)
|
2024-03-23 23:19:38 +01:00
|
|
|
if self.typ == "wzrost":
|
2024-03-24 13:10:02 +01:00
|
|
|
self.srodki.append(Srodek.Srodek(6, "witaminy", "odzywka"))
|
|
|
|
self.srodki.append(Srodek.Srodek(7, "aminokwasy", "odzywka"))
|
|
|
|
self.srodki.append(Srodek.Srodek(8, "algi morskie", "odzywka"))
|
2024-03-24 19:19:49 +01:00
|
|
|
self.benefits.append(typ)
|
|
|
|
self.benefits.append(20)
|
2024-03-23 23:19:38 +01:00
|
|
|
if self.typ == "grzyb":
|
2024-03-24 13:10:02 +01:00
|
|
|
self.srodki.append(Srodek.Srodek(9, "mankozeb", "ochrona"))
|
|
|
|
self.srodki.append(Srodek.Srodek(10, "czosnek", "ochrona")) #tak czosnek zabija grzyby
|
2024-03-24 19:19:49 +01:00
|
|
|
self.benefits.append("choroba")
|
|
|
|
self.benefits.append("brak")
|
|
|
|
if self.typ == "bakteria":
|
2024-03-24 13:10:02 +01:00
|
|
|
self.srodki.append(Srodek.Srodek(11, "miedź", "ochrona"))
|
|
|
|
self.srodki.append(Srodek.Srodek(12, "streptomycyna ", "ochrona"))
|
2024-03-24 19:19:49 +01:00
|
|
|
self.benefits.append("choroba")
|
|
|
|
self.benefits.append("brak")
|
2024-03-23 23:19:38 +01:00
|
|
|
if self.typ == "pasożyt":
|
2024-03-24 13:10:02 +01:00
|
|
|
self.srodki.append(Srodek.Srodek(13, "Cyjantraniliprol", "ochrona"))
|
|
|
|
self.srodki.append(Srodek.Srodek(14, "Permetryna", "ochrona"))
|
|
|
|
self.srodki.append(Srodek.Srodek(15, "Abamektyna", "ochrona"))
|
2024-03-24 19:19:49 +01:00
|
|
|
self.benefits.append("choroba")
|
|
|
|
self.benefits.append("brak")
|
|
|
|
|
2024-03-23 23:19:38 +01:00
|
|
|
def getBenefit(self):
|
|
|
|
return self.benefits
|