mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
fix text for spell school bonus
This commit is contained in:
@ -762,5 +762,7 @@
|
|||||||
"core.bonus.MECHANICAL.name": "Mechanical",
|
"core.bonus.MECHANICAL.name": "Mechanical",
|
||||||
"core.bonus.MECHANICAL.description": "Immunity to many effects, repairable",
|
"core.bonus.MECHANICAL.description": "Immunity to many effects, repairable",
|
||||||
"core.bonus.PRISM_HEX_ATTACK_BREATH.name": "Prism Breath",
|
"core.bonus.PRISM_HEX_ATTACK_BREATH.name": "Prism Breath",
|
||||||
"core.bonus.PRISM_HEX_ATTACK_BREATH.description": "Prism Breath Attack (three directions)"
|
"core.bonus.PRISM_HEX_ATTACK_BREATH.description": "Prism Breath Attack (three directions)",
|
||||||
|
"core.bonus.SPELL_SCHOOL_IMMUNITY.name": "${subtype.spellSchool} immunity",
|
||||||
|
"core.bonus.SPELL_SCHOOL_IMMUNITY.description": "Immune to ${subtype.spellSchool}"
|
||||||
}
|
}
|
||||||
|
@ -678,7 +678,7 @@
|
|||||||
"core.bonus.JOUSTING.name": "Champion Charge",
|
"core.bonus.JOUSTING.name": "Champion Charge",
|
||||||
"core.bonus.JOUSTING.description": "+${val}% Schaden pro zurückgelegtem Feld",
|
"core.bonus.JOUSTING.description": "+${val}% Schaden pro zurückgelegtem Feld",
|
||||||
"core.bonus.KING.name": "König",
|
"core.bonus.KING.name": "König",
|
||||||
"core.bonus.KING.description": "Anfällig für SLAYER Level ${val} oder höher",
|
"core.bonus.KING.description": "Anfällig für Drachentöter Level ${val} oder höher",
|
||||||
"core.bonus.LEVEL_SPELL_IMMUNITY.name": "Zauberimmunität 1-${val}",
|
"core.bonus.LEVEL_SPELL_IMMUNITY.name": "Zauberimmunität 1-${val}",
|
||||||
"core.bonus.LEVEL_SPELL_IMMUNITY.description": "Immun gegen Zaubersprüche der Stufen 1-${val}",
|
"core.bonus.LEVEL_SPELL_IMMUNITY.description": "Immun gegen Zaubersprüche der Stufen 1-${val}",
|
||||||
"core.bonus.LIMITED_SHOOTING_RANGE.name" : "Begrenzte Schussweite",
|
"core.bonus.LIMITED_SHOOTING_RANGE.name" : "Begrenzte Schussweite",
|
||||||
@ -762,5 +762,7 @@
|
|||||||
"core.bonus.MECHANICAL.name": "Mechanisch",
|
"core.bonus.MECHANICAL.name": "Mechanisch",
|
||||||
"core.bonus.MECHANICAL.description": "Immunität gegen viele Effekte, reparierbar",
|
"core.bonus.MECHANICAL.description": "Immunität gegen viele Effekte, reparierbar",
|
||||||
"core.bonus.PRISM_HEX_ATTACK_BREATH.name": "Prisma-Atem",
|
"core.bonus.PRISM_HEX_ATTACK_BREATH.name": "Prisma-Atem",
|
||||||
"core.bonus.PRISM_HEX_ATTACK_BREATH.description": "Prisma-Atem-Angriff (drei Richtungen)"
|
"core.bonus.PRISM_HEX_ATTACK_BREATH.description": "Prisma-Atem-Angriff (drei Richtungen)",
|
||||||
|
"core.bonus.SPELL_SCHOOL_IMMUNITY.name": "${subtype.spellSchool}-Immunität",
|
||||||
|
"core.bonus.SPELL_SCHOOL_IMMUNITY.description": "Immunität gegen ${subtype.spellSchool}"
|
||||||
}
|
}
|
||||||
|
@ -532,6 +532,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"SPELL_SCHOOL_IMMUNITY":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
|
||||||
"SPELL_RESISTANCE_AURA":
|
"SPELL_RESISTANCE_AURA":
|
||||||
{
|
{
|
||||||
"graphics":
|
"graphics":
|
||||||
|
@ -84,6 +84,13 @@ std::string CBonusTypeHandler::bonusToString(const std::shared_ptr<Bonus> & bonu
|
|||||||
if (text.find("${subtype.spell}") != std::string::npos && bonus->subtype.as<SpellID>().hasValue())
|
if (text.find("${subtype.spell}") != std::string::npos && bonus->subtype.as<SpellID>().hasValue())
|
||||||
boost::algorithm::replace_all(text, "${subtype.spell}", bonus->subtype.as<SpellID>().toSpell()->getNameTranslated());
|
boost::algorithm::replace_all(text, "${subtype.spell}", bonus->subtype.as<SpellID>().toSpell()->getNameTranslated());
|
||||||
|
|
||||||
|
if (text.find("${subtype.spellSchool}") != std::string::npos && bonus->subtype.as<SpellSchool>().hasValue())
|
||||||
|
{
|
||||||
|
auto school = bonus->subtype.as<SpellSchool>();
|
||||||
|
auto schoolName = VLC->generaltexth->zelp[school == SpellSchool::ANY ? 458 : 454 + school].first;
|
||||||
|
boost::algorithm::replace_all(text, "${subtype.spellSchool}", schoolName);
|
||||||
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user