public bool HasBoosts(EventAction_Data eventChosen) { foreach (Alignment boost in debateBoosts) { //Civil if ((boost.civil.escolasMilitares > 0) && (eventChosen.alignment.civil.escolasMilitares > 0)) { return(true); } if ((boost.civil.servicoMilitarObrigatorio > 0) && (eventChosen.alignment.civil.servicoMilitarObrigatorio > 0)) { return(true); } //Economic if ((boost.economic.bolsaFamilia > 0) && (eventChosen.alignment.economic.bolsaFamilia > 0)) { return(true); } if ((boost.economic.impostoDeRenda > 0) && (eventChosen.alignment.economic.impostoDeRenda > 0)) { return(true); } if ((boost.economic.previdencia > 0) && (eventChosen.alignment.economic.previdencia > 0)) { return(true); } if ((boost.economic.privatizacao > 0) && (eventChosen.alignment.economic.privatizacao > 0)) { return(true); } if ((boost.economic.salarioMinimo > 0) && (eventChosen.alignment.economic.salarioMinimo > 0)) { return(true); } //Societal if ((boost.societal.casamentoGay > 0) && (eventChosen.alignment.societal.casamentoGay > 0)) { return(true); } if ((boost.societal.ensinoReligiosoEscolas > 0) && (eventChosen.alignment.societal.ensinoReligiosoEscolas > 0)) { return(true); } if ((boost.societal.legalizacaoAborto > 0) && (eventChosen.alignment.societal.legalizacaoAborto > 0)) { return(true); } if ((boost.societal.legalizacaoDrogas > 0) && (eventChosen.alignment.societal.legalizacaoDrogas > 0)) { return(true); } } return(false); }
// Incrementa alinhamento e recursos do player com valores do staff private void SetEventConsequences(EventAction_Data eventChosen, int index) { // Incrementa recursos candidates [index].resources.cash += eventChosen.resources.cash; candidates [index].resources.corruption += eventChosen.resources.corruption; candidates [index].resources.credibility += eventChosen.resources.credibility; candidates [index].resources.visibility += eventChosen.resources.visibility; // Incrementa alinhamento candidates [index].alignment += eventChosen.alignment; // Special Consequences Debug.Log("SetEventConsequences to " + candidates[index].personName); eventChosen.RunSpecialConsequences(candidates[index]); if (index == 0) { uiResources.UpdateValues(); } }