mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 23:50:27 +00:00
Merge branch 'master' of https://github.com/zenorogue/hyperrogue
This commit is contained in:
commit
65065c7e69
@ -361,7 +361,7 @@ EX void stunMonster(cell *c2, eMonster killer, flagtype flags) {
|
|||||||
((flags & AF_WEAK) && !attackJustStuns(c2, flags &~ AF_WEAK, killer)) ? min(5+c2->stuntime, 15) :
|
((flags & AF_WEAK) && !attackJustStuns(c2, flags &~ AF_WEAK, killer)) ? min(5+c2->stuntime, 15) :
|
||||||
3);
|
3);
|
||||||
if(killer == moArrowTrap) newtime = min(newtime + 3, 7);
|
if(killer == moArrowTrap) newtime = min(newtime + 3, 7);
|
||||||
if(!isMetalBeast(c2->monst) && !among(c2->monst, moSkeleton, moReptile, moSalamander, moTortoise, moWorldTurtle, moBrownBug)) {
|
if(!(flags & AF_WEAK) && !isMetalBeast(c2->monst) && !among(c2->monst, moSkeleton, moReptile, moSalamander, moTortoise, moWorldTurtle, moBrownBug)) {
|
||||||
c2->hitpoints--;
|
c2->hitpoints--;
|
||||||
if(c2->monst == moPrincess)
|
if(c2->monst == moPrincess)
|
||||||
playSound(c2, princessgender() ? "hit-princess" : "hit-prince");
|
playSound(c2, princessgender() ? "hit-princess" : "hit-prince");
|
||||||
|
@ -916,6 +916,8 @@ int read_cheat_args() {
|
|||||||
PHASEFROM(2);
|
PHASEFROM(2);
|
||||||
shift();
|
shift();
|
||||||
firstland0 = firstland = specialland = readland(args());
|
firstland0 = firstland = specialland = readland(args());
|
||||||
|
if (!landUnlocked(firstland))
|
||||||
|
cheat();
|
||||||
stop_game_and_switch_mode(rg::nothing);
|
stop_game_and_switch_mode(rg::nothing);
|
||||||
showstartmenu = false;
|
showstartmenu = false;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
namespace hr {
|
namespace hr {
|
||||||
|
|
||||||
bool doAutoplay;
|
bool doAutoplay;
|
||||||
|
eLand autoplayLand;
|
||||||
|
|
||||||
namespace prairie { extern long long enter; }
|
namespace prairie { extern long long enter; }
|
||||||
|
|
||||||
@ -144,7 +145,7 @@ void autoplay(int num_moves = 1000000000) {
|
|||||||
} else if (croll == 29) {
|
} else if (croll == 29) {
|
||||||
printf("Place fun walls\n");
|
printf("Place fun walls\n");
|
||||||
forCellEx(cz, cwt.at)
|
forCellEx(cz, cwt.at)
|
||||||
if (!cz->wall)
|
if (!cz->wall && !cz->monst)
|
||||||
cz->wall = pick(waExplosiveBarrel, waBigStatue, waThumperOff, waBonfireOff, waCloud, waMirror);
|
cz->wall = pick(waExplosiveBarrel, waBigStatue, waThumperOff, waBonfireOff, waCloud, waMirror);
|
||||||
} else if (croll == 30) {
|
} else if (croll == 30) {
|
||||||
cell *ct = dcal[hrand(isize(dcal))];
|
cell *ct = dcal[hrand(isize(dcal))];
|
||||||
@ -164,8 +165,57 @@ void autoplay(int num_moves = 1000000000) {
|
|||||||
printf("Spam some slime\n");
|
printf("Spam some slime\n");
|
||||||
ct->item = itNone;
|
ct->item = itNone;
|
||||||
ct->wall = hrand(2) ? waFloorA : waFloorB;
|
ct->wall = hrand(2) ? waFloorA : waFloorB;
|
||||||
ct->monst = hrand(2) ? moSlime : moNone;
|
switch(hrand(4)) {
|
||||||
|
case 0: ct->monst = moSlime; break;
|
||||||
|
case 1: ct->item = itGreenStone; break;
|
||||||
|
default: ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else if (croll == 37) {
|
||||||
|
cell *ct = dcal[hrand(isize(dcal))];
|
||||||
|
if (!isPlayerOn(ct) && !ct->monst && !ct->wall) {
|
||||||
|
ct->monst = pick(moRagingBull, moTroll, moAcidBird, moMiner, moReptile, moVineBeast, moBug0, moBug1);
|
||||||
|
printf("Spam a monster: %s\n", minf[ct->monst].name);
|
||||||
|
}
|
||||||
|
// todo: dice
|
||||||
|
} else if (croll == 38) {
|
||||||
|
forCellEx(cz, cwt.at) {
|
||||||
|
if (cz->monst == moPrincessArmed) {
|
||||||
|
printf("Disarming a princess\n");
|
||||||
|
cz->monst = moPrincess;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (croll == 39) {
|
||||||
|
//forCellEx(cz, cwt.at) {
|
||||||
|
// if (!cz->monst) {
|
||||||
|
// printf("Summoning an unarmed princess incorrectly\n");
|
||||||
|
// cz->monst = moPrincess;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
} else if (croll == 40) {
|
||||||
|
//forCellEx(cz, cwt.at) {
|
||||||
|
// if (!cz->monst) {
|
||||||
|
// printf("Summoning an armed princess incorrectly\n");
|
||||||
|
// cz->monst = moPrincessArmed;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
} else if (croll == 41) {
|
||||||
|
cell *ct = dcal[hrand(isize(dcal))];
|
||||||
|
if (among(ct->wall, waNone, waVinePlant, waFloorA, waFloorB, waTrapdoor, waChasm, waBigStatue)) {
|
||||||
|
// Set wparam on a cell where it shouldn't matter, so that if this wall is later converted
|
||||||
|
// to a walltype that does care by some code that assumes wparam was 0,
|
||||||
|
// we can find out if that causes bugs.
|
||||||
|
printf("Randomizing wparam on %s at %p\n", winf[ct->wall].name, (void *)ct);
|
||||||
|
ct->wparam = (unsigned char) hrand(256);
|
||||||
|
}
|
||||||
|
} else if (croll == 42) {
|
||||||
|
vid.wallmode = hrand(7);
|
||||||
|
printf("Set vid.wallmode to %d: %s\n", vid.wallmode, wdmodes[vid.wallmode]);
|
||||||
|
} else if (croll == 43) {
|
||||||
|
vid.monmode = hrand(4);
|
||||||
|
printf("Set vid.monmode to %d: %s\n", vid.monmode, mdmodes[vid.monmode]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't show warning dialogs
|
// don't show warning dialogs
|
||||||
@ -228,8 +278,7 @@ void autoplay(int num_moves = 1000000000) {
|
|||||||
printf("RESET\n");
|
printf("RESET\n");
|
||||||
gcount = 0;
|
gcount = 0;
|
||||||
cellcount = 0;
|
cellcount = 0;
|
||||||
activateSafety(laCrossroads);
|
activateSafety(autoplayLand ? autoplayLand : landlist[hrand(isize(landlist))]);
|
||||||
// landlist[hrand(isize(landlist))]);
|
|
||||||
if (cellcount < 0) {
|
if (cellcount < 0) {
|
||||||
//printf("How did cellcount become negative?\n");
|
//printf("How did cellcount become negative?\n");
|
||||||
cellcount = 1;
|
cellcount = 1;
|
||||||
@ -255,7 +304,7 @@ void autoplay(int num_moves = 1000000000) {
|
|||||||
for(int i=0; i<isize(dcal); i++) {
|
for(int i=0; i<isize(dcal); i++) {
|
||||||
cell *c = dcal[i];
|
cell *c = dcal[i];
|
||||||
if(c->land == laCamelot && celldistAltRelative(c) == 0 && c->wall != waRoundTable) {
|
if(c->land == laCamelot && celldistAltRelative(c) == 0 && c->wall != waRoundTable) {
|
||||||
printf("The round table of camelot has been breached!\n");
|
printf("The round table of camelot is interrupted by a cell of %s\n", winf[c->wall].name);
|
||||||
kills[moPlayer] = 0;
|
kills[moPlayer] = 0;
|
||||||
canmove = true;
|
canmove = true;
|
||||||
doAutoplay = false;
|
doAutoplay = false;
|
||||||
@ -266,6 +315,9 @@ void autoplay(int num_moves = 1000000000) {
|
|||||||
if(cwt.at->monst && !isMultitile(cwt.at->monst)) {
|
if(cwt.at->monst && !isMultitile(cwt.at->monst)) {
|
||||||
printf("on a non-multitile monster: %s\n", minf[cwt.at->monst].name);
|
printf("on a non-multitile monster: %s\n", minf[cwt.at->monst].name);
|
||||||
}
|
}
|
||||||
|
else if(isDie(cwt.at->wall)) {
|
||||||
|
printf("on a wall-type die: %s\n", winf[cwt.at->wall].name);
|
||||||
|
}
|
||||||
|
|
||||||
for(int i=0; i<isize(dcal); i++) {
|
for(int i=0; i<isize(dcal); i++) {
|
||||||
cell *c = dcal[i];
|
cell *c = dcal[i];
|
||||||
@ -284,6 +336,29 @@ void autoplay(int num_moves = 1000000000) {
|
|||||||
canmove = true;
|
canmove = true;
|
||||||
doAutoplay = false;
|
doAutoplay = false;
|
||||||
}
|
}
|
||||||
|
if(isPrincess(c->monst) && princess::getPrincessInfo(c) == nullptr) {
|
||||||
|
printf("missing princess info\n");
|
||||||
|
kills[moPlayer] = 0;
|
||||||
|
canmove = true;
|
||||||
|
doAutoplay = false;
|
||||||
|
}
|
||||||
|
if(dice::on(c)) {
|
||||||
|
if(dice::data.count(c) == 0) {
|
||||||
|
c->item = itBuggy;
|
||||||
|
printf("missing dice::data[%p]\n", (void *)c);
|
||||||
|
kills[moPlayer] = 0;
|
||||||
|
canmove = true;
|
||||||
|
doAutoplay = false;
|
||||||
|
}
|
||||||
|
else if(!dice::data[c].which) {
|
||||||
|
// we might get here instead if someone already tried to do data[c], which creates a new element out of nothing
|
||||||
|
c->item = itBuggy;
|
||||||
|
printf("missing dice::data[%p].which\n", (void *)c);
|
||||||
|
kills[moPlayer] = 0;
|
||||||
|
canmove = true;
|
||||||
|
doAutoplay = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(buggyGeneration || isize(buggycells)) {
|
if(buggyGeneration || isize(buggycells)) {
|
||||||
@ -303,6 +378,13 @@ int readArgs() {
|
|||||||
using namespace arg;
|
using namespace arg;
|
||||||
|
|
||||||
if(0) ;
|
if(0) ;
|
||||||
|
else if(argis("-autoplayW")) {
|
||||||
|
// Start in this land and reset to this land
|
||||||
|
PHASE(3);
|
||||||
|
shift();
|
||||||
|
autoplayLand = readland(args());
|
||||||
|
activateSafety(autoplayLand);
|
||||||
|
}
|
||||||
else if(argis("-autoplay")) {
|
else if(argis("-autoplay")) {
|
||||||
PHASE(3);
|
PHASE(3);
|
||||||
autoplay();
|
autoplay();
|
||||||
|
@ -1345,7 +1345,7 @@ EX bool drawMonsterType(eMonster m, cell *where, const shiftmatrix& V1, color_t
|
|||||||
#if CAP_SHAPES
|
#if CAP_SHAPES
|
||||||
if(among(m, moTortoise, moWorldTurtle) && where && where->stuntime >= 3)
|
if(among(m, moTortoise, moWorldTurtle) && where && where->stuntime >= 3)
|
||||||
drawStunStars(V, where->stuntime-2);
|
drawStunStars(V, where->stuntime-2);
|
||||||
else if (among(m, moTortoise, moWorldTurtle) || m == moPlayer || (where && !where->stuntime)) ;
|
else if (among(m, moTortoise, moWorldTurtle, moMutant) || m == moPlayer || (where && !where->stuntime)) ;
|
||||||
else if(where && !(isMetalBeast(m) && where->stuntime == 1))
|
else if(where && !(isMetalBeast(m) && where->stuntime == 1))
|
||||||
drawStunStars(V, where->stuntime);
|
drawStunStars(V, where->stuntime);
|
||||||
|
|
||||||
|
@ -7312,6 +7312,64 @@ S("multiplayer", "режим нескольких игроков")
|
|||||||
// [PL:7811]
|
// [PL:7811]
|
||||||
S("Hint: these keys usually work during the game", "Подсказка: можно использовать эти клавиши во время игры")
|
S("Hint: these keys usually work during the game", "Подсказка: можно использовать эти клавиши во время игры")
|
||||||
|
|
||||||
|
// [PL:8443]
|
||||||
|
N("Frog Park", GEN_O, "Жабный парк", "Жабные парки", "Жабный парк", "в Жабном парке")
|
||||||
|
|
||||||
|
S("This park is a perfect place for frogs to hide from predators. "
|
||||||
|
"So perfect that the frogs have grown in size, gained magical abilities, "
|
||||||
|
"and become very dangerous themselves.",
|
||||||
|
"Этот парк - идеальное место, где жабы могут прятаться от хищников. "
|
||||||
|
"Такое идеальное, что они увеличились по размеру, приобрели магические способности, "
|
||||||
|
"и сами стали очень опасными."
|
||||||
|
)
|
||||||
|
|
||||||
|
N("Gold Ball", GEN_O, "Золотой мячик", "Золотые мячики", "Золотые мячик", "Золотом мячиком")
|
||||||
|
S("A toy lost in the Frog Park by a spoiled child.", "Игрушка, потерянная в Жабном парке баловным ребёнком.")
|
||||||
|
|
||||||
|
Orb("Impact", "Сотрясения")
|
||||||
|
|
||||||
|
S("Whenever you use a ranged Orb to achieve an effect, all the single-tile monsters adjacent to the target "
|
||||||
|
"location are stunned.",
|
||||||
|
"Каждый раз, когда Вы используете силу какую-либо Сферу на расстоянии, "
|
||||||
|
"все стоящие рядом с целью монстры из 1 клетка оглушаются.")
|
||||||
|
|
||||||
|
N("shrub", GEN_O, "куст", "кусты", "куст", "кустом")
|
||||||
|
S("A strange small tree that cannot be attacked with mundane weapons nor phased though. "
|
||||||
|
"It can be vaulted over, though.",
|
||||||
|
"Странное маленькое растение, которое нельзя атаковать обычными орудиями и сквозь которого нельзя фазировать. "
|
||||||
|
"Но можно прыгать через него рывком.")
|
||||||
|
|
||||||
|
N("Giant Frog", GEN_F, "Гигантская жаба", "Гигантские жабы", "Гигантскую жабу", "Гигантской жабой")
|
||||||
|
|
||||||
|
S(
|
||||||
|
"At first, you are shocked by the agility of this frog. Such a large creature "
|
||||||
|
"should not be able to jump that quickly!\n\n"
|
||||||
|
"Then, you notice the green glow around its legs. This frog must be magical... "
|
||||||
|
"it has sacrificed its swimming abilities for superfrog jumping powers.",
|
||||||
|
|
||||||
|
"В начале Вы были удивлены ловкостью этой жабы. Не может быть, что такой большой зверь "
|
||||||
|
"прыгает с такой скоростью!\n\n"
|
||||||
|
"Потом Вы заметили зелёное свечениe вокруг её задних ног. Должно быть, она волшебная... "
|
||||||
|
"она поменяла свой способность плавать на суперсилу прыгать.")
|
||||||
|
|
||||||
|
N("Yellow Frog", GEN_F, "Жёлтая жаба", "Жёлтые жабы", "Жёлтую жабу", "Жёлтой жабой")
|
||||||
|
|
||||||
|
S("A slightly transparent yellow frog. It has mastered the magical power of phasing through solid "
|
||||||
|
"obstacles such as rock.",
|
||||||
|
"Слегка прозрачная жаба. Она усвоила магическую силу фазировать сквозь твёрдые "
|
||||||
|
"препятствия, как например скалу.")
|
||||||
|
|
||||||
|
N("Blue Frog", GEN_F, "Синяя жаба", "Синие жабы", "Синюю жабу", "Синей жабой")
|
||||||
|
|
||||||
|
S(
|
||||||
|
"This frog is able to vault over the shrubs in the Frog Park, destroying the shrub in the process. "
|
||||||
|
"While it can also vault over monsters, it will never hurt the other frogs!",
|
||||||
|
|
||||||
|
"Эта жаба способна совершать рывок через кусты в Жабном парке, уничтожая их. "
|
||||||
|
"Хотя она может делать это и через монстров, она никогда не причиняет вред другим жабам!")
|
||||||
|
|
||||||
|
S("\n\nThis Frog uses the power of %the1. You get 5 charges yourself for killing it.", "\n\nЭта жаба использует силу %P1. Вы получите 5 зарядов этой сферы, когда её убьёте. ")
|
||||||
|
|
||||||
// [PL:8980]
|
// [PL:8980]
|
||||||
S("recently changed settings", "недавно изменённые настройки")
|
S("recently changed settings", "недавно изменённые настройки")
|
||||||
|
|
||||||
|
@ -1596,8 +1596,8 @@ EX int movevalue(eMonster m, cell *c, int dir, flagtype flags) {
|
|||||||
if(b) val = 50;
|
if(b) val = 50;
|
||||||
else if(tk2 > tk) val += 1000 + 200 * (tk2 - tk);
|
else if(tk2 > tk) val += 1000 + 200 * (tk2 - tk);
|
||||||
}
|
}
|
||||||
else if(passable_for(m, c2, c, P_DEADLY)) val = -1100;
|
else if(passable_for(m, c2, c, P_DEADLY)) return -1100;
|
||||||
else val = -1750;
|
else return -1750;
|
||||||
|
|
||||||
if(c->monst == moGolem ) {
|
if(c->monst == moGolem ) {
|
||||||
val -= c2->pathdist;
|
val -= c2->pathdist;
|
||||||
|
@ -333,7 +333,7 @@ EX eOrbLandRelation getOLR(eItem it, eLand l) {
|
|||||||
|
|
||||||
if(it == itOrbWoods && !among(l,
|
if(it == itOrbWoods && !among(l,
|
||||||
laDryForest, laWineyard, laCaribbean, laOvergrown, laHaunted, laHauntedWall, laHauntedBorder, laTortoise, laFrog, laEclectic,
|
laDryForest, laWineyard, laCaribbean, laOvergrown, laHaunted, laHauntedWall, laHauntedBorder, laTortoise, laFrog, laEclectic,
|
||||||
laVariant))
|
laVariant, laBull))
|
||||||
return olrUseless;
|
return olrUseless;
|
||||||
|
|
||||||
if(it == itShard) {
|
if(it == itShard) {
|
||||||
|
Loading…
Reference in New Issue
Block a user