v0.7.0: adjusted terror and charm, now shortened by taking damage
This commit is contained in:
parent
2bc1bf0018
commit
81db0652fd
|
@ -52,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ShieldBuff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Speed;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Speed;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Stamina;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Stamina;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
|
@ -326,6 +327,14 @@ public abstract class Char extends Actor {
|
||||||
if (!isAlive() || dmg < 0) {
|
if (!isAlive() || dmg < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Terror t = buff(Terror.class);
|
||||||
|
if (t != null){
|
||||||
|
t.recover();
|
||||||
|
}
|
||||||
|
Charm c = buff(Charm.class);
|
||||||
|
if (c != null){
|
||||||
|
c.recover();
|
||||||
|
}
|
||||||
if (this.buff(Frost.class) != null){
|
if (this.buff(Frost.class) != null){
|
||||||
Buff.detach( this, Frost.class );
|
Buff.detach( this, Frost.class );
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,15 @@ public class Charm extends FlavourBuff {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
//TODO
|
||||||
public String desc() {
|
public String desc() {
|
||||||
return Messages.get(this, "desc", dispTurns());
|
return Messages.get(this, "desc", dispTurns());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void recover() {
|
||||||
|
spend(-5f);
|
||||||
|
if (cooldown() <= 0){
|
||||||
|
detach();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,15 +21,12 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
public class Terror extends FlavourBuff {
|
public class Terror extends FlavourBuff {
|
||||||
|
|
||||||
public static final float DURATION = 10f;
|
|
||||||
|
|
||||||
public int object = 0;
|
public int object = 0;
|
||||||
|
|
||||||
private static final String OBJECT = "object";
|
private static final String OBJECT = "object";
|
||||||
|
@ -61,14 +58,15 @@ public class Terror extends FlavourBuff {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
//TODO
|
||||||
public String desc() {
|
public String desc() {
|
||||||
return Messages.get(this, "desc", dispTurns());
|
return Messages.get(this, "desc", dispTurns());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void recover( Char target ) {
|
public void recover() {
|
||||||
Terror terror = target.buff( Terror.class );
|
spend(-5f);
|
||||||
if (terror != null && terror.cooldown() < DURATION) {
|
if (cooldown() <= 0){
|
||||||
target.remove( terror );
|
detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -545,8 +545,6 @@ public abstract class Mob extends Char {
|
||||||
@Override
|
@Override
|
||||||
public void damage( int dmg, Object src ) {
|
public void damage( int dmg, Object src ) {
|
||||||
|
|
||||||
Terror.recover( this );
|
|
||||||
|
|
||||||
if (state == SLEEPING) {
|
if (state == SLEEPING) {
|
||||||
state = WANDERING;
|
state = WANDERING;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ import com.watabou.utils.Random;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
//TODO desc changes
|
||||||
public class Succubus extends Mob {
|
public class Succubus extends Mob {
|
||||||
|
|
||||||
private static final int BLINK_DELAY = 5;
|
private static final int BLINK_DELAY = 5;
|
||||||
|
@ -71,8 +72,13 @@ public class Succubus extends Mob {
|
||||||
public int attackProc( Char enemy, int damage ) {
|
public int attackProc( Char enemy, int damage ) {
|
||||||
damage = super.attackProc( enemy, damage );
|
damage = super.attackProc( enemy, damage );
|
||||||
|
|
||||||
if (Random.Int( 3 ) == 0) {
|
if (enemy.buff(Charm.class) != null ){
|
||||||
Buff.affect( enemy, Charm.class, Random.IntRange( 3, 7 ) ).object = id();
|
HP = Math.min(HT, HP + damage);
|
||||||
|
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 2 );
|
||||||
|
Sample.INSTANCE.play( Assets.SND_CHARMS );
|
||||||
|
} else if (Random.Int( 3 ) == 0) {
|
||||||
|
//attack will reduce by 5 turns, so effectively 3-6 turns
|
||||||
|
Buff.affect( enemy, Charm.class, Random.IntRange( 3, 6 ) + 5 ).object = id();
|
||||||
enemy.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
enemy.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
||||||
Sample.INSTANCE.play( Assets.SND_CHARMS );
|
Sample.INSTANCE.play( Assets.SND_CHARMS );
|
||||||
}
|
}
|
||||||
|
@ -138,5 +144,6 @@ public class Succubus extends Mob {
|
||||||
|
|
||||||
{
|
{
|
||||||
immunities.add( Sleep.class );
|
immunities.add( Sleep.class );
|
||||||
|
immunities.add( Charm.class );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class Affection extends Glyph {
|
||||||
|
|
||||||
if (Random.Int( level / 2 + 10 ) >= 9) {
|
if (Random.Int( level / 2 + 10 ) >= 9) {
|
||||||
|
|
||||||
int duration = Random.IntRange( 2, 5 );
|
int duration = Random.IntRange( 4, 12 );
|
||||||
|
|
||||||
Buff.affect( attacker, Charm.class, duration ).object = defender.id();
|
Buff.affect( attacker, Charm.class, duration ).object = defender.id();
|
||||||
attacker.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
attacker.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class ScrollOfTerror extends Scroll {
|
||||||
Mob affected = null;
|
Mob affected = null;
|
||||||
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
|
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
|
||||||
if (Dungeon.level.heroFOV[mob.pos]) {
|
if (Dungeon.level.heroFOV[mob.pos]) {
|
||||||
Buff.affect( mob, Terror.class, Terror.DURATION ).object = curUser.id();
|
Buff.affect( mob, Terror.class, 20f ).object = curUser.id();
|
||||||
|
|
||||||
if (mob.buff(Terror.class) != null){
|
if (mob.buff(Terror.class) != null){
|
||||||
count++;
|
count++;
|
||||||
|
@ -81,8 +81,8 @@ public class ScrollOfTerror extends Scroll {
|
||||||
if (Dungeon.level.heroFOV[mob.pos]) {
|
if (Dungeon.level.heroFOV[mob.pos]) {
|
||||||
Terror t = mob.buff(Terror.class);
|
Terror t = mob.buff(Terror.class);
|
||||||
if (t != null){
|
if (t != null){
|
||||||
Buff.prolong(mob, Terror.class, Terror.DURATION*1.5f);
|
Buff.prolong(mob, Terror.class, 15f);
|
||||||
Buff.affect(mob, Paralysis.class, Terror.DURATION*.5f);
|
Buff.affect(mob, Paralysis.class, 5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,8 +103,7 @@ public class WandOfTransfusion extends Wand {
|
||||||
//charms an enemy
|
//charms an enemy
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Buff.affect(ch , Charm.class, 5 + level() ).object = curUser.id();
|
Buff.affect(ch , Charm.class, 4 + level() ).object = curUser.id();
|
||||||
Buff.affect(curUser , Charm.class, 5 ).object = ch.id();
|
|
||||||
|
|
||||||
ch.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
ch.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
||||||
curUser.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
curUser.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
||||||
|
|
|
@ -38,10 +38,13 @@ public class Friendly extends Weapon.Enchantment {
|
||||||
|
|
||||||
if (Random.Int(10) == 0){
|
if (Random.Int(10) == 0){
|
||||||
|
|
||||||
Buff.affect( attacker, Charm.class, Random.IntRange(9, 15) ).object = defender.id();
|
int base = Random.IntRange(3, 5);
|
||||||
|
|
||||||
|
Buff.affect( attacker, Charm.class, base + 10 ).object = defender.id();
|
||||||
attacker.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
attacker.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
||||||
|
|
||||||
Buff.affect( defender, Charm.class, Random.IntRange(3, 5) ).object = attacker.id();
|
//5 turns will be reduced by the attack, so effectively lasts for base turns
|
||||||
|
Buff.affect( defender, Charm.class, base + 5 ).object = attacker.id();
|
||||||
defender.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
defender.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,8 @@ public class Eldritch extends Weapon.Enchantment {
|
||||||
if (defender == Dungeon.hero) {
|
if (defender == Dungeon.hero) {
|
||||||
Buff.affect( defender, Vertigo.class, Vertigo.DURATION );
|
Buff.affect( defender, Vertigo.class, Vertigo.DURATION );
|
||||||
} else {
|
} else {
|
||||||
Buff.affect( defender, Terror.class, Terror.DURATION ).object = attacker.id();
|
//damage will reduce by 5 turns, so effectively 10 turns of terror
|
||||||
|
Buff.affect( defender, Terror.class, 10f + 5f ).object = attacker.id();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user