1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

mithril removal

This commit is contained in:
Laserlicht
2025-09-16 02:07:25 +02:00
parent 3ec731ef6e
commit 7d1e661e6f
16 changed files with 20 additions and 38 deletions

View File

@@ -1083,7 +1083,5 @@
"spellSchool.core.air.name" : "Air", "spellSchool.core.air.name" : "Air",
"spellSchool.core.earth.name" : "Earth", "spellSchool.core.earth.name" : "Earth",
"spellSchool.core.fire.name" : "Fire", "spellSchool.core.fire.name" : "Fire",
"spellSchool.core.water.name" : "Water", "spellSchool.core.water.name" : "Water"
"resources.core.mithril.name" : "Mithril"
} }

View File

@@ -1076,7 +1076,5 @@
"spellSchool.core.air.name" : "Luft", "spellSchool.core.air.name" : "Luft",
"spellSchool.core.earth.name" : "Erde", "spellSchool.core.earth.name" : "Erde",
"spellSchool.core.fire.name" : "Feuer", "spellSchool.core.fire.name" : "Feuer",
"spellSchool.core.water.name" : "Wasser", "spellSchool.core.water.name" : "Wasser"
"resources.core.mithril.name" : "Mithril"
} }

View File

@@ -162,8 +162,6 @@ size_t OptionsTab::CPlayerSettingsHelper::getImageIndex(bool big)
return GEM; return GEM;
case EGameResID::GOLD: case EGameResID::GOLD:
return GOLD; return GOLD;
case EGameResID::MITHRIL:
return MITHRIL;
} }
} }
} }

View File

@@ -464,7 +464,7 @@ private:
enum class State { UNAFFORDABLE, ALREADY_UPGRADED, MAKE_UPGRADE, EMPTY, UNAVAILABLE }; enum class State { UNAFFORDABLE, ALREADY_UPGRADED, MAKE_UPGRADE, EMPTY, UNAVAILABLE };
static constexpr std::size_t slotsCount = 7; static constexpr std::size_t slotsCount = 7;
//todo: mithril support //todo: configurable resource support
static constexpr std::size_t resCount = 7; static constexpr std::size_t resCount = 7;
const CGObjectInstance * fort; const CGObjectInstance * fort;

View File

