diff --git a/game.cpp b/game.cpp index 8b2118c1..46f48465 100644 --- a/game.cpp +++ b/game.cpp @@ -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 }; diff --git a/landgen.cpp b/landgen.cpp index 300e3c8f..f3bc61fd 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -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; } diff --git a/monstergen.cpp b/monstergen.cpp index bd8ef79b..82647dce 100644 --- a/monstergen.cpp +++ b/monstergen.cpp @@ -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;