the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 31 lines 728 B view raw
1#include "stdafx.h" 2#include "LootBonusEnchantment.h" 3 4LootBonusEnchantment::LootBonusEnchantment(int id, int frequency, const EnchantmentCategory *cat) : Enchantment(id, frequency, cat) 5{ 6 setDescriptionId(IDS_ENCHANTMENT_LOOT_BONUS); 7 if (cat == EnchantmentCategory::digger) 8 { 9 setDescriptionId(IDS_ENCHANTMENT_LOOT_BONUS_DIGGER); 10 } 11} 12 13int LootBonusEnchantment::getMinCost(int level) 14{ 15 return 15 + (level - 1) * 9; 16} 17 18int LootBonusEnchantment::getMaxCost(int level) 19{ 20 return Enchantment::getMinCost(level) + 50; 21} 22 23int LootBonusEnchantment::getMaxLevel() 24{ 25 return 3; 26} 27 28bool LootBonusEnchantment::isCompatibleWith(Enchantment *other) const 29{ 30 return Enchantment::isCompatibleWith(other) && other->id != untouching->id; 31}