v0.3.0: modified wandmaker's reward
This commit is contained in:
parent
be9ba31994
commit
bb636dd237
|
@ -20,6 +20,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
|
@ -38,8 +39,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CorpseDust;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.PrisonLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Room;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
|
@ -221,13 +220,13 @@ public class Wandmaker extends NPC {
|
|||
alternative = Random.Int( 2 ) == 0;
|
||||
|
||||
given = false;
|
||||
//TODO: implement new logic
|
||||
wand1 = new WandOfDisintegration();
|
||||
wand1.random().upgrade();
|
||||
|
||||
wand1 = (Wand) Generator.random(Generator.Category.WAND);
|
||||
wand1.upgrade();
|
||||
|
||||
wand2 = new WandOfRegrowth();
|
||||
wand2.random().upgrade();
|
||||
do {
|
||||
wand2 = (Wand) Generator.random(Generator.Category.WAND);
|
||||
} while (wand2.getClass().equals(wand1.getClass()));
|
||||
wand2.upgrade();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,6 @@ public class WndWandmaker extends Window {
|
|||
private static final String TXT_MESSAGE =
|
||||
"Oh, I see you have succeeded! I do hope it hasn't troubled you too much. " +
|
||||
"As I promised, you can choose one of my high quality wands.";
|
||||
private static final String TXT_BATTLE = "Battle wand";
|
||||
private static final String TXT_NON_BATTLE = "Non-battle wand";
|
||||
|
||||
private static final String TXT_FARAWELL = "Good luck in your quest, %s!";
|
||||
|
||||
|
@ -60,25 +58,25 @@ public class WndWandmaker extends Window {
|
|||
message.y = titlebar.bottom() + GAP;
|
||||
add( message );
|
||||
|
||||
RedButton btnBattle = new RedButton( TXT_BATTLE ) {
|
||||
RedButton btnWand1 = new RedButton( Wandmaker.Quest.wand1.name() ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
selectReward( wandmaker, item, Wandmaker.Quest.wand1 );
|
||||
}
|
||||
};
|
||||
btnBattle.setRect( 0, message.y + message.height() + GAP, WIDTH, BTN_HEIGHT );
|
||||
add( btnBattle );
|
||||
btnWand1.setRect(0, message.y + message.height() + GAP, WIDTH, BTN_HEIGHT);
|
||||
add( btnWand1 );
|
||||
|
||||
RedButton btnNonBattle = new RedButton( TXT_NON_BATTLE ) {
|
||||
RedButton btnWand2 = new RedButton( Wandmaker.Quest.wand2.name() ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
selectReward( wandmaker, item, Wandmaker.Quest.wand2 );
|
||||
}
|
||||
};
|
||||
btnNonBattle.setRect( 0, btnBattle.bottom() + GAP, WIDTH, BTN_HEIGHT );
|
||||
add( btnNonBattle );
|
||||
btnWand2.setRect(0, btnWand1.bottom() + GAP, WIDTH, BTN_HEIGHT);
|
||||
add( btnWand2 );
|
||||
|
||||
resize( WIDTH, (int)btnNonBattle.bottom() );
|
||||
resize(WIDTH, (int) btnWand2.bottom());
|
||||
}
|
||||
|
||||
private void selectReward( Wandmaker wandmaker, Item item, Wand reward ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user