<%@ Page Language="vb" Debug="true" %> <% @Import NameSpace="System.Data" %> <% @Import NameSpace="System.Data.SQLClient" %> <% @Import NameSpace="System.Diagnostics.Debug" %> <% @Import Namespace="System.Web.Mail" %> <% @Import Namespace="System.Text.RegularExpressions" %> <% @Import NameSpace="System.Data.OleDb" %> <%@ Import namespace="System.IO" %> <%@ Import namespace="System.Net" %>

<% sqlConn.Open() sqlComm = New SqlCommand("SELECT C_Taverna, C_Centro_Villaggio, Morale, Tasse, R_Filoni_Oro, C_Case, P_Fattorie, P_Taglialegna, P_Min_Pietra, P_Min_Ferro, P_Min_Zolfo, P_Min_Oro, C_Tesoreria, C_Fattorie, C_TagliaLegna, C_Min_Ferro, C_Min_Pietra, C_Min_Zolfo, C_Min_Oro, P_Cittadini FROM Pianeti WHERE Dimensione = '" + Dimensione + "' AND Reame = '" + Reame + "' AND Paese = '" + Paese + "' ", sqlConn) r = sqlComm.ExecuteReader() While r.Read() Var_Cittadini_Tassabili = Split(r("P_Cittadini"),",")(0) Txt_P_Fattorie.Text = r("P_Fattorie") Txt_P_Taglialegna.Text = r("P_Taglialegna") Txt_P_Min_Pietra.Text = r("P_Min_Pietra") Txt_P_Min_Ferro.Text = r("P_Min_Ferro") Txt_P_Min_Zolfo.Text = r("P_Min_Zolfo") Txt_P_Min_Oro.Text = r("P_Min_Oro") Var_C_Tesoreria = r("C_Tesoreria") Ris_Legna = ((0.008 * (r("P_Taglialegna")/50)) + ((0.008 * (r("P_Taglialegna")/50))/4))*5 Ris_Ferro = ((0.005 * (r("P_Min_Ferro")/50)) + ((0.005 * (r("P_Min_Ferro")/50))/4))*5 Ris_Zolfo = ((0.004 * (r("P_Min_Zolfo")/50)) + ((0.004 * (r("P_Min_Zolfo")/50))/4))*5 Ris_Pietra = ((0.007 * (r("P_Min_Pietra")/50)) + ((0.007 * (r("P_Min_Pietra")/50))/4))*5 Ris_Oro = ((0.003 * (r("P_Min_Oro")/50)) + ((0.003 * (r("P_Min_Oro")/50))/4))*5 Prod_Ora_Taglialegna.Text = (Cint((Ris_Legna)*3600)) + ((0.015) * (3600)) Prod_Ora_Min_Ferro.Text = (Cint((Ris_Ferro)*3600)) + ((0.005) * (3600)) Prod_Ora_Min_Pietra.Text = (Cint((Ris_Pietra)*3600)) + ((0.010) * (3600)) Prod_Ora_Min_Zolfo.Text = (Cint((Ris_Zolfo)*3600)) Prod_Ora_Min_Oro.Text = ((Cint((Ris_Oro)*3600)) + (Cint(((Ris_Oro)*(r("R_Filoni_Oro"))*5/100)*3600))) Var_Cittadini_Liberi = Split(r("P_Cittadini"),",")(0) - Cint(Txt_P_Fattorie.Text) - Cint(Txt_P_Taglialegna.Text) - Cint(Txt_P_Min_Pietra.Text) - Cint(Txt_P_Min_Ferro.Text) - Cint(Txt_P_Min_Zolfo.Text) - Cint(Txt_P_Min_Oro.Text) Var_Cittadini_Tassabili = Split(r("P_Cittadini"),",")(0) Var_P_Fattorie = Cint(r("P_Fattorie")) Var_Morale = CInt(r("Morale")) Msg_Morale.Text = "La tua cittā č prossima alla rivolta!" Msg_Imm_Morale.Text = "" If Var_Morale > -100 Then Msg_Morale.Text = "La tua cittā č prossima alla rivolta!" Msg_Imm_Morale.Text = "" End If If Var_Morale > -80 Then Msg_Morale.Text = "Il morale della tua cittā č pessimo!" Msg_Imm_Morale.Text = "" End If If Var_Morale > -60 Then Msg_Morale.Text = "I cittadini sono molto demoralizzati, devi fare qualcosa!" Msg_Imm_Morale.Text = "" End If If Var_Morale > -40 Then Msg_Morale.Text = "Il morale cittadino č molto basso" Msg_Imm_Morale.Text = "" End If If Var_Morale > -20 Then Msg_Morale.Text = "Il morale č leggermente al di sotto di quanto dovrebbe essere" Msg_Imm_Morale.Text = "" End If If Var_Morale > 0 Then Msg_Morale.Text = "I cittadini non sono nč felici e nč scontenti..." Msg_Imm_Morale.Text = "" End If If Var_Morale > 20 Then Msg_Morale.Text = "I cittadini non si trovano male nella tua cittā" Msg_Imm_Morale.Text = "" End If If Var_Morale > 40 Then Msg_Morale.Text = "I tuoi cittadini sono abbastanza contenti del tuo regno" Msg_Imm_Morale.Text = "" End If If Var_Morale > 60 Then Msg_Morale.Text = "La cittā si complimenta con te, riesci sempre a tenere il morale della popolazione alto!" Msg_Imm_Morale.Text = "" End If If Var_Morale > 80 Then Msg_Morale.Text = "Tra feste e divertimenti, il morale della popolazione č molto alto!" Msg_Imm_Morale.Text = "" End If If Var_Morale > 90 Then Msg_Morale.Text = "Tra feste e divertimenti, il morale della popolazione č molto alto!" Msg_Imm_Morale.Text = "" End If If Var_Morale = 100 Then Msg_Morale.Text = "Il morale della tua cittā non potrebbe andare meglio! I cittadini ti applaudono ogni volta che cammini per le strade!" Msg_Imm_Morale.Text = "" End If Messaggio.Text = "" Messaggio.Text = Messaggio.Text + "
Popolazione Max.: " + CStr(Cint(r("C_Centro_Villaggio")*100)) Messaggio.Text = Messaggio.Text + "
Capienza Case: " + CStr(Cint(r("C_Case")*20)) Messaggio.Text = Messaggio.Text + "
Cittadini Totali: " + Split(r("P_Cittadini"),",")(0) Messaggio.Text = Messaggio.Text + "
Cittadini Liberi: " + CStr(Cint(Var_Cittadini_Liberi)) If r("C_Centro_Villaggio")*100 < (r("C_Case")*20) Then Messaggio.Text = Messaggio.Text + "
Cittadini in Arrivo: " + CStr(Cint(r("C_Centro_Villaggio")*100)-(Split(r("P_Cittadini"),",")(0))) Else Messaggio.Text = Messaggio.Text + "
Cittadini in Arrivo: " + CStr(Cint(r("C_Case")*20)-(Split(r("P_Cittadini"),",")(0))) End If Messaggio.Text = Messaggio.Text + "
" If Not Page.IsPostBack Then If r("Tasse") = 1 Then P_Tasse.SelectedValue = "Piccola Donazione" End If If r("Tasse") = 2 Then P_Tasse.SelectedValue = "Niente Tasse" End If If r("Tasse") = 3 Then P_Tasse.SelectedValue = "Tasse Molto Basse" End If If r("Tasse") = 4 Then P_Tasse.SelectedValue = "Tasse Basse" End If If r("Tasse") = 5 Then P_Tasse.SelectedValue = "Tasse Normali" End If If r("Tasse") = 6 Then P_Tasse.SelectedValue = "Tasse Alte" End If If r("Tasse") = 7 Then P_Tasse.SelectedValue = "Tasse Molto Alte" End If End If If r("Tasse") = 1 Then Ris_Oro = - (Var_Cittadini_Tassabili) * 0.0000200 * 3600 End If If r("Tasse") = 2 Then Ris_Oro = 0 End If If r("Tasse") = 3 Then Ris_Oro = (Var_Cittadini_Tassabili) * 0.0000200 * 3600 Ris_Oro = Ris_Oro + (Ris_Oro/10*Var_C_Tesoreria) End If If r("Tasse") = 4 Then Ris_Oro = (Var_Cittadini_Tassabili) * 0.0000300 * 3600 Ris_Oro = Ris_Oro + (Ris_Oro/10*Var_C_Tesoreria) End If If r("Tasse") = 5 Then Ris_Oro = (Var_Cittadini_Tassabili) * 0.0000400 * 3600 Ris_Oro = Ris_Oro + (Ris_Oro/10*Var_C_Tesoreria) End If If r("Tasse") = 6 Then Ris_Oro = (Var_Cittadini_Tassabili) * 0.0000500 * 3600 Ris_Oro = Ris_Oro + (Ris_Oro/10*Var_C_Tesoreria) End If If r("Tasse") = 7 Then Ris_Oro = (Var_Cittadini_Tassabili) * 0.0000600 * 3600 Ris_Oro = Ris_Oro + (Ris_Oro/10*Var_C_Tesoreria) End If Msg_Tasse.Text = Ris_Oro %>
Gestione Cittadini


