forked from CuteLunaMoon/Survival-Pixel-Dungeon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWndSpecialShop.txt
136 lines (114 loc) · 5.45 KB
/
WndSpecialShop.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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.shatteredpixel.shatteredpixeldungeon.windows;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Cultist;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.GuardCaptain;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.InnKeeper;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GoblinEar;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.watabou.noosa.BitmapTextMultiline;
public class WndInnKeeper extends Window {
private static final String TXT_GREETING = " Beeile dich, mein herr. I don't vant to be seen tradink vith outseiters like you...";
private static final String TXT_DUNGEON = " _Loran_ used to be a peaceful place for human und animorphs...But efer since zee first heroes brought zee fake Amulet back to _Loran_ , sings got outta kontrol. Tragische, tragische zeit. Zee underground city vas lost to... _zee geiBel_ . Und it vas unsafe for a fuchs-morph like me to shtay in _Loran_ anymore so I relokated here. Ich kann dir nicht mehr sagen. *whisper* Dieser Abend ist die Nacht der Jagd. Geh nicht nach _Loran_";
private static final String TXT_SELL = " Ja, you vant to look for a job? Go a head unt ask for fraulein Urta. I heard zat she's lookink for a helper or so. She's zee former Rittmeister of _Loran_ *whisper* So be careful";
private static final String TXT_AMULET =" Ah, zee Amulet of Yendor. I don't you much about zat. Zee church claimed zee one brought back to zee surface vas fake. Aber es gibt ein Gerucht. *whisper* Zat zee real one vould grant wishes or so. Maybe it's some made-up unsinn, maybe not. ";
//private static final String TXT_DRINK = "";
private static final String TXT_COMEBACK ="Come backs soon!";
private static final int BTN_SIZE = 36;
private static final float GAP = 2;
private static final float BTN_GAP = 10;
private static final int WIDTH = 120;
private static final int BTN_HEIGHT = 20;
private RedButton btnSell; // buy stuff from players
private RedButton btnBuyGunPowder; // sell Gun Powder
private RedButton btnBuyBullet; // sell bullets
private RedButton btnScroll; //sell Scrolls of Upgrade (limited)
public static WndBag sell() {
return GameScene.selectItem( itemSelector, WndBag.Mode.FOR_SALE, Messages.get(Shopkeeper.class, "sell"));
}
private static WndBag.Listener itemSelector = new WndBag.Listener() {
@Override
public void onSelect( Item item ) {
if (item != null) {
WndBag parentWnd = sell();
GameScene.show( new WndTradeItem( item, parentWnd ) );
}
}
};
public WndInnKeeper(final Yharnamite keeper) {
// k.detach(Dungeon.hero.bag);
// resize( WIDTH, (int)titlebar.bottom() );
IconTitle titlebar = new IconTitle();
titlebar.icon( keeper.sprite() );
titlebar.label( Messages.titleCase( keeper.name ) );
titlebar.setRect( 0, 0, WIDTH, 0 );
add( titlebar );
RenderedTextMultiline message = PixelScene.renderMultiline( TXT_GREETING, 6 );
message.maxWidth(WIDTH);
message.setPos(0, titlebar.bottom() + GAP);
add( message );
btnSell = new RedButton("Sell things"){
@Override
protected void onClick() {
hide();
sell();
}
};
btnSell.setRect(0, message.top() + message.height() + GAP, WIDTH, BTN_HEIGHT);
add( btnSell );
btnBuyGunPowder = new RedButton(" 100 GunPowder for 300 gold "){
@Override
protected void onClick() {
hide();
GameScene.show(
new WndQuest( keeper, TXT_EMPLOYMENT));
}
};
btnBuyGunPowder.setRect(0, btnSell.bottom() + GAP, WIDTH, BTN_HEIGHT);
add( btnBuyGunPowder );
btnBuyBullet = new RedButton("10 bullets for 100 gold"){
@Override
protected void onClick() {
hide();
GameScene.show(
new WndQuest( keeper, TXT_AMULET ));
}
};
btnBuyBullet.setRect(0, btnBuyGunPowder.bottom() + GAP, WIDTH, BTN_HEIGHT);
add(btnBuyBullet);
btnScroll = new RedButton("About the Amulet of Yendor"){
@Override
protected void onClick() {
hide();
GameScene.show(
new WndQuest( keeper, TXT_AMULET ));
}
};
btnScroll.setRect(0, btnBuyBullet.bottom() + GAP, WIDTH, BTN_HEIGHT);
add(btnScroll);
resize( WIDTH, (int) btnScroll.bottom());
}
}