blob: 9150fe445b42d6f2a5c725004e9b5a9b7119061e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "stdafx.h"
#include "LootBonusEnchantment.h"
LootBonusEnchantment::LootBonusEnchantment(int id, int frequency, const EnchantmentCategory *cat) : Enchantment(id, frequency, cat)
{
setDescriptionId(IDS_ENCHANTMENT_LOOT_BONUS);
if (cat == EnchantmentCategory::digger)
{
setDescriptionId(IDS_ENCHANTMENT_LOOT_BONUS_DIGGER);
}
}
int LootBonusEnchantment::getMinCost(int level)
{
return 15 + (level - 1) * 9;
}
int LootBonusEnchantment::getMaxCost(int level)
{
return Enchantment::getMinCost(level) + 50;
}
int LootBonusEnchantment::getMaxLevel()
{
return 3;
}
bool LootBonusEnchantment::isCompatibleWith(Enchantment *other) const
{
return Enchantment::isCompatibleWith(other) && other->id != untouching->id;
}
|