Unitā Quantitā Disponibile Produzione/Ora
Fattorie [<%=r("c_Fattorie")%>]  
Taglialegna [<%=r("C_Taglialegna")%>]
Miniere di Pietra [<%=r("C_Min_Pietra")%>]
Miniere di Ferro [<%=r("C_Min_Ferro")%>]
Miniere di Zolfo [<%=r("C_Min_Zolfo")%>]
Miniere D'Oro [<%=r("C_Min_Oro")%>]




 
Cibo

<% If (r("P_Fattorie") * 5) = 0 Then Msg_Cibo.Text= "Niente Cibo" End If If (r("P_Fattorie") * 5) > 0 Then Msg_Cibo.Text= "Minime Razioni" End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili)) / 3 Then Msg_Cibo.Text= "Piccole Razioni" End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili)) / 2 Then Msg_Cibo.Text= "Medie Razioni" End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili)) Then Msg_Cibo.Text = "Razioni Sufficienti" End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili) * 2) Then Msg_Cibo.Text = "Grandi Razioni" End If If (Var_P_Fattorie * 5) > (Cint(Var_Cittadini_Tassabili) * 2) Then Msg_Cibo.Text = "Grandi Razioni" End If %>




<% If r("C_Tesoreria") > 0 Then %> Tasse

