… | |
… | |
106 | ob->type = PLAYER; // we are paranoid |
106 | ob->type = PLAYER; // we are paranoid |
107 | ob->race = ob->arch->race; |
107 | ob->race = ob->arch->race; |
108 | |
108 | |
109 | ob->update_weight (); |
109 | ob->update_weight (); |
110 | link_skills (); |
110 | link_skills (); |
111 | |
|
|
112 | CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER); |
|
|
113 | |
111 | |
114 | assign (title, ob->arch->object::name); |
112 | assign (title, ob->arch->object::name); |
115 | |
113 | |
116 | /* if it's a dragon player, set the correct title here */ |
114 | /* if it's a dragon player, set the correct title here */ |
117 | if (is_dragon_pl (ob)) |
115 | if (is_dragon_pl (ob)) |
… | |
… | |
867 | if (op->move_type & MOVE_FLYING) |
865 | if (op->move_type & MOVE_FLYING) |
868 | return 1; |
866 | return 1; |
869 | |
867 | |
870 | next = op->below; |
868 | next = op->below; |
871 | |
869 | |
872 | int cnt = MAX_ITEM_PER_DROP; |
870 | int cnt = MAX_ITEM_PER_ACTION; |
873 | #define CHK_PICK_PICKUP do { pick_up (op, tmp); cnt--; } while (0) |
871 | #define CHK_PICK_PICKUP do { pick_up (op, tmp); cnt--; } while (0) |
874 | |
872 | |
875 | /* loop while there are items on the floor that are not marked as |
873 | /* loop while there are items on the floor that are not marked as |
876 | * destroyed */ |
874 | * destroyed */ |
877 | while (next && !next->destroyed ()) |
875 | while (next && !next->destroyed ()) |
… | |
… | |
1002 | continue; |
1000 | continue; |
1003 | } |
1001 | } |
1004 | |
1002 | |
1005 | /* wands/staves/rods/horns */ |
1003 | /* wands/staves/rods/horns */ |
1006 | if (op->contr->mode & PU_MAGIC_DEVICE) |
1004 | if (op->contr->mode & PU_MAGIC_DEVICE) |
1007 | if (tmp->type == WAND || tmp->type == ROD || tmp->type == HORN) |
1005 | if (tmp->type == WAND |
|
|
1006 | || tmp->type == ROD |
|
|
1007 | || tmp->type == HORN |
|
|
1008 | || tmp->type == POWER_CRYSTAL) |
1008 | { |
1009 | { |
1009 | CHK_PICK_PICKUP; |
1010 | CHK_PICK_PICKUP; |
1010 | continue; |
1011 | continue; |
1011 | } |
1012 | } |
1012 | |
1013 | |
1013 | /* pick up all magical items */ |
1014 | /* pick up all magical items */ |
1014 | if (op->contr->mode & PU_MAGICAL) |
1015 | if (op->contr->mode & PU_MAGICAL) |
1015 | if (QUERY_FLAG (tmp, FLAG_KNOWN_MAGICAL) && !QUERY_FLAG (tmp, FLAG_KNOWN_CURSED)) |
1016 | if (QUERY_FLAG (tmp, FLAG_KNOWN_MAGICAL) |
|
|
1017 | && !QUERY_FLAG (tmp, FLAG_KNOWN_CURSED)) |
1016 | { |
1018 | { |
1017 | CHK_PICK_PICKUP; |
1019 | CHK_PICK_PICKUP; |
1018 | continue; |
1020 | continue; |
1019 | } |
1021 | } |
1020 | |
1022 | |
… | |
… | |
1027 | } |
1029 | } |
1028 | } |
1030 | } |
1029 | |
1031 | |
1030 | /* rings & amulets - talismans seems to be typed AMULET */ |
1032 | /* rings & amulets - talismans seems to be typed AMULET */ |
1031 | if (op->contr->mode & PU_JEWELS) |
1033 | if (op->contr->mode & PU_JEWELS) |
1032 | if (tmp->type == RING || tmp->type == AMULET) |
1034 | if (tmp->type == RING |
|
|
1035 | || tmp->type == AMULET |
|
|
1036 | || tmp->type == GIRDLE |
|
|
1037 | || tmp->type == SKILL_TOOL) |
1033 | { |
1038 | { |
1034 | CHK_PICK_PICKUP; |
1039 | CHK_PICK_PICKUP; |
1035 | continue; |
1040 | continue; |
1036 | } |
1041 | } |
1037 | |
1042 | |
… | |
… | |
1086 | CHK_PICK_PICKUP; |
1091 | CHK_PICK_PICKUP; |
1087 | continue; |
1092 | continue; |
1088 | } |
1093 | } |
1089 | |
1094 | |
1090 | if (op->contr->mode & PU_GLOVES) |
1095 | if (op->contr->mode & PU_GLOVES) |
1091 | if (tmp->type == GLOVES) |
1096 | if (tmp->type == GLOVES || tmp->type == BRACERS) |
1092 | { |
1097 | { |
1093 | CHK_PICK_PICKUP; |
1098 | CHK_PICK_PICKUP; |
1094 | continue; |
1099 | continue; |
1095 | } |
1100 | } |
1096 | |
1101 | |
… | |
… | |
2481 | &op->name, op->contr->title, |
2486 | &op->name, op->contr->title, |
2482 | (int)op->level, |
2487 | (int)op->level, |
2483 | op->contr->killer_name () |
2488 | op->contr->killer_name () |
2484 | ); |
2489 | ); |
2485 | tmp->value = 0, tmp->type = 0; |
2490 | tmp->value = 0, tmp->type = 0; |
2486 | tmp->materialname = "organics"; |
2491 | tmp->material = name_to_material (shstr_organic); |
2487 | tmp->insert_at (op, tmp); |
2492 | tmp->insert_at (op, tmp); |
2488 | } |
2493 | } |
2489 | |
2494 | |
2490 | /* teleport defeated player to new destination */ |
2495 | /* teleport defeated player to new destination */ |
2491 | transfer_ob (op, x, y, 0, NULL); |
2496 | transfer_ob (op, x, y, 0, NULL); |