Mercurial > mm7
comparison mm7_5.cpp @ 861:fea81e031484
more AI function renames
author | zipi |
---|---|
date | Sun, 31 Mar 2013 12:49:45 +0100 |
parents | 8fc2f035abc0 |
children | f4394e320312 |
comparison
equal
deleted
inserted
replaced
860:8fc2f035abc0 | 861:fea81e031484 |
---|---|
5044 player->PlaySound(SPEECH_52, 0); | 5044 player->PlaySound(SPEECH_52, 0); |
5045 return; | 5045 return; |
5046 } | 5046 } |
5047 if ( pMonster->sCurrentHP > 0 ) | 5047 if ( pMonster->sCurrentHP > 0 ) |
5048 { | 5048 { |
5049 Actor::_4030AD(uActorID_Monster_, a1, 0); | 5049 Actor::Stun(uActorID_Monster_, a1, 0); |
5050 Actor::AggroSurroundingPeasants(uActorID_Monster_, 1); | 5050 Actor::AggroSurroundingPeasants(uActorID_Monster_, 1); |
5051 if ( bShowDamage ) | 5051 if ( bShowDamage ) |
5052 { | 5052 { |
5053 v50 = uDamageAmount; | 5053 v50 = uDamageAmount; |
5054 pMonsterName = (char *)pMonster; | 5054 pMonsterName = (char *)pMonster; |
5379 v7->sCurrentHP -= v26; | 5379 v7->sCurrentHP -= v26; |
5380 if ( v26 ) | 5380 if ( v26 ) |
5381 { | 5381 { |
5382 if ( v7->sCurrentHP >= 1 ) | 5382 if ( v7->sCurrentHP >= 1 ) |
5383 { | 5383 { |
5384 Actor::_4030AD(uActorID, PID(a4,OBJECT_Player), 0); | 5384 Actor::Stun(uActorID, PID(a4,OBJECT_Player), 0); |
5385 Actor::AggroSurroundingPeasants(uActorID, 1); | 5385 Actor::AggroSurroundingPeasants(uActorID, 1); |
5386 } | 5386 } |
5387 else | 5387 else |
5388 { | 5388 { |
5389 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 ) | 5389 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 ) |
5565 v44->sCurrentHP -= v56; | 5565 v44->sCurrentHP -= v56; |
5566 if ( v56 ) | 5566 if ( v56 ) |
5567 { | 5567 { |
5568 if ( v44->sCurrentHP >= 1 ) | 5568 if ( v44->sCurrentHP >= 1 ) |
5569 { | 5569 { |
5570 Actor::_4030AD(uActorID, PID(a4,OBJECT_Player), 0); | 5570 Actor::Stun(uActorID, PID(a4,OBJECT_Player), 0); |
5571 Actor::AggroSurroundingPeasants(uActorID, 1); | 5571 Actor::AggroSurroundingPeasants(uActorID, 1); |
5572 } | 5572 } |
5573 else | 5573 else |
5574 { | 5574 { |
5575 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 ) | 5575 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 ) |
5857 v7 = stru_50C198.CalcMagicalDamageToActor(pActor, 0, v6); | 5857 v7 = stru_50C198.CalcMagicalDamageToActor(pActor, 0, v6); |
5858 pActor->sCurrentHP -= v7; | 5858 pActor->sCurrentHP -= v7; |
5859 if ( v7 ) | 5859 if ( v7 ) |
5860 { | 5860 { |
5861 if ( pActor->sCurrentHP > 0 ) | 5861 if ( pActor->sCurrentHP > 0 ) |
5862 Actor::_4030AD(uActorIDa, a2, 0); | 5862 Actor::Stun(uActorIDa, a2, 0); |
5863 else | 5863 else |
5864 Actor::Die(uActorIDa); | 5864 Actor::Die(uActorIDa); |
5865 a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP; | 5865 a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP; |
5866 if ( 20 * v7 / (signed int)pActor->pMonsterInfo.uHP > 10 ) | 5866 if ( 20 * v7 / (signed int)pActor->pMonsterInfo.uHP > 10 ) |
5867 a2a = 10; | 5867 a2a = 10; |
5876 } | 5876 } |
5877 Actor::AddBloodsplatOnDamageOverlay(uActorIDa, 1, v7); | 5877 Actor::AddBloodsplatOnDamageOverlay(uActorIDa, 1, v7); |
5878 } | 5878 } |
5879 else | 5879 else |
5880 { | 5880 { |
5881 Actor::_4030AD(uActorIDa, a2, 0); | 5881 Actor::Stun(uActorIDa, a2, 0); |
5882 } | 5882 } |
5883 } | 5883 } |
5884 } | 5884 } |
5885 } | 5885 } |
5886 } | 5886 } |
5965 v14 = stru_50C198.CalcMagicalDamageToActor(v7, v12, v10); | 5965 v14 = stru_50C198.CalcMagicalDamageToActor(v7, v12, v10); |
5966 v7->sCurrentHP -= v14; | 5966 v7->sCurrentHP -= v14; |
5967 if ( v14 ) | 5967 if ( v14 ) |
5968 { | 5968 { |
5969 if ( v7->sCurrentHP > 0 ) | 5969 if ( v7->sCurrentHP > 0 ) |
5970 Actor::_4030AD(uActorID, v17, 0); | 5970 Actor::Stun(uActorID, v17, 0); |
5971 else | 5971 else |
5972 Actor::Die(uActorID); | 5972 Actor::Die(uActorID); |
5973 Actor::AggroSurroundingPeasants(uActorID, 0); | 5973 Actor::AggroSurroundingPeasants(uActorID, 0); |
5974 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP; | 5974 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP; |
5975 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 ) | 5975 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 ) |
5985 } | 5985 } |
5986 Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14); | 5986 Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14); |
5987 } | 5987 } |
5988 else | 5988 else |
5989 { | 5989 { |
5990 Actor::_4030AD(uActorID, v17, 0); | 5990 Actor::Stun(uActorID, v17, 0); |
5991 } | 5991 } |
5992 return; | 5992 return; |
5993 } | 5993 } |
5994 v13 = v7->pMonsterInfo.uSpell2ID; | 5994 v13 = v7->pMonsterInfo.uSpell2ID; |
5995 } | 5995 } |
7468 v14 = stru_50C198.special_ability_use_check(v5, a2a); | 7468 v14 = stru_50C198.special_ability_use_check(v5, a2a); |
7469 if ( v14 == 1 ) | 7469 if ( v14 == 1 ) |
7470 { | 7470 { |
7471 if ( v5->pMonsterInfo.uMissleAttack2Type ) | 7471 if ( v5->pMonsterInfo.uMissleAttack2Type ) |
7472 { | 7472 { |
7473 Actor::_40368B(v13, v22, &v18); | 7473 Actor::MissileAttack2(v13, v22, &v18); |
7474 goto LABEL_43; | 7474 goto LABEL_43; |
7475 } | 7475 } |
7476 } | 7476 } |
7477 else | 7477 else |
7478 { | 7478 { |
7483 else | 7483 else |
7484 v15 = v5->pMonsterInfo.uSpell2ID; | 7484 v15 = v5->pMonsterInfo.uSpell2ID; |
7485 if ( v15 ) | 7485 if ( v15 ) |
7486 { | 7486 { |
7487 if ( v14 == 2 ) | 7487 if ( v14 == 2 ) |
7488 Actor::_403854(v13, v22, &v18); | 7488 Actor::SpellAttack1(v13, v22, &v18); |
7489 else | 7489 else |
7490 Actor::_403A60(v13, v22, &v18); | 7490 Actor::SpellAttack2(v13, v22, &v18); |
7491 goto LABEL_43; | 7491 goto LABEL_43; |
7492 } | 7492 } |
7493 goto LABEL_44; | 7493 goto LABEL_44; |
7494 } | 7494 } |
7495 if ( v5->pMonsterInfo.uMissleAttack1Type ) | 7495 if ( v5->pMonsterInfo.uMissleAttack1Type ) |
7496 { | 7496 { |
7497 Actor::_403476(v13, v22, &v18); | 7497 Actor::MissileAttack1(v13, v22, &v18); |
7498 LABEL_43: | 7498 LABEL_43: |
7499 //v3 = v21; | 7499 //v3 = v21; |
7500 v21->field_C = 1; | 7500 v21->field_C = 1; |
7501 LABEL_48: | 7501 LABEL_48: |
7502 v21->uActionLength = v5->uCurrentActionLength; | 7502 v21->uActionLength = v5->uCurrentActionLength; |
7505 } | 7505 } |
7506 } | 7506 } |
7507 LABEL_44: | 7507 LABEL_44: |
7508 if ( (double)(signed int)v20 < 307.2 ) | 7508 if ( (double)(signed int)v20 < 307.2 ) |
7509 { | 7509 { |
7510 Actor::_403C6C(v13, v22, &v18); | 7510 Actor::MeleeAttack(v13, v22, &v18); |
7511 //v3 = v21; | 7511 //v3 = v21; |
7512 v21->field_C = 3; | 7512 v21->field_C = 3; |
7513 goto LABEL_48; | 7513 goto LABEL_48; |
7514 } | 7514 } |
7515 LABEL_47: | 7515 LABEL_47: |