Demonbane revisited
Commit c4a1f298e8 two and a half
months ago gave lawful Angels and Archons a chance to start with
a mace instead of a long sword so that they might get Demonbane.
It was a bit convulted; this redoes it to be more straightforward.
This commit is contained in:
@@ -329,27 +329,24 @@ m_initweap(struct monst *mtmp)
|
|||||||
|
|
||||||
case S_ANGEL:
|
case S_ANGEL:
|
||||||
if (humanoid(ptr)) {
|
if (humanoid(ptr)) {
|
||||||
/* create minion stuff; can't use mongets;
|
/* create minion stuff; bypass mongets */
|
||||||
weapon: long sword [rn2(5) > 1 == 60%] or mace [40%] */
|
int typ = rn2(3) ? LONG_SWORD : MACE;
|
||||||
otmp = mksobj((rn2(5) > 1) ? LONG_SWORD : MACE, FALSE, FALSE);
|
const char *nam = (typ == LONG_SWORD) ? "Sunsword" : "Demonbane";
|
||||||
|
|
||||||
|
otmp = mksobj(typ, FALSE, FALSE);
|
||||||
/* maybe promote weapon to an artifact */
|
/* maybe promote weapon to an artifact */
|
||||||
if ((!rn2(20) || is_lord(ptr))
|
if ((!rn2(20) || is_lord(ptr))
|
||||||
&& sgn(mtmp->isminion ? EMIN(mtmp)->min_align
|
&& sgn(mtmp->isminion ? EMIN(mtmp)->min_align
|
||||||
: ptr->maligntyp) == A_LAWFUL) {
|
: ptr->maligntyp) == A_LAWFUL)
|
||||||
/* Sunsword and Demonbane both used to be long swords and
|
otmp = oname(otmp, nam, ONAME_RANDOM); /* randomly created */
|
||||||
Angels always got a long sword, so might get either of
|
/* enhance the weapon */
|
||||||
the two artifacts; Demonbane has been changed to be a
|
|
||||||
mace; this deliberately makes an independent choice of
|
|
||||||
which artifact and if it picks the wrong name for 'otmp's
|
|
||||||
type, then 'otmp' won't be upgraded into an artifact */
|
|
||||||
otmp = oname(otmp, artiname((rn2(5) > 1) ? ART_SUNSWORD
|
|
||||||
: ART_DEMONBANE),
|
|
||||||
ONAME_RANDOM); /* randomly created */
|
|
||||||
}
|
|
||||||
bless(otmp);
|
bless(otmp);
|
||||||
otmp->oerodeproof = TRUE;
|
otmp->oerodeproof = TRUE;
|
||||||
/* make long sword be +0 to +3, weaker mace be +3 to +6 */
|
/* make long sword be +0 to +3, mace be +3 to +6 to compensate
|
||||||
otmp->spe = (otmp->otyp == LONG_SWORD) ? rn2(4) : rn1(4, 3);
|
for being significantly weaker against large opponents */
|
||||||
|
otmp->spe = rn2(4);
|
||||||
|
if (typ == MACE)
|
||||||
|
otmp->spe += 3;
|
||||||
(void) mpickobj(mtmp, otmp);
|
(void) mpickobj(mtmp, otmp);
|
||||||
|
|
||||||
otmp = mksobj(!rn2(4) || is_lord(ptr) ? SHIELD_OF_REFLECTION
|
otmp = mksobj(!rn2(4) || is_lord(ptr) ? SHIELD_OF_REFLECTION
|
||||||
|
|||||||
Reference in New Issue
Block a user