Mercurial > mm7
changeset 1693:861ede68187a
Player::_48DCF6 renamed to Player::ReceiveSpecialAttackEffect, some case reordering, fixing getting only disease3 instead of disease1 and ignoring disease2 and 3, uSpecialAttack to uSpecialAttackType, uSpecialAttackType to uSpecialAttackLevel
author | Grumpy7 |
---|---|
date | Sun, 22 Sep 2013 10:04:00 +0200 |
parents | 92732b6fc196 |
children | 5ead2688a227 |
files | Monsters.cpp Monsters.h Player.cpp |
diffstat | 3 files changed, 25 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/Monsters.cpp Sun Sep 22 09:36:38 2013 +0200 +++ b/Monsters.cpp Sun Sep 22 10:04:00 2013 +0200 @@ -893,8 +893,8 @@ { int str_len=0; int str_pos=0; - pInfos[curr_rec_num].uSpecialAttackType=1; - pInfos[curr_rec_num].uSpecialAttack=0; + pInfos[curr_rec_num].uSpecialAttackLevel=1; + pInfos[curr_rec_num].uSpecialAttackType=0; str_len=strlen(test_string); if (str_len>1) { @@ -903,12 +903,12 @@ if (tolower(test_string[str_pos])=='x') { test_string[str_pos]='\0'; - pInfos[curr_rec_num].uSpecialAttackType=atoi(&test_string[str_pos+1]); + pInfos[curr_rec_num].uSpecialAttackLevel=atoi(&test_string[str_pos+1]); test_string[str_pos]='x'; break; } } - pInfos[curr_rec_num].uSpecialAttack=ParseSpecialAttack(test_string); + pInfos[curr_rec_num].uSpecialAttackType=ParseSpecialAttack(test_string); } } break;
--- a/Monsters.h Sun Sep 22 09:36:38 2013 +0200 +++ b/Monsters.h Sun Sep 22 10:04:00 2013 +0200 @@ -114,8 +114,8 @@ unsigned __int8 uAIType; HostilityRadius uHostilityType; char field_12; - unsigned __int8 uSpecialAttack; unsigned __int8 uSpecialAttackType; + unsigned __int8 uSpecialAttackLevel; unsigned __int8 uAttack1Type; unsigned __int8 uAttack1DamageDiceRolls; unsigned __int8 uAttack1DamageDiceSides;
--- a/Player.cpp Sun Sep 22 09:36:38 2013 +0200 +++ b/Player.cpp Sun Sep 22 10:04:00 2013 +0200 @@ -2470,6 +2470,18 @@ return 1; break; case 9: + SetCondition(Condition_Disease1, 1); + pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); + pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); + return 1; + break; + case 10: + SetCondition(Condition_Disease2, 1); + pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); + pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); + return 1; + break; + case 11: SetCondition(Condition_Disease3, 1); pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); @@ -7493,10 +7505,10 @@ } } if ( !(dword_6BE368_debug_settings_2 & 0x10) - && actorPtr->pMonsterInfo.uSpecialAttack - && rand() % 100 < actorPtr->pMonsterInfo.uLevel * actorPtr->pMonsterInfo.uSpecialAttackType ) - { - playerPtr->_48DCF6(actorPtr->pMonsterInfo.uSpecialAttack, actorPtr); + && actorPtr->pMonsterInfo.uSpecialAttackType + && rand() % 100 < actorPtr->pMonsterInfo.uLevel * actorPtr->pMonsterInfo.uSpecialAttackLevel ) + { + playerPtr->_48DCF6(actorPtr->pMonsterInfo.uSpecialAttackType, actorPtr); } } if ( !pParty->bTurnBasedModeOn ) @@ -7684,10 +7696,10 @@ } if ( !element && !(dword_6BE368_debug_settings_2 & 0x10) - && actorPtr->pMonsterInfo.uSpecialAttack - && rand() % 100 < actorPtr->pMonsterInfo.uLevel * actorPtr->pMonsterInfo.uSpecialAttackType ) - { - playerPtr->_48DCF6(actorPtr->pMonsterInfo.uSpecialAttack, actorPtr); + && actorPtr->pMonsterInfo.uSpecialAttackType + && rand() % 100 < actorPtr->pMonsterInfo.uLevel * actorPtr->pMonsterInfo.uSpecialAttackLevel ) + { + playerPtr->_48DCF6(actorPtr->pMonsterInfo.uSpecialAttackType, actorPtr); } if ( !pParty->bTurnBasedModeOn ) {