use of com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob in project shattered-pixel-dungeon-gdx by 00-Evan.
the class Annoying method proc.
@Override
public int proc(Weapon weapon, Char attacker, Char defender, int damage) {
if (Random.Int(20) == 0) {
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
mob.beckon(attacker.pos);
}
attacker.sprite.centerEmitter().start(Speck.factory(Speck.SCREAM), 0.3f, 3);
Sample.INSTANCE.play(Assets.SND_MIMIC);
Invisibility.dispel();
GLog.n(Messages.get(this, "msg_" + (Random.Int(5) + 1)));
}
return damage;
}
use of com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob in project shattered-pixel-dungeon-gdx by 00-Evan.
the class ScrollOfPsionicBlast method empoweredRead.
@Override
public void empoweredRead() {
GameScene.flash(0xFFFFFF);
Sample.INSTANCE.play(Assets.SND_BLAST);
Invisibility.dispel();
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
if (Dungeon.level.heroFOV[mob.pos]) {
mob.damage(mob.HT, this);
}
}
setKnown();
readAnimation();
}
use of com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob in project shattered-pixel-dungeon-gdx by 00-Evan.
the class ScrollOfTerror method doRead.
@Override
public void doRead() {
new Flare(5, 32).color(0xFF0000, true).show(curUser.sprite, 2f);
Sample.INSTANCE.play(Assets.SND_READ);
Invisibility.dispel();
int count = 0;
Mob affected = null;
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
if (Dungeon.level.heroFOV[mob.pos]) {
Buff.affect(mob, Terror.class, Terror.DURATION).object = curUser.id();
if (mob.buff(Terror.class) != null) {
count++;
affected = mob;
}
}
}
switch(count) {
case 0:
GLog.i(Messages.get(this, "none"));
break;
case 1:
GLog.i(Messages.get(this, "one", affected.name));
break;
default:
GLog.i(Messages.get(this, "many"));
}
setKnown();
readAnimation();
}
use of com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob in project shattered-pixel-dungeon-gdx by 00-Evan.
the class Dirk method damageRoll.
@Override
public int damageRoll(Char owner) {
if (owner instanceof Hero) {
Hero hero = (Hero) owner;
Char enemy = hero.enemy();
if (enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)) {
// deals 67% toward max to max on surprise, instead of min to max.
int diff = max() - min();
int damage = imbue.damageFactor(Random.NormalIntRange(min() + Math.round(diff * 0.67f), max()));
int exStr = hero.STR() - STRReq();
if (exStr > 0) {
damage += Random.IntRange(0, exStr);
}
return damage;
}
}
return super.damageRoll(owner);
}
use of com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob in project shattered-pixel-dungeon-gdx by 00-Evan.
the class ThrowingKnife method damageRoll.
@Override
public int damageRoll(Char owner) {
if (owner instanceof Hero) {
Hero hero = (Hero) owner;
if (enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)) {
// deals 75% toward max to max on surprise, instead of min to max.
int diff = max() - min();
int damage = imbue.damageFactor(Random.NormalIntRange(min() + Math.round(diff * 0.75f), max()));
damage = Math.round(damage * RingOfSharpshooting.damageMultiplier(hero));
int exStr = hero.STR() - STRReq();
if (exStr > 0 && hero.heroClass == HeroClass.HUNTRESS) {
damage += Random.IntRange(0, exStr);
}
return damage;
}
}
return super.damageRoll(owner);
}
Aggregations