… | |
… | |
193 | } |
193 | } |
194 | else |
194 | else |
195 | { |
195 | { |
196 | // drop everything to the ground, if possible |
196 | // drop everything to the ground, if possible |
197 | op->insert_at (originator); |
197 | op->insert_at (originator); |
198 | op->destroy_inv (true); // be explicit about dropping |
|
|
199 | op->destroy (true); |
198 | op->drop_and_destroy (); |
200 | } |
199 | } |
201 | |
200 | |
202 | if (type & (AT_FIRE | AT_ELECTRICITY)) |
201 | if (type & (AT_FIRE | AT_ELECTRICITY)) |
203 | if (env) |
202 | if (env) |
204 | { |
203 | { |
… | |
… | |
1409 | return maxdam; |
1408 | return maxdam; |
1410 | } |
1409 | } |
1411 | |
1410 | |
1412 | if (QUERY_FLAG (op, FLAG_FRIENDLY) && op->type != PLAYER) |
1411 | if (QUERY_FLAG (op, FLAG_FRIENDLY) && op->type != PLAYER) |
1413 | { |
1412 | { |
1414 | op->destroy_inv (true); // be explicit about dropping |
|
|
1415 | op->destroy (true); |
1413 | op->drop_and_destroy (); |
1416 | return maxdam; |
1414 | return maxdam; |
1417 | } |
1415 | } |
1418 | |
1416 | |
1419 | /* Now lets start dealing with experience we get for killing something */ |
1417 | /* Now lets start dealing with experience we get for killing something */ |
1420 | |
1418 | |
… | |
… | |
1594 | } |
1592 | } |
1595 | |
1593 | |
1596 | remove_friendly_object (op); |
1594 | remove_friendly_object (op); |
1597 | } |
1595 | } |
1598 | |
1596 | |
1599 | op->destroy_inv (true); // be explicit about dropping |
|
|
1600 | op->destroy (true); |
1597 | op->drop_and_destroy (); |
1601 | } |
1598 | } |
1602 | else |
1599 | else |
1603 | /* Player has been killed! */ |
1600 | /* Player has been killed! */ |
1604 | op->contr->killer = owner->type == PLAYER ? owner : hitter; |
1601 | op->contr->killer = owner->type == PLAYER ? owner : hitter; |
1605 | |
1602 | |
… | |
… | |
1896 | /* Used to be ghosthit removal - we now use the ONE_HIT flag. Note |
1893 | /* Used to be ghosthit removal - we now use the ONE_HIT flag. Note |
1897 | * that before if the player was immune to ghosthit, the monster |
1894 | * that before if the player was immune to ghosthit, the monster |
1898 | * remained - that is no longer the case. |
1895 | * remained - that is no longer the case. |
1899 | */ |
1896 | */ |
1900 | if (QUERY_FLAG (hitter, FLAG_ONE_HIT)) |
1897 | if (QUERY_FLAG (hitter, FLAG_ONE_HIT)) |
1901 | { |
|
|
1902 | hitter->destroy_inv (true); // be explicit about dropping |
|
|
1903 | hitter->destroy (true); |
1898 | hitter->drop_and_destroy (); |
1904 | } |
|
|
1905 | /* Lets handle creatures that are splitting now */ |
1899 | /* Lets handle creatures that are splitting now */ |
1906 | else if (type & AT_PHYSICAL && !QUERY_FLAG (op, FLAG_FREED) && QUERY_FLAG (op, FLAG_SPLITTING)) |
1900 | else if (type & AT_PHYSICAL && !QUERY_FLAG (op, FLAG_FREED) && QUERY_FLAG (op, FLAG_SPLITTING)) |
1907 | { |
1901 | { |
1908 | int i; |
1902 | int i; |
1909 | int friendly = QUERY_FLAG (op, FLAG_FRIENDLY); |
1903 | int friendly = QUERY_FLAG (op, FLAG_FRIENDLY); |
… | |
… | |
1949 | } |
1943 | } |
1950 | |
1944 | |
1951 | op->destroy (true); |
1945 | op->destroy (true); |
1952 | } |
1946 | } |
1953 | else if (type & AT_DRAIN && hitter->type == GRIMREAPER && hitter->value++ > 10) |
1947 | else if (type & AT_DRAIN && hitter->type == GRIMREAPER && hitter->value++ > 10) |
1954 | { |
|
|
1955 | hitter->destroy_inv (true); // be explicit about dropping |
|
|
1956 | hitter->destroy (true); |
1948 | hitter->drop_and_destroy (); |
1957 | } |
|
|
1958 | |
1949 | |
1959 | return maxdam; |
1950 | return maxdam; |
1960 | } |
1951 | } |
1961 | |
1952 | |
1962 | void |
1953 | void |