mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-15 13:33:36 +02:00
Update accurate shot translation handling
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
parent
3a83de5e70
commit
250b1b69a8
@ -155,17 +155,11 @@ void Damage::describeEffect(std::vector<MetaString> & log, const Mechanics * m,
|
||||
else if(m->getSpell()->getJsonKey().find("accurateShot") != std::string::npos && !multiple)
|
||||
{
|
||||
MetaString line;
|
||||
if(kills > 1)
|
||||
{
|
||||
line.appendTextID("vcmi.battleWindow.accurateShot.resultDescription"); //(number) (unit type) was killed with an accurate shot!
|
||||
line.replaceNumber(kills);
|
||||
firstTarget->addNameReplacement(line, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
line.appendTextID("vcmi.battleWindow.accurateShot.resultDescription.1"); //1 (unit type) were killed by accurate shots!
|
||||
firstTarget->addNameReplacement(line, false);
|
||||
}
|
||||
std::string preferredLanguage = VLC->generaltexth->getPreferredLanguage();
|
||||
std::string textID = "vcmi.battleWindow.accurateShot.resultDescription";
|
||||
line.appendTextID(Languages::getPluralFormTextID( preferredLanguage, kills, text));
|
||||
line.replaceNumber(kills);
|
||||
firstTarget->addNameReplacement(line, true);
|
||||
log.push_back(line);
|
||||
}
|
||||
else if(m->getSpellIndex() == SpellID::THUNDERBOLT && !multiple)
|
||||
|
Loading…
x
Reference in New Issue
Block a user