Advertisement
micher43

FalloutGameThing

Oct 7th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.17 KB | None | 0 0
  1.  
  2. public class FalloutGameCharacters {
  3.     private int strength;
  4.     private int perception;
  5.     private int endurance;
  6.     private int charisma;
  7.     private int agility;
  8.     private int luck;
  9.    
  10.     private int actionPoints;
  11.     private int carryWeight;
  12.     private int healingRate;
  13.     private int hitPoints;
  14.     private int partyLimit;
  15.    
  16.     public FalloutGameCharacters(int inStrength, int inPerception, int inEndurance, int inCharisma , int inAgility, int inLuck){
  17.         strength = inStrength;
  18.         perception = inPerception;
  19.         endurance = inEndurance;
  20.         charisma = inCharisma;
  21.         agility = inAgility;
  22.         luck = inLuck;
  23.     }
  24.    
  25.     public void calculuateActionPoints(){
  26.         actionPoints = (agility/2) + 5;
  27.        
  28.     }
  29.    
  30.      public void calculateCarryWeight(){
  31.          carryWeight = 25 + (strength * 25);
  32.      }
  33.    
  34.      public void calculateHealingRate(){
  35.          healingRate = endurance/3;
  36.      }
  37.      
  38.      public void calculateHitPoints(){
  39.          hitPoints = 15 + (2*endurance) + strength;
  40.      }
  41.      
  42.      public void calculatePartyLimit(){
  43.          partyLimit = charisma/2;
  44.      }
  45.      
  46.      public int getStrength(){
  47.          return strength;
  48.      }
  49.      
  50.      public int getPerception(){
  51.          return perception;
  52.      }
  53.      
  54.      public int getEndurance(){
  55.          return endurance;
  56.      }
  57.      
  58.      public int getCharisma(){
  59.          return charisma;
  60.      }
  61.          
  62.      public int getAgility(){
  63.          return agility;
  64.      }
  65.      
  66.      public int getLuck(){
  67.          return luck;
  68.      }
  69.      
  70.      public int getActionPoints(){
  71.          return actionPoints;
  72.      }
  73.      
  74.      public int getCarryWeight(){
  75.          return carryWeight;
  76.      }
  77.      
  78.      public int getHealingRate(){
  79.          return healingRate;
  80.      }
  81.      
  82.      public int getHitPoints(){
  83.          return hitPoints;
  84.      }
  85.      
  86.      public int getPartyLimit(){
  87.          return partyLimit;
  88.      }
  89.      
  90.      public void increaseStrength(int amount){
  91.          strength = strength + amount;
  92.      }
  93.      
  94.      public void increasePerception(int amount){
  95.          perception = perception + amount;
  96.      }
  97.      
  98.      public void increaseEndurance(int amount){
  99.          endurance = endurance + amount;
  100.      }
  101.      
  102.      public void increaseCharisma(int amount){
  103.          charisma = charisma + amount;
  104.      }
  105.      
  106.      public void increaseAgility(int amount){
  107.          agility = agility + amount;
  108.      }
  109.      
  110.      public void increaseLuck(int amount){
  111.          luck = luck + amount;
  112.      }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement