Ejemplo n.º 1
0
 public virtual List <PlayerAnswer> Resolve(List <PlayerAnswer> answers)
 {
     if (type != EventType.CRISIS)
     {
         foreach (PlayerAnswer ans in answers)
         {
             Debug.Log("Player influence max: " + ans.player.influence.MaxValue);
             ans.player.influence  += Answer.AdaptedStatChanges(ans.answer.statChanges) / STATUS_CHANGE_SCALE;
             World.Instance.groups += Answer.AdaptedStatChanges(ans.answer.popChanges) / World.Instance.popMax;
             List <Player> players = new List <Player>(FindObjectsOfType <Player>());
             foreach (Player p in players)
             {
                 if (p != ans.player)
                 {
                     p.influence += Answer.AdaptedStatChanges(ans.answer.rivalStatChanges) / STATUS_CHANGE_SCALE;
                 }
             }
         }
         Player.NormalizeInfluences();
         return(new List <PlayerAnswer>(answers));
     }
     else
     {
         //FIXME: implement to get resolution of the crisis
         return(null);
     }
 }