AugmentationData.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package net.sf.l2j.gameserver.datatables;
  16. import java.io.File;
  17. import java.util.StringTokenizer;
  18. import java.util.logging.Level;
  19. import java.util.logging.Logger;
  20. import javax.xml.parsers.DocumentBuilderFactory;
  21. import javolution.util.FastList;
  22. import net.sf.l2j.Config;
  23. import net.sf.l2j.gameserver.model.L2Augmentation;
  24. import net.sf.l2j.gameserver.model.L2Skill;
  25. import net.sf.l2j.gameserver.skills.Stats;
  26. import net.sf.l2j.util.Rnd;
  27. import org.w3c.dom.Document;
  28. import org.w3c.dom.NamedNodeMap;
  29. import org.w3c.dom.Node;
  30. /**
  31. * This class manages the augmentation data and can also create new augmentations.
  32. *
  33. * @author durgus
  34. * edited by Gigiikun
  35. */
  36. public class AugmentationData
  37. {
  38. private static final Logger _log = Logger.getLogger(AugmentationData.class.getName());
  39. // =========================================================
  40. private static AugmentationData _instance;
  41. public static final AugmentationData getInstance()
  42. {
  43. if (_instance == null)
  44. {
  45. _instance = new AugmentationData();
  46. }
  47. return _instance;
  48. }
  49. // =========================================================
  50. // Data Field
  51. // stats
  52. private static final int STAT_START = 1;
  53. private static final int STAT_END = 14560;
  54. private static final int STAT_BLOCKSIZE = 3640;
  55. //private static final int STAT_NUMBEROF_BLOCKS = 4;
  56. private static final int STAT_SUBBLOCKSIZE = 91;
  57. //private static final int STAT_NUMBEROF_SUBBLOCKS = 40;
  58. // skills
  59. // private static final int BLUE_START = 14561;
  60. private static final int PURPLE_START = 14578;
  61. private static final int RED_START = 14685;
  62. // basestats
  63. private static final int BASESTAT_STR = 16341;
  64. private static final int BASESTAT_CON = 16342;
  65. private static final int BASESTAT_INT = 16343;
  66. private static final int BASESTAT_MEN = 16344;
  67. private FastList<?> _augmentationStats[];
  68. private FastList<augmentationSkill> _blueSkills;
  69. private FastList<augmentationSkill> _purpleSkills;
  70. private FastList<augmentationSkill> _redSkills;
  71. private int _skillsCount;
  72. // =========================================================
  73. // Constructor
  74. public AugmentationData()
  75. {
  76. _log.info("Initializing AugmentationData.");
  77. _augmentationStats = new FastList[4];
  78. _augmentationStats[0] = new FastList<augmentationStat>();
  79. _augmentationStats[1] = new FastList<augmentationStat>();
  80. _augmentationStats[2] = new FastList<augmentationStat>();
  81. _augmentationStats[3] = new FastList<augmentationStat>();
  82. _blueSkills = new FastList<augmentationSkill>();
  83. _purpleSkills = new FastList<augmentationSkill>();
  84. _redSkills = new FastList<augmentationSkill>();
  85. load();
  86. _skillsCount = _blueSkills.size() + _purpleSkills.size() + _redSkills.size();
  87. // Use size*4: since theres 4 blocks of stat-data with equivalent size
  88. _log.info("AugmentationData: Loaded: " + (_augmentationStats[0].size() * 4) + " augmentation stats.");
  89. _log.info("AugmentationData: Loaded: " + _blueSkills.size() + " blue, " + _purpleSkills.size() + " purple and " + _redSkills.size() + " red skills");
  90. }
  91. // =========================================================
  92. // Nested Class
  93. public class augmentationSkill
  94. {
  95. private int _skillId;
  96. private int _maxSkillLevel;
  97. private int _augmentationSkillId;
  98. public augmentationSkill(int skillId, int maxSkillLevel, int augmentationSkillId)
  99. {
  100. _skillId = skillId;
  101. _maxSkillLevel = maxSkillLevel;
  102. _augmentationSkillId = augmentationSkillId;
  103. }
  104. public L2Skill getSkill(int level)
  105. {
  106. if (level > _maxSkillLevel)
  107. return SkillTable.getInstance().getInfo(_skillId, _maxSkillLevel);
  108. return SkillTable.getInstance().getInfo(_skillId, level);
  109. }
  110. public int getAugmentationSkillId()
  111. {
  112. return _augmentationSkillId;
  113. }
  114. }
  115. public class augmentationStat
  116. {
  117. private Stats _stat;
  118. private int _singleSize;
  119. private int _combinedSize;
  120. private float _singleValues[];
  121. private float _combinedValues[];
  122. public augmentationStat(Stats stat, float sValues[], float cValues[])
  123. {
  124. _stat = stat;
  125. _singleSize = sValues.length;
  126. _singleValues = sValues;
  127. _combinedSize = cValues.length;
  128. _combinedValues = cValues;
  129. }
  130. public int getSingleStatSize()
  131. {
  132. return _singleSize;
  133. }
  134. public int getCombinedStatSize()
  135. {
  136. return _combinedSize;
  137. }
  138. public float getSingleStatValue(int i)
  139. {
  140. if (i >= _singleSize || i < 0)
  141. return _singleValues[_singleSize - 1];
  142. return _singleValues[i];
  143. }
  144. public float getCombinedStatValue(int i)
  145. {
  146. if (i >= _combinedSize || i < 0)
  147. return _combinedValues[_combinedSize - 1];
  148. return _combinedValues[i];
  149. }
  150. public Stats getStat()
  151. {
  152. return _stat;
  153. }
  154. }
  155. // =========================================================
  156. // Method - Private
  157. @SuppressWarnings("unchecked")
  158. private final void load()
  159. {
  160. // Load the skillmap
  161. // Note: the skillmap data is only used when generating new augmentations
  162. // the client expects a different id in order to display the skill in the
  163. // items description...
  164. try
  165. {
  166. SkillTable st = SkillTable.getInstance();
  167. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  168. factory.setValidating(false);
  169. factory.setIgnoringComments(true);
  170. File file = new File(Config.DATAPACK_ROOT + "/data/stats/augmentation/augmentation_skillmap.xml");
  171. if (!file.exists())
  172. {
  173. if (Config.DEBUG)
  174. _log.info("The augmentation skillmap file is missing.");
  175. return;
  176. }
  177. Document doc = factory.newDocumentBuilder().parse(file);
  178. for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
  179. {
  180. if ("list".equalsIgnoreCase(n.getNodeName()))
  181. {
  182. for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
  183. {
  184. if ("augmentation".equalsIgnoreCase(d.getNodeName()))
  185. {
  186. NamedNodeMap attrs = d.getAttributes();
  187. int skillId = 0, augmentationId = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());
  188. // type of the skill is not needed anymore but I do not erase the code.
  189. // maybe someone can use it for something
  190. // String type = "passive";
  191. for (Node cd = d.getFirstChild(); cd != null; cd = cd.getNextSibling())
  192. {
  193. if ("skillId".equalsIgnoreCase(cd.getNodeName()))
  194. {
  195. attrs = cd.getAttributes();
  196. skillId = Integer.parseInt(attrs.getNamedItem("val").getNodeValue());
  197. }
  198. /* else if ("type".equalsIgnoreCase(cd.getNodeName()))
  199. {
  200. attrs = cd.getAttributes();
  201. type = attrs.getNamedItem("val").getNodeValue();
  202. }*/
  203. }
  204. if (augmentationId < PURPLE_START)
  205. _blueSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));
  206. else if (augmentationId < RED_START)
  207. _purpleSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));
  208. else
  209. _redSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));
  210. }
  211. }
  212. }
  213. }
  214. }
  215. catch (Exception e)
  216. {
  217. _log.log(Level.SEVERE, "Error parsing augmentation_skillmap.xml.", e);
  218. return;
  219. }
  220. // Load the stats from xml
  221. for (int i = 1; i < 5; i++)
  222. {
  223. try
  224. {
  225. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  226. factory.setValidating(false);
  227. factory.setIgnoringComments(true);
  228. File file = new File(Config.DATAPACK_ROOT + "/data/stats/augmentation/augmentation_stats" + i + ".xml");
  229. if (!file.exists())
  230. {
  231. if (Config.DEBUG)
  232. _log.info("The augmentation stat data file " + i + " is missing.");
  233. return;
  234. }
  235. Document doc = factory.newDocumentBuilder().parse(file);
  236. for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
  237. {
  238. if ("list".equalsIgnoreCase(n.getNodeName()))
  239. {
  240. for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
  241. {
  242. if ("stat".equalsIgnoreCase(d.getNodeName()))
  243. {
  244. NamedNodeMap attrs = d.getAttributes();
  245. String statName = attrs.getNamedItem("name").getNodeValue();
  246. float soloValues[] = null, combinedValues[] = null;
  247. for (Node cd = d.getFirstChild(); cd != null; cd = cd.getNextSibling())
  248. {
  249. if ("table".equalsIgnoreCase(cd.getNodeName()))
  250. {
  251. attrs = cd.getAttributes();
  252. String tableName = attrs.getNamedItem("name").getNodeValue();
  253. StringTokenizer data = new StringTokenizer(cd.getFirstChild().getNodeValue());
  254. FastList<Float> array = new FastList<Float>();
  255. while (data.hasMoreTokens())
  256. array.add(Float.parseFloat(data.nextToken()));
  257. if (tableName.equalsIgnoreCase("#soloValues"))
  258. {
  259. soloValues = new float[array.size()];
  260. int x = 0;
  261. for (float value : array)
  262. soloValues[x++] = value;
  263. }
  264. else
  265. {
  266. combinedValues = new float[array.size()];
  267. int x = 0;
  268. for (float value : array)
  269. combinedValues[x++] = value;
  270. }
  271. }
  272. }
  273. // store this stat
  274. ((FastList<augmentationStat>) _augmentationStats[(i - 1)]).add(new augmentationStat(Stats.valueOfXml(statName), soloValues, combinedValues));
  275. }
  276. }
  277. }
  278. }
  279. }
  280. catch (Exception e)
  281. {
  282. _log.log(Level.SEVERE, "Error parsing augmentation_stats" + i + ".xml.", e);
  283. return;
  284. }
  285. }
  286. }
  287. // =========================================================
  288. // Properties - Public
  289. /**
  290. * Generate a new random augmentation
  291. * @param item
  292. * @param lifeStoneLevel
  293. * @param lifeSoneGrade
  294. * @return L2Augmentation
  295. */
  296. public L2Augmentation generateRandomAugmentation(int lifeStoneLevel, int lifeStoneGrade)
  297. {
  298. // Note that stat12 stands for stat 1 AND 2 (same for stat34 ;p )
  299. // this is because a value can contain up to 2 stat modifications
  300. // (there are two short values packed in one integer value, meaning 4 stat modifications at max)
  301. // for more info take a look at getAugStatsById(...)
  302. // Note: lifeStoneGrade: (0 means low grade, 3 top grade)
  303. // First: determine whether we will add a skill/baseStatModifier or not
  304. // because this determine which color could be the result
  305. int skill_Chance = 0;
  306. int stat34 = 0;
  307. boolean generateSkill = false;
  308. int resultColor = 0;
  309. boolean generateGlow = false;
  310. //lifestonelevel is used for stat Id and skill level, but here the max level is 10
  311. if (lifeStoneLevel > 10) lifeStoneLevel = 10;
  312. switch (lifeStoneGrade)
  313. {
  314. case 0:
  315. skill_Chance = Config.AUGMENTATION_NG_SKILL_CHANCE;
  316. if (Rnd.get(1,100) <= Config.AUGMENTATION_NG_GLOW_CHANCE)
  317. generateGlow = true;
  318. break;
  319. case 1:
  320. skill_Chance = Config.AUGMENTATION_MID_SKILL_CHANCE;
  321. if (Rnd.get(1,100) <= Config.AUGMENTATION_MID_GLOW_CHANCE)
  322. generateGlow = true;
  323. break;
  324. case 2:
  325. skill_Chance = Config.AUGMENTATION_HIGH_SKILL_CHANCE;
  326. if (Rnd.get(1,100) <= Config.AUGMENTATION_HIGH_GLOW_CHANCE)
  327. generateGlow = true;
  328. break;
  329. case 3:
  330. skill_Chance = Config.AUGMENTATION_TOP_SKILL_CHANCE;
  331. if (Rnd.get(1,100) <= Config.AUGMENTATION_TOP_GLOW_CHANCE)
  332. generateGlow = true;
  333. }
  334. if (Rnd.get(1, 100) <= skill_Chance)
  335. generateSkill = true;
  336. else if (Rnd.get(1, 100) <= Config.AUGMENTATION_BASESTAT_CHANCE)
  337. stat34 = Rnd.get(BASESTAT_STR, BASESTAT_MEN);
  338. // Second: decide which grade the augmentation result is going to have:
  339. // 0:yellow, 1:blue, 2:purple, 3:red
  340. // The chances used here are most likely custom,
  341. // whats known is: you cant have yellow with skill(or baseStatModifier)
  342. // noGrade stone can not have glow, mid only with skill, high has a chance(custom), top allways glow
  343. if (stat34 == 0 && !generateSkill)
  344. {
  345. resultColor = Rnd.get(0, 100);
  346. if (resultColor <= (15 * lifeStoneGrade) + 40)
  347. resultColor = 1;
  348. else
  349. resultColor = 0;
  350. }
  351. else
  352. {
  353. resultColor = Rnd.get(0, 100);
  354. if (resultColor <= (10 * lifeStoneGrade) + 5 || stat34 != 0)
  355. resultColor = 3;
  356. else if (resultColor <= (10 * lifeStoneGrade) + 10)
  357. resultColor = 1;
  358. else
  359. resultColor = 2;
  360. }
  361. // Third: Calculate the subblock offset for the choosen color,
  362. // and the level of the lifeStone
  363. // from large number of retail augmentations:
  364. // no skill part
  365. // Id for stat12:
  366. // A:1-910 B:911-1820 C:1821-2730 D:2731-3640 E:3641-4550 F:4551-5460 G:5461-6370 H:6371-7280
  367. // Id for stat34(this defines the color):
  368. // I:7281-8190(yellow) K:8191-9100(blue) L:10921-11830(yellow) M:11831-12740(blue)
  369. // you can combine I-K with A-D and L-M with E-H
  370. // using C-D or G-H Id you will get a glow effect
  371. // there seems no correlation in which grade use which Id except for the glowing restriction
  372. // skill part
  373. // Id for stat12:
  374. // same for no skill part
  375. // A same as E, B same as F, C same as G, D same as H
  376. // A - no glow, no grade LS
  377. // B - weak glow, mid grade LS?
  378. // C - glow, high grade LS?
  379. // D - strong glow, top grade LS?
  380. // is neither a skill nor basestat used for stat34? then generate a normal stat
  381. int stat12 = 0;
  382. if (stat34 == 0 && !generateSkill)
  383. {
  384. int temp = Rnd.get(2,3);
  385. int colorOffset = resultColor * (10 * STAT_SUBBLOCKSIZE) + temp * STAT_BLOCKSIZE + 1;
  386. int offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + colorOffset;
  387. stat34 = Rnd.get(offset, offset + STAT_SUBBLOCKSIZE - 1);
  388. if (generateGlow && lifeStoneGrade >= 2)
  389. offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + (temp - 2) * STAT_BLOCKSIZE + lifeStoneGrade * (10 * STAT_SUBBLOCKSIZE) + 1;
  390. else
  391. offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + (temp - 2) * STAT_BLOCKSIZE + Rnd.get(0, 1) * (10 * STAT_SUBBLOCKSIZE) + 1;
  392. stat12 = Rnd.get(offset, offset + STAT_SUBBLOCKSIZE - 1);
  393. }
  394. else
  395. {
  396. int offset;
  397. if (!generateGlow)
  398. offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + Rnd.get(0, 1) * STAT_BLOCKSIZE + 1;
  399. else
  400. offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + Rnd.get(0, 1) * STAT_BLOCKSIZE + (lifeStoneGrade + resultColor) / 2 * (10 * STAT_SUBBLOCKSIZE) + 1;
  401. stat12 = Rnd.get(offset, offset + STAT_SUBBLOCKSIZE - 1);
  402. }
  403. // generate a skill if neccessary
  404. L2Skill skill = null;
  405. if (generateSkill)
  406. {
  407. augmentationSkill temp = null;
  408. switch (resultColor)
  409. {
  410. case 1: // blue skill
  411. temp = _blueSkills.get(Rnd.get(0, _blueSkills.size() - 1));
  412. skill = temp.getSkill(lifeStoneLevel);
  413. stat34 = temp.getAugmentationSkillId() + (lifeStoneLevel - 1) * _skillsCount;
  414. break;
  415. case 2: // purple skill
  416. temp = _purpleSkills.get(Rnd.get(0, _purpleSkills.size() - 1));
  417. skill = temp.getSkill(lifeStoneLevel);
  418. stat34 = temp.getAugmentationSkillId() + (lifeStoneLevel - 1) * _skillsCount;
  419. break;
  420. case 3: // red skill
  421. temp = _redSkills.get(Rnd.get(0, _redSkills.size() - 1));
  422. skill = temp.getSkill(lifeStoneLevel);
  423. stat34 = temp.getAugmentationSkillId() + (lifeStoneLevel - 1) * _skillsCount;
  424. break;
  425. }
  426. }
  427. if (Config.DEBUG)
  428. _log.info("Augmentation success: stat12=" + stat12 + "; stat34=" + stat34 + "; resultColor=" + resultColor + "; level=" + lifeStoneLevel + "; grade=" + lifeStoneGrade);
  429. return new L2Augmentation(((stat34 << 16) + stat12), skill);
  430. }
  431. public class AugStat
  432. {
  433. private Stats _stat;
  434. private float _value;
  435. public AugStat(Stats stat, float value)
  436. {
  437. _stat = stat;
  438. _value = value;
  439. }
  440. public Stats getStat()
  441. {
  442. return _stat;
  443. }
  444. public float getValue()
  445. {
  446. return _value;
  447. }
  448. }
  449. /**
  450. * Returns the stat and basestat boni for a given augmentation id
  451. * @param augmentationId
  452. * @return
  453. */
  454. public FastList<AugStat> getAugStatsById(int augmentationId)
  455. {
  456. FastList<AugStat> temp = new FastList<AugStat>();
  457. // An augmentation id contains 2 short vaues so we gotta seperate them here
  458. // both values contain a number from 1-16380, the first 14560 values are stats
  459. // the 14560 stats are devided into 4 blocks each holding 3640 values
  460. // each block contains 40 subblocks holding 91 stat values
  461. // the first 13 values are so called Solo-stats and they have the highest stat increase possible
  462. // after the 13 Solo-stats come 78 combined stats (thats every possible combination of the 13 solo stats)
  463. // the first 12 combined stats (14-26) is the stat 1 combined with stat 2-13
  464. // the next 11 combined stats then are stat 2 combined with stat 3-13 and so on...
  465. // to get the idea have a look @ optiondata_client-e.dat - thats where the data came from :)
  466. int stats[] = new int[2];
  467. stats[0] = 0x0000FFFF & augmentationId;
  468. stats[1] = (augmentationId >> 16);
  469. for (int i = 0; i < 2; i++)
  470. {
  471. // its a stat
  472. if (stats[i] >= STAT_START && stats[i] <= STAT_END)
  473. {
  474. int block = 0;
  475. while (stats[i] > STAT_BLOCKSIZE)
  476. {
  477. stats[i] -= STAT_BLOCKSIZE;
  478. block++;
  479. }
  480. int subblock = 0;
  481. while (stats[i] > STAT_SUBBLOCKSIZE)
  482. {
  483. stats[i] -= STAT_SUBBLOCKSIZE;
  484. subblock++;
  485. }
  486. if (stats[i] < 14) // solo stat
  487. {
  488. augmentationStat as = ((augmentationStat) _augmentationStats[block].get((stats[i] - 1)));
  489. temp.add(new AugStat(as.getStat(), as.getSingleStatValue(subblock)));
  490. }
  491. else
  492. // twin stat
  493. {
  494. stats[i] -= 13; // rescale to 0 (if first of first combined block)
  495. int x = 12; // next combi block has 12 stats
  496. int rescales = 0; // number of rescales done
  497. while (stats[i] > x)
  498. {
  499. stats[i] -= x;
  500. x--;
  501. rescales++;
  502. }
  503. // get first stat
  504. augmentationStat as = ((augmentationStat) _augmentationStats[block].get(rescales));
  505. if (rescales == 0)
  506. temp.add(new AugStat(as.getStat(), as.getCombinedStatValue(subblock)));
  507. else
  508. temp.add(new AugStat(as.getStat(), as.getCombinedStatValue((subblock * 2) + 1)));
  509. // get 2nd stat
  510. as = ((augmentationStat) _augmentationStats[block].get(rescales + stats[i]));
  511. if (as.getStat() == Stats.CRITICAL_DAMAGE)
  512. temp.add(new AugStat(as.getStat(), as.getCombinedStatValue(subblock)));
  513. else
  514. temp.add(new AugStat(as.getStat(), as.getCombinedStatValue(subblock * 2)));
  515. }
  516. }
  517. // its a base stat
  518. else if (stats[i] >= BASESTAT_STR && stats[i] <= BASESTAT_MEN)
  519. {
  520. switch (stats[i])
  521. {
  522. case BASESTAT_STR:
  523. temp.add(new AugStat(Stats.STAT_STR, 1.0f));
  524. break;
  525. case BASESTAT_CON:
  526. temp.add(new AugStat(Stats.STAT_CON, 1.0f));
  527. break;
  528. case BASESTAT_INT:
  529. temp.add(new AugStat(Stats.STAT_INT, 1.0f));
  530. break;
  531. case BASESTAT_MEN:
  532. temp.add(new AugStat(Stats.STAT_MEN, 1.0f));
  533. break;
  534. }
  535. }
  536. }
  537. return temp;
  538. }
  539. }