falyptus

AncestraR - Breed Class

May 17th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.62 KB | None | 0 0
  1. package objects;
  2.  
  3. import java.util.Map;
  4. import java.util.TreeMap;
  5. import java.util.Map.Entry;
  6.  
  7. public class Breed {
  8.    
  9.     private final int id;
  10.     private final int startLife;
  11.     private final int startPA;
  12.     private final int startPM;
  13.     private final int startInitiative;
  14.     private final int startProspecting;
  15.     private final int startMap;
  16.     private final int startCell;
  17.     private final BreedStat intelligence;
  18.     private final BreedStat wisdom;
  19.     private final BreedStat chance;
  20.     private final BreedStat agility;
  21.     private final BreedStat strenght;
  22.     private final BreedStat vitality;
  23.    
  24.     public Breed(int id, int startLife, int startPA, int startPM, int startInitiative, int startProspecting, int startMap, int startCell,
  25.             String intelligence, String wisdom, String chance, String agility, String strenght, String vitality)
  26.  {
  27.         this.id = id;
  28.         this.startLife = startLife;
  29.         this.startPA = startPA;
  30.         this.startPM = startPM;
  31.         this.startInitiative = startInitiative;
  32.         this.startProspecting = startProspecting;
  33.         this.startMap = startMap;
  34.         this.startCell = startCell;
  35.         this.intelligence = BreedStat.parse(intelligence);
  36.         this.wisdom = BreedStat.parse(wisdom);
  37.         this.chance = BreedStat.parse(chance);
  38.         this.agility = BreedStat.parse(agility);
  39.         this.strenght = BreedStat.parse(strenght);
  40.         this.vitality = BreedStat.parse(vitality);
  41.     }
  42.    
  43.  
  44.     public int getId()
  45.     {
  46.             return id;
  47.     }
  48.  
  49.     public int getStartLife()
  50.     {
  51.             return startLife;
  52.         }
  53.  
  54.     public int getStartPA()
  55.     {
  56.             return startPA;
  57.         }
  58.  
  59.     public int getStartPM()
  60.     {
  61.             return startPM;
  62.         }
  63.  
  64.     public int getStartInitiative()
  65.     {
  66.             return startInitiative;
  67.         }
  68.  
  69.     public int getStartProspecting()
  70.     {
  71.             return startProspecting;
  72.         }
  73.  
  74.     public BreedStat getIntelligence()
  75.     {
  76.             return intelligence;
  77.         }
  78.  
  79.     public BreedStat getWisdom()
  80.     {
  81.             return wisdom;
  82.         }
  83.  
  84.     public BreedStat getChance()
  85.     {
  86.             return chance;
  87.     }
  88.  
  89.     public BreedStat getAgility()
  90.     {
  91.             return agility;
  92.         }
  93.  
  94.     public BreedStat getStrenght()
  95.     {
  96.             return strenght;
  97.         }
  98.  
  99.     public BreedStat getVitality()
  100.     {
  101.             return vitality;
  102.         }
  103.  
  104.     public int getStartMap()
  105.     {
  106.         return startMap;
  107.     }
  108.  
  109.     public int getStartCell()
  110.     {
  111.         return startCell;
  112.     }
  113.    
  114.     /**
  115.     *
  116.     *Début d'une classe qui gère les paliers de stats.
  117.     */
  118.     public static class BreedStat
  119.     {
  120.         private Object floors; //Utilisation d'une classe BreedFloor ou d'une Map ?
  121.        
  122.         public BreedStat()
  123.         {
  124.             floors = new Object();
  125.         }
  126.        
  127.         /**
  128.         *@param Points de caractéristiques de base déjà acquit (ex: _baseStats.getEffect(Constants.STAT_ADD_FORC);)
  129.         *@return Points requis pour up une caractéristique
  130.         */
  131.         public int getCost(int val)
  132.         {
  133.             //TODO: Système qui calcul le coût pour monter le stat.
  134.             return -1;
  135.         }
  136.        
  137.         public static BreedStat parse(String data)
  138.         {
  139.             BreedStat stats = new BreedStat();
  140.             //TODO: Parser le palier de stats.
  141.             return stats;
  142.         }
  143.  
  144.         public Object getFloors()
  145.         {
  146.                 return floors;
  147.             }
  148.     }
  149.    
  150.     public static class BreedSpell
  151.     {
  152.         private final int breed;
  153.         private final int lvl;
  154.         private final int spellId;
  155.         private final int pos;
  156.        
  157.         public BreedSpell(int race, int lvl, int spellId, int pos)
  158.         {
  159.             this.breed = race;
  160.             this.lvl = lvl;
  161.             this.spellId = spellId;
  162.             this.pos = pos;
  163.         }
  164.        
  165.         public int getBreed()
  166.         {
  167.             return breed;
  168.         }
  169.        
  170.         public int getLvl()
  171.         {
  172.             return lvl;
  173.         }
  174.        
  175.         public int getSpellId()
  176.         {
  177.             return spellId;
  178.         }
  179.        
  180.         public int getPos()
  181.         {
  182.             return pos;
  183.         }
  184.     }
  185.  
  186. }
Advertisement
Add Comment
Please, Sign In to add comment