private void spreadRegrowth(int cell, float strength){ if (strength >= 0 && Dungeon.level.passable[cell]){ affectedCells.add(cell); if (strength >= 1.5f) { spreadRegrowth(cell + PathFinder.CIRCLE8[left(direction)], strength - 1.5f); spreadRegrowth(cell + PathFinder.CIRCLE8[direction], strength - 1.5f); spreadRegrowth(cell + PathFinder.CIRCLE8[right(direction)], strength-1.5f); } else { visualCells.add(cell); } } else if (!Dungeon.level.passable[cell]) visualCells.add(cell); }
private int chargeLimit( int heroLevel ){ if (level() >= 12){ return Integer.MAX_VALUE; } else { //4 charges per hero level at +0, with another 2-4 each upgrade from +1 to +9. //then +7 at +10, +16 at +11, and infinite at +12. return Math.round(((4 + 2*level())*heroLevel) * (11f/12f + 1f/(12f-level()))); } }
visualCells = new HashSet<>(); int maxDist = Math.round(1.2f + chargesPerCast()*.8f); int dist = Math.min(bolt.dist, maxDist); spreadRegrowth(c + PathFinder.CIRCLE8[left(direction)], strength - 1); spreadRegrowth(c + PathFinder.CIRCLE8[direction], strength - 1); spreadRegrowth(c + PathFinder.CIRCLE8[right(direction)], strength - 1); } else { visualCells.add(c);
int overLimit = totChrgUsed - chargeLimit(Dungeon.hero.lvl); int chrgUsed = chargesPerCast(); placePlants(numPlants, numDews, numPods, numStars); processSoulMark(ch, chargesPerCast());
"_-_ Base damage increased to 6-9 from 4-6")); changes.addButton( new ChangeButton( new WandOfRegrowth(), "Thanks to the new furrowed grass system, the wand of regrowth can receive a slight buff:\n\n" + "_-_ When the wand of regrowth begins to run out of energy due to excessive use, it will now spawn furrowed grass, instead of short grass.")); infos.add(changes); changes.addButton( new ChangeButton(new WandOfRegrowth(), "Wand of regrowth will now cease producing plants if it is overused. Charges spent before it begins degrading will increase if the wand is upgraded. At +12 the wand will function infinitely.\n\n" + "This change is made to combat farming with low-levelled wands of regrowth. Especially with the alchemy changes this would be far too powerful. Infinite farming is still possible, but requires upgrades."));
visualCells = new HashSet<>(); int maxDist = Math.round(1.2f + chargesPerCast()*.8f); int dist = Math.min(bolt.dist, maxDist); spreadRegrowth(c + PathFinder.CIRCLE8[left(direction)], strength - 1); spreadRegrowth(c + PathFinder.CIRCLE8[direction], strength - 1); spreadRegrowth(c + PathFinder.CIRCLE8[right(direction)], strength - 1); } else { visualCells.add(c);
int overLimit = totChrgUsed - chargeLimit(Dungeon.hero.lvl); int chrgUsed = chargesPerCast(); placePlants(numPlants, numDews, numPods, numStars); processSoulMark(ch, chargesPerCast());
"_-_ Base damage increased to 6-9 from 4-6")); changes.addButton( new ChangeButton( new WandOfRegrowth(), "Thanks to the new furrowed grass system, the wand of regrowth can receive a slight buff:\n\n" + "_-_ When the wand of regrowth begins to run out of energy due to excessive use, it will now spawn furrowed grass, instead of short grass.")); infos.add(changes); changes.addButton( new ChangeButton(new WandOfRegrowth(), "Wand of regrowth will now cease producing plants if it is overused. Charges spent before it begins degrading will increase if the wand is upgraded. At +12 the wand will function infinitely.\n\n" + "This change is made to combat farming with low-levelled wands of regrowth. Especially with the alchemy changes this would be far too powerful. Infinite farming is still possible, but requires upgrades."));
private void spreadRegrowth(int cell, float strength){ if (strength >= 0 && Dungeon.level.passable[cell]){ affectedCells.add(cell); if (strength >= 1.5f) { spreadRegrowth(cell + PathFinder.CIRCLE8[left(direction)], strength - 1.5f); spreadRegrowth(cell + PathFinder.CIRCLE8[direction], strength - 1.5f); spreadRegrowth(cell + PathFinder.CIRCLE8[right(direction)], strength-1.5f); } else { visualCells.add(cell); } } else if (!Dungeon.level.passable[cell]) visualCells.add(cell); }
private int chargeLimit( int heroLevel ){ if (level() >= 12){ return Integer.MAX_VALUE; } else { //4 charges per hero level at +0, with another 2-4 each upgrade from +1 to +9. //then +7 at +10, +16 at +11, and infinite at +12. return Math.round(((4 + 2*level())*heroLevel) * (11f/12f + 1f/(12f-level()))); } }