Skip to content

Commit

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

- added ability to steal items from shops
- shopkeepers do not leave any items behind when fleeing anymore
- boomerangs and chakrams now always return when thrown (just like harpoons)
- sleeping in water doesn't affects health regeneration rate anymore
- slightly adjusted various debuff durations

MOBS & BOSSES

- gnoll brutes now become enraged on being hit while having less than 50% health
- DM-300 now becomes slightly faster after every enrage (up to 95%)
- DM-300 now receives halved damage when enraged
- Tengu now receives halved damage when enraged

HERBS & WATERSKINS

- brought back the Earthroot herb
- changed the sprite of the Whirlvine herb
- added a rare Wyrmflower herb which can be used to brew potions of Strength

- pouring water from waterskins does not flood the targeted tile anymore
- pouring water from waterskin now turns ember tiles into grass tiles
- pouring water from waterskin now turns grass tiles into high grass tiles
- pouring water from waterskin now grows random herbs on a high grass tiles

BUGS & ISSUES

- fixed game crashing when attacking burning Goo or its spawns
- fixed game crashing sometimes when Ankh tries to resurrect you
- fixed game crashing when player character is killed by a trap
- fixed Levitation visual effect glitch when using potion of Levitation to fall down
- fixed Ensnared duration from webs and regrowth clouds
- fixed guard lasting for a more than a single turn
- fixed some descriptions in the tutorial
- fixed some typos and grammar mistakes
- fixed some other minor issues
  • Loading branch information
ConsideredHamster committed Jun 3, 2018
1 parent 766c3ed commit beb2fdf
Show file tree
Hide file tree
Showing 58 changed files with 832 additions and 493 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 318
versionName '0.3.1h'
versionCode 319
versionName '0.3.1j'
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.
Binary file modified app/src/main/assets/items.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 @@ -274,14 +274,14 @@ public static void searchButton( boolean value ) {
Preferences.INSTANCE.put( Preferences.KEY_SEARCH_BTN, value );
}

public static void buttons( boolean value ) {
Preferences.INSTANCE.put( Preferences.KEY_BUTTONS, value );
}

public static boolean buttons() {
return true;
// return Preferences.INSTANCE.getBoolean(Preferences.KEY_BUTTONS, true);
}
// public static void buttons( boolean value ) {
// Preferences.INSTANCE.put( Preferences.KEY_BUTTONS, value );
// }
//
// public static boolean buttons() {
// return true;
//// return Preferences.INSTANCE.getBoolean(Preferences.KEY_BUTTONS, true);
// }

