mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
MM: MM1: Strip off trailing spaces on monster names
This commit is contained in:
@@ -365,6 +365,7 @@ dialogs:
|
||||
party_plus: "PARTY +"
|
||||
monster_plus: "MONSTER +"
|
||||
and_goes_down: "AND GOES DOWN!!!"
|
||||
goes_down: "GOES DOWN!!!"
|
||||
dies: "DIES!"
|
||||
defeating1: "! FOR DEFEATING THE MONSTERS !"
|
||||
defeating2: "! EACH SURVIVOR RECEIVES !"
|
||||
|
||||
@@ -38,8 +38,10 @@ bool Monsters::load() {
|
||||
assert(line.size() > 20 && line[0] == '"' && line[16] == '"');
|
||||
|
||||
mon._name = Common::String(line.c_str() + 1, line.c_str() + 15);
|
||||
line = Common::String(line.c_str() + 17);
|
||||
while (mon._name.hasSuffix(" "))
|
||||
mon._name.deleteLastChar();
|
||||
|
||||
line = Common::String(line.c_str() + 17);
|
||||
mon._count = getNextValue(line);
|
||||
mon._fleeThreshold = getNextValue(line);
|
||||
mon._defaultHP = getNextValue(line);
|
||||
|
||||
@@ -889,7 +889,7 @@ void Combat::updateMonsterStatus() {
|
||||
if (val <= 0) {
|
||||
enc._monsterList[_monsterIndex]._hp = 0;
|
||||
enc._monsterList[_monsterIndex]._status = MONFLAG_DEAD;
|
||||
warning("TODO: message that monster goes down");
|
||||
|
||||
} else {
|
||||
enc._monsterList[_monsterIndex]._hp = val;
|
||||
enc._monsterList[_monsterIndex]._status &= ~(MONFLAG_ASLEEP | MONFLAG_HELD);
|
||||
|
||||
@@ -768,6 +768,12 @@ void Combat::writeCharAttackDamage() {
|
||||
_isShooting = false;
|
||||
|
||||
writeString(0, 21, getAttackString());
|
||||
|
||||
if (_monsterP->_status == MONFLAG_DEAD) {
|
||||
writeString(0, 22, Common::String::format("%s %s",
|
||||
_monsterP->_name.c_str(),
|
||||
STRING["dialogs.combat.goes_down"].c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
void Combat::writeCharAttackNoEffect() {
|
||||
|
||||
Reference in New Issue
Block a user