… | |
… | |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * it under the terms of the GNU General Public License as published by |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * the Free Software Foundation, either version 3 of the License, or |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * (at your option) any later version. |
11 | * option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the Affero GNU General Public License |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * and the GNU General Public License along with this program. If not, see |
|
|
20 | * <http://www.gnu.org/licenses/>. |
20 | * |
21 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
23 | */ |
23 | |
24 | |
24 | /* TREASURE_DEBUG does some checking on the treasurelists after loading. |
25 | /* TREASURE_DEBUG does some checking on the treasurelists after loading. |
… | |
… | |
996 | op->value *= 5; |
997 | op->value *= 5; |
997 | set_ring_bonus (op, d); |
998 | set_ring_bonus (op, d); |
998 | } |
999 | } |
999 | } |
1000 | } |
1000 | |
1001 | |
1001 | if (GET_ANIM_ID (op)) |
1002 | if (op->animation_id) |
1002 | SET_ANIMATION (op, rndm (NUM_ANIMATIONS (op))); |
1003 | op->set_anim_frame (rndm (op->anim_frames ())); |
1003 | |
1004 | |
1004 | break; |
1005 | break; |
1005 | |
1006 | |
1006 | case BOOK: |
1007 | case BOOK: |
1007 | /* Is it an empty book?, if yes lets make a special· |
1008 | /* Is it an empty book?, if yes lets make a special· |
… | |
… | |
1566 | #if 1 |
1567 | #if 1 |
1567 | LOG (llevError, "Got null entry and non zero roll in generate_artifact, type %d\n", op->type); |
1568 | LOG (llevError, "Got null entry and non zero roll in generate_artifact, type %d\n", op->type); |
1568 | #endif |
1569 | #endif |
1569 | return; |
1570 | return; |
1570 | } |
1571 | } |
1571 | if (!strcmp (art->item->name, "NONE")) |
1572 | |
|
|
1573 | if (art->item->name == shstr_NONE) |
1572 | return; |
1574 | return; |
|
|
1575 | |
1573 | if (FABS (op->magic) < art->item->magic) |
1576 | if (fabs (op->magic) < art->item->magic) |
1574 | continue; /* Not magic enough to be this item */ |
1577 | continue; /* Not magic enough to be this item */ |
1575 | |
1578 | |
1576 | /* Map difficulty not high enough */ |
1579 | /* Map difficulty not high enough */ |
1577 | if (difficulty < art->difficulty) |
1580 | if (difficulty < art->difficulty) |
1578 | continue; |
1581 | continue; |