v0.7.4: various bugfixes involving allies
This commit is contained in:
parent
9f73defba2
commit
5d65116170
|
@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Alchemy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AdrenalineSurge;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Berserk;
|
||||
|
@ -1197,7 +1198,7 @@ public class Hero extends Char {
|
|||
|
||||
} else if (fieldOfView[cell] && (ch = Actor.findChar( cell )) instanceof Mob) {
|
||||
|
||||
if (ch.alignment != Alignment.ENEMY) {
|
||||
if (ch.alignment != Alignment.ENEMY && ch.buff(Amok.class) == null) {
|
||||
curAction = new HeroAction.Interact( ch );
|
||||
} else {
|
||||
curAction = new HeroAction.Attack( ch );
|
||||
|
|
|
@ -914,6 +914,7 @@ public abstract class Mob extends Char {
|
|||
|
||||
for (Mob ally : heldAllies) {
|
||||
level.mobs.add(ally);
|
||||
ally.state = ally.WANDERING;
|
||||
|
||||
if (!candidatePositions.isEmpty()){
|
||||
ally.pos = candidatePositions.remove(0);
|
||||
|
|
|
@ -222,7 +222,7 @@ public class CavesBossLevel extends Level {
|
|||
|
||||
for (Mob m : mobs){
|
||||
//bring the first ally with you
|
||||
if (m.alignment == Char.Alignment.ALLY){
|
||||
if (m.alignment == Char.Alignment.ALLY && !m.properties().contains(Char.Property.IMMOVABLE)){
|
||||
m.pos = Dungeon.hero.pos + (Random.Int(2) == 0 ? +1 : -1);
|
||||
m.sprite.place(m.pos);
|
||||
break;
|
||||
|
|
|
@ -193,7 +193,7 @@ public class CityBossLevel extends Level {
|
|||
|
||||
for (Mob m : mobs){
|
||||
//bring the first ally with you
|
||||
if (m.alignment == Char.Alignment.ALLY){
|
||||
if (m.alignment == Char.Alignment.ALLY && !m.properties().contains(Char.Property.IMMOVABLE)){
|
||||
m.pos = Dungeon.hero.pos + (Random.Int(2) == 0 ? +1 : -1);
|
||||
m.sprite.place(m.pos);
|
||||
break;
|
||||
|
|
|
@ -415,7 +415,7 @@ public class PrisonBossLevel extends Level {
|
|||
//remove all mobs, but preserve allies
|
||||
ArrayList<Mob> allies = new ArrayList<>();
|
||||
for(Mob m : mobs.toArray(new Mob[0])){
|
||||
if (m.alignment == Char.Alignment.ALLY){
|
||||
if (m.alignment == Char.Alignment.ALLY && !m.properties().contains(Char.Property.IMMOVABLE)){
|
||||
allies.add(m);
|
||||
mobs.remove(m);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user