1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

wandering monsters and tkills

This commit is contained in:
Zeno Rogue 2018-01-04 21:24:03 +01:00
parent 9c86b073bb
commit e21d8d79fc
3 changed files with 25 additions and 3 deletions

View File

@ -349,6 +349,8 @@ int* killtable[] = {
&kills[moHunterDog], &kills[moIceGolem], &kills[moVoidBeast],
&kills[moJiangshi], &kills[moTerraWarrior],
&kills[moSalamander], &kills[moLavaWolf],
&kills[moSwitch1], &kills[moSwitch2],
&kills[moMonk], &kills[moCrusher], &kills[moHexDemon], &kills[moAltDemon], &kills[moPair],
NULL
};

View File

@ -88,6 +88,17 @@ bool out_ruin(cell *c) {
return windmap::at(c) >= 128;
}
eMonster genRuinMonster(cell *c) {
eMonster m = pick(moHexDemon, moHexDemon, moHexDemon, moAltDemon, moAltDemon, moMonk, moMonk, moSkeleton, moSkeleton, moCrusher);
if(m == moHexDemon && ctof(c))
return genRuinMonster(c);
if(m == moMonk) {
if(c->item) return genRuinMonster(c);
forCellCM(c2, c) if(c2->item) return genRuinMonster(c);
}
return m;
}
// the giant switch generating most of the lands...
void giantLandSwitch(cell *c, int d, cell *from) {
@ -1936,12 +1947,15 @@ void giantLandSwitch(cell *c, int d, cell *from) {
}
}
ONEMPTY {
if(hrand(1500) < PT(30 + kills[moHexDemon] + kills[moSkeleton] + kills[moMonk] + kills[moPair], 100) && notDippingFor(itRuins)) {
c->item = itRuins;
forCellEx(c2, c) if(c2->monst == moMonk)
c->item = itNone;
}
if(hrand(7000) < kf && !c->monst) {
c->monst = pick(moHexDemon, moHexDemon, moHexDemon, moAltDemon, moAltDemon, moMonk, moMonk, moSkeleton, moSkeleton, moCrusher);
c->monst = genRuinMonster(c);
c->hitpoints = 3;
}
if(hrand(1500) < PT(30 + kills[moHexDemon] + kills[moSkeleton] + kills[moMonk] + kills[moPair], 100) && notDippingFor(itRuins))
c->item = itRuins;
}
break;
}

View File

@ -548,6 +548,12 @@ void wandering() {
else if(c->land == laTerracotta && wchance(items[itTerra], 40))
c->monst = moJiangshi;
else if(c->land == laSwitch && wchance(items[itSwitch], 80))
c->monst = active_switch();
else if(c->land == laRuins && wchance(items[itRuins], 80))
c->monst = genRuinMonster(c);
else if(c->land == laCaribbean && wchance(items[itPirate], 30))
c->monst = moPirate;