removed testing class; tweaks to items; heart piece message
This commit is contained in:
@@ -138,7 +138,7 @@ public class InvSlot extends ClickableComponent {
|
||||
|
||||
if (itm.getType() == ItemType.FOOD) {
|
||||
rtTxP.setText(Calc.toString(itm.getFoodPoints() / 2D));
|
||||
rbTxP.setColor(RGB.GREEN);
|
||||
rtTxP.setColor(RGB.GREEN);
|
||||
rtTxP.render();
|
||||
} else if (itm.getType() == ItemType.WEAPON) {
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package mightypork.rogue.t;
|
||||
|
||||
|
||||
import mightypork.rogue.world.item.Item;
|
||||
import mightypork.rogue.world.item.Items;
|
||||
|
||||
|
||||
public class TryItemDmg {
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
final Item itm = Items.CLUB.createItemDamaged(80);
|
||||
System.out.println(itm.getMaxUses() + " - remaining: " + itm.getRemainingUses());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -360,6 +360,12 @@ public class World implements DelegatingClient, BusAccess, IonObjBundled, Pausea
|
||||
{
|
||||
playerEntity.health.setHealthMax(health);
|
||||
}
|
||||
|
||||
|
||||
public World getWorld()
|
||||
{
|
||||
return World.this;
|
||||
}
|
||||
}
|
||||
|
||||
// not saved stuffs
|
||||
@@ -550,7 +556,7 @@ public class World implements DelegatingClient, BusAccess, IonObjBundled, Pausea
|
||||
|
||||
public void msgPick(Item item)
|
||||
{
|
||||
console.addMessage("You've picked a " + item.getVisualName() + ".");
|
||||
console.addMessage("You've picked up a " + item.getVisualName() + ".");
|
||||
console.lastPickupItem = item;
|
||||
console.timeSinceLastPickup = 0;
|
||||
}
|
||||
@@ -606,12 +612,18 @@ public class World implements DelegatingClient, BusAccess, IonObjBundled, Pausea
|
||||
|
||||
public void msgCannotPick()
|
||||
{
|
||||
console.addMessage("Can't pick items, inventory is full.");
|
||||
console.addMessage("Can't collect items, inventory is full.");
|
||||
}
|
||||
|
||||
|
||||
public void msgEnterFloor(int floor)
|
||||
{
|
||||
console.addMessage("~ Floor " + floor + " ~");
|
||||
console.addMessage("~ Welcome to floor " + (1+floor) + "! ~");
|
||||
}
|
||||
|
||||
|
||||
public void msgHeartPiece()
|
||||
{
|
||||
console.addMessage("Your health capacity has been increased.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@ public abstract class ItemBaseFood extends Item {
|
||||
|
||||
|
||||
@Override
|
||||
public int getAttackPoints()
|
||||
public final int getAttackPoints()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemType getType()
|
||||
public final ItemType getType()
|
||||
{
|
||||
return ItemType.FOOD;
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@ public abstract class ItemBaseWeapon extends Item {
|
||||
|
||||
|
||||
@Override
|
||||
public int getFoodPoints()
|
||||
public final int getFoodPoints()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemType getType()
|
||||
public final ItemType getType()
|
||||
{
|
||||
return ItemType.WEAPON;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,8 @@ public class ItemHeartPiece extends Item {
|
||||
pl.setHealthMax(pl.getHealthMax() + 2); // two points / heart
|
||||
pl.setHealth(pl.getHealthMax());
|
||||
|
||||
pl.getWorld().msgHeartPiece();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user