v1.1.0: implemented simple buffs to exotic potions:
- corrosive gas damage and AOE up - shrouding fog AOE up, and now only vision-blocks enemies - magical sight AOE up to 12 from 8 - storm clouds AOE size up to 3x3 from 1x1
This commit is contained in:
parent
5d53ac5944
commit
415341bf57
|
@ -218,7 +218,7 @@ actors.buffs.lostinventory.name=Lost Inventory
|
|||
actors.buffs.lostinventory.desc=Your inventory has been lost somewhere in the dungeon! You won't be able to pick up or use most items until you retrieve it.
|
||||
|
||||
actors.buffs.magicalsight.name=Magical Sight
|
||||
actors.buffs.magicalsight.desc=Somehow you are able to see with your mind, rather than your eyes.\n\nAll terrain or effects which reduce or block vision are broken while magical sight is active.\n\nTurns of magical sight remaining: %s.
|
||||
actors.buffs.magicalsight.desc=Somehow you are able to see with your mind, rather than your eyes.\n\nAll terrain or effects which reduce or block vision are broken while magical sight is active, and your vision range is increased by 50%.\n\nTurns of magical sight remaining: %s.
|
||||
|
||||
actors.buffs.magicalsleep.name=Magical Sleep
|
||||
actors.buffs.magicalsleep.toohealthy=You are too healthy, and resist the urge to sleep.
|
||||
|
|
|
@ -723,7 +723,7 @@ items.potions.exotic.potionofcleansing.name=potion of cleansing
|
|||
items.potions.exotic.potionofcleansing.desc=This powerful reagent will completely neutralize all harmful effects on the drinker when quaffed. It can be thrown at a target to cleanse them as well.
|
||||
|
||||
items.potions.exotic.potionofcorrosivegas.name=potion of corrosive gas
|
||||
items.potions.exotic.potionofcorrosivegas.desc=Uncorking or shattering this pressurized glass will cause its contents to explode into a deadly cloud of corrosive rust-colored gas. The gas is less concentrated however, and will not last for very long.
|
||||
items.potions.exotic.potionofcorrosivegas.desc=Uncorking or shattering this pressurized glass will cause its contents to explode into a deadly cloud of corrosive rust-colored gas. The gas spreads more quickly than toxic gas and is more deadly, but also won't last as long.
|
||||
|
||||
items.potions.exotic.potionofdragonsbreath.name=potion of dragon's breath
|
||||
items.potions.exotic.potionofdragonsbreath.prompt=Choose a location to burn
|
||||
|
@ -736,13 +736,13 @@ items.potions.exotic.potionofholyfuror.name=potion of holy furor
|
|||
items.potions.exotic.potionofholyfuror.desc=The power of holy energy reduced to liquid form, this draught will bless you for an extended period of time.
|
||||
|
||||
items.potions.exotic.potionofmagicalsight.name=potion of magical sight
|
||||
items.potions.exotic.potionofmagicalsight.desc=After drinking this, your senses will be briefly heightened to incredible levels, allowing you to see through walls!
|
||||
items.potions.exotic.potionofmagicalsight.desc=After drinking this, your senses will be briefly heightened to incredible levels, increasing your vision range and allowing you to see through walls!
|
||||
|
||||
items.potions.exotic.potionofshielding.name=potion of shielding
|
||||
items.potions.exotic.potionofshielding.desc=Rather than heal, this potion will instead project a durable shield around the user's body, blocking a considerable amount of damage.
|
||||
|
||||
items.potions.exotic.potionofshroudingfog.name=potion of shrouding fog
|
||||
items.potions.exotic.potionofshroudingfog.desc=When exposed to air, the liquid in this flask will produce a thick smoky fog which completely blocks vision.
|
||||
items.potions.exotic.potionofshroudingfog.desc=When exposed to air, the liquid in this flask will produce a thick smoky fog which quickly spreads and blocks the vision of your enemies.
|
||||
|
||||
items.potions.exotic.potionofsnapfreeze.name=potion of snap freeze
|
||||
items.potions.exotic.potionofsnapfreeze.desc=The chemical contained in this potion will rapidly react with the air, instantly freezing and rooting all within its effect.
|
||||
|
@ -751,7 +751,7 @@ items.potions.exotic.potionofstamina.name=potion of stamina
|
|||
items.potions.exotic.potionofstamina.desc=Drinking this oddly sweet liquid will imbue you with a long-lasting boost of energy, allowing you to run at a quickened pace for an extended period of time.
|
||||
|
||||
items.potions.exotic.potionofstormclouds.name=potion of storm clouds
|
||||
items.potions.exotic.potionofstormclouds.desc=Throwing this potion will create a cloud of concentrated vapor, which will condense and pour down onto the environment. Most terrain will be converted to water, and traps will be overwhelmed and break.
|
||||
items.potions.exotic.potionofstormclouds.desc=Throwing this potion will create a quickly-spreading cloud of concentrated vapor, which will condense and pour down onto the environment. Most terrain will be converted to water, and traps will be overwhelmed and break.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSight;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RevealedArea;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
|
@ -692,6 +693,11 @@ public class Dungeon {
|
|||
public static void observe(){
|
||||
int dist = 8;
|
||||
dist *= 1f + 0.25f*Dungeon.hero.pointsInTalent(Talent.FARSIGHT);
|
||||
|
||||
if (Dungeon.hero.buff(MagicalSight.class) != null){
|
||||
dist = Math.max( dist, MagicalSight.DISTANCE );
|
||||
}
|
||||
|
||||
observe( dist+1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -21,49 +21,18 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
|
||||
public class SmokeScreen extends Blob {
|
||||
|
||||
@Override
|
||||
protected void evolve() {
|
||||
super.evolve();
|
||||
|
||||
int cell;
|
||||
|
||||
Level l = Dungeon.level;
|
||||
for (int i = area.left; i < area.right; i++){
|
||||
for (int j = area.top; j < area.bottom; j++){
|
||||
cell = i + j*l.width();
|
||||
l.losBlocking[cell] = off[cell] > 0 || (Terrain.flags[l.map[cell]] & Terrain.LOS_BLOCKING) != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void use( BlobEmitter emitter ) {
|
||||
super.use( emitter );
|
||||
emitter.pour( Speck.factory( Speck.SMOKE ), 0.1f );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear(int cell) {
|
||||
super.clear(cell);
|
||||
Level l = Dungeon.level;
|
||||
l.losBlocking[cell] = cur[cell] > 0 || (Terrain.flags[l.map[cell]] & Terrain.LOS_BLOCKING) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fullyClear() {
|
||||
super.fullyClear();
|
||||
Dungeon.level.buildFlagMaps();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String tileDesc() {
|
||||
return Messages.get(this, "desc");
|
||||
|
|
|
@ -31,7 +31,7 @@ public class MagicalSight extends FlavourBuff {
|
|||
|
||||
public static final float DURATION = 50f;
|
||||
|
||||
public int distance = 8;
|
||||
public static final int DISTANCE = 12;
|
||||
|
||||
{
|
||||
type = buffType.POSITIVE;
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.PathFinder;
|
||||
|
||||
public class PotionOfCorrosiveGas extends ExoticPotion {
|
||||
|
||||
|
@ -46,6 +47,15 @@ public class PotionOfCorrosiveGas extends ExoticPotion {
|
|||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( cell, 200, CorrosiveGas.class ).setStrength( 1 + Dungeon.depth/5));
|
||||
int centerVolume = 25;
|
||||
for (int i : PathFinder.NEIGHBOURS8){
|
||||
if (!Dungeon.level.solid[cell+i]){
|
||||
GameScene.add( Blob.seed( cell+i, 25, CorrosiveGas.class ).setStrength( 2 + Dungeon.depth/5));
|
||||
} else {
|
||||
centerVolume += 25;
|
||||
}
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( cell, centerVolume, CorrosiveGas.class ).setStrength( 2 + Dungeon.depth/5));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.SmokeScreen;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.PathFinder;
|
||||
|
||||
public class PotionOfShroudingFog extends ExoticPotion {
|
||||
|
||||
|
@ -46,7 +47,16 @@ public class PotionOfShroudingFog extends ExoticPotion {
|
|||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( cell, 1000, SmokeScreen.class ) );
|
||||
int centerVolume = 120;
|
||||
for (int i : PathFinder.NEIGHBOURS8){
|
||||
if (!Dungeon.level.solid[cell+i]){
|
||||
GameScene.add( Blob.seed( cell+i, 120, SmokeScreen.class ) );
|
||||
} else {
|
||||
centerVolume += 120;
|
||||
}
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( cell, centerVolume, SmokeScreen.class ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.PathFinder;
|
||||
|
||||
public class PotionOfStormClouds extends ExoticPotion {
|
||||
|
||||
|
@ -46,6 +47,15 @@ public class PotionOfStormClouds extends ExoticPotion {
|
|||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( cell, 1000, StormCloud.class ) );
|
||||
int centerVolume = 120;
|
||||
for (int i : PathFinder.NEIGHBOURS8){
|
||||
if (!Dungeon.level.solid[cell+i]){
|
||||
GameScene.add( Blob.seed( cell+i, 120, StormCloud.class ) );
|
||||
} else {
|
||||
centerVolume += 120;
|
||||
}
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( cell, centerVolume, StormCloud.class ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.huntress.SpiritHawk;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bestiary;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.YogFist;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Sheep;
|
||||
|
@ -640,13 +639,6 @@ public abstract class Level implements Bundlable {
|
|||
pit[i] = (flags & Terrain.PIT) != 0;
|
||||
}
|
||||
|
||||
SmokeScreen s = (SmokeScreen)blobs.get(SmokeScreen.class);
|
||||
if (s != null && s.volume > 0){
|
||||
for (int i=0; i < length(); i++) {
|
||||
losBlocking[i] = losBlocking[i] || s.cur[i] > 0;
|
||||
}
|
||||
}
|
||||
|
||||
Web w = (Web) blobs.get(Web.class);
|
||||
if (w != null && w.volume > 0){
|
||||
for (int i=0; i < length(); i++) {
|
||||
|
@ -744,11 +736,6 @@ public abstract class Level implements Bundlable {
|
|||
level.pit[cell] = (flags & Terrain.PIT) != 0;
|
||||
level.water[cell] = terrain == Terrain.WATER;
|
||||
|
||||
SmokeScreen s = (SmokeScreen)level.blobs.get(SmokeScreen.class);
|
||||
if (s != null && s.volume > 0){
|
||||
level.losBlocking[cell] = level.losBlocking[cell] || s.cur[cell] > 0;
|
||||
}
|
||||
|
||||
for (int i : PathFinder.NEIGHBOURS9){
|
||||
i = cell + i;
|
||||
if (level.solid[i]){
|
||||
|
@ -1051,6 +1038,8 @@ public abstract class Level implements Bundlable {
|
|||
|
||||
private static boolean[] heroMindFov;
|
||||
|
||||
private static boolean[] modifiableBlocking;
|
||||
|
||||
public void updateFieldOfView( Char c, boolean[] fieldOfView ) {
|
||||
|
||||
int cx = c.pos % width();
|
||||
|
@ -1061,14 +1050,30 @@ public abstract class Level implements Bundlable {
|
|||
if (sighted) {
|
||||
boolean[] blocking;
|
||||
|
||||
if (modifiableBlocking == null || modifiableBlocking.length != Dungeon.level.losBlocking.length){
|
||||
modifiableBlocking = new boolean[Dungeon.level.losBlocking.length];
|
||||
}
|
||||
|
||||
if ((c instanceof Hero && ((Hero) c).subClass == HeroSubClass.WARDEN)
|
||||
|| c instanceof YogFist.SoiledFist) {
|
||||
blocking = Dungeon.level.losBlocking.clone();
|
||||
System.arraycopy(Dungeon.level.losBlocking, 0, modifiableBlocking, 0, modifiableBlocking.length);
|
||||
blocking = modifiableBlocking;
|
||||
for (int i = 0; i < blocking.length; i++){
|
||||
if (blocking[i] && (Dungeon.level.map[i] == Terrain.HIGH_GRASS || Dungeon.level.map[i] == Terrain.FURROWED_GRASS)){
|
||||
blocking[i] = false;
|
||||
}
|
||||
}
|
||||
} else if (c.alignment == Char.Alignment.ENEMY
|
||||
&& Dungeon.level.blobs.containsKey(SmokeScreen.class)
|
||||
&& Dungeon.level.blobs.get(SmokeScreen.class).volume > 0) {
|
||||
System.arraycopy(Dungeon.level.losBlocking, 0, modifiableBlocking, 0, modifiableBlocking.length);
|
||||
blocking = modifiableBlocking;
|
||||
Blob s = Dungeon.level.blobs.get(SmokeScreen.class);
|
||||
for (int i = 0; i < blocking.length; i++){
|
||||
if (!blocking[i] && s.cur[i] > 0){
|
||||
blocking[i] = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
blocking = Dungeon.level.losBlocking;
|
||||
}
|
||||
|
@ -1090,8 +1095,7 @@ public abstract class Level implements Bundlable {
|
|||
sense = Math.max( ((MindVision)b).distance, sense );
|
||||
}
|
||||
if (c.buff(MagicalSight.class) != null){
|
||||
sense = 8;
|
||||
sense *= 1f + 0.25f*((Hero) c).pointsInTalent(Talent.FARSIGHT);
|
||||
sense = Math.max( MagicalSight.DISTANCE, sense );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user