Advertisement
Kesseleth

Bug reference sheet

Jun 28th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.96 KB | None | 0 0
  1.  
  2.         public class GrowingPrimaryStat extends StaticPrimaryStat implements IAmGrowingPrimaryStat {
  3.  
  4.             public int statIncreaseAmount;
  5.             public GrowingSecondaryStat child;
  6.  
  7.             public GrowingPrimaryStat(int value, int statIncreaseAmount, PrimaryStatNames name,
  8.                                       GrowingSecondaryStat child) {
  9.                 super(value, name);
  10.                 this.child = child;
  11.                 this.statIncreaseAmount = statIncreaseAmount;
  12.             }
  13.  
  14.             public GrowingPrimaryStat(int value, int StatIncreaseAmount, PrimaryStatNames name) {
  15.                 super(value, name);
  16.                 this.statIncreaseAmount = statIncreaseAmount;
  17.             }
  18.  
  19.  
  20.             public GrowingPrimaryStat(int value, PrimaryStatNames name) {
  21.                 super(value, name);
  22.                 this.statIncreaseAmount = 1;
  23.             }
  24.  
  25.  
  26.             public GrowingPrimaryStat(PrimaryStatNames name) {
  27.                 super(name);
  28.                 this.statIncreaseAmount = 0;
  29.             }
  30.  
  31.             @Override
  32.             public void increaseStatValue() {
  33.                 value += statIncreaseAmount;
  34.             }
  35.  
  36.             @Override
  37.             public int getStatIncreaseAmount() {
  38.                 return statIncreaseAmount;
  39.             }
  40.  
  41.         }
  42.  
  43.     public class NormalGrowingPrimaryStatContainer extends NormalStaticPrimaryStatContainer
  44.             implements IAmGrowingPrimaryStatContainer {
  45.  
  46.         public NormalGrowingPrimaryStatContainer(GrowingPrimaryStat strength, GrowingPrimaryStat endurance,
  47.                                                  GrowingPrimaryStat finesse, GrowingPrimaryStat fortitude,
  48.                                                  GrowingPrimaryStat agility) {
  49.             this.strength = strength;
  50.             this.endurance = endurance;
  51.             this.finesse = finesse;
  52.             this.fortitude = fortitude;
  53.             this.agility = agility;
  54.         }
  55.  
  56.         public NormalGrowingPrimaryStatContainer() {
  57.             strength = new GrowingPrimaryStat(1, 1, STRENGTH);
  58.             endurance = new GrowingPrimaryStat(1, 1, ENDURANCE);
  59.             finesse = new GrowingPrimaryStat(1, 1, FINESSE);
  60.             fortitude = new GrowingPrimaryStat(1, 1, FORTITUDE);
  61.             agility = new GrowingPrimaryStat(1, 1, AGILITY);
  62.         }
  63.  
  64.  
  65.         public void updateStatValue(PrimaryStatNames stat) {
  66.             {
  67.  
  68.                 switch (stat) {
  69.  
  70.                     case STRENGTH:
  71.                         strength.increaseStatValue();
  72.  
  73.  
  74.                     case ENDURANCE:
  75.                         endurance.increaseStatValue();
  76.  
  77.                     case FINESSE:
  78.                         finesse.increaseStatValue();
  79.  
  80.                     case FORTITUDE:
  81.                         fortitude.increaseStatValue();
  82.  
  83.                     default:
  84.                         agility.increaseStatValue();
  85.                 }
  86.  
  87.  
  88.             }
  89.  
  90.         }
  91.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement