mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
EFH: Some renaming
This commit is contained in:
parent
90ceabd3fc
commit
6c027c0373
@ -272,23 +272,23 @@ void EfhEngine::handleFight_lastAction_A(int16 teamCharId) {
|
|||||||
int16 damagePointsAbsorbed = 0;
|
int16 damagePointsAbsorbed = 0;
|
||||||
int16 attackSpeed = _items[teamCharItemId]._attacks * _npcBuf[_teamCharId[teamCharId]]._speed;
|
int16 attackSpeed = _items[teamCharItemId]._attacks * _npcBuf[_teamCharId[teamCharId]]._speed;
|
||||||
|
|
||||||
// Action A - Loop var84 - Start
|
// Action A - Loop attackCounter - Start
|
||||||
for (int var84 = 0; var84 < attackSpeed; ++var84) {
|
for (int attackCounter = 0; attackCounter < attackSpeed; ++attackCounter) {
|
||||||
if (getRandom(100) < charScore) {
|
if (getRandom(100) < charScore) {
|
||||||
++hitCount;
|
++hitCount;
|
||||||
if (!hasAdequateDefense(_teamMonsterIdArray[groupId], _items[teamCharItemId]._attackType)) {
|
if (!hasAdequateDefense(_teamMonsterIdArray[groupId], _items[teamCharItemId]._attackType)) {
|
||||||
int16 var7C = getRandom(_items[teamCharItemId]._damage);
|
int16 randomDamage = getRandom(_items[teamCharItemId]._damage);
|
||||||
int16 varInt = var7C - randomDamageAbsorbed;
|
int16 residualDamage = randomDamage - randomDamageAbsorbed;
|
||||||
if (varInt > 0) {
|
if (residualDamage > 0) {
|
||||||
originalDamage += varInt;
|
originalDamage += residualDamage;
|
||||||
damagePointsAbsorbed += randomDamageAbsorbed;
|
damagePointsAbsorbed += randomDamageAbsorbed;
|
||||||
} else {
|
} else {
|
||||||
damagePointsAbsorbed += var7C;
|
damagePointsAbsorbed += randomDamage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Action A - Loop var84 - End
|
// Action A - Loop attackCounter - End
|
||||||
|
|
||||||
if (originalDamage < 0)
|
if (originalDamage < 0)
|
||||||
originalDamage = 0;
|
originalDamage = 0;
|
||||||
@ -513,7 +513,7 @@ void EfhEngine::handleFight_MobstersAttack(int groupId) {
|
|||||||
if (minTeamMemberId == -1)
|
if (minTeamMemberId == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// handleFight - Loop on var7E - Start
|
// handleFight - Loop on targetId - Start
|
||||||
for (int16 targetId = minTeamMemberId; targetId < maxTeamMemberId; ++targetId) {
|
for (int16 targetId = minTeamMemberId; targetId < maxTeamMemberId; ++targetId) {
|
||||||
if (_teamCharId[targetId] == -1 || !isTeamMemberStatusNormal(targetId))
|
if (_teamCharId[targetId] == -1 || !isTeamMemberStatusNormal(targetId))
|
||||||
continue;
|
continue;
|
||||||
@ -667,7 +667,7 @@ void EfhEngine::handleFight_MobstersAttack(int groupId) {
|
|||||||
genericGenerateSound(_items[monsterWeaponItemId]._attackType, hitCount);
|
genericGenerateSound(_items[monsterWeaponItemId]._attackType, hitCount);
|
||||||
displayBoxWithText(_messageToBePrinted, 1, 2, true);
|
displayBoxWithText(_messageToBePrinted, 1, 2, true);
|
||||||
}
|
}
|
||||||
// handleFight - Loop on var7E - End
|
// handleFight - Loop on targetId - End
|
||||||
} else if (_mapMonsters[_techId][_teamMonsterIdArray[groupId]]._hitPoints[ctrMobsterId] > 0 && _teamMonsterEffects[groupId]._effect[ctrMobsterId] > 0) {
|
} else if (_mapMonsters[_techId][_teamMonsterIdArray[groupId]]._hitPoints[ctrMobsterId] > 0 && _teamMonsterEffects[groupId]._effect[ctrMobsterId] > 0) {
|
||||||
--_teamMonsterEffects[groupId]._duration[ctrMobsterId];
|
--_teamMonsterEffects[groupId]._duration[ctrMobsterId];
|
||||||
if (_teamMonsterEffects[groupId]._duration[ctrMobsterId] <= 0) {
|
if (_teamMonsterEffects[groupId]._duration[ctrMobsterId] <= 0) {
|
||||||
@ -1598,8 +1598,8 @@ void EfhEngine::addNewOpponents(int16 monsterId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (teamMonsterId != -1) {
|
if (teamMonsterId != -1) {
|
||||||
// addNewOpponents - loop var2 - Start
|
// addNewOpponents - loop distCtr - Start
|
||||||
for (int var2 = 1; var2 < 3; ++var2) {
|
for (int distCtr = 1; distCtr < 3; ++distCtr) {
|
||||||
if (teamMonsterId >= 5)
|
if (teamMonsterId >= 5)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1620,7 +1620,7 @@ void EfhEngine::addNewOpponents(int16 monsterId) {
|
|||||||
if (!monsterActiveFound)
|
if (!monsterActiveFound)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (computeMonsterGroupDistance(ctrMapMonsterId) > var2)
|
if (computeMonsterGroupDistance(ctrMapMonsterId) > distCtr)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (isMonsterAlreadyFighting(ctrMapMonsterId, teamMonsterId))
|
if (isMonsterAlreadyFighting(ctrMapMonsterId, teamMonsterId))
|
||||||
@ -1641,7 +1641,7 @@ void EfhEngine::addNewOpponents(int16 monsterId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// addNewOpponents - loop var2 - End
|
// addNewOpponents - loop distCtr - End
|
||||||
}
|
}
|
||||||
|
|
||||||
if (teamMonsterId == -1 || teamMonsterId > 4)
|
if (teamMonsterId == -1 || teamMonsterId > 4)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user