v0.6.3: improved corruption logic, fixed bugs.
This commit is contained in:
parent
57b4eaf753
commit
d09c7e6067
|
@ -39,13 +39,6 @@ public class Corruption extends Buff {
|
||||||
public boolean attachTo(Char target) {
|
public boolean attachTo(Char target) {
|
||||||
if (super.attachTo(target)){
|
if (super.attachTo(target)){
|
||||||
target.alignment = Char.Alignment.ALLY;
|
target.alignment = Char.Alignment.ALLY;
|
||||||
if (target instanceof Mob){
|
|
||||||
((Mob) target).rollToDropLoot();
|
|
||||||
}
|
|
||||||
PinCushion p = target.buff(PinCushion.class);
|
|
||||||
if (p != null){
|
|
||||||
p.detach();
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -43,6 +43,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow;
|
||||||
|
@ -225,6 +226,8 @@ public class WandOfCorruption extends Wand {
|
||||||
if (buff.type == Buff.buffType.NEGATIVE
|
if (buff.type == Buff.buffType.NEGATIVE
|
||||||
&& !(buff instanceof SoulMark)) {
|
&& !(buff instanceof SoulMark)) {
|
||||||
buff.detach();
|
buff.detach();
|
||||||
|
} else if (buff instanceof PinCushion){
|
||||||
|
buff.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Buff.affect(enemy, Corruption.class);
|
Buff.affect(enemy, Corruption.class);
|
||||||
|
@ -236,7 +239,7 @@ public class WandOfCorruption extends Wand {
|
||||||
curUser.sprite.showStatus(CharSprite.POSITIVE, Messages.get(enemy, "exp", enemy.EXP));
|
curUser.sprite.showStatus(CharSprite.POSITIVE, Messages.get(enemy, "exp", enemy.EXP));
|
||||||
curUser.earnExp(enemy.EXP);
|
curUser.earnExp(enemy.EXP);
|
||||||
}
|
}
|
||||||
//TODO perhaps enemies should also drop loot here
|
enemy.rollToDropLoot();
|
||||||
} else {
|
} else {
|
||||||
Buff.affect(enemy, Doom.class);
|
Buff.affect(enemy, Doom.class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user