Piccola Donazione Niente Tasse Tasse Molto Basse Tasse Basse Tasse Normali Tasse Alte Tasse Molto Alte <% End If %>



Morale

  <% Dim Check_Morale If (r("P_Fattorie") * 5) = 0 Then Check_Morale = -50 End If If (r("P_Fattorie") * 5) > 0 Then Check_Morale = -40 End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili)) / 3 Then Check_Morale = -30 End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili)) / 2 Then Check_Morale = -20 End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili)) Then Check_Morale = +20 End If If (r("P_Fattorie") * 5) > (Cint(Var_Cittadini_Tassabili) * 2) Then Check_Morale = +40 End If If r("Tasse") = 1 Then Check_Morale = Check_Morale +20 End If If r("Tasse") = 2 Then Check_Morale = Check_Morale End If If r("Tasse") = 3 Then Check_Morale = Check_Morale -20 End If If r("Tasse") = 4 Then Check_Morale = Check_Morale -40 End If If r("Tasse") = 5 Then Check_Morale = Check_Morale -50 End If If r("Tasse") = 6 Then Check_Morale = Check_Morale -60 End If If r("Tasse") = 7 Then Check_Morale = Check_Morale -80 End If If r("C_Taverna") = 1 Then Check_Morale = Check_Morale +3 End If If r("C_Taverna") = 2 Then Check_Morale = Check_Morale +5 End If If r("C_Taverna") = 3 Then Check_Morale = Check_Morale +8 End If If r("C_Taverna") = 4 Then Check_Morale = Check_Morale +10 End If If r("C_Taverna") = 5 Then Check_Morale = Check_Morale +13 End If If r("C_Taverna") = 6 Then Check_Morale = Check_Morale +15 End If If r("C_Taverna") = 7 Then Check_Morale = Check_Morale +20 End If If r("C_Taverna") = 8 Then Check_Morale = Check_Morale +25 End If If r("C_Taverna") = 9 Then Check_Morale = Check_Morale +30 End If If r("C_Taverna") = 10 Then Check_Morale = Check_Morale +35 End If If r("C_Taverna") = 11 Then Check_Morale = Check_Morale +40 End If If r("C_Taverna") = 12 Then Check_Morale = Check_Morale +45 End If If r("C_Taverna") > 12 Then Check_Morale = Check_Morale +50 End If If Var_Livello_Generale > 0 Then Check_Morale = Check_Morale + Var_Livello_Generale End If %>

<% If Check_Morale > 0 %> <% End If %> <% If Check_Morale = 0 %> <% End If %> <% If Check_Morale < 0 %> <% End If %>

 


 
<% End While r.Close() sqlConn.Close() %>