47 lines
2.2 KiB
Python
47 lines
2.2 KiB
Python
import Srodek
|
|
|
|
|
|
#w przyszłości trzeba przenieść definicję środków do innego pliku inicjalizującego
|
|
class Akcja:
|
|
srodki = [] #lista obiektów klasy Srodek
|
|
benefits = [] #lista przechowująca benefity płynące z wykonania akcji
|
|
|
|
def __init__(self, typ):
|
|
self.typ = typ
|
|
if self.typ == "nawodnienie":
|
|
self.srodki.append(Srodek.Srodek(1, "woda", "woda"))
|
|
self.srodki.append(Srodek.Srodek(1.5, "powerade", "woda")) #nawadnia lepiej niż woda
|
|
self.benefits.append(typ)
|
|
self.benefits.append(100)
|
|
if self.typ == "zyznosc":
|
|
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"))
|
|
self.benefits.append(typ)
|
|
self.benefits.append(100)
|
|
if self.typ == "wzrost":
|
|
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"))
|
|
self.benefits.append(typ)
|
|
self.benefits.append(20)
|
|
if self.typ == "grzyb":
|
|
self.srodki.append(Srodek.Srodek(9, "mankozeb", "ochrona"))
|
|
self.srodki.append(Srodek.Srodek(10, "czosnek", "ochrona")) #tak czosnek zabija grzyby
|
|
self.benefits.append("choroba")
|
|
self.benefits.append("brak")
|
|
if self.typ == "bakteria":
|
|
self.srodki.append(Srodek.Srodek(11, "miedź", "ochrona"))
|
|
self.srodki.append(Srodek.Srodek(12, "streptomycyna ", "ochrona"))
|
|
self.benefits.append("choroba")
|
|
self.benefits.append("brak")
|
|
if self.typ == "pasożyt":
|
|
self.srodki.append(Srodek.Srodek(13, "Cyjantraniliprol", "ochrona"))
|
|
self.srodki.append(Srodek.Srodek(14, "Permetryna", "ochrona"))
|
|
self.srodki.append(Srodek.Srodek(15, "Abamektyna", "ochrona"))
|
|
self.benefits.append("choroba")
|
|
self.benefits.append("brak")
|
|
|
|
def getBenefit(self):
|
|
return self.benefits |