v0.3.1: new traps batch 1

(11 new traps, changes to 2 existing traps)
This commit is contained in:
Evan Debenham
2015-06-30 15:45:50 -04:00
parent 958c8a22fa
commit 20a6f91758
14 changed files with 680 additions and 5 deletions
@@ -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 );