public int getWeaponDamage() { switch (graphic) { case Items.GFX_GREAT_AXE: return RandUtil.random(16, 20); case Items.GFX_EXECUTIONER_AXE: return RandUtil.random(15, 19); case Items.GFX_HAND_AXE: return RandUtil.random(13, 17); case Items.GFX_BATTLE_AXE: return RandUtil.random(17, 20); case Items.GFX_WAR_AXE: return RandUtil.random(14, 18); case Items.GFX_DAGGER: return RandUtil.random(10, 13); case Items.GFX_MACE: return RandUtil.random(11, 16); case Items.GFX_SHORT_SWORD: return RandUtil.random(11, 16); case Items.GFX_BROAD_SWORD: return RandUtil.random(13, 18); default: log.warning("Unknown base damage for graphic " + graphic); return RandUtil.random(1, 10); } }
public Point3D getRandomContainerLocation() { Rectangle rect = Gumps.getGumpDimensions(Gumps.getItemGump(graphic)); int x = RandUtil.random(rect.x, rect.x + rect.width); int y = RandUtil.random(rect.y, rect.y + rect.height); return new Point3D(x, y, 0); }