Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Nation[] getGodFollowers(God god)
- {
- // getting all nations who follow a certain god
- Nation[] follower = new Nation[_player.length];
- int x =0;
- for(int i=0; i<_player.length; i++)
- {
- if(_player[i]!= null && _player[i]._god._name.equals(god._name))
- {
- follower[x] = _player[i];
- x++;
- }
- }
- return follower;
- }
- public int getFollowersFaith(God god)
- {
- int totalFaith = 0;
- Nation[] follower = getGodFollowers(god);
- for(int i=0; i<follower.length; i++)
- {
- if(follower[i]!= null )
- {
- totalFaith += follower[i]._faith;
- }
- }
- return totalFaith;
- }
- public void godTurnPass(God god)
- {
- if(god.checkVirtue("Balance"))
- god.checkBalanceBoost(this);
- if(god.checkVirtue("Harmony"))
- god.checkHarmonyBoost(this);
- if(god.checkVirtue("Piety"))
- god.checkPietyBoost(this);
- god._power += getFollowersFaith(god); System.out.println("Followers boost: "+god._name+" gained "+getFollowersFaith(god)+" faith from his followers");
- }
Add Comment
Please, Sign In to add comment