v2.5.0: buffed unstable brew/spell, always rolls a useful effect now

This commit is contained in:
Evan Debenham
2024-07-26 14:52:34 -04:00
parent 1466dea4b3
commit 7aa596a7c8
3 changed files with 15 additions and 14 deletions
@@ -748,7 +748,7 @@ items.potions.brews.shockingbrew.name=shocking brew
items.potions.brews.shockingbrew.desc=When shattered, this brew will unleash an electrical storm in a wide area around the location it breaks at.
items.potions.brews.unstablebrew.name=unstable brew
items.potions.brews.unstablebrew.desc=This magical brew glows with shifting colors of the rainbow.\n\nWhen drank or thrown it will trigger the effect of a random potion. The potion effect will be more likely to be suitable to how the brew is used.
items.potions.brews.unstablebrew.desc=This magical brew glows with shifting colors of the rainbow.\n\nWhen drank or thrown it will trigger the effect of a random potion. The potion effect will always be beneficial if it is drank, and will always be harmful if it is thrown.
###elixirs
items.potions.elixirs.elixirofarcanearmor.name=elixir of arcane armor
@@ -1248,7 +1248,7 @@ items.spells.telekineticgrab.no_target=There's nothing to grab there.
items.spells.telekineticgrab.desc=This spell allows the caster to remotely grab all items at a location, or all thrown weapons stuck to an enemy!\n\nIt can't be used to grab items that someone else owns, or to grab containers like chests.
items.spells.unstablespell.name=unstable spell
items.spells.unstablespell.desc=This small black square crystal has shifting runic symbols on each of its surfaces.\n\nWhen activated, it will trigger the effect of a random scroll. The scroll effect will be more or less likely to be combat-focused depending on whether there are enemies in your field of view.
items.spells.unstablespell.desc=This small black square crystal has shifting runic symbols on each of its surfaces.\n\nWhen activated, it will trigger the effect of a random scroll. The scroll effect will always be combat focused if there are enemies in your field of view, and will always be non-combat focused otherwise.
items.spells.wildenergy.name=wild energy
items.spells.wildenergy.desc=This spell contains some of the cursed energy which powered DM-300. When cast, it will recharge your wands and worn artifacts, while also triggering a random cursed wand effect. You are able to choose a direction for this cursed magic to shoot in, however.
@@ -88,8 +88,8 @@ public class UnstableBrew extends Brew {
Potion p = Reflection.newInstance(Random.chances(potionChances));
//reroll the potion once if it wasn't a good potion to drink
if (mustThrowPots.contains(p.getClass())){
//reroll the potion if it wasn't a good potion to drink
while (mustThrowPots.contains(p.getClass())){
p = Reflection.newInstance(Random.chances(potionChances));
}
@@ -105,8 +105,8 @@ public class UnstableBrew extends Brew {
public void shatter(int cell) {
Potion p = Reflection.newInstance(Random.chances(potionChances));
//reroll the potion once if it wasn't a good potion to throw
if (!mustThrowPots.contains(p.getClass()) && !canThrowPots.contains(p.getClass())){
//reroll the potion if it wasn't a good potion to throw
while (!mustThrowPots.contains(p.getClass()) && !canThrowPots.contains(p.getClass())){
p = Reflection.newInstance(Random.chances(potionChances));
}
@@ -98,14 +98,15 @@ public class UnstableSpell extends Spell {
Scroll s = Reflection.newInstance(Random.chances(scrollChances));
boolean enemy = hero.visibleEnemies() != 0;
//reroll the scroll once if there is an enemy and it is a non-combat scroll
// or if there is no enemy and it is a combat scroll
if (enemy && nonCombatScrolls.contains(s.getClass())){
s = Reflection.newInstance(Random.chances(scrollChances));
} else if (!enemy && combatScrolls.contains(s.getClass())){
s = Reflection.newInstance(Random.chances(scrollChances));
//reroll the scroll until it is relevant for the situation (whether there are visible enemies)
if (hero.visibleEnemies() == 0){
while (combatScrolls.contains(s.getClass())){
s = Reflection.newInstance(Random.chances(scrollChances));
}
} else {
while (nonCombatScrolls.contains(s.getClass())){
s = Reflection.newInstance(Random.chances(scrollChances));
}
}
s.anonymize();