mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Use string ID's instead of raw strings for win/loss conditions
This commit is contained in:
parent
8dde8018d0
commit
c43783db58
@ -1586,7 +1586,7 @@ void CPlayerInterface::gameOver(PlayerColor player, const EVictoryLossCheckResul
|
|||||||
{
|
{
|
||||||
if (victoryLossCheckResult.loss() && cb->getPlayerStatus(playerID) == EPlayerStatus::INGAME) //enemy has lost
|
if (victoryLossCheckResult.loss() && cb->getPlayerStatus(playerID) == EPlayerStatus::INGAME) //enemy has lost
|
||||||
{
|
{
|
||||||
std::string str = victoryLossCheckResult.messageToSelf;
|
std::string str = CGI->generaltexth->translate(victoryLossCheckResult.messageToSelf);
|
||||||
boost::algorithm::replace_first(str, "%s", CGI->generaltexth->capColors[player.getNum()]);
|
boost::algorithm::replace_first(str, "%s", CGI->generaltexth->capColors[player.getNum()]);
|
||||||
showInfoDialog(str, std::vector<std::shared_ptr<CComponent>>(1, std::make_shared<CComponent>(CComponent::flag, player.getNum(), 0)));
|
showInfoDialog(str, std::vector<std::shared_ptr<CComponent>>(1, std::make_shared<CComponent>(CComponent::flag, player.getNum(), 0)));
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -309,18 +309,18 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
|
|
||||||
TriggeredEvent standardVictory;
|
TriggeredEvent standardVictory;
|
||||||
standardVictory.effect.type = EventEffect::VICTORY;
|
standardVictory.effect.type = EventEffect::VICTORY;
|
||||||
standardVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[5];
|
standardVictory.effect.toOtherMessage = "core.genrltxt.5";
|
||||||
standardVictory.identifier = "standardVictory";
|
standardVictory.identifier = "standardVictory";
|
||||||
standardVictory.description.clear(); // TODO: display in quest window
|
standardVictory.description.clear(); // TODO: display in quest window
|
||||||
standardVictory.onFulfill = VLC->generaltexth->allTexts[659];
|
standardVictory.onFulfill = "core.genrltxt.659";
|
||||||
standardVictory.trigger = EventExpression(victoryCondition);
|
standardVictory.trigger = EventExpression(victoryCondition);
|
||||||
|
|
||||||
TriggeredEvent standardDefeat;
|
TriggeredEvent standardDefeat;
|
||||||
standardDefeat.effect.type = EventEffect::DEFEAT;
|
standardDefeat.effect.type = EventEffect::DEFEAT;
|
||||||
standardDefeat.effect.toOtherMessage = VLC->generaltexth->allTexts[8];
|
standardDefeat.effect.toOtherMessage = "core.genrltxt.8";
|
||||||
standardDefeat.identifier = "standardDefeat";
|
standardDefeat.identifier = "standardDefeat";
|
||||||
standardDefeat.description.clear(); // TODO: display in quest window
|
standardDefeat.description.clear(); // TODO: display in quest window
|
||||||
standardDefeat.onFulfill = VLC->generaltexth->allTexts[7];
|
standardDefeat.onFulfill = "core.genrltxt.7";
|
||||||
standardDefeat.trigger = EventExpression(defeatCondition);
|
standardDefeat.trigger = EventExpression(defeatCondition);
|
||||||
|
|
||||||
// Specific victory conditions
|
// Specific victory conditions
|
||||||
@ -368,8 +368,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
EventCondition cond(EventCondition::HAVE_ARTIFACT);
|
EventCondition cond(EventCondition::HAVE_ARTIFACT);
|
||||||
cond.objectType = reader->readArtifact();
|
cond.objectType = reader->readArtifact();
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[281];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.281";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[280];
|
specialVictory.onFulfill = "core.genrltxt.280";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -379,8 +379,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.objectType = reader->readCreature();
|
cond.objectType = reader->readCreature();
|
||||||
cond.value = reader->readInt32();
|
cond.value = reader->readInt32();
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[277];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.277";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[276];
|
specialVictory.onFulfill = "core.genrltxt.6";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -390,8 +390,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.objectType = reader->readUInt8();
|
cond.objectType = reader->readUInt8();
|
||||||
cond.value = reader->readInt32();
|
cond.value = reader->readInt32();
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[279];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.279";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[278];
|
specialVictory.onFulfill = "core.genrltxt.278";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -405,8 +405,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.objectType = BuildingID::FORT + reader->readUInt8();
|
cond.objectType = BuildingID::FORT + reader->readUInt8();
|
||||||
oper.expressions.emplace_back(cond);
|
oper.expressions.emplace_back(cond);
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[283];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.283";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[282];
|
specialVictory.onFulfill = "core.genrltxt.282";
|
||||||
specialVictory.trigger = EventExpression(oper);
|
specialVictory.trigger = EventExpression(oper);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -418,8 +418,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
if(cond.position.z > 2)
|
if(cond.position.z > 2)
|
||||||
cond.position = int3(-1, -1, -1);
|
cond.position = int3(-1, -1, -1);
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[285];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.285";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[284];
|
specialVictory.onFulfill = "core.genrltxt.284";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -429,8 +429,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.objectType = Obj::HERO;
|
cond.objectType = Obj::HERO;
|
||||||
cond.position = reader->readInt3();
|
cond.position = reader->readInt3();
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[253];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.253";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[252];
|
specialVictory.onFulfill = "core.genrltxt.252";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -440,8 +440,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.objectType = Obj::TOWN;
|
cond.objectType = Obj::TOWN;
|
||||||
cond.position = reader->readInt3();
|
cond.position = reader->readInt3();
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[250];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.250";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[249];
|
specialVictory.onFulfill = "core.genrltxt.249";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -451,8 +451,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.objectType = Obj::MONSTER;
|
cond.objectType = Obj::MONSTER;
|
||||||
cond.position = reader->readInt3();
|
cond.position = reader->readInt3();
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[287];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.287";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[286];
|
specialVictory.onFulfill = "core.genrltxt.286";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -462,8 +462,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
oper.expressions.emplace_back(EventCondition(EventCondition::CONTROL, 0, Obj::CREATURE_GENERATOR1));
|
oper.expressions.emplace_back(EventCondition(EventCondition::CONTROL, 0, Obj::CREATURE_GENERATOR1));
|
||||||
oper.expressions.emplace_back(EventCondition(EventCondition::CONTROL, 0, Obj::CREATURE_GENERATOR4));
|
oper.expressions.emplace_back(EventCondition(EventCondition::CONTROL, 0, Obj::CREATURE_GENERATOR4));
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[289];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.289";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[288];
|
specialVictory.onFulfill = "core.genrltxt.288";
|
||||||
specialVictory.trigger = EventExpression(oper);
|
specialVictory.trigger = EventExpression(oper);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -472,8 +472,8 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
EventCondition cond(EventCondition::CONTROL);
|
EventCondition cond(EventCondition::CONTROL);
|
||||||
cond.objectType = Obj::MINE;
|
cond.objectType = Obj::MINE;
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[291];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.291";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[290];
|
specialVictory.onFulfill = "core.genrltxt.290";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -483,20 +483,29 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.objectType = reader->readUInt8();
|
cond.objectType = reader->readUInt8();
|
||||||
cond.position = reader->readInt3();
|
cond.position = reader->readInt3();
|
||||||
|
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[293];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.293";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[292];
|
specialVictory.onFulfill = "core.genrltxt.292";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EVictoryConditionType::HOTA_ELIMINATE_ALL_MONSTERS:
|
case EVictoryConditionType::HOTA_ELIMINATE_ALL_MONSTERS:
|
||||||
//TODO: HOTA
|
{
|
||||||
logGlobal->warn("Map '%s': Victory condition 'Eliminate all monsters' is not implemented!", mapName);
|
EventCondition cond(EventCondition::DESTROY);
|
||||||
|
cond.objectType = Obj::MONSTER;
|
||||||
|
|
||||||
|
specialVictory.effect.toOtherMessage = "Defeat all monsters"; // Eliminate all monsters on the map
|
||||||
|
specialVictory.onFulfill = "You have defeated all of the monsters plaguing this land!";
|
||||||
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case EVictoryConditionType::HOTA_SURVIVE_FOR_DAYS:
|
case EVictoryConditionType::HOTA_SURVIVE_FOR_DAYS:
|
||||||
{
|
{
|
||||||
//TODO: HOTA
|
EventCondition cond(EventCondition::DAYS_PASSED);
|
||||||
uint32_t daysToSurvive = reader->readUInt32(); // Number of days
|
cond.value = reader->readUInt32();
|
||||||
logGlobal->warn("Map '%s': Victory condition 'Survive for %d days' is not implemented!", mapName, daysToSurvive);
|
|
||||||
|
specialVictory.effect.toOtherMessage = "Survive beyond a time limit"; // Survive by month %d, week %d, day %d.
|
||||||
|
specialVictory.onFulfill = "You have managed to survive!";
|
||||||
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -535,7 +544,7 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
{
|
{
|
||||||
TriggeredEvent specialDefeat;
|
TriggeredEvent specialDefeat;
|
||||||
specialDefeat.effect.type = EventEffect::DEFEAT;
|
specialDefeat.effect.type = EventEffect::DEFEAT;
|
||||||
specialDefeat.effect.toOtherMessage = VLC->generaltexth->allTexts[5];
|
specialDefeat.effect.toOtherMessage = "core.genrltxt.5";
|
||||||
specialDefeat.identifier = "specialDefeat";
|
specialDefeat.identifier = "specialDefeat";
|
||||||
specialDefeat.description.clear(); // TODO: display in quest window
|
specialDefeat.description.clear(); // TODO: display in quest window
|
||||||
|
|
||||||
@ -552,7 +561,7 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.position = reader->readInt3();
|
cond.position = reader->readInt3();
|
||||||
|
|
||||||
noneOf.expressions.emplace_back(cond);
|
noneOf.expressions.emplace_back(cond);
|
||||||
specialDefeat.onFulfill = VLC->generaltexth->allTexts[251];
|
specialDefeat.onFulfill = "core.genrltxt.251";
|
||||||
specialDefeat.trigger = EventExpression(noneOf);
|
specialDefeat.trigger = EventExpression(noneOf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -564,7 +573,7 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
cond.position = reader->readInt3();
|
cond.position = reader->readInt3();
|
||||||
|
|
||||||
noneOf.expressions.emplace_back(cond);
|
noneOf.expressions.emplace_back(cond);
|
||||||
specialDefeat.onFulfill = VLC->generaltexth->allTexts[253];
|
specialDefeat.onFulfill = "core.genrltxt.253";
|
||||||
specialDefeat.trigger = EventExpression(noneOf);
|
specialDefeat.trigger = EventExpression(noneOf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -573,7 +582,7 @@ void CMapLoaderH3M::readVictoryLossConditions()
|
|||||||
EventCondition cond(EventCondition::DAYS_PASSED);
|
EventCondition cond(EventCondition::DAYS_PASSED);
|
||||||
cond.value = reader->readUInt16();
|
cond.value = reader->readUInt16();
|
||||||
|
|
||||||
specialDefeat.onFulfill = VLC->generaltexth->allTexts[254];
|
specialDefeat.onFulfill = "core.genrltxt.254";
|
||||||
specialDefeat.trigger = EventExpression(cond);
|
specialDefeat.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -561,19 +561,19 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
//Victory condition - defeat all
|
//Victory condition - defeat all
|
||||||
TriggeredEvent standardVictory;
|
TriggeredEvent standardVictory;
|
||||||
standardVictory.effect.type = EventEffect::VICTORY;
|
standardVictory.effect.type = EventEffect::VICTORY;
|
||||||
standardVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[5];
|
standardVictory.effect.toOtherMessage = "core.genrltxt.5";
|
||||||
standardVictory.identifier = "standardVictory";
|
standardVictory.identifier = "standardVictory";
|
||||||
standardVictory.description.clear(); // TODO: display in quest window
|
standardVictory.description.clear(); // TODO: display in quest window
|
||||||
standardVictory.onFulfill = VLC->generaltexth->allTexts[659];
|
standardVictory.onFulfill = "core.genrltxt.659";
|
||||||
standardVictory.trigger = EventExpression(victoryCondition);
|
standardVictory.trigger = EventExpression(victoryCondition);
|
||||||
|
|
||||||
//Loss condition - 7 days without town
|
//Loss condition - 7 days without town
|
||||||
TriggeredEvent standardDefeat;
|
TriggeredEvent standardDefeat;
|
||||||
standardDefeat.effect.type = EventEffect::DEFEAT;
|
standardDefeat.effect.type = EventEffect::DEFEAT;
|
||||||
standardDefeat.effect.toOtherMessage = VLC->generaltexth->allTexts[8];
|
standardDefeat.effect.toOtherMessage = "core.genrltxt.8";
|
||||||
standardDefeat.identifier = "standardDefeat";
|
standardDefeat.identifier = "standardDefeat";
|
||||||
standardDefeat.description.clear(); // TODO: display in quest window
|
standardDefeat.description.clear(); // TODO: display in quest window
|
||||||
standardDefeat.onFulfill = VLC->generaltexth->allTexts[7];
|
standardDefeat.onFulfill = "core.genrltxt.7";
|
||||||
standardDefeat.trigger = EventExpression(defeatCondition);
|
standardDefeat.trigger = EventExpression(defeatCondition);
|
||||||
|
|
||||||
controller.map()->triggeredEvents.clear();
|
controller.map()->triggeredEvents.clear();
|
||||||
@ -603,8 +603,8 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
EventCondition cond(EventCondition::HAVE_ARTIFACT);
|
EventCondition cond(EventCondition::HAVE_ARTIFACT);
|
||||||
assert(victoryTypeWidget);
|
assert(victoryTypeWidget);
|
||||||
cond.objectType = victoryTypeWidget->currentData().toInt();
|
cond.objectType = victoryTypeWidget->currentData().toInt();
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[281];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.281";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[280];
|
specialVictory.onFulfill = "core.genrltxt.280";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -614,8 +614,8 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
assert(victoryTypeWidget);
|
assert(victoryTypeWidget);
|
||||||
cond.objectType = victoryTypeWidget->currentData().toInt();
|
cond.objectType = victoryTypeWidget->currentData().toInt();
|
||||||
cond.value = victoryValueWidget->text().toInt();
|
cond.value = victoryValueWidget->text().toInt();
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[277];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.277";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[276];
|
specialVictory.onFulfill = "core.genrltxt.276";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -625,8 +625,8 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
assert(victoryTypeWidget);
|
assert(victoryTypeWidget);
|
||||||
cond.objectType = victoryTypeWidget->currentData().toInt();
|
cond.objectType = victoryTypeWidget->currentData().toInt();
|
||||||
cond.value = victoryValueWidget->text().toInt();
|
cond.value = victoryValueWidget->text().toInt();
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[279];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.279";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[278];
|
specialVictory.onFulfill = "core.genrltxt.278";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -638,8 +638,8 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
int townIdx = victorySelectWidget->currentData().toInt();
|
int townIdx = victorySelectWidget->currentData().toInt();
|
||||||
if(townIdx > -1)
|
if(townIdx > -1)
|
||||||
cond.position = controller.map()->objects[townIdx]->pos;
|
cond.position = controller.map()->objects[townIdx]->pos;
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[283];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.283";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[282];
|
specialVictory.onFulfill = "core.genrltxt.282";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -650,8 +650,8 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
cond.objectType = Obj::TOWN;
|
cond.objectType = Obj::TOWN;
|
||||||
int townIdx = victoryTypeWidget->currentData().toInt();
|
int townIdx = victoryTypeWidget->currentData().toInt();
|
||||||
cond.position = controller.map()->objects[townIdx]->pos;
|
cond.position = controller.map()->objects[townIdx]->pos;
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[250];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.250";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[249];
|
specialVictory.onFulfill = "core.genrltxt.249";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -662,8 +662,8 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
cond.objectType = Obj::HERO;
|
cond.objectType = Obj::HERO;
|
||||||
int heroIdx = victoryTypeWidget->currentData().toInt();
|
int heroIdx = victoryTypeWidget->currentData().toInt();
|
||||||
cond.position = controller.map()->objects[heroIdx]->pos;
|
cond.position = controller.map()->objects[heroIdx]->pos;
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[253];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.253";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[252];
|
specialVictory.onFulfill = "core.genrltxt.252";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -675,8 +675,8 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
int townIdx = victorySelectWidget->currentData().toInt();
|
int townIdx = victorySelectWidget->currentData().toInt();
|
||||||
if(townIdx > -1)
|
if(townIdx > -1)
|
||||||
cond.position = controller.map()->objects[townIdx]->pos;
|
cond.position = controller.map()->objects[townIdx]->pos;
|
||||||
specialVictory.effect.toOtherMessage = VLC->generaltexth->allTexts[293];
|
specialVictory.effect.toOtherMessage = "core.genrltxt.293";
|
||||||
specialVictory.onFulfill = VLC->generaltexth->allTexts[292];
|
specialVictory.onFulfill = "core.genrltxt.292";
|
||||||
specialVictory.trigger = EventExpression(cond);
|
specialVictory.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -733,7 +733,7 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
int townIdx = loseTypeWidget->currentData().toInt();
|
int townIdx = loseTypeWidget->currentData().toInt();
|
||||||
cond.position = controller.map()->objects[townIdx]->pos;
|
cond.position = controller.map()->objects[townIdx]->pos;
|
||||||
noneOf.expressions.push_back(cond);
|
noneOf.expressions.push_back(cond);
|
||||||
specialDefeat.onFulfill = VLC->generaltexth->allTexts[251];
|
specialDefeat.onFulfill = "core.genrltxt.251";
|
||||||
specialDefeat.trigger = EventExpression(noneOf);
|
specialDefeat.trigger = EventExpression(noneOf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -746,7 +746,7 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
int townIdx = loseTypeWidget->currentData().toInt();
|
int townIdx = loseTypeWidget->currentData().toInt();
|
||||||
cond.position = controller.map()->objects[townIdx]->pos;
|
cond.position = controller.map()->objects[townIdx]->pos;
|
||||||
noneOf.expressions.push_back(cond);
|
noneOf.expressions.push_back(cond);
|
||||||
specialDefeat.onFulfill = VLC->generaltexth->allTexts[253];
|
specialDefeat.onFulfill = "core.genrltxt.253";
|
||||||
specialDefeat.trigger = EventExpression(noneOf);
|
specialDefeat.trigger = EventExpression(noneOf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -755,7 +755,7 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
EventCondition cond(EventCondition::DAYS_PASSED);
|
EventCondition cond(EventCondition::DAYS_PASSED);
|
||||||
assert(loseValueWidget);
|
assert(loseValueWidget);
|
||||||
cond.value = expiredDate(loseValueWidget->text());
|
cond.value = expiredDate(loseValueWidget->text());
|
||||||
specialDefeat.onFulfill = VLC->generaltexth->allTexts[254];
|
specialDefeat.onFulfill = "core.genrltxt.254";
|
||||||
specialDefeat.trigger = EventExpression(cond);
|
specialDefeat.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -764,7 +764,7 @@ void MapSettings::on_pushButton_clicked()
|
|||||||
EventCondition cond(EventCondition::DAYS_WITHOUT_TOWN);
|
EventCondition cond(EventCondition::DAYS_WITHOUT_TOWN);
|
||||||
assert(loseValueWidget);
|
assert(loseValueWidget);
|
||||||
cond.value = loseValueWidget->text().toInt();
|
cond.value = loseValueWidget->text().toInt();
|
||||||
specialDefeat.onFulfill = VLC->generaltexth->allTexts[7];
|
specialDefeat.onFulfill = "core.genrltxt.7";
|
||||||
specialDefeat.trigger = EventExpression(cond);
|
specialDefeat.trigger = EventExpression(cond);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user