v0.6.4: significantly nerfed paralysis, now is easier to snap out of
This commit is contained in:
parent
bc14b0472b
commit
f8c94e2989
|
@ -302,12 +302,7 @@ public abstract class Char extends Actor {
|
|||
}
|
||||
|
||||
if (buff( Paralysis.class ) != null) {
|
||||
if (Random.Int( dmg ) >= Random.Int( HP )) {
|
||||
Buff.detach( this, Paralysis.class );
|
||||
if (Dungeon.level.heroFOV[pos]) {
|
||||
GLog.i( Messages.get(Char.class, "out_of_paralysis", name) );
|
||||
}
|
||||
}
|
||||
buff( Paralysis.class ).processDamage(dmg);
|
||||
}
|
||||
|
||||
//FIXME: when I add proper damage properties, should add an IGNORES_SHIELDS property to use here.
|
||||
|
|
|
@ -38,6 +38,11 @@ import com.watabou.utils.Random;
|
|||
|
||||
public class Electricity extends Blob {
|
||||
|
||||
{
|
||||
//acts after mobs, to give them a chance to resist paralysis
|
||||
actPriority = MOB_PRIO - 1;
|
||||
}
|
||||
|
||||
private boolean[] water;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,6 +32,11 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||
|
||||
public class ParalyticGas extends Blob {
|
||||
|
||||
{
|
||||
//acts after mobs, to give them a chance to resist paralysis
|
||||
actPriority = MOB_PRIO - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void evolve() {
|
||||
super.evolve();
|
||||
|
|
|
@ -21,11 +21,14 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Paralysis extends FlavourBuff {
|
||||
|
||||
|
@ -45,6 +48,21 @@ public class Paralysis extends FlavourBuff {
|
|||
}
|
||||
}
|
||||
|
||||
public void processDamage( int damage ){
|
||||
if (target == null) return;
|
||||
ParalysisResist resist = target.buff(ParalysisResist.class);
|
||||
if (resist == null){
|
||||
resist = Buff.affect(target, ParalysisResist.class);
|
||||
}
|
||||
resist.damage += damage;
|
||||
if (Random.NormalIntRange(0, resist.damage) >= Random.NormalIntRange(0, target.HP)){
|
||||
detach();
|
||||
if (Dungeon.level.heroFOV[target.pos]) {
|
||||
GLog.i( Messages.get(this, "out", target.name) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach() {
|
||||
super.detach();
|
||||
|
@ -81,4 +99,33 @@ public class Paralysis extends FlavourBuff {
|
|||
public static float duration( Char ch ) {
|
||||
return DURATION;
|
||||
}
|
||||
|
||||
public static class ParalysisResist extends Buff {
|
||||
|
||||
private int damage;
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (target.buff(Paralysis.class) == null) {
|
||||
damage -= Math.ceil(damage / 10f);
|
||||
if (damage >= 0) detach();
|
||||
}
|
||||
spend(TICK);
|
||||
return true;
|
||||
}
|
||||
|
||||
private static final String DAMAGE = "damage";
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
damage = bundle.getInt(DAMAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
bundle.put( DAMAGE, damage );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,6 +171,7 @@ actors.buffs.ooze.desc=This sticky acid clings to flesh, slowly melting it away.
|
|||
|
||||
actors.buffs.paralysis.name=Paralysed
|
||||
actors.buffs.paralysis.heromsg=You are paralysed!
|
||||
actors.buffs.paralysis.out=The pain snaps %s out of paralysis.
|
||||
actors.buffs.paralysis.desc=Oftentimes the worst thing to do is nothing at all.\n\nParalysis completely halts all actions, forcing the target to wait until the effect wears off. The pain from taking damage can also cause characters to snap out of paralysis.\n\nTurns of paralysis remaining: %s.
|
||||
|
||||
actors.buffs.poison.name=Poisoned
|
||||
|
@ -555,5 +556,4 @@ actors.mobs.yog$larva.desc=Yog-Dzewa is an Old God, a powerful entity from the r
|
|||
|
||||
actors.char.kill=%s killed you...
|
||||
actors.char.defeat=You defeated %s.
|
||||
actors.char.out_of_paralysis=The pain snapped %s out of paralysis.
|
||||
actors.char.def_verb=dodged
|
||||
|
|
Loading…
Reference in New Issue
Block a user