From 285605c0f29f5edf41296f29268a0952bf9a260d Mon Sep 17 00:00:00 2001 From: blargdag Date: Mon, 12 Jul 2021 07:59:33 -0700 Subject: [PATCH 1/7] Translation of Frog Park strings. --- language-ru.cpp | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/language-ru.cpp b/language-ru.cpp index 893410d5..89f707be 100644 --- a/language-ru.cpp +++ b/language-ru.cpp @@ -7312,6 +7312,64 @@ S("multiplayer", "режим нескольких игроков") // [PL:7811] 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] S("recently changed settings", "недавно изменённые настройки") From 7bf23df2dddac04eb95fe114f932156540b46f7d Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Wed, 14 Jul 2021 17:47:32 -0700 Subject: [PATCH 2/7] Starting in a non-basic land with -W now enables cheat mode --- debug.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debug.cpp b/debug.cpp index 35186a4a..f31dd1ba 100644 --- a/debug.cpp +++ b/debug.cpp @@ -916,6 +916,8 @@ int read_cheat_args() { PHASEFROM(2); shift(); firstland0 = firstland = specialland = readland(args()); + if (!landUnlocked(firstland)) + cheat(); stop_game_and_switch_mode(rg::nothing); showstartmenu = false; } From 36af5f186f1400d75535fe86b308c925b82a1e50 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Wed, 14 Jul 2021 20:56:46 -0700 Subject: [PATCH 3/7] Autoplay improvements 2 --- devmods/autoplay.cpp | 92 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 5 deletions(-) diff --git a/devmods/autoplay.cpp b/devmods/autoplay.cpp index 8bee4c1c..8c03bf0b 100644 --- a/devmods/autoplay.cpp +++ b/devmods/autoplay.cpp @@ -7,6 +7,7 @@ namespace hr { bool doAutoplay; +eLand autoplayLand; namespace prairie { extern long long enter; } @@ -144,7 +145,7 @@ void autoplay(int num_moves = 1000000000) { } else if (croll == 29) { printf("Place fun walls\n"); forCellEx(cz, cwt.at) - if (!cz->wall) + if (!cz->wall && !cz->monst) cz->wall = pick(waExplosiveBarrel, waBigStatue, waThumperOff, waBonfireOff, waCloud, waMirror); } else if (croll == 30) { cell *ct = dcal[hrand(isize(dcal))]; @@ -164,8 +165,57 @@ void autoplay(int num_moves = 1000000000) { printf("Spam some slime\n"); ct->item = itNone; 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 @@ -228,8 +278,7 @@ void autoplay(int num_moves = 1000000000) { printf("RESET\n"); gcount = 0; cellcount = 0; - activateSafety(laCrossroads); - // landlist[hrand(isize(landlist))]); + activateSafety(autoplayLand ? autoplayLand : landlist[hrand(isize(landlist))]); if (cellcount < 0) { //printf("How did cellcount become negative?\n"); cellcount = 1; @@ -255,7 +304,7 @@ void autoplay(int num_moves = 1000000000) { for(int i=0; iland == 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; canmove = true; doAutoplay = false; @@ -266,6 +315,9 @@ void autoplay(int num_moves = 1000000000) { if(cwt.at->monst && !isMultitile(cwt.at->monst)) { 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; imonst) && 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)) { @@ -303,6 +378,13 @@ int readArgs() { using namespace arg; 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")) { PHASE(3); autoplay(); From 1f88b87154f5271c4df6b82275e78e1604560d88 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Fri, 16 Jul 2021 09:28:47 -0700 Subject: [PATCH 4/7] Rose scent can now force the player's allies to walk into rosebushes --- monstermove.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monstermove.cpp b/monstermove.cpp index 7c3fe24e..ffdca97d 100644 --- a/monstermove.cpp +++ b/monstermove.cpp @@ -1596,8 +1596,8 @@ EX int movevalue(eMonster m, cell *c, int dir, flagtype flags) { if(b) val = 50; else if(tk2 > tk) val += 1000 + 200 * (tk2 - tk); } - else if(passable_for(m, c2, c, P_DEADLY)) val = -1100; - else val = -1750; + else if(passable_for(m, c2, c, P_DEADLY)) return -1100; + else return -1750; if(c->monst == moGolem ) { val -= c2->pathdist; From c24e32de7cf589bb2f5491002ec1a595996cd4f5 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Sat, 17 Jul 2021 02:24:38 -0700 Subject: [PATCH 5/7] ASCII monsters: don't draw stun stars for Mutant Ivy --- graph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph.cpp b/graph.cpp index 6d925d20..0199dbeb 100644 --- a/graph.cpp +++ b/graph.cpp @@ -1345,7 +1345,7 @@ EX bool drawMonsterType(eMonster m, cell *where, const shiftmatrix& V1, color_t #if CAP_SHAPES if(among(m, moTortoise, moWorldTurtle) && where && where->stuntime >= 3) 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)) drawStunStars(V, where->stuntime); From 877ce3771af53e367b60090ad8fa886536a73cfc Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Sat, 17 Jul 2021 08:20:20 -0700 Subject: [PATCH 6/7] Allow Orb of the Woods to appear in Bull Dash as a prize orb --- orbgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orbgen.cpp b/orbgen.cpp index d5629166..8bc65909 100644 --- a/orbgen.cpp +++ b/orbgen.cpp @@ -333,7 +333,7 @@ EX eOrbLandRelation getOLR(eItem it, eLand l) { if(it == itOrbWoods && !among(l, laDryForest, laWineyard, laCaribbean, laOvergrown, laHaunted, laHauntedWall, laHauntedBorder, laTortoise, laFrog, laEclectic, - laVariant)) + laVariant, laBull)) return olrUseless; if(it == itShard) { From 7d2f2aad7bdfa6f03e06db7b39b174817de8e478 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Sat, 17 Jul 2021 23:50:57 -0700 Subject: [PATCH 7/7] Weak attacks no longer affect enemy HP --- attack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attack.cpp b/attack.cpp index 52d29861..b6c53509 100644 --- a/attack.cpp +++ b/attack.cpp @@ -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) : 3); 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--; if(c2->monst == moPrincess) playSound(c2, princessgender() ? "hit-princess" : "hit-prince");