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