v1.1.0: redesigned potion of adrenaline surge into potion of mastery
Also added a confirmation windows for un-IDed potion of dragon's breath
This commit is contained in:
parent
ab6e8feed5
commit
9887c9da7a
|
@ -719,9 +719,9 @@ items.potions.exotic.exoticpotion.bistre=exotic bistre potion
|
||||||
items.potions.exotic.exoticpotion.indigo=exotic indigo potion
|
items.potions.exotic.exoticpotion.indigo=exotic indigo potion
|
||||||
items.potions.exotic.exoticpotion.silver=exotic silver potion
|
items.potions.exotic.exoticpotion.silver=exotic silver potion
|
||||||
items.potions.exotic.exoticpotion.unknown_desc=This round flask contains a grainy colorful liquid. It seems to be foreign to this land, who knows what it might do when drunk or thrown?
|
items.potions.exotic.exoticpotion.unknown_desc=This round flask contains a grainy colorful liquid. It seems to be foreign to this land, who knows what it might do when drunk or thrown?
|
||||||
|
items.potions.exotic.exoticpotion.warning=Do you really want to cancel this potion usage? It will be consumed anyway.
|
||||||
items.potions.exotic.potionofadrenalinesurge.name=potion of adrenaline surge
|
items.potions.exotic.exoticpotion.yes=Yes, I'm positive
|
||||||
items.potions.exotic.potionofadrenalinesurge.desc=This powerful liquid will give you a greater boost of strength that withers after an extended period of time.
|
items.potions.exotic.exoticpotion.no=No, I changed my mind
|
||||||
|
|
||||||
items.potions.exotic.potionofcleansing.name=potion of cleansing
|
items.potions.exotic.potionofcleansing.name=potion of cleansing
|
||||||
items.potions.exotic.potionofcleansing.desc=This powerful reagent will render the drinker immune to all harmful effects for a few turns when quaffed. It can be thrown at a target to cleanse them as well.
|
items.potions.exotic.potionofcleansing.desc=This powerful reagent will render the drinker immune to all harmful effects for a few turns when quaffed. It can be thrown at a target to cleanse them as well.
|
||||||
|
@ -747,6 +747,9 @@ items.potions.exotic.potionofdivineinspiration.desc=The power of holy energy red
|
||||||
items.potions.exotic.potionofmagicalsight.name=potion of magical sight
|
items.potions.exotic.potionofmagicalsight.name=potion of magical sight
|
||||||
items.potions.exotic.potionofmagicalsight.desc=After drinking this, your senses will be briefly heightened to incredible levels, increasing your vision range and allowing you to see through walls!
|
items.potions.exotic.potionofmagicalsight.desc=After drinking this, your senses will be briefly heightened to incredible levels, increasing your vision range and allowing you to see through walls!
|
||||||
|
|
||||||
|
items.potions.exotic.potionofmastery.name=potion of mastery
|
||||||
|
items.potions.exotic.potionofmastery.desc=Rather than granting raw strength, this potion will instead attune the muscles of the user to a particular item. This will make that item easier to use, as if the drinker had practised with it and built muscle memory.\n\nThe chosen weapon or armor will require 2 less strength to use. This potion can only be used once on each item.
|
||||||
|
|
||||||
items.potions.exotic.potionofshielding.name=potion of shielding
|
items.potions.exotic.potionofshielding.name=potion of shielding
|
||||||
items.potions.exotic.potionofshielding.desc=Rather than heal, this potion will instead project a durable shield around the user's body, blocking a considerable amount of damage.
|
items.potions.exotic.potionofshielding.desc=Rather than heal, this potion will instead project a durable shield around the user's body, blocking a considerable amount of damage.
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -58,6 +58,9 @@ public class ShatteredPixelDungeon extends Game {
|
||||||
com.watabou.utils.Bundle.addAlias(
|
com.watabou.utils.Bundle.addAlias(
|
||||||
com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfDivineInspiration.class,
|
com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfDivineInspiration.class,
|
||||||
"com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfHolyFuror" );
|
"com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfHolyFuror" );
|
||||||
|
com.watabou.utils.Bundle.addAlias(
|
||||||
|
com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfMastery.class,
|
||||||
|
"com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfAdrenalineSurge" );
|
||||||
|
|
||||||
//v1.0.0
|
//v1.0.0
|
||||||
com.watabou.utils.Bundle.addAlias(
|
com.watabou.utils.Bundle.addAlias(
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
public class AdrenalineSurge extends Buff {
|
public class AdrenalineSurge extends Buff {
|
||||||
|
|
||||||
public static float DURATION = 800f;
|
public static float DURATION = 200f;
|
||||||
|
|
||||||
{
|
{
|
||||||
type = buffType.POSITIVE;
|
type = buffType.POSITIVE;
|
||||||
|
|
|
@ -103,6 +103,7 @@ public class Armor extends EquipableItem {
|
||||||
|
|
||||||
public Glyph glyph;
|
public Glyph glyph;
|
||||||
public boolean curseInfusionBonus = false;
|
public boolean curseInfusionBonus = false;
|
||||||
|
public boolean masteryPotionBonus = false;
|
||||||
|
|
||||||
private BrokenSeal seal;
|
private BrokenSeal seal;
|
||||||
|
|
||||||
|
@ -120,6 +121,7 @@ public class Armor extends EquipableItem {
|
||||||
private static final String AVAILABLE_USES = "available_uses";
|
private static final String AVAILABLE_USES = "available_uses";
|
||||||
private static final String GLYPH = "glyph";
|
private static final String GLYPH = "glyph";
|
||||||
private static final String CURSE_INFUSION_BONUS = "curse_infusion_bonus";
|
private static final String CURSE_INFUSION_BONUS = "curse_infusion_bonus";
|
||||||
|
private static final String MASTERY_POTION_BONUS = "mastery_potion_bonus";
|
||||||
private static final String SEAL = "seal";
|
private static final String SEAL = "seal";
|
||||||
private static final String AUGMENT = "augment";
|
private static final String AUGMENT = "augment";
|
||||||
|
|
||||||
|
@ -130,6 +132,7 @@ public class Armor extends EquipableItem {
|
||||||
bundle.put( AVAILABLE_USES, availableUsesToID );
|
bundle.put( AVAILABLE_USES, availableUsesToID );
|
||||||
bundle.put( GLYPH, glyph );
|
bundle.put( GLYPH, glyph );
|
||||||
bundle.put( CURSE_INFUSION_BONUS, curseInfusionBonus );
|
bundle.put( CURSE_INFUSION_BONUS, curseInfusionBonus );
|
||||||
|
bundle.put( MASTERY_POTION_BONUS, masteryPotionBonus );
|
||||||
bundle.put( SEAL, seal);
|
bundle.put( SEAL, seal);
|
||||||
bundle.put( AUGMENT, augment);
|
bundle.put( AUGMENT, augment);
|
||||||
}
|
}
|
||||||
|
@ -141,6 +144,7 @@ public class Armor extends EquipableItem {
|
||||||
availableUsesToID = bundle.getInt( AVAILABLE_USES );
|
availableUsesToID = bundle.getInt( AVAILABLE_USES );
|
||||||
inscribe((Glyph) bundle.get(GLYPH));
|
inscribe((Glyph) bundle.get(GLYPH));
|
||||||
curseInfusionBonus = bundle.getBoolean( CURSE_INFUSION_BONUS );
|
curseInfusionBonus = bundle.getBoolean( CURSE_INFUSION_BONUS );
|
||||||
|
masteryPotionBonus = bundle.getBoolean( MASTERY_POTION_BONUS );
|
||||||
seal = (BrokenSeal)bundle.get(SEAL);
|
seal = (BrokenSeal)bundle.get(SEAL);
|
||||||
|
|
||||||
augment = bundle.getEnum(AUGMENT, Augment.class);
|
augment = bundle.getEnum(AUGMENT, Augment.class);
|
||||||
|
@ -533,7 +537,11 @@ public class Armor extends EquipableItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int STRReq(){
|
public int STRReq(){
|
||||||
return STRReq(level());
|
int req = STRReq(level());
|
||||||
|
if (masteryPotionBonus){
|
||||||
|
req -= 2;
|
||||||
|
}
|
||||||
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int STRReq(int lvl){
|
public int STRReq(int lvl){
|
||||||
|
|
|
@ -110,6 +110,7 @@ abstract public class ClassArmor extends Armor {
|
||||||
classArmor.inscribe( armor.glyph );
|
classArmor.inscribe( armor.glyph );
|
||||||
classArmor.cursed = armor.cursed;
|
classArmor.cursed = armor.cursed;
|
||||||
classArmor.curseInfusionBonus = armor.curseInfusionBonus;
|
classArmor.curseInfusionBonus = armor.curseInfusionBonus;
|
||||||
|
classArmor.masteryPotionBonus = armor.masteryPotionBonus;
|
||||||
classArmor.identify();
|
classArmor.identify();
|
||||||
|
|
||||||
classArmor.charge = 50;
|
classArmor.charge = 50;
|
||||||
|
|
|
@ -37,7 +37,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticG
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
|
||||||
import com.watabou.utils.Reflection;
|
import com.watabou.utils.Reflection;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -58,8 +57,8 @@ public class ExoticPotion extends Potion {
|
||||||
regToExo.put(PotionOfToxicGas.class, PotionOfCorrosiveGas.class);
|
regToExo.put(PotionOfToxicGas.class, PotionOfCorrosiveGas.class);
|
||||||
exoToReg.put(PotionOfCorrosiveGas.class, PotionOfToxicGas.class);
|
exoToReg.put(PotionOfCorrosiveGas.class, PotionOfToxicGas.class);
|
||||||
|
|
||||||
regToExo.put(PotionOfStrength.class, PotionOfAdrenalineSurge.class);
|
regToExo.put(PotionOfStrength.class, PotionOfMastery.class);
|
||||||
exoToReg.put(PotionOfAdrenalineSurge.class, PotionOfStrength.class);
|
exoToReg.put(PotionOfMastery.class, PotionOfStrength.class);
|
||||||
|
|
||||||
regToExo.put(PotionOfFrost.class, PotionOfSnapFreeze.class);
|
regToExo.put(PotionOfFrost.class, PotionOfSnapFreeze.class);
|
||||||
exoToReg.put(PotionOfSnapFreeze.class, PotionOfFrost.class);
|
exoToReg.put(PotionOfSnapFreeze.class, PotionOfFrost.class);
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
/*
|
|
||||||
* Pixel Dungeon
|
|
||||||
* Copyright (C) 2012-2015 Oleg Dolya
|
|
||||||
*
|
|
||||||
* Shattered Pixel Dungeon
|
|
||||||
* Copyright (C) 2014-2021 Evan Debenham
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic;
|
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AdrenalineSurge;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
|
||||||
|
|
||||||
public class PotionOfAdrenalineSurge extends ExoticPotion {
|
|
||||||
|
|
||||||
{
|
|
||||||
icon = ItemSpriteSheet.Icons.POTION_ARENSURGE;
|
|
||||||
|
|
||||||
unique = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void apply(Hero hero) {
|
|
||||||
identify();
|
|
||||||
Buff.affect(hero, AdrenalineSurge.class).reset(2, 800f);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -39,7 +39,9 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.ConeAOE;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
|
@ -62,12 +64,38 @@ public class PotionOfDragonsBreath extends ExoticPotion {
|
||||||
}
|
}
|
||||||
|
|
||||||
private CellSelector.Listener targeter = new CellSelector.Listener() {
|
private CellSelector.Listener targeter = new CellSelector.Listener() {
|
||||||
|
|
||||||
|
private boolean showingWindow = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(final Integer cell) {
|
public void onSelect(final Integer cell) {
|
||||||
|
|
||||||
|
if (showingWindow){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (cell == null && !isKnown()){
|
if (cell == null && !isKnown()){
|
||||||
identify();
|
showingWindow = true;
|
||||||
detach(curUser.belongings.backpack);
|
GameScene.show( new WndOptions(new ItemSprite(PotionOfDragonsBreath.this),
|
||||||
|
Messages.titleCase(name()),
|
||||||
|
Messages.get(ExoticPotion.class, "warning"),
|
||||||
|
Messages.get(ExoticPotion.class, "yes"),
|
||||||
|
Messages.get(ExoticPotion.class, "no") ) {
|
||||||
|
@Override
|
||||||
|
protected void onSelect( int index ) {
|
||||||
|
showingWindow = false;
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
curUser.spendAndNext(1f);
|
||||||
|
detach(curUser.belongings.backpack);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
GameScene.selectCell( targeter );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void onBackPressed() {}
|
||||||
|
} );
|
||||||
} else if (cell != null) {
|
} else if (cell != null) {
|
||||||
identify();
|
identify();
|
||||||
curUser.busy();
|
curUser.busy();
|
||||||
|
|
|
@ -0,0 +1,114 @@
|
||||||
|
/*
|
||||||
|
* Pixel Dungeon
|
||||||
|
* Copyright (C) 2012-2015 Oleg Dolya
|
||||||
|
*
|
||||||
|
* Shattered Pixel Dungeon
|
||||||
|
* Copyright (C) 2014-2021 Evan Debenham
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
|
||||||
|
public class PotionOfMastery extends ExoticPotion {
|
||||||
|
|
||||||
|
{
|
||||||
|
icon = ItemSpriteSheet.Icons.POTION_MASTERY;
|
||||||
|
|
||||||
|
unique = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
//need to override drink so that time isn't spent right away
|
||||||
|
protected void drink(final Hero hero) {
|
||||||
|
curUser = hero;
|
||||||
|
curItem = this;
|
||||||
|
|
||||||
|
GameScene.selectItem(itemSelector);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected WndBag.ItemSelector itemSelector = new WndBag.ItemSelector() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String textPrompt() {
|
||||||
|
return "Master an Item";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean itemSelectable(Item item) {
|
||||||
|
return
|
||||||
|
(item instanceof MeleeWeapon && !((MeleeWeapon) item).masteryPotionBonus)
|
||||||
|
|| (item instanceof Armor && !((Armor) item).masteryPotionBonus);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(Item item) {
|
||||||
|
|
||||||
|
if (item == null && !isKnown()){
|
||||||
|
GameScene.show( new WndOptions(new ItemSprite(PotionOfMastery.this),
|
||||||
|
Messages.titleCase(name()),
|
||||||
|
Messages.get(ExoticPotion.class, "warning"),
|
||||||
|
Messages.get(ExoticPotion.class, "yes"),
|
||||||
|
Messages.get(ExoticPotion.class, "no") ) {
|
||||||
|
@Override
|
||||||
|
protected void onSelect( int index ) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
curUser.spendAndNext(1f);
|
||||||
|
detach(curUser.belongings.backpack);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
GameScene.selectItem(itemSelector);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void onBackPressed() {}
|
||||||
|
} );
|
||||||
|
} else if (item != null) {
|
||||||
|
|
||||||
|
if (item instanceof Weapon) {
|
||||||
|
((Weapon) item).masteryPotionBonus = true;
|
||||||
|
GLog.p( "Your weapon becomes easier to wield!" );
|
||||||
|
} else if (item instanceof Armor) {
|
||||||
|
((Armor) item).masteryPotionBonus = true;
|
||||||
|
GLog.p( "Your weapon becomes easier to wear!" );
|
||||||
|
}
|
||||||
|
updateQuickslot();
|
||||||
|
|
||||||
|
identify();
|
||||||
|
Sample.INSTANCE.play( Assets.Sounds.DRINK );
|
||||||
|
curUser.sprite.operate(curUser.pos);
|
||||||
|
curItem.detach(curUser.belongings.backpack);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -180,6 +180,7 @@ public class ScrollOfTransmutation extends InventoryScroll {
|
||||||
|
|
||||||
n.enchantment = w.enchantment;
|
n.enchantment = w.enchantment;
|
||||||
n.curseInfusionBonus = w.curseInfusionBonus;
|
n.curseInfusionBonus = w.curseInfusionBonus;
|
||||||
|
n.masteryPotionBonus = w.masteryPotionBonus;
|
||||||
n.levelKnown = w.levelKnown;
|
n.levelKnown = w.levelKnown;
|
||||||
n.cursedKnown = w.cursedKnown;
|
n.cursedKnown = w.cursedKnown;
|
||||||
n.cursed = w.cursed;
|
n.cursed = w.cursed;
|
||||||
|
|
|
@ -99,6 +99,7 @@ abstract public class Weapon extends KindOfWeapon {
|
||||||
|
|
||||||
public Enchantment enchantment;
|
public Enchantment enchantment;
|
||||||
public boolean curseInfusionBonus = false;
|
public boolean curseInfusionBonus = false;
|
||||||
|
public boolean masteryPotionBonus = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int proc( Char attacker, Char defender, int damage ) {
|
public int proc( Char attacker, Char defender, int damage ) {
|
||||||
|
@ -133,6 +134,7 @@ abstract public class Weapon extends KindOfWeapon {
|
||||||
private static final String AVAILABLE_USES = "available_uses";
|
private static final String AVAILABLE_USES = "available_uses";
|
||||||
private static final String ENCHANTMENT = "enchantment";
|
private static final String ENCHANTMENT = "enchantment";
|
||||||
private static final String CURSE_INFUSION_BONUS = "curse_infusion_bonus";
|
private static final String CURSE_INFUSION_BONUS = "curse_infusion_bonus";
|
||||||
|
private static final String MASTERY_POTION_BONUS = "mastery_potion_bonus";
|
||||||
private static final String AUGMENT = "augment";
|
private static final String AUGMENT = "augment";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -142,6 +144,7 @@ abstract public class Weapon extends KindOfWeapon {
|
||||||
bundle.put( AVAILABLE_USES, availableUsesToID );
|
bundle.put( AVAILABLE_USES, availableUsesToID );
|
||||||
bundle.put( ENCHANTMENT, enchantment );
|
bundle.put( ENCHANTMENT, enchantment );
|
||||||
bundle.put( CURSE_INFUSION_BONUS, curseInfusionBonus );
|
bundle.put( CURSE_INFUSION_BONUS, curseInfusionBonus );
|
||||||
|
bundle.put( MASTERY_POTION_BONUS, masteryPotionBonus );
|
||||||
bundle.put( AUGMENT, augment );
|
bundle.put( AUGMENT, augment );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +155,7 @@ abstract public class Weapon extends KindOfWeapon {
|
||||||
availableUsesToID = bundle.getFloat( AVAILABLE_USES );
|
availableUsesToID = bundle.getFloat( AVAILABLE_USES );
|
||||||
enchantment = (Enchantment)bundle.get( ENCHANTMENT );
|
enchantment = (Enchantment)bundle.get( ENCHANTMENT );
|
||||||
curseInfusionBonus = bundle.getBoolean( CURSE_INFUSION_BONUS );
|
curseInfusionBonus = bundle.getBoolean( CURSE_INFUSION_BONUS );
|
||||||
|
masteryPotionBonus = bundle.getBoolean( MASTERY_POTION_BONUS );
|
||||||
|
|
||||||
augment = bundle.getEnum(AUGMENT, Augment.class);
|
augment = bundle.getEnum(AUGMENT, Augment.class);
|
||||||
}
|
}
|
||||||
|
@ -207,7 +211,11 @@ abstract public class Weapon extends KindOfWeapon {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int STRReq(){
|
public int STRReq(){
|
||||||
return STRReq(level());
|
int req = STRReq(level());
|
||||||
|
if (masteryPotionBonus){
|
||||||
|
req -= 2;
|
||||||
|
}
|
||||||
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract int STRReq(int lvl);
|
public abstract int STRReq(int lvl);
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class Rotberry extends Plant {
|
||||||
@Override
|
@Override
|
||||||
public void activate( Char ch ) {
|
public void activate( Char ch ) {
|
||||||
if (ch instanceof Hero && ((Hero) ch).subClass == HeroSubClass.WARDEN){
|
if (ch instanceof Hero && ((Hero) ch).subClass == HeroSubClass.WARDEN){
|
||||||
Buff.affect(ch, AdrenalineSurge.class).reset(1, 200f);
|
Buff.affect(ch, AdrenalineSurge.class).reset(1, AdrenalineSurge.DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dungeon.level.drop( new Seed(), pos ).sprite.drop();
|
Dungeon.level.drop( new Seed(), pos ).sprite.drop();
|
||||||
|
|
|
@ -834,7 +834,7 @@ public class ItemSpriteSheet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int EXOTIC_POTIONS = xy(1, 7); //16 slots
|
private static final int EXOTIC_POTIONS = xy(1, 7); //16 slots
|
||||||
public static final int POTION_ARENSURGE= EXOTIC_POTIONS+0;
|
public static final int POTION_MASTERY = EXOTIC_POTIONS+0;
|
||||||
public static final int POTION_SHIELDING= EXOTIC_POTIONS+1;
|
public static final int POTION_SHIELDING= EXOTIC_POTIONS+1;
|
||||||
public static final int POTION_MAGISIGHT= EXOTIC_POTIONS+2;
|
public static final int POTION_MAGISIGHT= EXOTIC_POTIONS+2;
|
||||||
public static final int POTION_SNAPFREEZ= EXOTIC_POTIONS+3;
|
public static final int POTION_SNAPFREEZ= EXOTIC_POTIONS+3;
|
||||||
|
@ -847,7 +847,7 @@ public class ItemSpriteSheet {
|
||||||
public static final int POTION_CLEANSE = EXOTIC_POTIONS+10;
|
public static final int POTION_CLEANSE = EXOTIC_POTIONS+10;
|
||||||
public static final int POTION_DIVINE = EXOTIC_POTIONS+11;
|
public static final int POTION_DIVINE = EXOTIC_POTIONS+11;
|
||||||
static {
|
static {
|
||||||
assignIconRect( POTION_ARENSURGE, 7, 7 );
|
assignIconRect( POTION_MASTERY, 7, 7 );
|
||||||
assignIconRect( POTION_SHIELDING, 6, 6 );
|
assignIconRect( POTION_SHIELDING, 6, 6 );
|
||||||
assignIconRect( POTION_MAGISIGHT, 7, 5 );
|
assignIconRect( POTION_MAGISIGHT, 7, 5 );
|
||||||
assignIconRect( POTION_SNAPFREEZ, 7, 7 );
|
assignIconRect( POTION_SNAPFREEZ, 7, 7 );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user