public static string eventNotification(Mechanics.CityEvent notifiedEvent) { string message = ""; if (notifiedEvent.countdown >= 10) { message += "Planowane wydarzenie: "; } else if (notifiedEvent.countdown > 0) { message += "Zbliża się wydarzenie: "; } else { message += "Z ostatniej chwili: "; } switch (notifiedEvent.type) { case Mechanics.EventType.attack: return(message + "atak frakcji" + notifiedEvent.perpetrator.name + " na frakcję " + notifiedEvent.target.name + "."); break; case Mechanics.EventType.manifestation: return(message + "manifestacja przciw frakcji " + notifiedEvent.target.name + " organizowana przez frakcję " + notifiedEvent.perpetrator.name + "."); break; case Mechanics.EventType.peace: return(message + "deklaracja pokoju złożona frakcji " + notifiedEvent.target.name + " przez frakcję " + notifiedEvent.perpetrator.name + "."); break; case Mechanics.EventType.provocation: return(message + "prowokacja medialna frakcji " + notifiedEvent.perpetrator.name + " wymierzona we frakcję " + notifiedEvent.target.name + "."); break; case Mechanics.EventType.rally: return(message + "wiec frakcji " + notifiedEvent.perpetrator.name + " z gościnnym udziałem frakcji " + notifiedEvent.target.name + "."); break; case Mechanics.EventType.sabotage: return(message + "sabotaż wymierzony we frakcję " + notifiedEvent.target.name + " przygotowany przez frakcję " + notifiedEvent.perpetrator.name + "."); break; case Mechanics.EventType.talk: return(message + "pertraktacje frakcji " + notifiedEvent.perpetrator.name + " z frakcją " + notifiedEvent.target.name + "."); break; } return(notifiedEvent.perpetrator.name); }
public static void Prevent(object sender, EventArgs e) { Mechanics.CityEvent thisEvent = (CityEvent)((sender as Button).Tag); Mechanics.GameLog.Add(new Notification("Frakcja " + thisEvent.perpetrator.name + " nie jest zadowolona z interwencji")); thisEvent.perpetrator.Upset(10f); thisEvent.active = false; CityLife.Remove(thisEvent); RefreshNotifications(); CityUpdate(1); }