| | 1461 | /* |
|---|
| | 1462 | * Create lots of items. |
|---|
| | 1463 | */ |
|---|
| | 1464 | static void wiz_test_kind(int tval) |
|---|
| | 1465 | { |
|---|
| | 1466 | int py = p_ptr->py; |
|---|
| | 1467 | int px = p_ptr->px; |
|---|
| | 1468 | int sval; |
|---|
| | 1469 | |
|---|
| | 1470 | object_type object_type_body; |
|---|
| | 1471 | object_type *i_ptr = &object_type_body; |
|---|
| | 1472 | |
|---|
| | 1473 | for (sval = 0; sval < 255; sval++) |
|---|
| | 1474 | { |
|---|
| | 1475 | int k_idx = lookup_kind(tval, sval); |
|---|
| | 1476 | |
|---|
| | 1477 | if (k_idx) |
|---|
| | 1478 | { |
|---|
| | 1479 | /* Create the item */ |
|---|
| | 1480 | object_prep(i_ptr, k_idx); |
|---|
| | 1481 | |
|---|
| | 1482 | /* Apply magic (no messages, no artifacts) */ |
|---|
| | 1483 | apply_magic(i_ptr, p_ptr->depth, FALSE, FALSE, FALSE); |
|---|
| | 1484 | |
|---|
| | 1485 | /* Mark as cheat, and where created */ |
|---|
| | 1486 | i_ptr->origin = ORIGIN_CHEAT; |
|---|
| | 1487 | i_ptr->origin_depth = p_ptr->depth; |
|---|
| | 1488 | |
|---|
| | 1489 | if (k_info[k_idx].tval == TV_GOLD) |
|---|
| | 1490 | { |
|---|
| | 1491 | coin_type = sval; |
|---|
| | 1492 | make_gold(i_ptr, p_ptr->depth); |
|---|
| | 1493 | coin_type = 0; |
|---|
| | 1494 | } |
|---|
| | 1495 | |
|---|
| | 1496 | /* Drop the object from heaven */ |
|---|
| | 1497 | drop_near(i_ptr, -1, py, px); |
|---|
| | 1498 | } |
|---|
| | 1499 | } |
|---|
| | 1500 | |
|---|
| | 1501 | msg_print("Done."); |
|---|
| | 1502 | } |
|---|