v2.2.0: fixed degradation not properly applying to the mage's staff
This commit is contained in:
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
@@ -332,6 +333,14 @@ public abstract class Wand extends Item {
|
||||
int lvl = super.buffedLvl();
|
||||
|
||||
if (charger != null && charger.target != null) {
|
||||
|
||||
//inside staff, still need to apply degradation
|
||||
if (charger.target == Dungeon.hero
|
||||
&& !Dungeon.hero.belongings.contains(this)
|
||||
&& Dungeon.hero.buff( Degrade.class ) != null){
|
||||
lvl = Degrade.reduceLevel(lvl);
|
||||
}
|
||||
|
||||
if (charger.target.buff(WildMagic.WildMagicTracker.class) != null){
|
||||
int bonus = 4 + ((Hero)charger.target).pointsInTalent(Talent.WILD_POWER);
|
||||
if (Random.Int(2) == 0) bonus++;
|
||||
|
||||
Reference in New Issue
Block a user