public static int loadingTips() {
return Preferences.INSTANCE.getInt( Preferences.KEY_LOADING_TIPS, 3 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.consideredhamster.yetanotherpixeldungeon.Statistics;
import com.consideredhamster.yetanotherpixeldungeon.actors.blobs.Blob;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.Buff;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.BuffReactive;
import com.consideredhamster.yetanotherpixeldungeon.actors.mobs.Mob;
import com.consideredhamster.yetanotherpixeldungeon.levels.Level;
import com.consideredhamster.yetanotherpixeldungeon.misc.utils.GLog;
Expand All @@ -49,7 +50,9 @@ protected void spend( float time ) {
this.time += time;
}


public int actingPriority(){
return 0;
}

protected void postpone( float time ) {
// if (this.time < now + time) {
Expand Down Expand Up @@ -184,25 +187,16 @@ public static void process() {

current = null;

Actor currentChar = null;
Actor currentBlob = null;
Actor currentBuff = null;

Arrays.fill( chars, null );

for (Actor actor : all) {
if (actor.time < now) {

if (actor.time < now || actor.time <= now && actor.actingPriority() > current.actingPriority() ) {

now = actor.time;

current = actor;

if(actor instanceof Char) {
currentChar = actor;
} else if(actor instanceof Blob) {
currentBlob = actor;
} else if(actor instanceof Buff) {
currentBuff = actor;
}
}

if (actor instanceof Char) {
Expand All @@ -211,22 +205,6 @@ public static void process() {
}
}

// for (Actor actor : all) {
//
// if (actor instanceof Char) {
// Char ch = (Char)actor;
// chars[ch.pos] = ch;
// }
// }

if( currentBuff != null && currentBuff.time <= now ) {
current = currentBuff;
} else if( currentBlob != null && currentBlob.time <= now ) {
current = currentBlob;
} else if( currentChar != null && currentChar.time <= now ) {
current = currentChar;
}

if (current != null) {

if (current instanceof Char && ((Char)current).sprite != null && ((Char)current).sprite.isMoving) {
Expand All @@ -238,6 +216,12 @@ public static void process() {

doNext = current.act();

if (current instanceof Char) {
BuffReactive.check( (Char)current );
}



if (doNext && !Dungeon.hero.isAlive()) {
doNext = false;
current = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.debuffs.Ensnared;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.debuffs.Tormented;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.special.Exposed;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.special.Focused;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.special.Focus;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.special.Guard;
import com.consideredhamster.yetanotherpixeldungeon.actors.buffs.special.Light;
import com.consideredhamster.yetanotherpixeldungeon.items.rings.RingOfVitality;
import com.consideredhamster.yetanotherpixeldungeon.misc.utils.GLog;
import com.watabou.noosa.Camera;
import com.watabou.noosa.audio.Sample;
import com.consideredhamster.yetanotherpixeldungeon.visuals.Assets;
Expand Down Expand Up @@ -107,6 +106,7 @@ public abstract class Char extends Actor {

@Override
protected boolean act() {

Dungeon.level.updateFieldOfView( this );

moving = false;
Expand All @@ -123,6 +123,11 @@ public int viewDistance() {
private static final String TAG_HT = "HT";
private static final String BUFFS = "buffs";

@Override
public int actingPriority(){
return 3;
}

@Override
public void storeInBundle( Bundle bundle ) {

Expand Down Expand Up @@ -170,10 +175,11 @@ public boolean attack( Char enemy ){

if( !isRanged() && Random.Float() < counterChance() ){

Exposed exposed = Buff.affect( this, Exposed.class, TICK );
Exposed exposed = Buff.affect( this, Exposed.class );

if( exposed != null ) {
exposed.object = enemy.id();
exposed.reset(1);
}

}
Expand Down Expand Up @@ -256,7 +262,7 @@ public static boolean hit( Char attacker, Char defender, boolean ranged, boolean
if( Level.fieldOfView[ defender.pos ] )
attValue *= 2;

if( attacker.buff( Focused.class ) != null ){
if( attacker.buff( Focus.class ) != null ){
attValue *= 2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ public boolean act() {

return true;
}

@Override
public int actingPriority(){
return 2;
}

public void use( BlobEmitter emitter ) {
this.emitter = emitter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private void burn( int pos ) {
Char ch = Actor.findChar(pos);
if (ch != null) {
if( ch.buff( Burning.class ) == null ){
BuffActive.add( ch, Burning.class, TICK * 3 );
BuffActive.add( ch, Burning.class, TICK * 5 );
} else {
BuffActive.add( ch, Burning.class, TICK );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ protected void evolve() {
Char ch = Actor.findChar( i );

if( ch != null ){
if( ch.buff( Frozen.class ) != null ){
// if( ch.buff( Frozen.class ) == null ){
BuffActive.add( ch, Frozen.class, TICK * 2 );
} else {
BuffActive.add( ch, Frozen.class, TICK );
}
// } else {
// BuffActive.add( ch, Frozen.class, TICK );
// }
}

Heap heap = Dungeon.level.heaps.get( i );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ protected void evolve() {
}

ch.damage( Random.Int( effect ) + 1, this, Element.BODY );
BuffActive.add( ch, Withered.class, TICK );

if( ch.buff( Withered.class ) == null ){
BuffActive.add( ch, Withered.class, TICK * 3 );
} else {
BuffActive.add( ch, Withered.class, TICK );
}

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ protected void evolve() {
Char ch = Actor.findChar(i);
if (ch != null && !ch.flying ) {

if( ch.buff( Ensnared.class ) != null ){
BuffActive.add( ch, Ensnared.class, TICK * 2 );
} else if ( Random.Int(50) < growth[i] ) {
if( ch.buff( Ensnared.class ) == null ){
BuffActive.add( ch, Ensnared.class, TICK * 3 );
} else {
BuffActive.add( ch, Ensnared.class, TICK );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ protected void evolve() {
Char ch = Actor.findChar( i );

if ( ch != null ) {
if( ch.buff( Ensnared.class ) != null ){
BuffActive.add( ch, Ensnared.class, TICK * 2 );
if( ch.buff( Ensnared.class ) == null ){
BuffActive.add( ch, Ensnared.class, TICK * 3 );
} else {
BuffActive.add( ch, Ensnared.class, TICK );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public boolean attachTo( Char target ) {

if( target.add(this) ){

if( statusMessage() != null ) {
if( statusMessage() != null && target.sprite != null ) {
target.sprite.showStatus( statusColor(), statusMessage() );
}

Expand Down Expand Up @@ -88,6 +88,11 @@ public boolean act() {
deactivate();
return true;
}

@Override
public int actingPriority(){
return 1;
}

public int icon() {
return BuffIndicator.NONE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.consideredhamster.yetanotherpixeldungeon.actors.Char;
import com.consideredhamster.yetanotherpixeldungeon.misc.utils.GLog;
import com.consideredhamster.yetanotherpixeldungeon.visuals.sprites.CharSprite;
import com.consideredhamster.yetanotherpixeldungeon.visuals.ui.BuffIndicator;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;

Expand All @@ -37,9 +38,6 @@ public String status() {
return duration > 0 ? Integer.toString( duration ) : null;
}

@Override
public String description() { return ""; }

public Element buffType() {
return null;
}
Expand Down Expand Up @@ -117,6 +115,7 @@ public static<T extends BuffActive> T add( Char target, Class<T> buffClass, floa
if( duration > 0 ) {
if( !newBuff || buff.attachTo( target ) ) {
buff.duration += duration;
BuffIndicator.refreshHero();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Yet Another Pixel Dungeon
* Copyright (C) 2015-2016 Considered Hamster
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.consideredhamster.yetanotherpixeldungeon.actors.buffs;

import com.consideredhamster.yetanotherpixeldungeon.actors.Char;
import com.watabou.utils.Bundle;

import java.util.HashSet;

public abstract class BuffReactive extends Buff {

protected int duration;

public void reset( int value ) {
duration = value;
}

public void check(){
if( duration > 0 ) {
duration--;
} else {
detach();
}
}

public static void check( Char ch ){
for( BuffReactive buff : (HashSet<BuffReactive>)ch.buffs( BuffReactive.class ).clone() ) {
buff.check();
}
}

@Override
public boolean act() {
spend( TICK );
return true;
}

private static final String DURATION = "duration";

@Override
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( DURATION, duration );
}

@Override
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle);
duration = bundle.getInt( DURATION );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class Enraged extends Bonus {

public static final int DURATION = 11;
public static final int DURATION = 10;

@Override
public String toString() {
Expand Down
Loading

0 comments on commit beb2fdf

Please sign in to comment.