Changes in v0.2.1c

Conflicts:
	src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java

Additionally:
   Improved challenge characteristics (now armor challenge removes the reward menu button, rather than giving cloth armor)
This commit is contained in:
Evan Debenham 2014-10-21 09:53:56 -04:00
parent 1592ceb6d8
commit 29a323ebcf
2 changed files with 21 additions and 20 deletions

View File

@ -359,10 +359,6 @@ public class Ghost extends NPC {
} }
} }
//TODO this is silly, why trap the player with bad armour? Just remove the button from the window.
if (Dungeon.isChallenged( Challenges.NO_ARMOR ))
armor = (Armor)new ClothArmor().degrade();
weapon.identify(); weapon.identify();
armor.identify(); armor.identify();
} }

View File

@ -17,18 +17,19 @@
*/ */
package com.shatteredpixel.shatteredpixeldungeon.windows; package com.shatteredpixel.shatteredpixeldungeon.windows;
import com.shatteredpixel.shatteredpixeldungeon.sprites.FetidRatSprite; import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GreatCrabSprite;
import com.watabou.noosa.BitmapTextMultiline;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.FetidRatSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GreatCrabSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton; import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.BitmapTextMultiline;
public class WndSadGhost extends Window { public class WndSadGhost extends Window {
@ -97,16 +98,20 @@ public class WndSadGhost extends Window {
btnWeapon.setRect( 0, message.y + message.height() + GAP, WIDTH, BTN_HEIGHT ); btnWeapon.setRect( 0, message.y + message.height() + GAP, WIDTH, BTN_HEIGHT );
add( btnWeapon ); add( btnWeapon );
RedButton btnArmor = new RedButton( TXT_ARMOR ) { if (!Dungeon.isChallenged( Challenges.NO_ARMOR )) {
RedButton btnArmor = new RedButton(TXT_ARMOR) {
@Override @Override
protected void onClick() { protected void onClick() {
selectReward( ghost, Ghost.Quest.armor ); selectReward(ghost, Ghost.Quest.armor);
} }
}; };
btnArmor.setRect( 0, btnWeapon.bottom() + GAP, WIDTH, BTN_HEIGHT ); btnArmor.setRect(0, btnWeapon.bottom() + GAP, WIDTH, BTN_HEIGHT);
add( btnArmor ); add(btnArmor);
resize( WIDTH, (int)btnArmor.bottom() ); resize(WIDTH, (int) btnArmor.bottom());
} else {
resize(WIDTH, (int) btnWeapon.bottom());
}
} }
private void selectReward( Ghost ghost, Item reward ) { private void selectReward( Ghost ghost, Item reward ) {