Mercurial > mm7
comparison Player.cpp @ 1695:33df22a5e376
Player::ReceiveSpecialAttackEffect finishing cleanup, special attack type enum created
author | Grumpy7 |
---|---|
date | Sun, 22 Sep 2013 10:44:42 +0200 |
parents | 5ead2688a227 |
children | ef42788fef1d 7153ee05d088 |
comparison
equal
deleted
inserted
replaced
1694:5ead2688a227 | 1695:33df22a5e376 |
---|---|
2266 PlaySound(SPEECH_24, 0); | 2266 PlaySound(SPEECH_24, 0); |
2267 return recieved_dmg; | 2267 return recieved_dmg; |
2268 } | 2268 } |
2269 | 2269 |
2270 //----- (0048DCF6) -------------------------------------------------------- | 2270 //----- (0048DCF6) -------------------------------------------------------- |
2271 int Player::ReceiveSpecialAttackEffect(int a2, Actor *pActor) //TODO check this with IDA to see what the uninitialized vars are supposed to contain | 2271 int Player::ReceiveSpecialAttackEffect( int attType, struct Actor *pActor ) |
2272 { | 2272 { |
2273 SPECIAL_ATTACK_TYPE attTypeCast = (SPECIAL_ATTACK_TYPE) attType; | |
2273 signed int v3; // edi@1 | 2274 signed int v3; // edi@1 |
2274 signed int v4; // ebx@1 | 2275 signed int v4; // ebx@1 |
2275 int v6; // eax@2 | 2276 int v6; // eax@2 |
2276 int v8; // eax@8 | 2277 int v8; // eax@8 |
2277 int v10; // eax@8 | 2278 int v10; // eax@8 |
2278 int v11; // ebx@8 | 2279 int v11; // ebx@8 |
2279 signed int v12; // edx@9 | |
2280 ItemGen *v13; // eax@9 | 2280 ItemGen *v13; // eax@9 |
2281 int v14; // edx@16 | |
2282 int v16; // edx@26 | |
2283 signed int v19; // edx@38 | |
2284 int v22; // eax@49 | 2281 int v22; // eax@49 |
2285 signed int v23; // ebx@49 | 2282 signed int v23; // ebx@49 |
2286 void *v27; // ecx@76 | 2283 void *v27; // ecx@76 |
2287 enum CHARACTER_ATTRIBUTE_TYPE v40; // [sp-4h] [bp-A4h]@4 | |
2288 char v46[140]; // [sp+Ch] [bp-94h]@13 | 2284 char v46[140]; // [sp+Ch] [bp-94h]@13 |
2289 unsigned int v47; // [sp+98h] [bp-8h]@1 | 2285 unsigned int v47; // [sp+98h] [bp-8h]@1 |
2290 ItemGen* v48; // [sp+9Ch] [bp-4h]@1 | 2286 ItemGen* v48; // [sp+9Ch] [bp-4h]@1 |
2291 | 2287 |
2292 v4 = 0; | 2288 v4 = 0; |
2293 v47 = 0; | 2289 v47 = 0; |
2294 switch ( a2 ) | 2290 switch ( attTypeCast ) |
2295 { | 2291 { |
2296 case 1: | 2292 case SPECIAL_ATTACK_CURSE: |
2297 v6 = GetActualWillpower(); | 2293 v6 = GetActualWillpower(); |
2298 v11 = GetParameterBonus(v6); | 2294 v11 = GetParameterBonus(v6); |
2299 break; | 2295 break; |
2300 case 2: | 2296 case SPECIAL_ATTACK_WEAK: |
2301 case 3: | 2297 case SPECIAL_ATTACK_SLEEP: |
2302 case 4: | 2298 case SPECIAL_ATTACK_DRUNK: |
2303 case 9: | 2299 case SPECIAL_ATTACK_DISEASE1: |
2304 case 10: | 2300 case SPECIAL_ATTACK_DISEASE2: |
2305 case 11: | 2301 case SPECIAL_ATTACK_DISEASE3: |
2306 case 13: | 2302 case SPECIAL_ATTACK_UNCONSCIOUS: |
2307 case 21: | 2303 case SPECIAL_ATTACK_AGING: |
2308 v6 = GetActualEndurance(); | 2304 v6 = GetActualEndurance(); |
2309 v11 = GetParameterBonus(v6); | 2305 v11 = GetParameterBonus(v6); |
2310 break; | 2306 break; |
2311 case 5: | 2307 case SPECIAL_ATTACK_INSANE: |
2312 case 12: | 2308 case SPECIAL_ATTACK_PARALYZED: |
2313 case 23: | 2309 case SPECIAL_ATTACK_FEAR: |
2314 v40 = (CHARACTER_ATTRIBUTE_TYPE)14; | 2310 v11 = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); |
2315 v11 = GetActualResistance(v40); | |
2316 break; | 2311 break; |
2317 case 15: | 2312 case SPECIAL_ATTACK_PETRIFIED: |
2318 v40 = (CHARACTER_ATTRIBUTE_TYPE)13; | 2313 v11 = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); |
2319 v11 = GetActualResistance(v40); | |
2320 break; | 2314 break; |
2321 case 6: | 2315 case SPECIAL_ATTACK_POISON1: |
2322 case 7: | 2316 case SPECIAL_ATTACK_POISON2: |
2323 case 8: | 2317 case SPECIAL_ATTACK_POISON3: |
2324 case 14: | 2318 case SPECIAL_ATTACK_DEAD: |
2325 case 16: | 2319 case SPECIAL_ATTACK_ERADICATED: |
2326 v40 = (CHARACTER_ATTRIBUTE_TYPE)15; | 2320 v11 = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); |
2327 v11 = GetActualResistance(v40); | |
2328 break; | 2321 break; |
2329 case 22: | 2322 case SPECIAL_ATTACK_MANA_DRAIN: |
2330 v8 = GetActualWillpower(); | 2323 v8 = GetActualWillpower(); |
2331 v10 = GetActualIntelligence(); | 2324 v10 = GetActualIntelligence(); |
2332 v11 = (GetParameterBonus(v10) + GetParameterBonus(v8)) / 2; | 2325 v11 = (GetParameterBonus(v10) + GetParameterBonus(v8)) / 2; |
2333 break; | 2326 break; |
2334 case 17: | 2327 case SPECIAL_ATTACK_BREAK_ANY: |
2335 for (int i = 0; i < 138; i++) | 2328 for (int i = 0; i < 138; i++) |
2336 { | 2329 { |
2337 v13 = &this->pInventoryItemList[i]; | 2330 v13 = &this->pInventoryItemList[i]; |
2338 if ( v13->uItemID > 0 && v13->uItemID <= 134 && !v13->IsBroken()) | 2331 if ( v13->uItemID > 0 && v13->uItemID <= 134 && !v13->IsBroken()) |
2339 v46[v4++] = v12; | 2332 v46[v4++] = i; |
2340 } | 2333 } |
2341 if ( !v4 ) | 2334 if ( !v4 ) |
2342 return 0; | 2335 return 0; |
2343 v48 = &this->pInventoryItemList[v46[rand() % v4]]; | 2336 v48 = &this->pInventoryItemList[v46[rand() % v4]]; |
2344 v11 = 3 * (pItemsTable->pItems[v48->uItemID].uMaterial + pItemsTable->pItems[v48->uItemID].uDamageMod); | 2337 v11 = 3 * (pItemsTable->pItems[v48->uItemID].uMaterial + pItemsTable->pItems[v48->uItemID].uDamageMod); |
2345 break; | 2338 break; |
2346 case 18: | 2339 case SPECIAL_ATTACK_BREAK_ARMOR: |
2347 for (int i = 0; i < 16; i++ ) | 2340 for (int i = 0; i < 16; i++ ) |
2348 { | 2341 { |
2349 if ( HasItemEquipped((ITEM_EQUIP_TYPE)v14) ) | 2342 if ( HasItemEquipped((ITEM_EQUIP_TYPE)i) ) |
2350 { | 2343 { |
2351 if ( i == EQUIP_ARMOUR ) | 2344 if ( i == EQUIP_ARMOUR ) |
2352 v46[v4++] = this->pEquipment.uArmor - 1; | 2345 v46[v4++] = this->pEquipment.uArmor - 1; |
2353 if ( (i == EQUIP_OFF_HAND || i == EQUIP_MAIN_HAND) && GetEquippedItemEquipType((ITEM_EQUIP_TYPE)i) == EQUIP_SHIELD ) | 2346 if ( (i == EQUIP_OFF_HAND || i == EQUIP_MAIN_HAND) && GetEquippedItemEquipType((ITEM_EQUIP_TYPE)i) == EQUIP_SHIELD ) |
2354 v46[v4++] = this->pEquipment.pIndices[i] - 1; | 2347 v46[v4++] = this->pEquipment.pIndices[i] - 1; |
2357 if ( !v4 ) | 2350 if ( !v4 ) |
2358 return 0; | 2351 return 0; |
2359 v48 = &this->pInventoryItemList[v46[rand() % v4]]; | 2352 v48 = &this->pInventoryItemList[v46[rand() % v4]]; |
2360 v11 = 3 * (pItemsTable->pItems[v48->uItemID].uMaterial + pItemsTable->pItems[v48->uItemID].uDamageMod); | 2353 v11 = 3 * (pItemsTable->pItems[v48->uItemID].uMaterial + pItemsTable->pItems[v48->uItemID].uDamageMod); |
2361 break; | 2354 break; |
2362 case 19: | 2355 case SPECIAL_ATTACK_BREAK_WEAPON: |
2363 for (int i = 0; i < 16; i++ ) | 2356 for (int i = 0; i < 16; i++ ) |
2364 { | 2357 { |
2365 if ( HasItemEquipped((ITEM_EQUIP_TYPE)v16) ) | 2358 if ( HasItemEquipped((ITEM_EQUIP_TYPE)i) ) |
2366 { | 2359 { |
2367 if ( v16 == EQUIP_BOW ) | 2360 if ( i == EQUIP_BOW ) |
2368 v46[v4++] = LOBYTE(this->pEquipment.uBow) - 1; | 2361 v46[v4++] = LOBYTE(this->pEquipment.uBow) - 1; |
2369 if ( (v16 == EQUIP_OFF_HAND || v16 == EQUIP_MAIN_HAND) | 2362 if ( (i == EQUIP_OFF_HAND || i == EQUIP_MAIN_HAND) |
2370 && (GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v16) == EQUIP_OFF_HAND || GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v16) == EQUIP_MAIN_HAND) ) | 2363 && (GetEquippedItemEquipType((ITEM_EQUIP_TYPE)i) == EQUIP_OFF_HAND || GetEquippedItemEquipType((ITEM_EQUIP_TYPE)i) == EQUIP_MAIN_HAND) ) |
2371 v46[v4++] = this->pEquipment.pIndices[v16] - 1; | 2364 v46[v4++] = this->pEquipment.pIndices[i] - 1; |
2372 } | 2365 } |
2373 } | 2366 } |
2374 if ( !v4 ) | 2367 if ( !v4 ) |
2375 return 0; | 2368 return 0; |
2376 v48 = &this->pInventoryItemList[v46[rand() % v4]]; | 2369 v48 = &this->pInventoryItemList[v46[rand() % v4]]; |
2377 v11 = 3 * (pItemsTable->pItems[v48->uItemID].uMaterial + pItemsTable->pItems[v48->uItemID].uDamageMod); | 2370 v11 = 3 * (pItemsTable->pItems[v48->uItemID].uMaterial + pItemsTable->pItems[v48->uItemID].uDamageMod); |
2378 break; | 2371 break; |
2379 case 20: | 2372 case SPECIAL_ATTACK_STEAL: |
2380 for ( int i = 0; i < 126; i++ ) | 2373 for ( int i = 0; i < 126; i++ ) |
2381 { | 2374 { |
2382 int ItemPosInList = this->pInventoryMatrix[i]; | 2375 int ItemPosInList = this->pInventoryMatrix[i]; |
2383 if (ItemPosInList > 0) | 2376 if (ItemPosInList > 0) |
2384 { | 2377 { |
2385 ItemGen* v21 = &this->pInventoryItemList[ItemPosInList - 1]; | 2378 ItemGen* v21 = &this->pInventoryItemList[ItemPosInList - 1]; |
2386 if ( v21->uItemID > 0 && v21->uItemID <= 134 ) | 2379 if ( v21->uItemID > 0 && v21->uItemID <= 134 ) |
2387 { | 2380 { |
2388 v46[v4++] = v19; | 2381 v46[v4++] = i; |
2389 } | 2382 } |
2390 } | 2383 } |
2391 } | 2384 } |
2392 if ( !v4 ) | 2385 if ( !v4 ) |
2393 return 0; | 2386 return 0; |
2411 { | 2404 { |
2412 if ( this == pPlayers[v3 + 1] ) | 2405 if ( this == pPlayers[v3 + 1] ) |
2413 break; | 2406 break; |
2414 } | 2407 } |
2415 | 2408 |
2416 switch ( a2 ) | 2409 switch ( attTypeCast ) |
2417 { | 2410 { |
2418 case 1: | 2411 case SPECIAL_ATTACK_CURSE: |
2419 SetCondition(Condition_Cursed, 1); | 2412 SetCondition(Condition_Cursed, 1); |
2420 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); | 2413 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); |
2421 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2414 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2422 return 1; | 2415 return 1; |
2423 break; | 2416 break; |
2424 case 2: | 2417 case SPECIAL_ATTACK_WEAK: |
2425 SetCondition(Condition_Weak, 1); | 2418 SetCondition(Condition_Weak, 1); |
2426 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); | 2419 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); |
2427 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2420 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2428 return 1; | 2421 return 1; |
2429 break; | 2422 break; |
2430 case 3: | 2423 case SPECIAL_ATTACK_SLEEP: |
2431 SetCondition(Condition_Sleep, 1); | 2424 SetCondition(Condition_Sleep, 1); |
2432 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); | 2425 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); |
2433 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2426 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2434 return 1; | 2427 return 1; |
2435 break; | 2428 break; |
2436 case 23: | 2429 case SPECIAL_ATTACK_DRUNK: |
2437 SetCondition(Condition_Fear, 1); | |
2438 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); | |
2439 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | |
2440 return 1; | |
2441 break; | |
2442 case 4: | |
2443 SetCondition(Condition_Drunk, 1); | 2430 SetCondition(Condition_Drunk, 1); |
2444 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); | 2431 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); |
2445 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2432 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2446 return 1; | 2433 return 1; |
2447 break; | 2434 break; |
2448 case 5: | 2435 case SPECIAL_ATTACK_INSANE: |
2449 SetCondition(Condition_Insane, 1); | 2436 SetCondition(Condition_Insane, 1); |
2450 pAudioPlayer->PlaySound((SoundID)224, 0, 0, -1, 0, 0, 0, 0); | 2437 pAudioPlayer->PlaySound((SoundID)224, 0, 0, -1, 0, 0, 0, 0); |
2451 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2438 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2452 return 1; | 2439 return 1; |
2453 break; | 2440 break; |
2454 case 6: | 2441 case SPECIAL_ATTACK_POISON1: |
2455 SetCondition(Condition_Poison1, 1); | 2442 SetCondition(Condition_Poison1, 1); |
2456 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); | 2443 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); |
2457 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2444 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2458 return 1; | 2445 return 1; |
2459 break; | 2446 break; |
2460 case 7: | 2447 case SPECIAL_ATTACK_POISON2: |
2461 SetCondition(Condition_Poison2, 1); | 2448 SetCondition(Condition_Poison2, 1); |
2462 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); | 2449 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); |
2463 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2450 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2464 return 1; | 2451 return 1; |
2465 break; | 2452 break; |
2466 case 8: | 2453 case SPECIAL_ATTACK_POISON3: |
2467 SetCondition(Condition_Poison3, 1); | 2454 SetCondition(Condition_Poison3, 1); |
2468 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); | 2455 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); |
2469 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2456 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2470 return 1; | 2457 return 1; |
2471 break; | 2458 break; |
2472 case 9: | 2459 case SPECIAL_ATTACK_DISEASE1: |
2473 SetCondition(Condition_Disease1, 1); | 2460 SetCondition(Condition_Disease1, 1); |
2474 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); | 2461 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); |
2475 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2462 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2476 return 1; | 2463 return 1; |
2477 break; | 2464 break; |
2478 case 10: | 2465 case SPECIAL_ATTACK_DISEASE2: |
2479 SetCondition(Condition_Disease2, 1); | 2466 SetCondition(Condition_Disease2, 1); |
2480 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); | 2467 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); |
2481 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2468 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2482 return 1; | 2469 return 1; |
2483 break; | 2470 break; |
2484 case 11: | 2471 case SPECIAL_ATTACK_DISEASE3: |
2485 SetCondition(Condition_Disease3, 1); | 2472 SetCondition(Condition_Disease3, 1); |
2486 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); | 2473 pAudioPlayer->PlaySound((SoundID)222, 0, 0, -1, 0, 0, 0, 0); |
2487 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2474 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2488 return 1; | 2475 return 1; |
2489 break; | 2476 break; |
2490 case 12: | 2477 case SPECIAL_ATTACK_PARALYZED: |
2491 SetCondition(Condition_Paralyzed, 1); | 2478 SetCondition(Condition_Paralyzed, 1); |
2492 pAudioPlayer->PlaySound((SoundID)224, 0, 0, -1, 0, 0, 0, 0); | 2479 pAudioPlayer->PlaySound((SoundID)224, 0, 0, -1, 0, 0, 0, 0); |
2493 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2480 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2494 return 1; | 2481 return 1; |
2495 break; | 2482 break; |
2496 case 15: | 2483 case SPECIAL_ATTACK_UNCONSCIOUS: |
2484 SetCondition(Condition_Unconcious, 1); | |
2485 pAudioPlayer->PlaySound((SoundID)224, 0, 0, -1, 0, 0, 0, 0); | |
2486 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | |
2487 return 1; | |
2488 break; | |
2489 case SPECIAL_ATTACK_DEAD: | |
2490 SetCondition(Condition_Dead, 1); | |
2491 pAudioPlayer->PlaySound((SoundID)225, 0, 0, -1, 0, 0, 0, 0); | |
2492 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | |
2493 return 1; | |
2494 break; | |
2495 case SPECIAL_ATTACK_PETRIFIED: | |
2497 SetCondition(Condition_Pertified, 1); | 2496 SetCondition(Condition_Pertified, 1); |
2498 pAudioPlayer->PlaySound((SoundID)225, 0, 0, -1, 0, 0, 0, 0); | 2497 pAudioPlayer->PlaySound((SoundID)225, 0, 0, -1, 0, 0, 0, 0); |
2499 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2498 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2500 return 1; | 2499 return 1; |
2501 break; | 2500 break; |
2502 case 13: | 2501 case SPECIAL_ATTACK_ERADICATED: |
2503 SetCondition(Condition_Unconcious, 1); | |
2504 pAudioPlayer->PlaySound((SoundID)224, 0, 0, -1, 0, 0, 0, 0); | |
2505 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | |
2506 return 1; | |
2507 break; | |
2508 case 14: | |
2509 SetCondition(Condition_Dead, 1); | |
2510 pAudioPlayer->PlaySound((SoundID)225, 0, 0, -1, 0, 0, 0, 0); | |
2511 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | |
2512 return 1; | |
2513 break; | |
2514 case 16: | |
2515 SetCondition(Condition_Eradicated, 1); | 2502 SetCondition(Condition_Eradicated, 1); |
2516 pAudioPlayer->PlaySound((SoundID)225, 0, 0, -1, 0, 0, 0, 0); | 2503 pAudioPlayer->PlaySound((SoundID)225, 0, 0, -1, 0, 0, 0, 0); |
2517 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2504 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2518 return 1; | 2505 return 1; |
2519 break; | 2506 break; |
2520 case 17: | 2507 case SPECIAL_ATTACK_BREAK_ANY: |
2521 case 18: | 2508 case SPECIAL_ATTACK_BREAK_ARMOR: |
2522 case 19: | 2509 case SPECIAL_ATTACK_BREAK_WEAPON: |
2523 if ( v48->uAttributes & ITEM_ENCHANTED ) | 2510 if ( !(v48->uAttributes & ITEM_ENCHANTED) ) |
2524 { | 2511 { |
2525 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2512 PlaySound(SPEECH_40, 0); |
2526 return 1; | 2513 v48->SetBroken(); |
2514 pAudioPlayer->PlaySound((SoundID)47, 0, 0, -1, 0, 0, 0, 0); | |
2527 } | 2515 } |
2528 PlaySound(SPEECH_40, 0); | |
2529 v48->SetBroken(); | |
2530 pAudioPlayer->PlaySound((SoundID)47, 0, 0, -1, 0, 0, 0, 0); | |
2531 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2516 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2532 return 1; | 2517 return 1; |
2533 break; | 2518 break; |
2534 case 20: | 2519 case SPECIAL_ATTACK_STEAL: |
2535 PlaySound(SPEECH_40, 0); | 2520 PlaySound(SPEECH_40, 0); |
2536 v27 = pActor->array_000234; | 2521 v27 = pActor->array_000234; |
2537 if ( pActor->array_000234[0].uItemID ) | 2522 if ( pActor->array_000234[0].uItemID ) |
2538 { | 2523 { |
2539 v27 = &pActor->array_000234[1]; | 2524 v27 = &pActor->array_000234[1]; |
2547 RemoveItemAtInventoryIndex(v47); | 2532 RemoveItemAtInventoryIndex(v47); |
2548 pAudioPlayer->PlaySound((SoundID)47, 0, 0, -1, 0, 0, 0, 0); | 2533 pAudioPlayer->PlaySound((SoundID)47, 0, 0, -1, 0, 0, 0, 0); |
2549 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2534 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2550 return 1; | 2535 return 1; |
2551 break; | 2536 break; |
2552 case 21: | 2537 case SPECIAL_ATTACK_AGING: |
2553 PlaySound(SPEECH_42, 0); | 2538 PlaySound(SPEECH_42, 0); |
2554 ++this->sAgeModifier; | 2539 ++this->sAgeModifier; |
2555 pAudioPlayer->PlaySound((SoundID)226, 0, 0, -1, 0, 0, 0, 0); | 2540 pAudioPlayer->PlaySound((SoundID)226, 0, 0, -1, 0, 0, 0, 0); |
2556 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2541 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2557 return 1; | 2542 return 1; |
2558 break; | 2543 break; |
2559 case 22: | 2544 case SPECIAL_ATTACK_MANA_DRAIN: |
2560 PlaySound(SPEECH_41, 0); | 2545 PlaySound(SPEECH_41, 0); |
2561 this->sMana = 0; | 2546 this->sMana = 0; |
2562 pAudioPlayer->PlaySound((SoundID)226, 0, 0, -1, 0, 0, 0, 0); | 2547 pAudioPlayer->PlaySound((SoundID)226, 0, 0, -1, 0, 0, 0, 0); |
2548 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | |
2549 return 1; | |
2550 break; | |
2551 case SPECIAL_ATTACK_FEAR: | |
2552 SetCondition(Condition_Fear, 1); | |
2553 pAudioPlayer->PlaySound((SoundID)221, 0, 0, -1, 0, 0, 0, 0); | |
2563 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); | 2554 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); |
2564 return 1; | 2555 return 1; |
2565 break; | 2556 break; |
2566 default: | 2557 default: |
2567 return 0; | 2558 return 0; |