From 07c3f86aeedb2507af07b2d343cc422cb90ffda7 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 22 Oct 2009 13:26:51 +0200 Subject: Swap transform_cancellable into transform_uncancellable, since that's the default. It broken normal transformations... --- crawl-ref/source/abl-show.cc | 3 +-- crawl-ref/source/player.h | 2 +- crawl-ref/source/religion.cc | 2 +- crawl-ref/source/tags.cc | 4 ++-- crawl-ref/source/transfor.cc | 9 +++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index f87b97954f..9fb79b0fa3 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -2412,8 +2412,7 @@ std::vector your_talents(bool check_confused) _add_talent(talents, ABIL_BOLT_OF_DRAINING, check_confused); if (you.duration[DUR_TRANSFORMATION] - && you.attribute[ATTR_TRANSFORMATION] != TRAN_PIG - && you.transform_cancellable) + && you.transform_uncancellable) { _add_talent(talents, ABIL_END_TRANSFORMATION, check_confused); } diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 6aefbcb3b2..0c77c6894d 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -129,7 +129,7 @@ public: game_direction_type char_direction; bool opened_zot; bool royal_jelly_dead; - bool transform_cancellable; + bool transform_uncancellable; unsigned short pet_target; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 8d73ad94b1..0c68f7692f 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -4886,7 +4886,7 @@ static bool _jiyva_retribution() } if (transform(random2(you.penance[GOD_JIYVA]) * 2, form, true)) - you.transform_cancellable = false; + you.transform_uncancellable = false; } } else diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index d0b2ac4a7a..d39b498be5 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -836,7 +836,7 @@ static void tag_construct_you(writer &th) marshallByte(th, you.char_direction); marshallByte(th, you.opened_zot); marshallByte(th, you.royal_jelly_dead); - marshallByte(th, you.transform_cancellable); + marshallByte(th, you.transform_uncancellable); marshallByte(th, you.your_level); marshallByte(th, you.is_undead); marshallShort(th, you.unrand_reacts); @@ -1259,7 +1259,7 @@ static void tag_read_you(reader &th, char minorVersion) you.royal_jelly_dead = (bool) unmarshallByte(th); if (minorVersion >= TAG_MINOR_TRANS) - you.transform_cancellable = (bool) unmarshallByte(th); + you.transform_uncancellable = (bool) unmarshallByte(th); you.your_level = unmarshallByte(th); you.is_undead = static_cast(unmarshallByte(th)); diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 5f5eb5b950..d43e1ee88e 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -523,10 +523,10 @@ bool transform(int pow, transformation_type which_trans, bool force, if (!force && crawl_state.is_god_acting()) force = true; - if (!force && !you.transform_cancellable) + if (!force && you.transform_uncancellable) { // Jiyva's wrath-induced transformation is blocking the attempt. - // May need to be updated if transform_cancellable is used for + // May need to be updated if transform_uncancellable is used for // other uses. return (false); } @@ -708,6 +708,7 @@ bool transform(int pow, transformation_type which_trans, bool force, colour = RED; dur = pow; msg = "You have been turned into a pig!"; + you.transform_uncancellable = true; break; case TRAN_NONE: @@ -968,8 +969,8 @@ void untransform(bool skip_wielding) handle_interrupted_swap(true, false, true); you.turn_is_over = true; - if (!you.transform_cancellable) - you.transform_cancellable = true; + if (you.transform_uncancellable) + you.transform_uncancellable = false; } // XXX: This whole system is a mess as it still relies on special -- cgit v1.2.3-54-g00ecf