handle some special cases; must be called after u_init() */
| 84 | |
| 85 | /* handle some special cases; must be called after u_init() */ |
| 86 | staticfn void |
| 87 | hack_artifacts(void) |
| 88 | { |
| 89 | struct artifact *art; |
| 90 | int alignmnt = aligns[flags.initalign].value; |
| 91 | |
| 92 | /* Fix up the alignments of "gift" artifacts */ |
| 93 | for (art = artilist + 1; art->otyp; art++) |
| 94 | if (art->role == Role_switch && art->alignment != A_NONE) |
| 95 | art->alignment = alignmnt; |
| 96 | |
| 97 | /* Excalibur can be used by any lawful character, not just knights */ |
| 98 | if (!Role_if(PM_KNIGHT)) |
| 99 | artilist[ART_EXCALIBUR].role = NON_PM; |
| 100 | |
| 101 | /* Fix up the quest artifact */ |
| 102 | if (gu.urole.questarti) { |
| 103 | artilist[gu.urole.questarti].alignment = alignmnt; |
| 104 | artilist[gu.urole.questarti].role = Role_switch; |
| 105 | } |
| 106 | return; |
| 107 | } |
| 108 | |
| 109 | /* zero out the artifact existence list */ |
| 110 | void |
no outgoing calls
no test coverage detected