v0.9.0: enemies that spawn offspring now pass on champion buffs

This commit is contained in:
Evan Debenham 2020-09-29 20:34:42 -04:00
parent 7ba15b4712
commit 356b7e4a3d
3 changed files with 14 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
@ -128,6 +129,11 @@ public class Ghoul extends Mob {
if (sprite.visible) {
Actor.addDelayed( new Pushing( child, pos, child.pos ), -1 );
}
for (Buff b : buffs(ChampionEnemy.class)){
Buff.affect( child, b.getClass());
}
}
}

View File

@ -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.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
import com.shatteredpixel.shatteredpixeldungeon.effects.Beam;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
@ -252,6 +253,9 @@ public class Necromancer extends Mob {
if (buff(Corruption.class) != null){
Buff.affect(mySkeleton, Corruption.class);
}
for (Buff b : buffs(ChampionEnemy.class)){
Buff.affect( mySkeleton, b.getClass());
}
spend(TICK);
return true;

View File

@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
@ -130,6 +131,9 @@ public class Swarm extends Mob {
if (buff(Corruption.class ) != null) {
Buff.affect( clone, Corruption.class);
}
for (Buff b : buffs(ChampionEnemy.class)){
Buff.affect( clone, b.getClass());
}
return clone;
}