/** Activate the artifact. Check what the type is and activate the corresponding artifact */ private void activate() { if (type == TYPE.ALLHELPERDAMAGE) { game.getHelpers().artifactDamage(currentAmount); } else if (type == TYPE.HERODAMAGE) { game.getHero().artifactDamage(currentAmount); } else if (type == TYPE.ENEMYGOLD) { game.artifactEnemyGold(currentAmount); } }
/** * Increase level and amount. Reset the description and cost and play character level animation */ public void level() { level++; currentAmount = amount; amount *= 1.2; setDescription(); setCost(); game.getHero().levelAnimation(); activate(); }