v2.1.0: adjusted exp gain mechanics during ascension challenge:
- hero now gains 10xp per kill until level 30 if they would otherwise be over-levelled - at level 30, reducing a curse stack grants 10 xp for recharge effects
This commit is contained in:
@@ -26,12 +26,12 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.*;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
@@ -163,11 +163,18 @@ public class AscensionChallenge extends Buff {
|
||||
if (chal.stacks < 8f && (int)(chal.stacks/2) != (int)(oldStacks/2f)){
|
||||
GLog.p(Messages.get(AscensionChallenge.class, "weaken"));
|
||||
}
|
||||
|
||||
//if the hero is at the max level, grant them 10 effective xp per stack cleared
|
||||
// for the purposes of on-xp gain effects
|
||||
if (oldStacks > chal.stacks && Dungeon.hero.lvl == Hero.MAX_LEVEL){
|
||||
Dungeon.hero.earnExp(Math.round(10*(oldStacks - chal.stacks)), chal.getClass());
|
||||
}
|
||||
|
||||
BuffIndicator.refreshHero();
|
||||
}
|
||||
|
||||
//used for internal calculations like corruption, not actual exp gain
|
||||
public static int AscensionExp(Mob m){
|
||||
public static int AscensionCorruptResist(Mob m){
|
||||
//default to just using their EXP value if no ascent challenge is happening
|
||||
if (Dungeon.hero.buff(AscensionChallenge.class) == null){
|
||||
return m.EXP;
|
||||
}
|
||||
|
||||
@@ -1672,8 +1672,11 @@ public class Hero extends Char {
|
||||
}
|
||||
|
||||
public void earnExp( int exp, Class source ) {
|
||||
|
||||
this.exp += exp;
|
||||
|
||||
//xp granted by ascension challenge is only for on-exp gain effects
|
||||
if (source != AscensionChallenge.class) {
|
||||
this.exp += exp;
|
||||
}
|
||||
float percent = exp/(float)maxExp();
|
||||
|
||||
EtherealChains.chainsRecharge chains = buff(EtherealChains.chainsRecharge.class);
|
||||
|
||||
@@ -761,6 +761,15 @@ public abstract class Mob extends Char {
|
||||
AscensionChallenge.processEnemyKill(this);
|
||||
|
||||
int exp = Dungeon.hero.lvl <= maxLvl ? EXP : 0;
|
||||
|
||||
//during ascent, under-levelled enemies grant 10 xp each until level 30
|
||||
// after this enemy kills which reduce the amulet curse still grant 10 effective xp
|
||||
// for the purposes of on-exp effects, see AscensionChallenge.processEnemyKill
|
||||
if (Dungeon.hero.buff(AscensionChallenge.class) != null &&
|
||||
exp == 0 && maxLvl > 0 && EXP > 0 && Dungeon.hero.lvl < Hero.MAX_LEVEL){
|
||||
exp = Math.round(10 * spawningWeight());
|
||||
}
|
||||
|
||||
if (exp > 0) {
|
||||
Dungeon.hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "exp", exp));
|
||||
}
|
||||
|
||||
@@ -150,10 +150,10 @@ public class WandOfCorruption extends Wand {
|
||||
enemyResist = (1f + Dungeon.scalingDepth()/4f) / 5f;
|
||||
} else if (ch instanceof Swarm){
|
||||
//child swarms don't give exp, so we force this here.
|
||||
enemyResist = 1 + AscensionChallenge.AscensionExp(enemy);
|
||||
enemyResist = 1 + AscensionChallenge.AscensionCorruptResist(enemy);
|
||||
if (enemyResist == 1) enemyResist = 1 + 3;
|
||||
} else {
|
||||
enemyResist = 1 + AscensionChallenge.AscensionExp(enemy);
|
||||
enemyResist = 1 + AscensionChallenge.AscensionCorruptResist(enemy);
|
||||
}
|
||||
|
||||
//100% health: 5x resist 75%: 3.25x resist 50%: 2x resist 25%: 1.25x resist
|
||||
|
||||
Reference in New Issue
Block a user