diff -Nru crawl-0.21.0/debian/changelog crawl-0.21.1/debian/changelog --- crawl-0.21.0/debian/changelog 2018-01-09 01:01:36.000000000 +0000 +++ crawl-0.21.1/debian/changelog 2018-02-03 21:30:13.000000000 +0000 @@ -1,3 +1,9 @@ +crawl (2:0.21.1-1) unstable; urgency=medium + + * New upstream release + + -- Adam Borowski Sat, 03 Feb 2018 22:30:13 +0100 + crawl (2:0.21.0-1) unstable; urgency=medium * New upstream release diff -Nru crawl-0.21.0/docs/changelog.txt crawl-0.21.1/docs/changelog.txt --- crawl-0.21.0/docs/changelog.txt 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/docs/changelog.txt 2018-02-01 11:47:54.000000000 +0000 @@ -1,3 +1,22 @@ +Stone Soup 0.21.1 (20180201) +---------------------------- + +Bugfix Release +-------------- +* Dith shadow mimic of launcher attacks no longer copies the enchant and ego + of the launcher. +* Monsters lose constriction by Borgnjor's Vile Clutch when they are moved by + any means. +* Formicids can now manually cancel digging, allowing them to use Wu Jian's + Wall Jump ability after digging. +* Wu Jian's Wall Jump ability now works under silence. +* New splash screen art. +* Numlock on Windows systems no longer causes unpredictable repeating + movement. +* Alt-F4 no longer causes freezing in Tiles on Windows systems. +* Resizing the local Tiles window during prompts no longer causes crashes. +* SDL 2 contrib updated to 2.0.7, which fixes compilation under Msys2. + Stone Soup 0.21 (20180105) -------------------------- diff -Nru crawl-0.21.0/INSTALL.txt crawl-0.21.1/INSTALL.txt --- crawl-0.21.0/INSTALL.txt 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/INSTALL.txt 2018-02-01 11:47:54.000000000 +0000 @@ -284,7 +284,17 @@ pacman -S mingw-w64-x86_64-toolchain - After the packages install, you're ready to build crawl! + At this point you may need to add the newly installed toolchain to your path. + You can do this with the following line, either at the command line (for that + shell instance only) or in the file `~/.bashrc` to make it permanent: + + export PATH=$PATH:/mingw64/bin + + To test that this worked, run: + + gcc -v + + After the packages are installed and gcc runs, you're ready to build crawl! * To get the Crawl source, you can follow the steps in the Source Code Checkout section above to clone Crawl into your MSYS2 home directory. If you've diff -Nru crawl-0.21.0/source/ability.cc crawl-0.21.1/source/ability.cc --- crawl-0.21.0/source/ability.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/ability.cc 2018-02-01 11:47:54.000000000 +0000 @@ -641,7 +641,7 @@ 0, 0, 0, 20, {fail_basis::invo, piety_breakpoint(5), 0, 1}, abflag::none }, { ABIL_WU_JIAN_LUNGE, "Lunge", 0, 0, 0, 0, {}, abflag::none }, { ABIL_WU_JIAN_WHIRLWIND, "Whirlwind", 0, 0, 0, 0, {}, abflag::none }, - { ABIL_WU_JIAN_WALLJUMP, "Wall Jump", 0, 0, 0, 0, {fail_basis::invo}, abflag::none }, + { ABIL_WU_JIAN_WALLJUMP, "Wall Jump", 0, 0, 0, 0, {}, abflag::none }, { ABIL_STOP_RECALL, "Stop Recall", 0, 0, 0, 0, {fail_basis::invo}, abflag::none }, { ABIL_RENOUNCE_RELIGION, "Renounce Religion", @@ -1653,6 +1653,7 @@ case ABIL_SIF_MUNA_DIVINE_ENERGY: case ABIL_SIF_MUNA_STOP_DIVINE_ENERGY: case ABIL_WU_JIAN_WALLJUMP: + case ABIL_DIG: // Doesn't work when starving, but is free to toggle. hungerCheck = false; break; default: @@ -1815,8 +1816,8 @@ } else { - mpr("You are already prepared to dig."); - return SPRET_ABORT; + you.digging = false; + mpr("You retract your mandibles."); } break; @@ -3689,6 +3690,9 @@ } if (you.transfer_skill_points > 0) abilities.push_back(ABIL_ASHENZARI_END_TRANSFER); + if (silenced(you.pos()) && you_worship(GOD_WU_JIAN) && piety_rank() >= 2) + abilities.push_back(ABIL_WU_JIAN_WALLJUMP); + if (!ignore_silence && silenced(you.pos())) return abilities; // Remaining abilities are unusable if silenced. diff -Nru crawl-0.21.0/source/abyss.cc crawl-0.21.1/source/abyss.cc --- crawl-0.21.0/source/abyss.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/abyss.cc 2018-02-01 11:47:54.000000000 +0000 @@ -1807,6 +1807,7 @@ case DNGN_CLEAR_PERMAROCK_WALL: case DNGN_OPEN_SEA: case DNGN_LAVA_SEA: + case DNGN_TRANSPORTER_LANDING: // entry already taken care of as stairs return false; case DNGN_METAL_WALL: diff -Nru crawl-0.21.0/source/actor.cc crawl-0.21.1/source/actor.cc --- crawl-0.21.0/source/actor.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/actor.cc 2018-02-01 11:47:54.000000000 +0000 @@ -542,7 +542,7 @@ constricting = nullptr; } -static bool _invalid_constrictee(const actor *constrictee) +static bool _invalid_constricting_map_entry(const actor *constrictee) { return !constrictee || !constrictee->is_constricted(); } @@ -563,7 +563,7 @@ for (const auto &entry : *constricting) { const actor * const constrictee = actor_by_mid(entry.first); - if (_invalid_constrictee(constrictee) + if (_invalid_constricting_map_entry(constrictee) || constrictee->is_directly_constricted()) { need_cleared.push_back(entry.first); @@ -595,87 +595,45 @@ clear_constricted(); } -void actor::clear_invalid_constrictions() -{ - clear_direct_constrictions_far_from(pos()); - clear_invalid_indirect_constrictions(); -} - /** - * Does the actor have a direct constrictor that's invalid for the given - * position? Direct constriction (e.g. by nagas and octopode players or - * AT_CONSTRICT) must happen between adjacent squares. + * Does the actor have an constrictor that's now invalid? Checks validity based + * on the type of constriction being done to the actor. * - * @param where The position to consider. - * @returns True if the constrictor is defined, direct, and invalid, false - * otherwise. + * @param move True if we are checking after the actor has moved. + * @returns True if the constrictor is defined yet invalid, false + * otherwise. */ -bool actor::has_invalid_direct_constrictor(const coord_def &where) const +bool actor::has_invalid_constrictor(bool move) const { - if (!is_directly_constricted()) + if (!is_constricted()) return false; const actor* const attacker = actor_by_mid(constricted_by); - return attacker && !adjacent(attacker->pos(), where); -} - -/** - * Clear any constriction-like engulfing attacks or direct constriction that's - * too far from the given position. - * - * @param where The position to consider. - */ -void actor::clear_direct_constrictions_far_from(const coord_def &where) -{ - clear_far_engulf(); + if (!attacker) + return true; - if (has_invalid_direct_constrictor(where)) - stop_being_constricted(); - - if (!constricting) - return; - - vector need_cleared; - for (const auto &entry : *constricting) - { - const actor * const constrictee = actor_by_mid(entry.first); - if (_invalid_constrictee(constrictee) - || constrictee->has_invalid_direct_constrictor(where)) - { - need_cleared.push_back(entry.first); - } - } - - for (mid_t whom : need_cleared) - stop_constricting(whom, false, false); -} - -/** - * Does the actor have an indirect constrictor that's invalid? - * - * @returns True if the constrictor is defined, indirect, and invalid, - * l false otherwise. - */ -bool actor::has_invalid_indirect_constrictor() const -{ - if (!is_constricted() || is_directly_constricted()) - return false; - - const actor* const attacker = actor_by_mid(constricted_by); - return !attacker + // Direct constriction (e.g. by nagas and octopode players or AT_CONSTRICT) + // must happen between adjacent squares. + if (is_directly_constricted()) + return !adjacent(attacker->pos(), pos()); + + // Indirect constriction requires the defender not to move. + return move + // Indirect constriction requires reachable ground. + || !feat_has_solid_floor(grd(pos())) // Constriction doesn't work out of LOS. - || !attacker->see_cell(pos()) - // All current indirect constriction requires reachable ground. - || !feat_has_solid_floor(grd(pos())); + || !attacker->see_cell(pos()); } /** - * Clear any indirect constrictions (e.g. from Borgnjor's Vile Clutch) that are - * no longer valid. + * Clear any constrictions that are no longer valid. + * + * @param movement True if we are clearing invalid constrictions after + * the actor has moved, false otherwise. */ -void actor::clear_invalid_indirect_constrictions() +void actor::clear_invalid_constrictions(bool move) { - if (has_invalid_indirect_constrictor()) + if (has_invalid_constrictor(move)) stop_being_constricted(); if (!constricting) @@ -685,8 +643,8 @@ for (const auto &entry : *constricting) { const actor * const constrictee = actor_by_mid(entry.first); - if (_invalid_constrictee(constrictee) - || constrictee->has_invalid_indirect_constrictor()) + if (_invalid_constricting_map_entry(constrictee) + || constrictee->has_invalid_constrictor()) { need_cleared.push_back(entry.first); } diff -Nru crawl-0.21.0/source/actor.h crawl-0.21.1/source/actor.h --- crawl-0.21.0/source/actor.h 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/actor.h 2018-02-01 11:47:54.000000000 +0000 @@ -428,11 +428,8 @@ void stop_being_constricted(bool quiet = false); bool can_constrict(const actor* defender, bool direct) const; - bool has_invalid_direct_constrictor(const coord_def &where) const; - void clear_direct_constrictions_far_from(const coord_def &where); - bool has_invalid_indirect_constrictor() const; - void clear_invalid_indirect_constrictions(); - void clear_invalid_constrictions(); + bool has_invalid_constrictor(bool move = false) const; + void clear_invalid_constrictions(bool move = false); void accum_has_constricted(); void handle_constriction(); bool is_constricted() const; diff -Nru crawl-0.21.0/source/beam.cc crawl-0.21.1/source/beam.cc --- crawl-0.21.0/source/beam.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/beam.cc 2018-02-01 11:47:54.000000000 +0000 @@ -6218,6 +6218,12 @@ return &menv[YOU_FAULTLESS]; nominal_source = reflector; } + + // Check for whether this is actually a dith shadow, not you + if (monster* shadow = monster_at(you.pos())) + if (shadow->type == MONS_PLAYER_SHADOW && nominal_source == MID_PLAYER) + return shadow; + if (YOU_KILL(nominal_ktype)) return &you; else diff -Nru crawl-0.21.0/source/cio.h crawl-0.21.1/source/cio.h --- crawl-0.21.0/source/cio.h 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/cio.h 2018-02-01 11:47:54.000000000 +0000 @@ -214,7 +214,9 @@ CK_MOUSE_CLICK, CK_TOUCH_DUMMY, // so a non-event can be passed from handle_mouse to the controlling code CK_REDRAW, // no-op to force redraws of things - CK_NO_KEY // so that the handle_mouse loop can be broken from early (for popups) + + CK_NO_KEY // so that the handle_mouse loop can be broken from early (for + // popups), and otherwise for keys to ignore }; class cursor_control diff -Nru crawl-0.21.0/source/dat/defaults/messages.txt crawl-0.21.1/source/dat/defaults/messages.txt --- crawl-0.21.0/source/dat/defaults/messages.txt 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/dat/defaults/messages.txt 2018-02-01 11:47:54.000000000 +0000 @@ -117,7 +117,7 @@ force_more_message += sound of rushing water force_more_message += oppressive heat about you force_more_message += crackle of arcane power -force_more_message += distant wind +force_more_message += hear a distant wind # Religion force_more_message += press .* to convert to Beogh diff -Nru crawl-0.21.0/source/dat/descript/ability.txt crawl-0.21.1/source/dat/descript/ability.txt --- crawl-0.21.0/source/dat/descript/ability.txt 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/dat/descript/ability.txt 2018-02-01 11:47:54.000000000 +0000 @@ -93,6 +93,9 @@ ability has no cost and simply prepares you to start digging; once active, moving into a wall will start tunneling. Doing so makes some noise and causes hunger, and is a little slower than walking. + +Once active, activating the ability again or making any non-digging movement +action will cancel the Dig status. %%%% Shaft Self ability diff -Nru crawl-0.21.0/source/dat/dlua/lm_timed.lua crawl-0.21.1/source/dat/dlua/lm_timed.lua --- crawl-0.21.0/source/dat/dlua/lm_timed.lua 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/dat/dlua/lm_timed.lua 2018-02-01 11:47:54.000000000 +0000 @@ -108,6 +108,7 @@ if ev:type() == dgn.dgn_event_type('entered_level') then self:start() + self.msg:event(self, marker, ev) elseif ev:type() == dgn.dgn_event_type('player_los') then self:start_short(marker) elseif ev:type() == self.ticktype then diff -Nru crawl-0.21.0/source/dat/dlua/lm_tmsg.lua crawl-0.21.1/source/dat/dlua/lm_tmsg.lua --- crawl-0.21.0/source/dat/dlua/lm_tmsg.lua 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/dat/dlua/lm_tmsg.lua 2018-02-01 11:47:54.000000000 +0000 @@ -67,6 +67,7 @@ end end + self._have_entered_level = false if verbose and self.initmsg then self:emit_message(cm, self.initmsg) end @@ -163,6 +164,11 @@ end function TimedMessaging:event(luamark, cmarker, event) + if event:type() == dgn.dgn_event_type('entered_level') then + self._have_entered_level = true + elseif not self._have_entered_level then + return + end if luamark.dur < self.check or luamark.dur <= 100 and self.check > -150 then self.check = luamark.dur - 250 if luamark.dur > 900 then Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/dat/tiles/title_froggy_goodgod_tengu_gold.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/dat/tiles/title_froggy_goodgod_tengu_gold.png differ Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/dat/tiles/title_froggy_jiyva_felid.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/dat/tiles/title_froggy_jiyva_felid.png differ Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/dat/tiles/title_froggy_natasha_and_boris.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/dat/tiles/title_froggy_natasha_and_boris.png differ Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/dat/tiles/title_froggy_rune_and_run_failed_on_dis.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/dat/tiles/title_froggy_rune_and_run_failed_on_dis.png differ Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/dat/tiles/title_froggy_thunder_fist_nikola.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/dat/tiles/title_froggy_thunder_fist_nikola.png differ diff -Nru crawl-0.21.0/source/debian/changelog crawl-0.21.1/source/debian/changelog --- crawl-0.21.0/source/debian/changelog 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/debian/changelog 2018-02-01 11:47:54.000000000 +0000 @@ -1,3 +1,8 @@ +crawl (2:0.21.1-1) UNRELEASED; urgency=low + + * New upstream release. + -- gammafunk Thu, 01 Feb 2018 01:54:03 -0600 + crawl (2:0.21.0-1) UNRELEASED; urgency=low * New upstream release. diff -Nru crawl-0.21.0/source/describe-spells.cc crawl-0.21.1/source/describe-spells.cc --- crawl-0.21.0/source/describe-spells.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/describe-spells.cc 2018-02-01 11:47:54.000000000 +0000 @@ -484,7 +484,7 @@ // only display header for book spells if (source_item) - description.cprintf("\n Spells Type Level"); + description.cprintf("\n Spells Type Level"); description.cprintf("\n"); // list spells in two columns, instead of one? (monster books) @@ -509,10 +509,11 @@ #endif && (get_spell_flags(spell) & SPFLAG_MR_CHECK)) { + int chance = hex_chance(spell, hd); + int ch_len = to_string(chance).length(); description.cprintf("%c - (%d%%) %s", - spell_letter, - hex_chance(spell, hd), - chop_string(spell_title(spell), 22).c_str()); + spell_letter, chance, + chop_string(spell_title(spell), 25-ch_len).c_str()); } else { diff -Nru crawl-0.21.0/source/dgn-proclayouts.cc crawl-0.21.1/source/dgn-proclayouts.cc --- crawl-0.21.0/source/dgn-proclayouts.cc 2017-04-28 07:04:16.000000000 +0000 +++ crawl-0.21.1/source/dgn-proclayouts.cc 2018-02-01 11:47:54.000000000 +0000 @@ -187,7 +187,8 @@ #if TAG_MAJOR_VERSION == 34 || feature == DNGN_TELEPORTER #endif - || feature == DNGN_TRANSPORTER) + || feature == DNGN_TRANSPORTER + || feature == DNGN_TRANSPORTER_LANDING) { feature = DNGN_STONE_ARCH; } diff -Nru crawl-0.21.0/source/directn.cc crawl-0.21.1/source/directn.cc --- crawl-0.21.0/source/directn.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/directn.cc 2018-02-01 11:47:54.000000000 +0000 @@ -1855,7 +1855,14 @@ reinitialize_move_flags(); const coord_def old_target = target(); - const command_type key_command = behaviour->get_command(); + const int key = behaviour->get_key(); + if (key == CK_REDRAW) + { + redraw_screen(false); + return false; + } + + const command_type key_command = behaviour->get_command(key); behaviour->update_top_prompt(&top_prompt); bool loop_done = false; diff -Nru crawl-0.21.0/source/libgui.cc crawl-0.21.1/source/libgui.cc --- crawl-0.21.0/source/libgui.cc 2017-09-01 20:35:22.000000000 +0000 +++ crawl-0.21.1/source/libgui.cc 2018-02-01 11:47:54.000000000 +0000 @@ -196,7 +196,7 @@ bool kbhit() { - if (crawl_state.tiles_disabled) + if (crawl_state.tiles_disabled || crawl_state.seen_hups) return false; // Look for the presence of any keyboard events in the queue. int count = wm->get_event_count(WME_KEYDOWN) diff -Nru crawl-0.21.0/source/lookup-help.cc crawl-0.21.1/source/lookup-help.cc --- crawl-0.21.0/source/lookup-help.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/lookup-help.cc 2018-02-01 11:47:54.000000000 +0000 @@ -413,6 +413,8 @@ if (spell == SPELL_NO_SPELL) return true; + if (spell_removed(spell)) + return true; if (get_spell_flags(spell) & SPFLAG_TESTING) return !you.wizard; @@ -669,7 +671,7 @@ static MenuEntry* _feature_menu_gen(char letter, const string &str, string &key) { const dungeon_feature_type feat = feat_by_desc(str); - MenuEntry* me = new FeatureMenuEntry(str, feat, letter); + MenuEntry* me = new MenuEntry(str, MEL_ITEM, 1, letter); me->data = &key; #ifdef USE_TILE diff -Nru crawl-0.21.0/source/macro.cc crawl-0.21.1/source/macro.cc --- crawl-0.21.0/source/macro.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/macro.cc 2018-02-01 11:47:54.000000000 +0000 @@ -711,12 +711,15 @@ if (!rgetch) rgetch = m_getch; - keys.push_back(a = rgetch()); - // The a == 0 test is legacy code that I don't dare to remove. I // have a vague recollection of it being a kludge for conio support. - while ((kbhit() || a == 0) && a != CK_REDRAW) - keys.push_back(a = rgetch()); + do + { + a = rgetch(); + if (a != CK_NO_KEY) + keys.push_back(a); + } + while (keys.size() == 0 || ((kbhit() || a == 0) && a != CK_REDRAW)); return keys; } diff -Nru crawl-0.21.0/source/Makefile crawl-0.21.1/source/Makefile --- crawl-0.21.0/source/Makefile 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/Makefile 2018-02-01 11:47:54.000000000 +0000 @@ -699,10 +699,10 @@ ifndef GLES ifneq ($(uname_S),Darwin) -ifeq (,$(findstring MINGW,$(uname_S))) -LIBS += -lGL -lGLU -else +ifeq ($(msys),Yes) LIBS += -lopengl32 -lglu32 +else +LIBS += -lGL -lGLU endif endif endif diff -Nru crawl-0.21.0/source/melee-attack.cc crawl-0.21.1/source/melee-attack.cc --- crawl-0.21.0/source/melee-attack.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/melee-attack.cc 2018-02-01 11:47:54.000000000 +0000 @@ -1346,66 +1346,69 @@ aux_damage = inflict_damage(aux_damage, BEAM_MISSILE); damage_done = aux_damage; - if (atk == UNAT_CONSTRICT) - attacker->start_constricting(*defender); - - if (damage_done > 0 || atk == UNAT_CONSTRICT) + if (defender->alive()) { - player_announce_aux_hit(); - - if (damage_brand == SPWPN_ACID) - defender->splash_with_acid(&you, 3); + if (atk == UNAT_CONSTRICT) + attacker->start_constricting(*defender); - if (damage_brand == SPWPN_VENOM && coinflip()) - poison_monster(defender->as_monster(), &you); - - // Normal vampiric biting attack, not if already got stabbing special. - if (damage_brand == SPWPN_VAMPIRISM && you.species == SP_VAMPIRE - && (!stab_attempt || stab_bonus <= 0)) + if (damage_done > 0 || atk == UNAT_CONSTRICT) { - _player_vampire_draws_blood(defender->as_monster(), damage_done); - } + player_announce_aux_hit(); - if (damage_brand == SPWPN_ANTIMAGIC && you.has_mutation(MUT_ANTIMAGIC_BITE) - && damage_done > 0) - { - const bool spell_user = defender->antimagic_susceptible(); + if (damage_brand == SPWPN_ACID) + defender->splash_with_acid(&you, 3); - antimagic_affects_defender(damage_done * 32); + if (damage_brand == SPWPN_VENOM && coinflip()) + poison_monster(defender->as_monster(), &you); - // MP drain suppressed under Pakellas, but antimagic still applies. - if (!have_passive(passive_t::no_mp_regen) || spell_user) + // Normal vampiric biting attack, not if already got stabbing special. + if (damage_brand == SPWPN_VAMPIRISM && you.species == SP_VAMPIRE + && (!stab_attempt || stab_bonus <= 0)) { - mprf("You %s %s %s.", - have_passive(passive_t::no_mp_regen) ? "disrupt" : "drain", - defender->as_monster()->pronoun(PRONOUN_POSSESSIVE).c_str(), - spell_user ? "magic" : "power"); + _player_vampire_draws_blood(defender->as_monster(), damage_done); } - if (!have_passive(passive_t::no_mp_regen) - && you.magic_points != you.max_magic_points - && !defender->as_monster()->is_summoned() - && !mons_is_firewood(*defender->as_monster())) + if (damage_brand == SPWPN_ANTIMAGIC && you.has_mutation(MUT_ANTIMAGIC_BITE) + && damage_done > 0) { - int drain = random2(damage_done * 2) + 1; - // Augment mana drain--1.25 "standard" effectiveness at 0 mp, - // 0.25 at mana == max_mana - drain = (int)((1.25 - you.magic_points / you.max_magic_points) - * drain); - if (drain) + const bool spell_user = defender->antimagic_susceptible(); + + antimagic_affects_defender(damage_done * 32); + + // MP drain suppressed under Pakellas, but antimagic still applies. + if (!have_passive(passive_t::no_mp_regen) || spell_user) { - mpr("You feel invigorated."); - inc_mp(drain); + mprf("You %s %s %s.", + have_passive(passive_t::no_mp_regen) ? "disrupt" : "drain", + defender->as_monster()->pronoun(PRONOUN_POSSESSIVE).c_str(), + spell_user ? "magic" : "power"); + } + + if (!have_passive(passive_t::no_mp_regen) + && you.magic_points != you.max_magic_points + && !defender->as_monster()->is_summoned() + && !mons_is_firewood(*defender->as_monster())) + { + int drain = random2(damage_done * 2) + 1; + // Augment mana drain--1.25 "standard" effectiveness at 0 mp, + // 0.25 at mana == max_mana + drain = (int)((1.25 - you.magic_points / you.max_magic_points) + * drain); + if (drain) + { + mpr("You feel invigorated."); + inc_mp(drain); + } } } } - } - else // no damage was done - { - mprf("You %s %s%s.", - aux_verb.c_str(), - defender->name(DESC_THE).c_str(), - you.can_see(*defender) ? ", but do no damage" : ""); + else // no damage was done + { + mprf("You %s %s%s.", + aux_verb.c_str(), + defender->name(DESC_THE).c_str(), + you.can_see(*defender) ? ", but do no damage" : ""); + } } if (defender->as_monster()->hit_points < 1) diff -Nru crawl-0.21.0/source/monster.cc crawl-0.21.1/source/monster.cc --- crawl-0.21.0/source/monster.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/monster.cc 2018-02-01 11:47:54.000000000 +0000 @@ -2693,9 +2693,11 @@ props[IOOD_Y].get_float() += c.y - pos().y; } - clear_direct_constrictions_far_from(c); - set_position(c); + + // Do constriction invalidation after to the move, so that all LOS checking + // is available. + clear_invalid_constrictions(true); } bool monster::fumbles_attack() diff -Nru crawl-0.21.0/source/output.cc crawl-0.21.1/source/output.cc --- crawl-0.21.0/source/output.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/output.cc 2018-02-01 11:47:54.000000000 +0000 @@ -1478,7 +1478,7 @@ // Line 8 is exp pool, Level } -void redraw_screen() +void redraw_screen(bool show_updates) { if (!crawl_state.need_save) { @@ -1518,11 +1518,11 @@ if (Options.messages_at_top) { display_message_window(); - viewwindow(); + viewwindow(show_updates); } else { - viewwindow(); + viewwindow(show_updates); display_message_window(); } diff -Nru crawl-0.21.0/source/output.h crawl-0.21.1/source/output.h --- crawl-0.21.0/source/output.h 2017-04-28 07:04:16.000000000 +0000 +++ crawl-0.21.1/source/output.h 2018-02-01 11:47:54.000000000 +0000 @@ -17,7 +17,7 @@ void print_stats_level(); void draw_border(); -void redraw_screen(); +void redraw_screen(bool show_updates = true); string mpr_monster_list(bool past = false); int update_monster_pane(); diff -Nru crawl-0.21.0/source/player-stats.cc crawl-0.21.1/source/player-stats.cc --- crawl-0.21.0/source/player-stats.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/player-stats.cc 2018-02-01 11:47:54.000000000 +0000 @@ -23,6 +23,7 @@ #include "mon-util.h" #include "notes.h" #include "ouch.h" +#include "output.h" #include "player.h" #include "religion.h" #include "stat-type.h" @@ -161,7 +162,8 @@ #ifdef TOUCH_UI keyin = pop.pop(); #else - keyin = getchm(); + while ((keyin = getchm()) == CK_REDRAW) + redraw_screen(); #endif } tried_lua = true; diff -Nru crawl-0.21.0/source/prompt.cc crawl-0.21.1/source/prompt.cc --- crawl-0.21.0/source/prompt.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/prompt.cc 2018-02-01 11:47:54.000000000 +0000 @@ -16,6 +16,7 @@ #endif #include "message.h" #include "options.h" +#include "output.h" #include "state.h" #include "stringutil.h" #ifdef TOUCH_UI @@ -94,7 +95,8 @@ cprintf("%s", prompt.c_str()); } - tmp = getchm(KMC_CONFIRM); + while ((tmp = getchm(KMC_CONFIRM)) == CK_REDRAW) + redraw_screen(); #endif } diff -Nru crawl-0.21.0/source/religion.cc crawl-0.21.1/source/religion.cc --- crawl-0.21.0/source/religion.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/religion.cc 2018-02-01 11:47:54.000000000 +0000 @@ -181,8 +181,7 @@ // Trog { { 1, ABIL_TROG_BERSERK, "go berserk at will" }, - { 2, ABIL_TROG_REGEN_MR, "call upon Trog for regeneration and protection " - "from hostile enchantments" }, + { 2, ABIL_TROG_REGEN_MR, "call upon Trog for regeneration and magic resistance" }, { 4, ABIL_TROG_BROTHERS_IN_ARMS, "call in reinforcements" }, { 5, "Trog will gift you weapons as you gain piety.", "Trog will no longer gift you weapons." }, diff -Nru crawl-0.21.0/source/rltiles/dc-icons.txt crawl-0.21.1/source/rltiles/dc-icons.txt --- crawl-0.21.0/source/rltiles/dc-icons.txt 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/rltiles/dc-icons.txt 2018-02-01 11:47:54.000000000 +0000 @@ -58,6 +58,7 @@ swift SWIFT pinned PINNED vile_clutch VILE_CLUTCH +possessable POSSESSABLE something_under SOMETHING_UNDER new_stair NEW_STAIR diff -Nru crawl-0.21.0/source/rltiles/dc-spells.txt crawl-0.21.1/source/rltiles/dc-spells.txt --- crawl-0.21.0/source/rltiles/dc-spells.txt 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/rltiles/dc-spells.txt 2018-02-01 11:47:54.000000000 +0000 @@ -169,134 +169,42 @@ iceblast ICEBLAST # spells normally only used by monsters +%back gui/spells/bg %sdir gui/spells/monster +generic GENERIC_MONSTER_SPELL air_elementals AIR_ELEMENTALS -%sdir misc -error AWAKEN_FOREST -error AWAKEN_VINES -error BLACK_MARK -error BLINK_ALLIES_AWAY -error BLINK_ALLIES_ENCIRCLE -error BLINK_AWAY -error BLINK_CLOSE -%sdir gui/spells/monster blink_other BLINK_OTHER -%sdir misc -error BLINK_OTHER_CLOSE -error BLINK_RANGE -error BLINKBOLT -%sdir gui/spells/monster brain_feed BRAIN_FEED -%sdir misc -error CALL_LOST_SOUL -error CALL_OF_CHAOS -error CALL_TIDE -%sdir gui/spells/monster cantrip CANTRIP -%sdir misc -error CHAIN_OF_CHAOS -error CHAOS_BREATH -%sdir gui/spells/monster cold_breath COLD_BREATH -%sdir misc -error CREATE_TENTACLES -error CRYSTAL_BOLT -error DEATH_RATTLE -error DIMENSION_ANCHOR -error DISINTEGRATE -error DRUIDS_CALL -%sdir gui/spells/monster earth_elementals EARTH_ELEMENTALS -%sdir misc -error ENERGY_BOLT -error ENSNARE -%sdir gui/spells/monster fake_mara_summon FAKE_MARA_SUMMON fake_rakshasa_summon FAKE_RAKSHASA_SUMMON fire_breath FIRE_BREATH fire_elementals FIRE_ELEMENTALS -%sdir misc -error FIRE_SUMMON -error FLASH_FREEZE -error FORCEFUL_INVITATION -error GHOSTLY_FIREBALL -error SPECTRAL_CLOUD -%sdir gui/spells/monster haste_other HASTE_OTHER call_down_damnation CALL_DOWN_DAMNATION -%sdir misc -error HOLY_BREATH -error HOLY_FLAMES -error INJURY_BOND -error INK_CLOUD -error INVISIBILITY_OTHER -%sdir gui/spells/monster iron_elementals IRON_ELEMENTALS -%sdir misc -error LEGENDARY_DESTRUCTION -error MALIGN_OFFERING -error MALMUTATE -error MESMERISE -%sdir gui/spells/monster metal_splinters METAL_SPLINTERS miasma_breath MIASMA_BREATH -%sdir misc -error MIGHT -error MIGHT_OTHER -error NOXIOUS_CLOUD -error ORB_OF_ELECTRICITY -error PETRIFYING_CLOUD -error PHANTOM_MIRROR -error PLANEREND -%sdir gui/spells/monster polymorph POLYMORPH porkalator PORKALATOR -%sdir misc -error PRIMAL_WAVE -%sdir gui/spells/monster quicksilver_bolt QUICKSILVER_BOLT -%sdir misc # Remove when TAG_MAJOR_VERSION > 34 -error REARRANGE_PIECES -error SAP_MAGIC -error SENTINEL_MARK -error SHADOW_BOLT -error SHADOW_SHARD -error SLEEP -%sdir gui/spells/monster spit_acid SPIT_ACID spit_poison SPIT_POISON steam_ball STEAM_BALL sticky_flame_range STICKY_FLAME_RANGE -%sdir misc -error STRIP_RESISTANCE -%sdir gui/spells/monster summon_drakes SUMMON_DRAKES summon_eyeballs SUMMON_EYEBALLS summon_hell_beast SUMMON_HELL_BEAST -%sdir misc -error SUMMON_ILLUSION -%sdir gui/spells/monster summon_minor_demon SUMMON_MINOR_DEMON summon_mushrooms SUMMON_MUSHROOMS -%sdir misc -error SUMMON_SPECTRAL_ORCS -%sdir gui/spells/monster summon_ufetubus SUMMON_UFETUBUS summon_undead SUMMON_UNDEAD summon_vermin SUMMON_VERMIN -%sdir misc -error TELEPORT_SELF -error THORN_VOLLEY -error TOMB_OF_DOROKLOHE -error VIRULENCE -error WALL_OF_BRAMBLES -error WATERSTRIKE -%sdir gui/spells/monster water_elementals WATER_ELEMENTALS -%sdir misc -error WIND_BLAST -error WORD_OF_RECALL +%back none # spells mimicking natural abilities %sdir gui/abilities Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/rltiles/gui/spells/bg.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/rltiles/gui/spells/bg.png differ Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/rltiles/gui/spells/monster/generic.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/rltiles/gui/spells/monster/generic.png differ Binary files /tmp/tmpRP7_iv/L7x_iI0vxq/crawl-0.21.0/source/rltiles/misc/icons/possessable.png and /tmp/tmpRP7_iv/dPLC27OBTB/crawl-0.21.1/source/rltiles/misc/icons/possessable.png differ diff -Nru crawl-0.21.0/source/spl-data.h crawl-0.21.1/source/spl-data.h --- crawl-0.21.0/source/spl-data.h 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/spl-data.h 2018-02-01 11:47:54.000000000 +0000 @@ -30,7 +30,7 @@ 0, -1, -1, 4, 0, - TILEG_TELEPORT_SELF, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -151,7 +151,7 @@ 200, 4, 11, 3, 0, - TILEG_BLINKBOLT, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -321,7 +321,7 @@ 200, -1, -1, 6, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -411,7 +411,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 3, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -536,7 +536,7 @@ 0, -1, -1, 2, 0, - TILEG_BLINK_RANGE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -547,7 +547,7 @@ 0, -1, -1, 2, 0, - TILEG_BLINK_AWAY, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -558,7 +558,7 @@ 0, -1, -1, 2, 0, - TILEG_BLINK_CLOSE, + TILEG_GENERIC_MONSTER_SPELL, }, // The following name was found in the hack.exe file of an early version @@ -857,7 +857,7 @@ 200, -1, -1, 4, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -997,7 +997,7 @@ 200, -1, -1, 2, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -1008,7 +1008,7 @@ 200, -1, -1, 2, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, #endif @@ -1125,7 +1125,7 @@ 100, LOS_RADIUS, LOS_RADIUS, 7, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -1169,7 +1169,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 6, 0, - TILEG_DISINTEGRATE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -1783,7 +1783,7 @@ 200, 5, 5, 5, 0, - TILEG_NOXIOUS_CLOUD, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -1827,7 +1827,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_ENERGY_BOLT, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -1928,7 +1928,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 2, 0, - TILEG_BLINK_OTHER_CLOSE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2006,7 +2006,7 @@ 0, 5, 5, 5, 0, - TILEG_CHAOS_BREATH, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2028,7 +2028,7 @@ 0, 5, 5, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2074,7 +2074,7 @@ 0, -1, -1, 4, 0, - TILEG_CREATE_TENTACLES, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2085,7 +2085,7 @@ 0, -1, -1, 4, 0, - TILEG_TOMB_OF_DOROKLOHE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2165,7 +2165,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_SLEEP, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2211,7 +2211,7 @@ 0, -1, -1, 4, 0, - TILEG_SUMMON_ILLUSION, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2222,7 +2222,7 @@ 200, 6, 6, 6, 25, - TILEG_PRIMAL_WAVE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2233,7 +2233,7 @@ 0, -1, -1, 6, 0, - TILEG_CALL_TIDE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2255,7 +2255,7 @@ 0, -1, -1, 7, 0, - TILEG_INK_CLOUD, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2267,7 +2267,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 3, 0, - TILEG_MIGHT, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2279,7 +2279,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_MIGHT_OTHER, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2303,7 +2303,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_AWAKEN_FOREST, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2314,7 +2314,7 @@ 0, -1, -1, 5, 0, - TILEG_DRUIDS_CALL, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2347,7 +2347,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_SUMMON_SPECTRAL_ORCS, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2371,7 +2371,7 @@ 0, -1, -1, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2394,7 +2394,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 6, 0, - TILEG_HOLY_FLAMES, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2406,7 +2406,7 @@ 200, 5, 5, 5, 2, - TILEG_HOLY_BREATH, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2473,7 +2473,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_MESMERISE, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2497,7 +2497,7 @@ 0, -1, -1, 6, 0, - TILEG_FIRE_SUMMON, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2508,7 +2508,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_PETRIFYING_CLOUD, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2565,7 +2565,7 @@ 200, 5, 5, 6, 0, - TILEG_ENSNARE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2609,7 +2609,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_MALMUTATE, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2655,7 +2655,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_SENTINEL_MARK, + TILEG_GENERIC_MONSTER_SPELL, }, // Ironbrand Convoker version (delayed activation, recalls only humanoids) @@ -2667,7 +2667,7 @@ 0, -1, -1, 3, 0, - TILEG_WORD_OF_RECALL, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2678,7 +2678,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_INJURY_BOND, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2689,7 +2689,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_SPECTRAL_CLOUD, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2700,7 +2700,7 @@ 200, 5, 5, 5, 0, - TILEG_GHOSTLY_FIREBALL, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2711,7 +2711,7 @@ 200, -1, -1, 4, 0, - TILEG_CALL_LOST_SOUL, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2722,7 +2722,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 3, 0, - TILEG_DIMENSION_ANCHOR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2733,7 +2733,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_BLINK_ALLIES_ENCIRCLE, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2757,7 +2757,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_AWAKEN_VINES, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2781,7 +2781,7 @@ 100, 5, 5, 4, 0, - TILEG_THORN_VOLLEY, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2792,7 +2792,7 @@ 100, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_WALL_OF_BRAMBLES, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2803,7 +2803,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 3, 0, - TILEG_WATERSTRIKE, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2827,7 +2827,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 3, 0, - TILEG_WIND_BLAST, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2838,7 +2838,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_STRIP_RESISTANCE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2906,7 +2906,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 10, - TILEG_MALIGN_OFFERING, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2939,7 +2939,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_INVISIBILITY_OTHER, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -2950,7 +2950,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 2, 0, - TILEG_VIRULENCE, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2974,7 +2974,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 7, 0, - TILEG_ORB_OF_ELECTRICITY, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -2998,7 +2998,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 7, 0, - TILEG_FLASH_FREEZE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3009,7 +3009,7 @@ 200, 5, 5, 8, 0, - TILEG_LEGENDARY_DESTRUCTION, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -3033,7 +3033,7 @@ 200, -1, -1, 3, 0, - TILEG_FORCEFUL_INVITATION, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3044,7 +3044,7 @@ 200, -1, -1, 6, 0, - TILEG_PLANEREND, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3055,7 +3055,7 @@ 200, -1, -1, 8, 0, - TILEG_CHAIN_OF_CHAOS, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3066,7 +3066,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 6, 0, - TILEG_CALL_OF_CHAOS, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3077,7 +3077,7 @@ 200, -1, -1, 6, 0, - TILEG_BLACK_MARK, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -3101,7 +3101,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_SAP_MAGIC, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -3124,7 +3124,7 @@ 200, -1, -1, 0, 0, - TILEG_REARRANGE_PIECES, + TILEG_GENERIC_MONSTER_SPELL, }, #endif @@ -3147,7 +3147,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_BLINK_ALLIES_AWAY, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3191,7 +3191,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_SHADOW_SHARD, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3202,7 +3202,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_SHADOW_BOLT, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3213,7 +3213,7 @@ 200, 6, 6, 6, 0, - TILEG_CRYSTAL_BOLT, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3316,7 +3316,7 @@ 200, -1, -1, 4, 0, - TILEG_PHANTOM_MIRROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3327,7 +3327,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3349,7 +3349,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3360,7 +3360,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3371,7 +3371,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3382,7 +3382,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3393,7 +3393,7 @@ 100, -1, -1, 6, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3415,7 +3415,7 @@ 0, 5, 5, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3426,7 +3426,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3438,7 +3438,7 @@ 0, 5, 5, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3449,7 +3449,7 @@ 0, 5, 5, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3460,7 +3460,7 @@ 0, -1, -1, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3471,7 +3471,7 @@ 0, -1, -1, 25, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3482,7 +3482,7 @@ 0, -1, -1, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3493,7 +3493,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 6, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3504,7 +3504,7 @@ 0, 3, 3, 3, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -3528,7 +3528,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 0, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3539,7 +3539,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3550,7 +3550,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3561,7 +3561,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 0, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3572,7 +3572,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 0, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3583,7 +3583,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 0, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3594,7 +3594,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_DEATH_RATTLE, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3605,7 +3605,7 @@ 100, -1, -1, 6, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3627,7 +3627,7 @@ 50, LOS_RADIUS, LOS_RADIUS, 3, 5, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -3651,7 +3651,7 @@ 200, -1, -1, 20, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, #if TAG_MAJOR_VERSION == 34 @@ -3710,7 +3710,7 @@ 200, -1, -1, 3, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3721,7 +3721,7 @@ 200, -1, -1, 6, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3732,7 +3732,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 15, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3743,7 +3743,7 @@ 0, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3754,7 +3754,7 @@ 200, -1, -1, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3776,7 +3776,7 @@ 25, LOS_RADIUS, LOS_RADIUS, 1, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3787,7 +3787,7 @@ 100, -1, -1, 2, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3798,7 +3798,7 @@ 200, -1, -1, 6, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3831,7 +3831,7 @@ 200, -1, -1, 0, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3842,7 +3842,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3853,7 +3853,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3864,7 +3864,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 0, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3887,7 +3887,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3898,7 +3898,7 @@ 200, LOS_RADIUS, LOS_RADIUS, 4, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3931,7 +3931,7 @@ 200, VORTEX_RADIUS, VORTEX_RADIUS, 5, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, { @@ -3953,7 +3953,7 @@ 0, -1, -1, 1, 0, - TILEG_ERROR, + TILEG_GENERIC_MONSTER_SPELL, }, }; diff -Nru crawl-0.21.0/source/status.cc crawl-0.21.1/source/status.cc --- crawl-0.21.0/source/status.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/status.cc 2018-02-01 11:47:54.000000000 +0000 @@ -417,8 +417,13 @@ case STATUS_CONSTRICTED: if (you.is_constricted()) { + // Our constrictor isn't, valid so don't report this status. + if (you.has_invalid_constrictor()) + return false; + const monster * const cstr = monster_by_mid(you.constricted_by); ASSERT(cstr); + const bool damage = cstr->constriction_does_damage(you.is_directly_constricted()); diff -Nru crawl-0.21.0/source/tiledgnbuf.cc crawl-0.21.1/source/tiledgnbuf.cc --- crawl-0.21.0/source/tiledgnbuf.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/tiledgnbuf.cc 2018-02-01 11:47:54.000000000 +0000 @@ -504,6 +504,16 @@ m_buf_icons.add(TILEI_RECALL, x, y, -status_shift, 0); status_shift += 9; } + if (fg & TILE_FLAG_VILE_CLUTCH) + { + m_buf_icons.add(TILEI_VILE_CLUTCH, x, y, -status_shift, 0); + status_shift += 11; + } + if (fg & TILE_FLAG_POSSESSABLE) + { + m_buf_icons.add(TILEI_POSSESSABLE, x, y, -status_shift, 0); + status_shift += 6; + } // Summoned and anim. weap. icons will overlap if you have a // summoned dancing weapon, but that's rare and still looks okay. diff -Nru crawl-0.21.0/source/tile-flags.h crawl-0.21.1/source/tile-flags.h --- crawl-0.21.0/source/tile-flags.h 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/tile-flags.h 2018-02-01 11:47:54.000000000 +0000 @@ -47,6 +47,7 @@ TILE_FLAG_SWIFT = 0x100000000000000ULL, TILE_FLAG_PINNED = 0x200000000000000ULL, TILE_FLAG_VILE_CLUTCH = 0x400000000000000ULL, + TILE_FLAG_POSSESSABLE = 0x800000000000000ULL, // MDAM has 5 possibilities, so uses 3 bits. TILE_FLAG_MDAM_MASK = 0x1C0000000ULL, diff -Nru crawl-0.21.0/source/tilepick.cc crawl-0.21.1/source/tilepick.cc --- crawl-0.21.0/source/tilepick.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/tilepick.cc 2018-02-01 11:47:54.000000000 +0000 @@ -1844,6 +1844,8 @@ ch |= TILE_FLAG_PINNED; if (mons.is(MB_VILE_CLUTCH)) ch |= TILE_FLAG_VILE_CLUTCH; + if (mons.is(MB_POSSESSABLE)) + ch |= TILE_FLAG_POSSESSABLE; if (mons.attitude == ATT_FRIENDLY) ch |= TILE_FLAG_PET; diff -Nru crawl-0.21.0/source/tile-player-flags.h crawl-0.21.1/source/tile-player-flags.h --- crawl-0.21.0/source/tile-player-flags.h 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/tile-player-flags.h 2018-02-01 11:47:54.000000000 +0000 @@ -1,6 +1,11 @@ #pragma once +#include "tiledef-player.h" + enum tile_player_flags { - TILEP_SHOW_EQUIP = 0x1000, + TILEP_SHOW_EQUIP = 0x10000000, }; + +static_assert(static_cast(TILEP_SHOW_EQUIP) > static_cast(TILEP_PLAYER_MAX), + "TILEP_SHOW_EQUIP must be distinct from all player tile enums"); diff -Nru crawl-0.21.0/source/tilereg-map.cc crawl-0.21.1/source/tilereg-map.cc --- crawl-0.21.0/source/tilereg-map.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/tilereg-map.cc 2018-02-01 11:47:54.000000000 +0000 @@ -65,6 +65,8 @@ m_colours[MF_EXCL_ROOT] = Options.tile_excl_centre_col; m_colours[MF_EXCL] = Options.tile_excluded_col; m_colours[MF_PLAYER] = Options.tile_player_col; + m_colours[MF_TRANSPORTER] = Options.tile_transporter_col; + m_colours[MF_TRANSPORTER_LANDING] = Options.tile_transporter_landing_col; } MapRegion::~MapRegion() diff -Nru crawl-0.21.0/source/tilereg-menu.cc crawl-0.21.1/source/tilereg-menu.cc --- crawl-0.21.0/source/tilereg-menu.cc 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/tilereg-menu.cc 2018-02-01 11:47:54.000000000 +0000 @@ -220,8 +220,7 @@ // sorted by texture first, e.g. you can never draw // a dungeon tile over a monster tile. TextureID tex = tile.tex; - m_tile_buf[tex].add_unscaled(tile.tile, entry.sx, entry.sy, - tile.ymax); + m_tile_buf[tex].add(tile.tile, entry.sx, entry.sy, 0, 0, false, tile.ymax, 1, 1); } } else diff -Nru crawl-0.21.0/source/util/release_ver crawl-0.21.1/source/util/release_ver --- crawl-0.21.0/source/util/release_ver 2018-01-05 19:23:52.000000000 +0000 +++ crawl-0.21.1/source/util/release_ver 2018-02-01 11:52:55.000000000 +0000 @@ -1 +1 @@ -0.21.0 +0.21.1 diff -Nru crawl-0.21.0/source/webserver/game_data/static/cell_renderer.js crawl-0.21.1/source/webserver/game_data/static/cell_renderer.js --- crawl-0.21.0/source/webserver/game_data/static/cell_renderer.js 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/webserver/game_data/static/cell_renderer.js 2018-02-01 11:47:54.000000000 +0000 @@ -1011,7 +1011,7 @@ // Helper functions for drawing from specific textures - draw_tile: function(idx, x, y, mod, ofsx, ofsy, y_max) + draw_tile: function(idx, x, y, mod, ofsx, ofsy, y_max, centre) { var info = mod.get_tile_info(idx); var img = get_img(mod.get_img(idx)); @@ -1019,8 +1019,9 @@ { throw ("Tile not found: " + idx); } - var size_ox = 32 / 2 - info.w / 2; - var size_oy = 32 - info.h; + centre = centre === undefined ? true : centre; + var size_ox = !centre ? 0 : 32 / 2 - info.w / 2; + var size_oy = !centre ? 0 : 32 - info.h; var pos_sy_adjust = (ofsy || 0) + info.oy + size_oy; var pos_ey_adjust = pos_sy_adjust + info.ey - info.sy; var sy = pos_sy_adjust; @@ -1075,10 +1076,10 @@ this.draw_tile(idx, x, y, icons, ofsx, ofsy); }, - draw_from_texture: function (idx, x, y, tex, ofsx, ofsy, y_max) + draw_from_texture: function (idx, x, y, tex, ofsx, ofsy, y_max, centre) { var mod = tileinfos(tex); - this.draw_tile(idx, x, y, mod, ofsx, ofsy); + this.draw_tile(idx, x, y, mod, ofsx, ofsy, y_max, centre); }, }); diff -Nru crawl-0.21.0/source/webserver/game_data/static/menu.js crawl-0.21.1/source/webserver/game_data/static/menu.js --- crawl-0.21.0/source/webserver/game_data/static/menu.js 2018-01-05 19:21:10.000000000 +0000 +++ crawl-0.21.1/source/webserver/game_data/static/menu.js 2018-02-01 11:47:54.000000000 +0000 @@ -50,7 +50,7 @@ renderer.init(canvas[0]); $.each(item.tiles, function () { - renderer.draw_from_texture(this.t, 0, 0, this.tex, 0, 0, this.ymax); + renderer.draw_from_texture(this.t, 0, 0, this.tex, 0, 0, this.ymax, false); }); elem.prepend(canvas); diff -Nru crawl-0.21.0/source/windowmanager-sdl.cc crawl-0.21.1/source/windowmanager-sdl.cc --- crawl-0.21.0/source/windowmanager-sdl.cc 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/windowmanager-sdl.cc 2018-02-01 11:47:54.000000000 +0000 @@ -127,16 +127,6 @@ } } -// Suppress the SDL_TEXTINPUT event from this keypress. XXX: hacks -static void _suppress_textinput() -{ - if (SDL_IsTextInputActive()) - { - SDL_StopTextInput(); - SDL_StartTextInput(); - } -} - static int _translate_keysym(SDL_Keysym &keysym) { // This function returns the key that was hit. Returning zero implies that @@ -336,7 +326,7 @@ } SDLWrapper::SDLWrapper(): - m_window(nullptr), m_context(nullptr) + m_window(nullptr), m_context(nullptr), prev_keycode(0) { } @@ -657,12 +647,67 @@ SDL_SetModState(set_to); } +static char32_t _key_suppresses_textinput(int keycode) +{ + char result_char = 0; + char32_t result = 0; + switch (keycode) + { + case SDLK_KP_5: + case SDLK_CLEAR: + result_char = '5'; + break; + case SDLK_KP_8: + case SDLK_UP: + result_char = '8'; + break; + case SDLK_KP_2: + case SDLK_DOWN: + result_char = '2'; + break; + case SDLK_KP_4: + case SDLK_LEFT: + result_char = '4'; + break; + case SDLK_KP_6: + case SDLK_RIGHT: + result_char = '6'; + break; + case SDLK_KP_0: + case SDLK_INSERT: + result_char = '0'; + break; + case SDLK_KP_7: + case SDLK_HOME: + result_char = '7'; + break; + case SDLK_KP_1: + case SDLK_END: + result_char = '1'; + break; + case SDLK_KP_9: + case SDLK_PAGEUP: + result_char = '9'; + break; + case SDLK_KP_3: + case SDLK_PAGEDOWN: + result_char = '3'; + break; + } + if (result_char) + utf8towc(&result, &result_char); + return result; +} + int SDLWrapper::wait_event(wm_event *event) { SDL_Event sdlevent; if (!SDL_WaitEvent(&sdlevent)) return 0; + if (sdlevent.type != SDL_TEXTINPUT) + prev_keycode = 0; + // translate the SDL_Event into the almost-analogous wm_event switch (sdlevent.type) { @@ -684,9 +729,9 @@ return 0; // If we're going to accept this keydown, don't generate subsequent - // textinput events for the same key. - if (event->key.keysym.sym) - _suppress_textinput(); + // textinput events for the same key. This mechanism assumes that a + // fake textinput will arrive as the immediately following SDL event. + prev_keycode = sdlevent.key.keysym.sym; /* * LShift = scancode 0x30; tiles_key_mod 0x1; unicode 0x130; sym 0x130 SDLK_LSHIFT @@ -709,6 +754,15 @@ // XXX: handle multiple keys? char32_t wc; utf8towc(&wc, sdlevent.text.text); + if (prev_keycode && _key_suppresses_textinput(prev_keycode) == wc) + { + // this needs to return something, or the event loop in + // TilesFramework::getch_ck will block. Currently, CK_NO_KEY + // is handled in macro.cc:_getch_mul. + prev_keycode = 0; + event->key.keysym.sym = CK_NO_KEY; + return 1; + } event->key.keysym.sym = wc; break; } diff -Nru crawl-0.21.0/source/windowmanager-sdl.h crawl-0.21.1/source/windowmanager-sdl.h --- crawl-0.21.0/source/windowmanager-sdl.h 2018-01-05 19:20:46.000000000 +0000 +++ crawl-0.21.1/source/windowmanager-sdl.h 2018-02-01 11:47:54.000000000 +0000 @@ -68,6 +68,8 @@ private: void glDebug(const char *msg); + + int prev_keycode; }; #endif // USE_SDL