@Test public void testHealthPowerUp() { TestHelper.load(); world.debugReset(); Player player = new Player(); Item healthItem = ItemRegistry.getItem("Health1"); PowerUp h1 = new PowerUp(healthItem, "health", 20, 15, 10000); world.addEntity(player); world.addEntity(h1); world.gameLoop(1); player.setPosition(0, 50); player.addHealth(-25); h1.setPosition(0, 50); assert (world.getAllEntities().contains(h1)); world.gameLoop(1); world.gameLoop(1); player.getMaxHealth(); player.getCurrentHealth(); assert (!world.getAllEntities().contains(h1)); assert (h1.getModifier() == 20); }
public float getModifier() { return this.modifier; }
PowerUp extends ItemEntity { public float getModifier() { return this.modifier; } }
PowerUp extends ItemEntity { public float getModifier() { return this.modifier; } PowerUp(Item item, String buff, float modifier, long modifierValue, long decay); }
PowerUp extends ItemEntity { public float getModifier() { return this.modifier; } PowerUp(Item item, String buff, float modifier, long modifierValue, long decay); float getModifier(); long getModifierValue(); }
PowerUp extends ItemEntity { public float getModifier() { return this.modifier; } PowerUp(Item item, String buff, float modifier, long modifierValue, long decay); float getModifier(); long getModifierValue();  }