Skip to content

Commit

Permalink
Version 0.3.1h
Browse files Browse the repository at this point in the history
GENERAL

- lantern can be used to spend your oil flasks to ignite nearby tiles
- amount of oil flasks spawned is increased
- waterskins can be used to pour water on adjacent tiles (or yourself)
- pouring water now creates a patch of water on affected tile
- wands of Magic Missile now inflict energy damage with their spells (instead physical)

MOBS

- decreased wraith HP
- decreased wraith blink chance
- restored wraith spawn rate on haunted floor to the previous value
- gnoll shamans now inflict energy damage with their spells (instead of physical)
- fixed first boss not spawning minions when hit

MISC

- weapons ands armors in shops can be enchanted now
- increased duration of "Withered" caused by unholy damage
- thunderstorm clouds now can remove Corrosion
- updated loading tips
- updated tutorial

BUGFIXES

- fixed issue with weapons being degraded too fast
- fixed scroll of Challenge crashing the game
- fixed scroll of Transmutation and throwing weapons/ammunitions issue
- fixed issue when using throwing weapons with ranged weapon in your main hand
- fixed issue with quickslots acting as offhand slots when item in them is equipped
- fixed scroll of Transmutation not showing a message when transmuting rings
- fixed some typos and grammar mistakes
  • Loading branch information
ConsideredHamster committed Apr 15, 2018
1 parent baf3514 commit 766c3ed
Show file tree
Hide file tree
Showing 26 changed files with 296 additions and 169 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.consideredhamster.yetanotherpixeldungeon"
minSdkVersion 9
targetSdkVersion 21
versionCode 316
versionName '0.3.1f'
versionCode 318
versionName '0.3.1h'
archivesBaseName = "yapd-$versionName"
}

Expand Down
Binary file modified app/src/main/assets/help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public static boolean ammosNeeded() {
}

