Skip to content

Commit 83670ed

Browse files
committed
More bug fixes
1 parent c4087bf commit 83670ed

File tree

8 files changed

+12
-16
lines changed

8 files changed

+12
-16
lines changed

assets/definitions/dialogues.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,7 @@
296296
"Not if you want that amulet back. I'd start by exploring the dungeons nearby. The farther you travel, the more dangerous they get."
297297
],
298298
"options": [
299-
{ "label": "Thanks for the tip.", "pointsTo": "collector_6"}
300-
]
301-
},
302-
{
303-
"id": "collector_6",
304-
"texts": [
305-
"One more thing. You'll probably need a Healing spell. Take this one, on the house. But the next one will cost ya."
306-
],
307-
"options": [
308-
{ "label": "(Accept healing spell)", "pointsTo": "collector_7"}
299+
{ "label": "Thanks for the tip.", "pointsTo": "collector_7"}
309300
]
310301
},
311302
{

assets/tips.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Zombies are much more powerful in groups. Once they grab you, it's hard to break free.
2+
If a zombie has grabbed you, fire a damage spell repeatedly until you get an opening.
23
Press CTRL + Backspace to clear text fields.
34
Stuck? Try talking to people you've met. They might have the answer.
45
Want to stay in the loop? Check the website for the latest news and updates.

gui/elements/Picker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void onClick(int button) {
4444

4545
public void onValueChange() {}
4646

47-
public void refresh() {
47+
private void refresh() {
4848
if (labels != null) label.setText(labels[value]);
4949
}
5050

gui/menus/SpellcraftingMenu.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ public void onClick(int button) {
7474
iconChooser = new Picker(0, 14, 1, 8, null) {
7575
@Override
7676
public void onValueChange() {
77-
icon.setImage(Assets.getImage("assets/gui/icons/spells/"+this.getValue()+".png"));
7877
spell.setIconIndex(getValue());
78+
refresh();
7979
}
8080
};
8181
iconChooser.addChild(icon, 0, -16, GUIAnchor.TOP_MIDDLE);
@@ -269,6 +269,7 @@ public boolean onMouseMoved(int ogx, int ogy) {
269269

270270
@Override
271271
public void onShow() {
272+
272273
nameField.grabFocus();
273274
}
274275

@@ -294,6 +295,7 @@ private void refresh() {
294295
this.nameField.setText(spell.getName());
295296
this.icon.setFilter(spell.getColor());
296297
this.iconChooser.setValue(spell.getIconIndex());
298+
icon.setImage(Assets.getImage("assets/gui/icons/spells/"+iconChooser.getValue()+".png"));
297299
this.colorChooser.setColor(spell.getColor());
298300
refreshTechniquesPanel();
299301
}

world/World.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ public static void load() {
110110
JSONObject jsonPlayer = (JSONObject)world.get("player");
111111
spawnPlayer((int)(double)jsonPlayer.get("x"), (int)(double)jsonPlayer.get("y"), (int)(long)jsonPlayer.get("rotation"), (String)jsonPlayer.get("region"));
112112
getLocalPlayer().deserialize(jsonPlayer);
113-
for (Region r: regions.values()) r.loadSavedChunks();
113+
getLocalPlayer().getLocation().getRegion().plan();
114+
for (Region r: regions.values()) { r.loadSavedChunks(); }
114115
} catch (IOException e) {
115116
e.printStackTrace();
116117
} catch (ParseException e) {

world/entities/types/humanoids/Player.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public Player() {
4040
this.setMaxMana(100);
4141
this.setMana(100);
4242

43-
getSpellbook().addSpell(SpellFactory.createSpell(SpellFactory.DAMAGE, 3));
43+
getSpellbook().addSpell(SpellFactory.createSpell(SpellFactory.DAMAGE, 2));
44+
getSpellbook().addSpell(SpellFactory.createSpell(SpellFactory.HEALING, 1));
4445

4546
this.getAnimationLayer("head").setColor(SKIN_COLORS[0]);
4647

world/entities/types/humanoids/npcs/Collector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void handle(Event e) {
142142
return;
143143
} else {
144144
exitState();
145-
pre.getPlayer().getSpellbook().addSpell(SpellFactory.createSpell(spellTypes[pre.getOption()], (int)MiscMath.random(1, 2)));
145+
pre.getPlayer().getSpellbook().addSpell(SpellFactory.createSpell(spellTypes[pre.getOption()], (int)MiscMath.random(2, 3)));
146146
getActionQueue().queueAction(new SpeakAction("Hope it serves you well."));
147147
}
148148
}

world/generators/chunk/overworld/ForestGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ForestGenerator(int seed) {
1616

1717
@Override
1818
public byte getTop(int x, int y) {
19-
if (rng().nextFloat() > 1 - density) return Tiles.TREE;
19+
if (rng().nextFloat() <= density) return Tiles.TREE;
2020
return super.getTop(x, y);
2121
}
2222

0 commit comments

Comments
 (0)