v2.0.0: fixed ratforcements rats getting ascension buff
This commit is contained in:
+15
@@ -82,6 +82,10 @@ public class AscensionChallenge extends Buff {
|
||||
ch = ((Ratmogrify.TransmogRat) ch).getOriginal();
|
||||
}
|
||||
|
||||
if (ch.buff(AscensionBuffBlocker.class) != null){
|
||||
return 1f;
|
||||
}
|
||||
|
||||
for (Class<?extends Mob> cls : modifiers.keySet()){
|
||||
if (cls.isAssignableFrom(ch.getClass())){
|
||||
return modifiers.get(cls);
|
||||
@@ -134,6 +138,10 @@ public class AscensionChallenge extends Buff {
|
||||
}
|
||||
|
||||
//only enemies that are boosted count
|
||||
if (enemy.buff(AscensionBuffBlocker.class) != null){
|
||||
return;
|
||||
}
|
||||
|
||||
boolean found = false;
|
||||
for (Class<?extends Mob> cls : modifiers.keySet()){
|
||||
if (cls.isAssignableFrom(enemy.getClass())){
|
||||
@@ -166,6 +174,10 @@ public class AscensionChallenge extends Buff {
|
||||
m = ((Ratmogrify.TransmogRat) m).getOriginal();
|
||||
}
|
||||
|
||||
if (m.buff(AscensionBuffBlocker.class) != null){
|
||||
return m.EXP;
|
||||
}
|
||||
|
||||
if (m instanceof RipperDemon){
|
||||
return 10; //reduced due to their numbers
|
||||
} else if (m instanceof Ghoul){
|
||||
@@ -320,4 +332,7 @@ public class AscensionChallenge extends Buff {
|
||||
stacks = bundle.getFloat(STACKS);
|
||||
damageInc = bundle.getFloat(DAMAGE);
|
||||
}
|
||||
|
||||
//chars with this buff are not boosted by the ascension challenge
|
||||
public static class AscensionBuffBlocker extends Buff{};
|
||||
}
|
||||
|
||||
+2
@@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
@@ -107,6 +108,7 @@ public class Ratmogrify extends ArmorAbility {
|
||||
Rat rat = new Rat();
|
||||
rat.alignment = Char.Alignment.ALLY;
|
||||
rat.state = rat.HUNTING;
|
||||
Buff.affect(rat, AscensionChallenge.AscensionBuffBlocker.class);
|
||||
GameScene.add( rat );
|
||||
ScrollOfTeleportation.appear( rat, spawnPoints.get( index ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user