v0.3.1: new traps batch 1
(11 new traps, changes to 2 existing traps)
This commit is contained in:
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Wound;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.TrapSprite;
|
||||
import com.watabou.utils.Random;
|
||||
@@ -44,9 +45,10 @@ public class GrippingTrap extends Trap {
|
||||
Char c = Actor.findChar( pos );
|
||||
|
||||
if (c != null) {
|
||||
int damage = Math.max( 0, (Dungeon.depth + 3) - Random.IntRange( 0, c.dr() / 2 ) );
|
||||
int damage = Math.max( 0, (Dungeon.depth) - Random.IntRange( 0, c.dr() / 2 ) );
|
||||
Buff.affect( c, Bleeding.class ).set( damage );
|
||||
Buff.prolong( c, Cripple.class, Cripple.DURATION );
|
||||
Buff.prolong( c, Cripple.class, 15f);
|
||||
Buff.prolong( c, Roots.class, 5f);
|
||||
Wound.hit( c );
|
||||
} else {
|
||||
Wound.hit( pos );
|
||||
|
||||
Reference in New Issue
Block a user