public static boolean torchesNeeded() {
int[] quota = {5, 1, 11, 2, 17, 3, 23, 4, 29, 5};
int[] quota = {5, 2, 11, 4, 17, 6, 23, 8, 29, 10};

return chance( quota, torches );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public static class Unholy extends Element {
public int proc( Char target, int damage ) {

// if ( Random.Int( target.HT ) < damage * damage / 2 ) {
BuffActive.addFromDamage(target, Withered.class, damage);
BuffActive.addFromDamage(target, Withered.class, damage * 2 );

// if( damage < target.HP && buff != null ) {
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/
package com.consideredhamster.yetanotherpixeldungeon.actors.blobs;

import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.debuffs.Corrosion;
import com.consideredhamster.yetanotherpixeldungeon.actors.hero.Hero;
import com.consideredhamster.yetanotherpixeldungeon.actors.mobs.Elemental;
import com.consideredhamster.yetanotherpixeldungeon.visuals.effects.particles.SparkParticle;
Expand Down Expand Up @@ -122,6 +123,7 @@ protected void evolve() {
ch.damage( Random.IntRange( 1, (int)Math.sqrt( ch.HT / 2 + 1 ) ), this, null );
} else {
Buff.detach(ch, Burning.class);
Buff.detach(ch, Corrosion.class);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ private boolean actAttack( HeroAction.Attack action ){

if( enemy.isAlive() ){

if( belongings.weap1 instanceof RangedWeaponMissile && ( (RangedWeaponMissile) belongings.weap1 ).checkAmmo( this, true ) ){
if( belongings.weap1 instanceof RangedWeaponMissile && ( (RangedWeaponMissile) belongings.weap1 ).checkAmmo( this, false ) ){

RangedWeaponMissile weap = (RangedWeaponMissile) belongings.weap1;

Expand All @@ -1140,7 +1140,7 @@ private boolean actAttack( HeroAction.Attack action ){

weap.execute( this, RangedWeaponFlintlock.AC_RELOAD );

} else if( weap.checkAmmo( this, true ) ){
} else if( weap.checkAmmo( this, false ) ){

busy();

Expand Down Expand Up @@ -1258,7 +1258,7 @@ public int attackProc( Char enemy, int damage, boolean blocked ){
wep.proc( this, enemy, damage );

if( wep instanceof MeleeWeapon ){
wep.use( 2 );
wep.use( 1 );
}
}

Expand All @@ -1273,7 +1273,7 @@ public int defenseProc( Char enemy, int damage, boolean blocked ){
currentArmour = (Shield) belongings.weap2;
currentArmour.use( 2 );
} else {
currentArmour = null;
currentArmour = belongings.armor;

if( currentWeapon instanceof MeleeWeapon ){
currentWeapon.use( 2 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public boolean cast( Char enemy ) {

if (hit( this, enemy, true, true )) {

enemy.damage( absorb( damageRoll() + damageRoll(), enemy.armorClass() ), this, null );
enemy.damage( absorb( damageRoll() + damageRoll(), enemy.armorClass() ), this, Element.ENERGY );

} else {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void damage( int dmg, Object src, Element type ) {

dmg /= 2;

} else if ( type == null && dmg > 1 && dmg < HP && dmg > Random.Int( SPAWN_HEALTH * 3 ) ) {
} else if ( type == Element.PHYSICAL && dmg > 1 && dmg < HP && dmg > Random.Int( SPAWN_HEALTH * 3 ) ) {

ArrayList<Integer> candidates = new ArrayList<Integer>();
boolean[] passable = Level.passable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public class Wraith extends MobRanged {

private static final float SPAWN_DELAY = 2.0f;

private static final float BLINK_CHANCE = 0.25f;
public static final float HEALTH_DRAIN = 0.25f;
private static final float BLINK_CHANCE = 0.125f;

public Wraith() {
this( Dungeon.depth );;
Expand All @@ -65,6 +64,11 @@ public Wraith( int depth ) {
minDamage += tier;
maxDamage += tier;

minDamage /= 2;
maxDamage /= 2;

HP = HT /= 2;

flying = true;

resistances.put( Element.Frost.class, Element.Resist.PARTIAL );
Expand All @@ -80,11 +84,6 @@ public boolean isMagical() {
return true;
}

@Override
public int damageRoll() {
return super.damageRoll() / 2;
}

@Override
public boolean ignoresAC() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public boolean isMagical() {
public String description() {
return
"This guy doesn't looks threatening in any way. Yet, for some reason, mere presence of this mysterious fellow " +
"unnerves you. What business he can lead here?";
"unnerves you. You wonder what business he can lead here?";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@
package com.consideredhamster.yetanotherpixeldungeon.items.misc;

import com.consideredhamster.yetanotherpixeldungeon.Dungeon;
import com.consideredhamster.yetanotherpixeldungeon.actors.Actor;
import com.consideredhamster.yetanotherpixeldungeon.actors.blobs.Blob;
import com.consideredhamster.yetanotherpixeldungeon.actors.blobs.Fire;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.Buff;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.bonuses.Invisibility;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.debuffs.Frozen;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.special.Light;
import com.consideredhamster.yetanotherpixeldungeon.actors.hero.Hero;
import com.consideredhamster.yetanotherpixeldungeon.items.Item;
import com.consideredhamster.yetanotherpixeldungeon.misc.mechanics.Ballistica;
import com.consideredhamster.yetanotherpixeldungeon.misc.utils.GLog;
import com.consideredhamster.yetanotherpixeldungeon.misc.utils.Utils;
import com.consideredhamster.yetanotherpixeldungeon.scenes.CellSelector;
import com.consideredhamster.yetanotherpixeldungeon.scenes.GameScene;
import com.consideredhamster.yetanotherpixeldungeon.visuals.Assets;
import com.consideredhamster.yetanotherpixeldungeon.visuals.effects.CellEmitter;
import com.consideredhamster.yetanotherpixeldungeon.visuals.effects.particles.FlameParticle;
import com.consideredhamster.yetanotherpixeldungeon.visuals.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
Expand All @@ -39,15 +47,16 @@
public class OilLantern extends Item {

public static final String AC_LIGHT = "LIGHT";
private static final String AC_SNUFF = "SNUFF";
private static final String AC_REFILL = "REFILL";
private static final String AC_SPLASH = "SPLASH";
public static final String AC_SNUFF = "SNUFF";
public static final String AC_REFILL = "REFILL";
public static final String AC_BURN = "BURN";

private static final float TIME_TO_USE = 1f;
private static final int MAX_CHARGE = 100;

private static final String TXT_STATUS = "%d%%";

private static final String TXT_CANT_BURN = "You need a spare oil flask for this!";
private static final String TXT_NO_FLASKS = "You don't have oil to refill the lamp!";

private static final String TXT_DEACTIVATE = "Your lantern flickers faintly and goes out!";
Expand All @@ -58,6 +67,9 @@ public class OilLantern extends Item {

private static final String TXT_SNUFF = "You snuff out the lantern.";

private static final String TXT_BURN_SELF = "You pour the oil from an oil flask on yourself and ignite it. Just... Why?";
private static final String TXT_BURN_TILE = "You pour the oil from an oil flask on a nearby tile and ignite it.";

{
name = "oil lantern";
image = ItemSpriteSheet.LANTERN;
Expand Down Expand Up @@ -130,6 +142,7 @@ public ArrayList<String> actions( Hero hero ) {

actions.add( isActivated() ? AC_SNUFF : AC_LIGHT );
actions.add( AC_REFILL );
actions.add( AC_BURN );

actions.remove( AC_THROW );
actions.remove( AC_DROP );
Expand Down Expand Up @@ -166,13 +179,26 @@ public void execute( final Hero hero, String action ) {

} else if (action.equals( AC_REFILL ) ) {

if ( flasks > 0 ) {
if ( flasks > 0 ) {

refill( hero );
refill( hero );

} else {
GLog.w( TXT_NO_FLASKS );
}
GLog.w( TXT_NO_FLASKS );
}

} else if (action.equals( AC_BURN ) ) {

if ( flasks > 0 ) {

curUser = hero;
curItem = this;

GameScene.selectCell( burner );

} else {
GLog.w( TXT_CANT_BURN );
}

} else {

Expand All @@ -192,7 +218,7 @@ public void refill( Hero hero ) {
Sample.INSTANCE.play( Assets.SND_DRINK, 1.0f, 1.0f, 1.2f );
hero.sprite.operate( hero.pos );

GLog.w( TXT_REFILL );
GLog.i( TXT_REFILL );
updateQuickslot();

}
Expand All @@ -212,7 +238,7 @@ public void activate( Hero hero, boolean voluntary ) {
hero.spend( TIME_TO_USE );
hero.busy();

GLog.w( TXT_LIGHT );
GLog.i( TXT_LIGHT );
hero.sprite.operate( hero.pos );

}
Expand All @@ -238,7 +264,7 @@ public void deactivate( Hero hero, boolean voluntary ) {
hero.busy();

hero.sprite.operate( hero.pos );
GLog.w( TXT_SNUFF );
GLog.i( TXT_SNUFF );

} else {

Expand Down Expand Up @@ -319,14 +345,55 @@ public boolean doPickUp( Hero hero ) {

@Override
public int price() {
return quantity * 20;
return quantity * 30;
}

@Override
public String info() {
return
"This container holds 10 oz of oil. You can buy it to " +
"use as a fuel for your lantern. It is fireproof, thankfully.";
"This container holds 10 oz of lantern oil. You can use it to " +
"refill your lantern or pour on something to burn it.";
}
}



protected static CellSelector.Listener burner = new CellSelector.Listener() {
@Override
public void onSelect( Integer target ) {

if (target != null) {

Ballistica.cast( curUser.pos, target, false, true );

int cell = Ballistica.trace[ 0 ];

if( Ballistica.distance > 1 ){
cell = Ballistica.trace[ 1 ];
}

GameScene.add( Blob.seed( cell, 5, Fire.class ) );
((OilLantern)curItem).flasks--;
Invisibility.dispel();

if( curUser.pos == cell ) {
GLog.i( TXT_BURN_SELF );
} else {
GLog.i( TXT_BURN_TILE );
}

Sample.INSTANCE.play(Assets.SND_BURNING, 0.6f, 0.6f, 1.5f);
CellEmitter.get( cell ).burst( FlameParticle.FACTORY, 5 );

curUser.sprite.operate(cell);
curUser.busy();
curUser.spend( Actor.TICK );

}
}
@Override
public String prompt() {
return "Select nearby tile to burn";
}
};
}
Loading

0 comments on commit 766c3ed

Please sign in to comment.