PR #1008 - get doppelganger form from 'record'
Pull request from NulCGT: when a doppelganger is choosing to become a fake player, get role from an entry in the high scores file. Use that entry's name too if the doppelganger is within view at the time. I'm not sure how well this will work for a single user score file if the player always runs the same role and name. I've given it a small chance (1/13) to ignore the topten and stay with random role instead. Closes #1008
This commit is contained in:
@@ -1435,7 +1435,7 @@ tt_oname(struct obj *otmp)
|
||||
/* Randomly select a topten entry to mimic */
|
||||
int
|
||||
tt_doppel(struct monst *mon) {
|
||||
struct toptenentry *tt = get_rnd_toptenentry();
|
||||
struct toptenentry *tt = rn2(13) ? get_rnd_toptenentry() : NULL;
|
||||
int ret;
|
||||
|
||||
if (!tt)
|
||||
@@ -1447,7 +1447,7 @@ tt_doppel(struct monst *mon) {
|
||||
mon->female = 0;
|
||||
ret = classmon(tt->plrole);
|
||||
/* Only take on a name if the player can see
|
||||
the doppelganger, otherwise we end up with
|
||||
the doppelganger, otherwise we end up with
|
||||
named monsters spoiling the fun - Kes */
|
||||
if (canseemon(mon))
|
||||
christen_monst(mon, tt->name);
|
||||
|
||||
Reference in New Issue
Block a user