@@ -4,31 +4,31 @@
{ {
"pawn": "pawn":
{ {
"resources": { "wood" : 30, "mercury": 15, "ore": 30, "sulfur": 15, "crystal": 15, "gems": 15, "gold": 30000, "mithril": 0 }, "resources": { "wood" : 30, "mercury": 15, "ore": 30, "sulfur": 15, "crystal": 15, "gems": 15, "gold": 30000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"knight": "knight":
{ {
"resources": { "wood" : 20, "mercury": 10, "ore": 20, "sulfur": 10, "crystal": 10, "gems": 10, "gold": 20000, "mithril": 0 }, "resources": { "wood" : 20, "mercury": 10, "ore": 20, "sulfur": 10, "crystal": 10, "gems": 10, "gold": 20000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"rook": "rook":
{ {
"resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 15000, "mithril": 0 }, "resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 15000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"queen": "queen":
{ {
"resources": { "wood" : 10, "mercury": 4, "ore": 10, "sulfur": 4, "crystal": 4, "gems": 4, "gold": 10000, "mithril": 0 }, "resources": { "wood" : 10, "mercury": 4, "ore": 10, "sulfur": 4, "crystal": 4, "gems": 4, "gold": 10000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"king": "king":
{ {
"resources": { "wood" : 0, "mercury": 0, "ore": 0, "sulfur": 0, "crystal": 0, "gems": 0, "gold": 0, "mithril": 0 }, "resources": { "wood" : 0, "mercury": 0, "ore": 0, "sulfur": 0, "crystal": 0, "gems": 0, "gold": 0 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
} }
@@ -37,31 +37,31 @@
{ {
"pawn": "pawn":
{ {
"resources": { "wood" : 5, "mercury": 2, "ore": 5, "sulfur": 2, "crystal": 2, "gems": 2, "gold": 5000, "mithril": 0 }, "resources": { "wood" : 5, "mercury": 2, "ore": 5, "sulfur": 2, "crystal": 2, "gems": 2, "gold": 5000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"knight": "knight":
{ {
"resources": { "wood" : 10, "mercury": 4, "ore": 10, "sulfur": 4, "crystal": 4, "gems": 4, "gold": 7500, "mithril": 0 }, "resources": { "wood" : 10, "mercury": 4, "ore": 10, "sulfur": 4, "crystal": 4, "gems": 4, "gold": 7500 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"rook": "rook":
{ {
"resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 10000, "mithril": 0 }, "resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 10000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"queen": "queen":
{ {
"resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 10000, "mithril": 0 }, "resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 10000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
}, },
"king": "king":
{ {
"resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 10000, "mithril": 0 }, "resources": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 10000 },
"globalBonuses": [], "globalBonuses": [],
"battleBonuses": [] "battleBonuses": []
} }

View File

@@ -32,11 +32,5 @@
"gold": { "gold": {
"index" : 6, "index" : 6,
"price": 1 "price": 1
},
"mithril": {
"index" : 7,
"name" : "Mithril",
"price": 0
} }
} }

View File

@@ -14,7 +14,7 @@ Difficulty configuration is located in [config/difficulty.json](../../config/dif
"pawn": //parameters for specific difficulty "pawn": //parameters for specific difficulty
{ {
//starting resources //starting resources
"resources": { "wood" : 30, "mercury": 15, "ore": 30, "sulfur": 15, "crystal": 15, "gems": 15, "gold": 30000, "mithril": 0 }, "resources": { "wood" : 30, "mercury": 15, "ore": 30, "sulfur": 15, "crystal": 15, "gems": 15, "gold": 30000 },
//bonuses will be given to player globally //bonuses will be given to player globally
"globalBonuses": [], "globalBonuses": [],
//bonuses will be given to player every battle //bonuses will be given to player every battle

View File

@@ -568,7 +568,6 @@ Deprecated, please use primarySkill instead
- resource.gems - resource.gems
- resource.gold - resource.gold
- resource.mercury - resource.mercury
- resource.mithril
- resource.ore - resource.ore
- resource.sulfur - resource.sulfur
- resource.wood - resource.wood

View File

@@ -41,10 +41,6 @@ Stack experience interface has been merged with regular creature window. Among o
VCMI offers native support for Commanders. Commanders are part of WoG mod for VCMI and require it to be enabled. However, once this is done, any new faction can use its own Commander, too. VCMI offers native support for Commanders. Commanders are part of WoG mod for VCMI and require it to be enabled. However, once this is done, any new faction can use its own Commander, too.
### Mithril module
VCMI natively supports Mithril resource known from WoG. However, it is not currently used by any mod.
### Stack Artifact module ### Stack Artifact module
In original WoG, there is one available Stack Artifact - Warlord's Banner, which is related directly to stack experience. VCMI natively supports any number of Stack Artifacts regardless if of Stack Experience module is enabled or not. However, currently no mods make use of this feature and it hasn't been tested for many years. In original WoG, there is one available Stack Artifact - Warlord's Banner, which is related directly to stack experience. VCMI natively supports any number of Stack Artifacts regardless if of Stack Experience module is enabled or not. However, currently no mods make use of this feature and it hasn't been tested for many years.

View File

@@ -568,7 +568,7 @@ std::vector<JsonNode> CCreatureHandler::loadLegacyData()
data["name"]["plural"].String() = parser.readString(); data["name"]["plural"].String() = parser.readString();
for(int v=0; v<7; ++v) for(int v=0; v<GameConstants::RESOURCE_QUANTITY; ++v)
data["cost"][GameConstants::RESOURCE_NAMES[v]].Float() = parser.readNumber(); data["cost"][GameConstants::RESOURCE_NAMES[v]].Float() = parser.readNumber();
data["fightValue"].Float() = parser.readNumber(); data["fightValue"].Float() = parser.readNumber();

View File

@@ -1064,7 +1064,6 @@ public:
CRYSTAL, CRYSTAL,
GEMS, GEMS,
GOLD, GOLD,
MITHRIL,
COUNT, COUNT,
WOOD_AND_ORE = -4, // special case for town bonus resource WOOD_AND_ORE = -4, // special case for town bonus resource

View File

@@ -37,7 +37,7 @@ namespace GameConstants
constexpr int SKILL_QUANTITY=28; constexpr int SKILL_QUANTITY=28;
constexpr int PRIMARY_SKILLS=4; constexpr int PRIMARY_SKILLS=4;
constexpr int RESOURCE_QUANTITY=8; constexpr int RESOURCE_QUANTITY=7;
constexpr int HEROES_PER_TYPE=8; //amount of heroes of each type constexpr int HEROES_PER_TYPE=8; //amount of heroes of each type
// amounts of OH3 objects. Can be changed by mods, should be used only during H3 loading phase // amounts of OH3 objects. Can be changed by mods, should be used only during H3 loading phase

View File

@@ -19,7 +19,7 @@ VCMI_LIB_NAMESPACE_BEGIN
namespace GameConstants namespace GameConstants
{ {
const std::string RESOURCE_NAMES [RESOURCE_QUANTITY] = { const std::string RESOURCE_NAMES [RESOURCE_QUANTITY] = {
"wood", "mercury", "ore", "sulfur", "crystal", "gems", "gold", "mithril" "wood", "mercury", "ore", "sulfur", "crystal", "gems", "gold"
}; };
const std::string PLAYER_COLOR_NAMES [PlayerColor::PLAYER_LIMIT_I] = { const std::string PLAYER_COLOR_NAMES [PlayerColor::PLAYER_LIMIT_I] = {

View File

@@ -53,10 +53,11 @@ JsonNode readBuilding(CLegacyConfigParser & parser)
JsonNode ret; JsonNode ret;
JsonNode & cost = ret["cost"]; JsonNode & cost = ret["cost"];
//note: this code will try to parse mithril as well but wil always return 0 for it
for(const std::string & resID : GameConstants::RESOURCE_NAMES) for(const std::string & resID : GameConstants::RESOURCE_NAMES)
cost[resID].Float() = parser.readNumber(); cost[resID].Float() = parser.readNumber();
parser.readNumber(); //note: will try to parse mithril -> needs mapping to resource from mithril mod
parser.endLine(); parser.endLine();
return ret; return ret;

View File

@@ -8,7 +8,7 @@ local Bonus = require("Bonus")
local BonusBearer = require("BonusBearer") local BonusBearer = require("BonusBearer")
local BonusList = require("BonusList") local BonusList = require("BonusList")
local RES = {[0] = "wood", [1] = "mercury", [2] = "ore", [3] = "sulfur", [4] = "crystal", [5] = "gems", [6] = "gold", [7] = "mithril"} local RES = {[0] = "wood", [1] = "mercury", [2] = "ore", [3] = "sulfur", [4] = "crystal", [5] = "gems", [6] = "gold"}
local SERVICES = SERVICES local SERVICES = SERVICES
local creatures = SERVICES:creatures() local creatures = SERVICES:creatures()

View File

@@ -214,7 +214,6 @@ TEST_F(ResourceManagerTest, freeResources)
ASSERT_GE(res[EGameResID::CRYSTAL], 0); ASSERT_GE(res[EGameResID::CRYSTAL], 0);
ASSERT_GE(res[EGameResID::GEMS], 0); ASSERT_GE(res[EGameResID::GEMS], 0);
ASSERT_GE(res[EGameResID::GOLD], 0); ASSERT_GE(res[EGameResID::GOLD], 0);
ASSERT_GE(res[EGameResID::MITHRIL], 0);
} }
TEST_F(ResourceManagerTest, freeResourcesWithManyGoals) TEST_F(ResourceManagerTest, freeResourcesWithManyGoals)