Changeset 753
- Timestamp:
- 03/07/08 18:55:45 (5 months ago)
- Files:
-
- trunk/src/obj-info.c (modified) (4 diffs)
- trunk/src/xtra1.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/obj-info.c
r723 r753 341 341 { 342 342 int blows = calc_blows(o_ptr); 343 344 dam = (o_ptr->ds * o_ptr->dd * 5); 343 int extra_blows = 0; 344 345 if (f1 & (TR1_BLOWS)) extra_blows += o_ptr->pval; 346 blows += extra_blows; 347 348 dam = ((o_ptr->ds + 1) * o_ptr->dd * 5); 345 349 346 350 xtra_dam = (p_ptr->to_d * 10); … … 367 371 368 372 /* Calculate damage */ 369 dam = ( o_ptr->ds* o_ptr->dd * 5);373 dam = ((o_ptr->ds + 1) * o_ptr->dd * 5); 370 374 if (object_known_p(o_ptr)) xtra_dam += (o_ptr->to_d * 10); 371 375 if (object_known_p(j_ptr)) xtra_dam += (j_ptr->to_d * 10); … … 434 438 435 439 /* Work out radius */ 436 if (artifact )rad = 3;440 if (artifact && is_lite) rad = 3; 437 441 else if (is_lite) rad = 2; 438 442 if (f3 & TR3_LITE) rad++; … … 442 446 text_out_c(TERM_L_GREEN, format("%d", rad)); 443 447 if (no_fuel && !artifact) 444 text_out(" light. No fuel required .");448 text_out(" light. No fuel required"); 445 449 else if (is_lite && o_ptr->sval == SV_LITE_TORCH) 446 450 text_out(" light, reduced when running of out fuel"); 451 else 452 text_out (" light"); 447 453 text_out("."); 448 454 trunk/src/xtra1.c
r698 r753 564 564 { 565 565 int blows; 566 int str_index , dex_index;566 int str_index1, str_index2, dex_index1, dex_index2; 567 567 int div; 568 569 object_type *j_ptr = &inventory[INVEN_WIELD]; 568 570 569 571 /* Enforce a minimum "weight" (tenth pounds) */ 570 572 div = ((o_ptr->weight < cp_ptr->min_weight) ? cp_ptr->min_weight : o_ptr->weight); 571 573 574 /* If we're wielding this weapon, use the current stats */ 575 if (o_ptr == j_ptr) 576 { 577 str_index1 = p_ptr->stat_ind[A_STR]; 578 dex_index1 = p_ptr->stat_ind[A_DEX]; 579 } 580 else 581 { 582 /* Recalculate bonuses as if we were wielding this weapon */ 583 584 int str_change = 0, dex_change = 0; 585 int new_str = p_ptr->stat_use[A_STR]; 586 int new_dex = p_ptr->stat_use[A_DEX]; 587 588 /* object_type *j_ptr = &inventory[INVEN_WIELD]; */ 589 590 u32b jf1, jf2, jf3; 591 u32b of1, of2, of3; 592 593 /* Examine the wielded weapon */ 594 object_flags(j_ptr, &jf1, &jf2, &jf3); 595 if (jf1 & (TR1_STR)) str_change -= j_ptr->pval; 596 if (jf1 & (TR1_DEX)) dex_change -= j_ptr->pval; 597 598 /* Examine the weapon in the pack*/ 599 object_flags(o_ptr, &of1, &of2, &of3); 600 if (of1 & (TR1_STR)) str_change += o_ptr->pval; 601 if (of1 & (TR1_DEX)) dex_change += o_ptr->pval; 602 603 new_str = modify_stat_value(new_str, str_change); 604 new_dex = modify_stat_value(new_dex, dex_change); 605 606 if (new_str <= 18) 607 str_index1 = new_str - 3; 608 else if (new_str <= 18+219) 609 str_index1 = (15 + (new_str - 18) / 10); 610 else 611 str_index1 = 37; 612 613 if (new_dex <= 18) 614 dex_index1 = new_dex - 3; 615 else if (new_dex <= 18+219) 616 dex_index1 = (15 + (new_dex - 18) / 10); 617 else 618 dex_index1 = 37; 619 } 620 621 572 622 /* Get the strength vs weight */ 573 str_index = (adj_str_blow[p_ptr->stat_ind[A_STR]] * cp_ptr->att_multiply / div);623 str_index2 = (adj_str_blow[str_index1] * cp_ptr->att_multiply / div); 574 624 575 625 /* Maximal value */ 576 if (str_index > 11) str_index= 11;626 if (str_index2 > 11) str_index2 = 11; 577 627 578 628 /* Index by dexterity */ 579 dex_index = MIN(adj_dex_blow[p_ptr->stat_ind[A_DEX]], 11);629 dex_index2 = MIN(adj_dex_blow[dex_index1], 11); 580 630 581 631 /* Use the blows table */ 582 blows = MIN(blows_table[str_index ][dex_index], cp_ptr->max_attacks);632 blows = MIN(blows_table[str_index2][dex_index2], cp_ptr->max_attacks); 583 633 584 634 /* Require at least one blow */
