- }
-
- if (o_ptr->tval != TV_BOW)
- {
- switch (randint1(34))
- {
- case 1:
- case 2:
- o_ptr->art_flags1 |= TR1_SLAY_ANIMAL;
- break;
- case 3:
- case 4:
- o_ptr->art_flags1 |= TR1_SLAY_EVIL;
- if (!artifact_bias && one_in_(2))
- artifact_bias = BIAS_LAW;
- else if (!artifact_bias && one_in_(9))
- artifact_bias = BIAS_PRIESTLY;
- break;
- case 5:
- case 6:
- o_ptr->art_flags1 |= TR1_SLAY_UNDEAD;
- if (!artifact_bias && one_in_(9))
- artifact_bias = BIAS_PRIESTLY;
- break;
- case 7:
- case 8:
- o_ptr->art_flags1 |= TR1_SLAY_DEMON;
- if (!artifact_bias && one_in_(9))
- artifact_bias = BIAS_PRIESTLY;
- break;
- case 9:
- case 10:
- o_ptr->art_flags1 |= TR1_SLAY_ORC;
- break;
- case 11:
- case 12:
- o_ptr->art_flags1 |= TR1_SLAY_TROLL;
- break;
- case 13:
- case 14:
- o_ptr->art_flags1 |= TR1_SLAY_GIANT;
- break;
- case 15:
- case 16:
- o_ptr->art_flags1 |= TR1_SLAY_DRAGON;
- break;
- case 17:
- o_ptr->art_flags1 |= TR1_KILL_DRAGON;
- break;
- case 18:
- case 19:
- if (o_ptr->tval == TV_SWORD)
- {
- o_ptr->art_flags1 |= TR1_VORPAL;
- if (!artifact_bias && one_in_(9))
- artifact_bias = BIAS_WARRIOR;
- }
- else
- random_slay(o_ptr, is_scroll);
- break;
- case 20:
- o_ptr->art_flags1 |= TR1_IMPACT;
- break;
- case 21:
- case 22:
- o_ptr->art_flags1 |= TR1_BRAND_FIRE;
- if (!artifact_bias)
- artifact_bias = BIAS_FIRE;
- break;
- case 23:
- case 24:
- o_ptr->art_flags1 |= TR1_BRAND_COLD;
- if (!artifact_bias)
- artifact_bias = BIAS_COLD;
- break;
- case 25:
- case 26:
- o_ptr->art_flags1 |= TR1_BRAND_ELEC;
- if (!artifact_bias)
- artifact_bias = BIAS_ELEC;
- break;
- case 27:
- case 28:
- o_ptr->art_flags1 |= TR1_BRAND_ACID;
- if (!artifact_bias)
- artifact_bias = BIAS_ACID;
- break;
- case 29:
- case 30:
- o_ptr->art_flags1 |= TR1_BRAND_POIS;
- if (!artifact_bias && !one_in_(3))
- artifact_bias = BIAS_POIS;
- else if (!artifact_bias && one_in_(6))
- artifact_bias = BIAS_NECROMANTIC;
- else if (!artifact_bias)
- artifact_bias = BIAS_ROGUE;
- break;
- case 31:
- o_ptr->art_flags1 |= TR1_VAMPIRIC;
- if (!artifact_bias)
- artifact_bias = BIAS_NECROMANTIC;
- break;
- case 32:
- o_ptr->art_flags1 |= TR1_FORCE_WEAPON;
- if (!artifact_bias)
- artifact_bias = (one_in_(2) ? BIAS_MAGE : BIAS_PRIESTLY);
- break;
- default:
- o_ptr->art_flags1 |= TR1_CHAOTIC;
- if (!artifact_bias)
- artifact_bias = BIAS_CHAOS;
- break;
+ break;
+
+ case BIAS_FIRE:
+ if (!(have_flag(o_ptr->art_flags, TR_BRAND_FIRE)))
+ {
+ add_flag(o_ptr->art_flags, TR_BRAND_FIRE);
+ if (one_in_(2)) return;
+ }
+ break;
+
+ case BIAS_COLD:
+ if (!(have_flag(o_ptr->art_flags, TR_BRAND_COLD)))
+ {
+ add_flag(o_ptr->art_flags, TR_BRAND_COLD);
+ if (one_in_(2)) return;
+ }
+ break;
+
+ case BIAS_ELEC:
+ if (!(have_flag(o_ptr->art_flags, TR_BRAND_ELEC)))
+ {
+ add_flag(o_ptr->art_flags, TR_BRAND_ELEC);
+ if (one_in_(2)) return;
+ }
+ break;
+
+ case BIAS_ACID:
+ if (!(have_flag(o_ptr->art_flags, TR_BRAND_ACID)))
+ {
+ add_flag(o_ptr->art_flags, TR_BRAND_ACID);
+ if (one_in_(2)) return;
+ }
+ break;
+
+ case BIAS_LAW:
+ if (!(have_flag(o_ptr->art_flags, TR_SLAY_EVIL)))
+ {
+ add_flag(o_ptr->art_flags, TR_SLAY_EVIL);
+ if (one_in_(2)) return;