From f1bf6c22c3d579509c34e8577010d9e51516d826 Mon Sep 17 00:00:00 2001
From: wheals <shm.mark@gmail.com>
Date: Wed, 12 Feb 2014 18:59:28 -0500
Subject: [PATCH] Remove djinn.

Djinn games can't be started (hopefully including using the rcfile),
and djinn code should be removed on save-compat bump.

Also, schedule a few SE things to be removed.
---
 crawl-ref/source/ability.cc               | 25 ++++++++-
 crawl-ref/source/actor.cc                 |  6 ++-
 crawl-ref/source/aptitudes.h              | 10 ++--
 crawl-ref/source/art-func.h               |  2 +
 crawl-ref/source/beam.cc                  |  2 +
 crawl-ref/source/cloud.cc                 |  5 +-
 crawl-ref/source/dat/descript/species.txt |  4 --
 crawl-ref/source/delay.cc                 |  6 ++-
 crawl-ref/source/effects.cc               | 10 +++-
 crawl-ref/source/enum.h                   |  5 ++
 crawl-ref/source/evoke.cc                 |  8 ++-
 crawl-ref/source/food.cc                  | 16 ++++--
 crawl-ref/source/godwrath.cc              |  6 ++-
 crawl-ref/source/item_use.cc              |  8 ++-
 crawl-ref/source/itemname.cc              | 41 ++++++++++++---
 crawl-ref/source/items.cc                 | 10 ++++
 crawl-ref/source/mon-abil.cc              |  4 ++
 crawl-ref/source/mon-data.h               |  2 +
 crawl-ref/source/mon-stuff.cc             |  3 +-
 crawl-ref/source/mutation.cc              |  4 ++
 crawl-ref/source/ng-restr.cc              | 36 +------------
 crawl-ref/source/ng-setup.cc              |  2 +
 crawl-ref/source/ouch.cc                  |  2 +
 crawl-ref/source/output.cc                | 35 +++++++++----
 crawl-ref/source/player-act.cc            | 10 +++-
 crawl-ref/source/player-equip.cc          | 21 ++++++--
 crawl-ref/source/player.cc                | 86 +++++++++++++++++++++----------
 crawl-ref/source/potion.cc                |  2 +
 crawl-ref/source/religion.cc              | 12 +++--
 crawl-ref/source/skills2.cc               |  6 +++
 crawl-ref/source/species.cc               | 35 ++++++++++---
 crawl-ref/source/spl-book.cc              |  2 +
 crawl-ref/source/spl-cast.cc              | 10 +++-
 crawl-ref/source/spl-miscast.cc           | 12 ++++-
 crawl-ref/source/state.cc                 |  4 ++
 crawl-ref/source/status.cc                |  6 ++-
 crawl-ref/source/tilepick-p.cc            |  6 +++
 crawl-ref/source/tileweb.cc               |  7 +++
 crawl-ref/source/transform.cc             |  2 +
 crawl-ref/source/util/gen-apt.pl          |  4 +-
 40 files changed, 355 insertions(+), 122 deletions(-)

diff --git a/crawl-ref/source/ability.cc b/crawl-ref/source/ability.cc
index 2cd0e36..920805b 100644
--- a/crawl-ref/source/ability.cc
+++ b/crawl-ref/source/ability.cc
@@ -655,6 +655,7 @@ const string make_cost_description(ability_type ability)
 {
     const ability_def& abil = get_ability_def(ability);
     string ret;
+#if TAG_MAJOR_VERSION == 34
     int ep = 0;
     if (abil.mp_cost)
         if (you.species == SP_DJINNI)
@@ -674,6 +675,15 @@ const string make_cost_description(ability_type ability)
             abil.flags & ABFLAG_PERMANENT_HP ? "Permanent " : "",
             you.species == SP_DJINNI ? "EP" : "HP");
     }
+#else
+    if (abil.mp_cost)
+        ret += make_stringf(", %d %sMP", abil.mp_cost,
+             abil.flags & ABFLAG_PERMANENT_MP ? "Permanent " : "");
+
+    if (abil.hp_cost)
+        ret += make_stringf(", %d %sHP", abil.hp_cost.cost(you.hp_max),
+            abil.flags & ABFLAG_PERMANENT_HP ? "Permanent " : "",
+#endif
 
     if (abil.zp_cost)
         ret += make_stringf(", %d ZP", (int)_zp_cost(abil));
@@ -681,9 +691,11 @@ const string make_cost_description(ability_type ability)
     if (abil.food_cost && !you_foodless(true)
         && (you.is_undead != US_SEMI_UNDEAD || you.hunger_state > HS_STARVING))
     {
+#if TAG_MAJOR_VERSION == 34
         if (you.species == SP_DJINNI)
             ret += ", Glow";
         else
+#endif
             ret += ", Food"; // randomised and exact amount hidden from player
     }
 
@@ -775,9 +787,11 @@ static const string _detailed_cost_description(ability_type ability)
         && (you.is_undead != US_SEMI_UNDEAD || you.hunger_state > HS_STARVING))
     {
         have_cost = true;
+#if TAG_MAJOR_VERSION == 34
         if (you.species == SP_DJINNI)
             ret << "\nGlow   : ";
         else
+#endif
             ret << "\nHunger : ";
         ret << hunger_cost_string(abil.food_cost + abil.food_cost / 2);
     }
@@ -847,7 +861,9 @@ static ability_type _fixup_ability(ability_type ability)
     case ABIL_TROG_BERSERK:
         switch (you.species)
         {
+#if TAG_MAJOR_VERSION == 34
         case SP_DJINNI:
+#endif
         case SP_GHOUL:
         case SP_MUMMY:
         case SP_FORMICID:
@@ -2614,8 +2630,10 @@ static bool _do_ability(const ability_def& abil)
     {
         const bool self = (abil.ability == ABIL_ELYVILON_LESSER_HEALING_SELF);
         int pow = 3 + (you.skill_rdiv(SK_INVOCATIONS, 1, 6));
+#if TAG_MAJOR_VERSION == 34
         if (self && you.species == SP_DJINNI)
             pow /= 2;
+#endif
         if (cast_healing(pow,
                          3 + (int) ceil(you.skill(SK_INVOCATIONS, 1) / 6.0),
                          true, self ? you.pos() : coord_def(0, 0), !self,
@@ -2637,8 +2655,10 @@ static bool _do_ability(const ability_def& abil)
         const bool self = (abil.ability == ABIL_ELYVILON_GREATER_HEALING_SELF);
 
         int pow = 10 + (you.skill_rdiv(SK_INVOCATIONS, 1, 3));
+#if TAG_MAJOR_VERSION == 34
         if (self && you.species == SP_DJINNI)
             pow /= 2;
+#endif
         if (cast_healing(pow,
                          10 + (int) ceil(you.skill(SK_INVOCATIONS, 1) / 3.0),
                          true, self ? you.pos() : coord_def(0, 0), !self,
@@ -3327,7 +3347,10 @@ vector<talent> your_talents(bool check_confused, bool include_unusable)
     if ((you.species == SP_TENGU && you.experience_level >= 5
          || player_mutation_level(MUT_BIG_WINGS)) && !you.airborne()
         || you.racial_permanent_flight() && !you.attribute[ATTR_PERM_FLIGHT]
-           && you.species != SP_DJINNI)
+#if TAG_MAJOR_VERSION == 34
+           && you.species != SP_DJINNI
+#endif
+           )
     {
         // Tengu can fly, but only from the ground
         // (until level 15, when it becomes permanent until revoked).
diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc
index aa7642e..4050f54 100644
--- a/crawl-ref/source/actor.cc
+++ b/crawl-ref/source/actor.cc
@@ -52,7 +52,11 @@ bool actor::airborne() const
  */
 bool actor::ground_level() const
 {
-    return !airborne() && !is_wall_clinging() && mons_species() != MONS_DJINNI;
+    return !airborne() && !is_wall_clinging()
+#if TAG_MAJOR_VERSION == 34
+        && mons_species() != MONS_DJINNI
+#endif
+        ;
 }
 
 bool actor::stand_on_solid_ground() const
diff --git a/crawl-ref/source/aptitudes.h b/crawl-ref/source/aptitudes.h
index 1f2da7f..d9c0d67 100644
--- a/crawl-ref/source/aptitudes.h
+++ b/crawl-ref/source/aptitudes.h
@@ -129,6 +129,7 @@ static const species_skill_aptitude species_skill_aptitudes[] =
     APT(SP_DEEP_ELF,        SK_INVOCATIONS,     1),
     APT(SP_DEEP_ELF,        SK_EVOCATIONS,      2),
 
+#if TAG_MAJOR_VERSION == 34
     // SP_SLUDGE_ELF
     APT(SP_SLUDGE_ELF,      SK_FIGHTING,        1),
     APT(SP_SLUDGE_ELF,      SK_SHORT_BLADES,   -1),
@@ -144,13 +145,9 @@ static const species_skill_aptitude species_skill_aptitudes[] =
     APT(SP_SLUDGE_ELF,      SK_ARMOUR,         -2),
     APT(SP_SLUDGE_ELF,      SK_DODGING,         2),
     APT(SP_SLUDGE_ELF,      SK_STEALTH,         2),
-#if TAG_MAJOR_VERSION == 34
     APT(SP_SLUDGE_ELF,      SK_STABBING,      -99),
-#endif
     APT(SP_SLUDGE_ELF,      SK_SHIELDS,        -2),
-#if TAG_MAJOR_VERSION == 34
     APT(SP_SLUDGE_ELF,      SK_TRAPS,         -99),
-#endif
     APT(SP_SLUDGE_ELF,      SK_UNARMED_COMBAT,  1),
     APT(SP_SLUDGE_ELF,      SK_SPELLCASTING,    1),
     APT(SP_SLUDGE_ELF,      SK_CONJURATIONS,   -2),
@@ -167,6 +164,7 @@ static const species_skill_aptitude species_skill_aptitudes[] =
     APT(SP_SLUDGE_ELF,      SK_POISON_MAGIC,    1),
     APT(SP_SLUDGE_ELF,      SK_INVOCATIONS,     1),
     APT(SP_SLUDGE_ELF,      SK_EVOCATIONS,      1),
+#endif
 
     // SP_HALFLING
     APT(SP_HALFLING,        SK_FIGHTING,       -1),
@@ -1338,6 +1336,7 @@ static const species_skill_aptitude species_skill_aptitudes[] =
     APT(SP_OCTOPODE,        SK_INVOCATIONS,     1),
     APT(SP_OCTOPODE,        SK_EVOCATIONS,      2),
 
+#if TAG_MAJOR_VERSION == 34
     // SP_DJINNI
     APT(SP_DJINNI,          SK_FIGHTING,       -1),
     APT(SP_DJINNI,          SK_SHORT_BLADES,   -2),
@@ -1354,9 +1353,7 @@ static const species_skill_aptitude species_skill_aptitudes[] =
     APT(SP_DJINNI,          SK_DODGING,        -1),
     APT(SP_DJINNI,          SK_STEALTH,        -1),
     APT(SP_DJINNI,          SK_SHIELDS,         0),
-#if TAG_MAJOR_VERSION == 34
     APT(SP_DJINNI,          SK_TRAPS,         -99),
-#endif
     APT(SP_DJINNI,          SK_UNARMED_COMBAT, -1),
     APT(SP_DJINNI,          SK_SPELLCASTING,    1),
     APT(SP_DJINNI,          SK_CONJURATIONS,    1),
@@ -1373,6 +1370,7 @@ static const species_skill_aptitude species_skill_aptitudes[] =
     APT(SP_DJINNI,          SK_POISON_MAGIC,   -1),
     APT(SP_DJINNI,          SK_INVOCATIONS,    -1),
     APT(SP_DJINNI,          SK_EVOCATIONS,      2),
+#endif
 
     // SP_LAVA_ORC
     APT(SP_LAVA_ORC,        SK_FIGHTING,        2),
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h
index 99a7ee7..7d1acb6 100644
--- a/crawl-ref/source/art-func.h
+++ b/crawl-ref/source/art-func.h
@@ -459,6 +459,7 @@ static void _wucad_miscast(actor* victim, int power,int fail)
 static bool _WUCAD_MU_evoke(item_def *item, int* pract, bool* did_work,
                             bool* unevokable)
 {
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
     {
         mpr("The staff is unable to affect your essence.");
@@ -466,6 +467,7 @@ static bool _WUCAD_MU_evoke(item_def *item, int* pract, bool* did_work,
         return true;
     }
 
+#endif
     if (you.magic_points == you.max_magic_points)
     {
         mpr("Your reserves of magic are full.");
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 2b4de13..588f1c4 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3184,11 +3184,13 @@ bool bolt::harmless_to_player() const
     case BEAM_ACID:
         return false;
 
+#if TAG_MAJOR_VERSION == 34
     case BEAM_FIRE:
     case BEAM_HELLFIRE:
     case BEAM_HOLY_FLAME:
     case BEAM_NAPALM:
         return you.species == SP_DJINNI;
+#endif
 
     case BEAM_VIRULENCE:
         return player_res_poison(false) >= 3;
diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc
index 158aa05..6a7ba21 100644
--- a/crawl-ref/source/cloud.cc
+++ b/crawl-ref/source/cloud.cc
@@ -793,7 +793,10 @@ static bool _actor_cloud_immune(const actor *act, const cloud_struct &cloud)
                 || player &&
                    (you.duration[DUR_FIRE_SHIELD]
                     || you.mutation[MUT_IGNITE_BLOOD]
-                    || you.species == SP_DJINNI);
+#if TAG_MAJOR_VERSION == 34
+                    || you.species == SP_DJINNI)
+#endif
+                   ;
     case CLOUD_HOLY_FLAMES:
         return act->res_holy_fire() > 0;
     case CLOUD_COLD:
diff --git a/crawl-ref/source/dat/descript/species.txt b/crawl-ref/source/dat/descript/species.txt
index f82fc54..aa0bcda 100644
--- a/crawl-ref/source/dat/descript/species.txt
+++ b/crawl-ref/source/dat/descript/species.txt
@@ -23,10 +23,6 @@ Demonspawn
 Demonspawn are half human, half demon. They acquire strong demonic mutations as
 they grow.
 %%%%
-Djinni
-
-The Djinn are spirits of fire, for whom magic is the very essence of life.
-%%%%
 Draconian
 
 Draconians are versatile hybrids. They mature when reaching level 7 and develop
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index c8dfb73..cf786f1 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1689,7 +1689,11 @@ bool interrupt_activity(activity_interrupt_type ai,
     const delay_queue_item &item = you.delay_queue.front();
 
     if (ai == AI_FULL_HP)
-        mprf("%s restored.", you.species == SP_DJINNI ? "EP" : "HP");
+        mprf("%s restored.",
+#if TAG_MAJOR_VERSION == 34
+                you.species == SP_DJINNI ? "EP" :
+#endif
+                "HP");
     else if (ai == AI_FULL_MP)
         mpr("Magic restored.");
 
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 18811c4..c61555b 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2015,9 +2015,10 @@ static void _handle_magic_contamination()
     if (you.duration[DUR_FINESSE])
         added_contamination += 20;
 
+#if TAG_MAJOR_VERSION == 34
     if (you.duration[DUR_REGENERATION] && you.species == SP_DJINNI)
         added_contamination += 20;
-
+#endif
     // The Orb halves dissipation (well a bit more, I had to round it),
     // but won't cause glow on its own -- otherwise it'd spam the player
     // with messages about contamination oscillating near zero.
@@ -2086,7 +2087,12 @@ static void _magic_contamination_effects(int time_delta)
                "mutagenic glow", true,
                coinflip(),
                false, false, false, false,
-               you.species == SP_DJINNI);
+#if TAG_MAJOR_VERSION == 34
+               you.species == SP_DJINNI
+#else
+               false
+#endif
+               );
 
         // we're meaner now, what with explosions and whatnot, but
         // we dial down the contamination a little faster if its actually
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 60abccf..98c6e78 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2853,7 +2853,9 @@ enum monster_type                      // menv[].type
     MONS_LOST_SOUL,
     MONS_JIANGSHI,
 
+#if TAG_MAJOR_VERSION == 34
     MONS_DJINNI,
+#endif
     MONS_LAVA_ORC,
 
     MONS_DRYAD,
@@ -3517,7 +3519,9 @@ enum species_type
     SP_DEEP_DWARF,
     SP_FELID,
     SP_OCTOPODE,
+#if TAG_MAJOR_VERSION == 34
     SP_DJINNI,
+#endif
     SP_LAVA_ORC,
     SP_GARGOYLE,
     SP_FORMICID,
@@ -3532,6 +3536,7 @@ enum species_type
     SP_MOUNTAIN_DWARF,                 // (placeholder)
 #if TAG_MAJOR_VERSION > 34
     SP_SLUDGE_ELF,                     // (placeholder)
+    SP_DJINNI,                         // (placeholder)
 #endif
 
     NUM_SPECIES,                       // always after the last species
diff --git a/crawl-ref/source/evoke.cc b/crawl-ref/source/evoke.cc
index c39034b..9c15657 100644
--- a/crawl-ref/source/evoke.cc
+++ b/crawl-ref/source/evoke.cc
@@ -270,13 +270,14 @@ static bool _evoke_horn_of_geryon(item_def &item)
 
 static bool _check_crystal_ball()
 {
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
     {
         mpr("These balls have not yet been approved for use by djinn. "
             "(OOC: they're supposed to work, but need a redesign.)");
         return false;
     }
-
+#endif
     if (you.intel() <= 1)
     {
         mpr("You lack the intelligence to focus on the shapes in the ball.");
@@ -1612,7 +1613,10 @@ bool evoke_item(int slot, bool check_range)
             return false;
         }
         else if (you.magic_points >= you.max_magic_points
-                 && (you.species != SP_DJINNI || you.hp == you.hp_max))
+#if TAG_MAJOR_VERSION == 34
+                 && (you.species != SP_DJINNI || you.hp == you.hp_max)
+#endif
+                )
         {
             mpr("Your reserves of magic are already full.");
             return false;
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index a4e24e9..e2326fa 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -79,7 +79,7 @@ void make_hungry(int hunger_amount, bool suppress_msg,
         you.hunger_state = HS_SATIATED;
         return;
     }
-
+#if TAG_MAJOR_VERSION == 34
     // Lich/tree form djinn don't get exempted from food costs: infinite
     // healing from channeling would be just too good.
     if (you.species == SP_DJINNI)
@@ -90,6 +90,7 @@ void make_hungry(int hunger_amount, bool suppress_msg,
         contaminate_player(hunger_amount * 4 / 3, true);
         return;
     }
+#endif
 
     if (you_foodless())
         return;
@@ -149,7 +150,9 @@ void set_hunger(int new_hunger_level, bool suppress_msg)
 bool you_foodless(bool can_eat)
 {
     return you.is_undead == US_UNDEAD
+#if TAG_MAJOR_VERSION == 34
         || you.species == SP_DJINNI && !can_eat
+#endif
         || you.form == TRAN_FUNGUS
         || you.form == TRAN_TREE
         || you.form == TRAN_WISP;
@@ -158,7 +161,10 @@ bool you_foodless(bool can_eat)
 bool you_foodless_normally()
 {
     return you.is_undead == US_UNDEAD && you.form != TRAN_LICH
-        || you.species == SP_DJINNI;
+#if TAG_MAJOR_VERSION == 34
+        || you.species == SP_DJINNI
+#endif
+        ;
 }
 
 /**
@@ -2142,7 +2148,11 @@ bool is_preferred_food(const item_def &food)
         return is_blood_potion(food);
 
     if (food.base_type == OBJ_POTIONS && food.sub_type == POT_PORRIDGE
-        && item_type_known(food) && you.species != SP_DJINNI)
+        && item_type_known(food)
+#if TAG_MAJOR_VERSION == 34
+        && you.species != SP_DJINNI
+#endif
+        )
     {
         return !player_mutation_level(MUT_CARNIVOROUS);
     }
diff --git a/crawl-ref/source/godwrath.cc b/crawl-ref/source/godwrath.cc
index 15c82b5..bea5ded 100644
--- a/crawl-ref/source/godwrath.cc
+++ b/crawl-ref/source/godwrath.cc
@@ -808,7 +808,11 @@ static bool _sif_muna_retribution()
         break;
 
     case 8:
-        if (you.magic_points > 0 || you.species == SP_DJINNI)
+        if (you.magic_points > 0
+#if TAG_MAJOR_VERSION == 34
+                 || you.species == SP_DJINNI
+#endif
+                )
         {
             drain_mp(100);  // This should zero it.
             mprf(MSGCH_WARN, "You suddenly feel drained of magical energy!");
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index e3fa8c2..9271d0e 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -200,6 +200,7 @@ bool can_wield(item_def *weapon, bool say_reason,
             id_brand = true;
         }
     }
+#if TAG_MAJOR_VERSION == 34
     else if (you.species == SP_DJINNI
              && get_weapon_brand(*weapon) == SPWPN_ANTIMAGIC
              && (item_type_known(*weapon) || !only_known))
@@ -210,6 +211,7 @@ bool can_wield(item_def *weapon, bool say_reason,
             id_brand = true;
         }
     }
+#endif
 
     if (id_brand)
     {
@@ -733,7 +735,11 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
             return false;
         }
 
-        if (you.species == SP_NAGA || you.species == SP_DJINNI)
+        if (you.species == SP_NAGA ||
+#if TAG_MAJOR_VERSION == 34
+                you.species == SP_DJINNI
+#endif
+           )
         {
             if (verbose)
                 mpr("You have no legs!");
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 0082e34..9bbe44d 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -3065,7 +3065,10 @@ bool is_bad_item(const item_def &item, bool temp)
             return true;
         case RING_HUNGER:
             // Even Vampires can use this ring.
-            if (you.species == SP_DJINNI || you.species == SP_MUMMY
+            if (you.species == SP_MUMMY
+#if TAG_MAJOR_VERSION == 34
+                || you.species == SP_DJINNI
+#endif
                 || you.species == SP_VAMPIRE)
             {
                 return false;
@@ -3177,8 +3180,10 @@ bool is_useless_item(const item_def &item, bool temp)
             return true;
         }
 
+#if TAG_MAJOR_VERSION == 34
         if (you.species == SP_DJINNI && get_weapon_brand(item) == SPWPN_ANTIMAGIC)
             return true;
+#endif
 
         return false;
 
@@ -3297,7 +3302,9 @@ bool is_useless_item(const item_def &item, bool temp)
             return you.is_undead
                    && (you.species != SP_VAMPIRE
                        || temp && you.hunger_state <= HS_SATIATED)
+#if TAG_MAJOR_VERSION == 34
                    || you.species == SP_DJINNI
+#endif
                    || you.species == SP_FORMICID;
         case POT_SPEED:
             return you.species == SP_FORMICID;
@@ -3325,7 +3332,11 @@ bool is_useless_item(const item_def &item, bool temp)
         case POT_PORRIDGE:
         case POT_BLOOD:
         case POT_BLOOD_COAGULATED:
-            return !can_ingest(item, true, false) || you.species == SP_DJINNI;
+            return !can_ingest(item, true, false)
+#if TAG_MAJOR_VERSION == 34
+                || you.species == SP_DJINNI
+#endif
+                ;
         case POT_POISON:
             // If you're poison resistant, poison is only useless.
             // Spriggans could argue, but it's too small of a gain for
@@ -3361,7 +3372,9 @@ bool is_useless_item(const item_def &item, bool temp)
             return you.is_undead
                    && (you.species != SP_VAMPIRE
                        || temp && you.hunger_state <= HS_SATIATED)
+#if TAG_MAJOR_VERSION == 34
                    || you.species == SP_DJINNI
+#endif
                    || you.species == SP_FORMICID;
 
         case AMU_STASIS:
@@ -3380,15 +3393,20 @@ bool is_useless_item(const item_def &item, bool temp)
                                                 // contaminated
                    || player_mutation_level(MUT_GOURMAND) > 0
                    || player_mutation_level(MUT_HERBIVOROUS) == 3
-                   || you.is_undead && you.species != SP_GHOUL
-                   || you.species == SP_DJINNI;
+#if TAG_MAJOR_VERSION == 34
+                   || you.species == SP_DJINNI
+#endif
+                   || you.is_undead && you.species != SP_GHOUL;
 
         case AMU_FAITH:
             return you.species == SP_DEMIGOD && !you.religion;
 
         case AMU_GUARDIAN_SPIRIT:
-            return you.species == SP_DJINNI
-                   || you.spirit_shield(false, false);
+            return
+#if TAG_MAJOR_VERSION == 34
+                you.species == SP_DJINNI ||
+#endif
+                you.spirit_shield(false, false);
 
         case RING_LIFE_PROTECTION:
             return player_prot_life(false, temp, false) == 3;
@@ -3396,7 +3414,9 @@ bool is_useless_item(const item_def &item, bool temp)
         case RING_HUNGER:
         case RING_SUSTENANCE:
             return you.species == SP_MUMMY
+#if TAG_MAJOR_VERSION == 34
                    || you.species == SP_DJINNI
+#endif
                    || temp && you_foodless()
                    || temp && you.species == SP_VAMPIRE
                        && you.hunger_state == HS_STARVING;
@@ -3413,10 +3433,10 @@ bool is_useless_item(const item_def &item, bool temp)
             return player_res_poison(false, temp, false) > 0
                    && (temp || you.species != SP_VAMPIRE);
 
+#if TAG_MAJOR_VERSION == 34
         case RING_PROTECTION_FROM_FIRE:
             return you.species == SP_DJINNI;
 
-#if TAG_MAJOR_VERSION == 34
         case AMU_CONTROLLED_FLIGHT:
             return player_genus(GENPC_DRACONIAN)
                    || (you.species == SP_TENGU && you.experience_level >= 5);
@@ -3461,6 +3481,7 @@ bool is_useless_item(const item_def &item, bool temp)
         if (item.sub_type == NUM_FOODS)
             break;
 
+#if TAG_MAJOR_VERSION == 34
         if (you.species == SP_DJINNI)
         {
             // Only comestibles with effects beyond nutrition have an use.
@@ -3472,7 +3493,9 @@ bool is_useless_item(const item_def &item, bool temp)
                 return false;
             }
         }
-        else if (!is_inedible(item))
+        else
+#endif
+        if (!is_inedible(item))
             return false;
 
         if (item.sub_type == FOOD_CHUNK
@@ -3494,12 +3517,14 @@ bool is_useless_item(const item_def &item, bool temp)
         if (item.sub_type != CORPSE_SKELETON && !you_foodless())
             return false;
 
+#if TAG_MAJOR_VERSION == 34
         if (item.sub_type == CORPSE_BODY && you.species == SP_DJINNI
             && mons_corpse_effect(item.mon_type) == CE_MUTAGEN
             && !is_inedible(item))
         {
             return false;
         }
+#endif
 
         if (you.has_spell(SPELL_ANIMATE_DEAD)
             || you.has_spell(SPELL_ANIMATE_SKELETON)
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 2224327..4f138ab 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1557,6 +1557,7 @@ void note_inscribe_item(item_def &item)
     _origin_freeze(item, you.pos());
     _check_note_item(item);
 }
+#if TAG_MAJOR_VERSION == 34
 
 static void _fish(item_def &item, short quant = 0)
 {
@@ -1567,6 +1568,7 @@ static void _fish(item_def &item, short quant = 0)
     mprf("You fish the %s out of the water.", item.name(DESC_PLAIN).c_str());
     you.time_taken += 5;
 }
+#endif
 
 // Returns quantity of items moved into player's inventory and -1 if
 // the player's inventory is full.
@@ -1597,7 +1599,9 @@ int move_item_to_player(int obj, int quant_got, bool quiet,
     // Gold has no mass, so we handle it first.
     if (it.base_type == OBJ_GOLD)
     {
+#if TAG_MAJOR_VERSION == 34
         _fish(it);
+#endif
         _got_gold(it, quant_got, quiet);
         dec_mitm_item_quantity(obj, quant_got);
 
@@ -1615,7 +1619,9 @@ int move_item_to_player(int obj, int quant_got, bool quiet,
 
         if (!quiet)
         {
+#if TAG_MAJOR_VERSION == 34
             _fish(it);
+#endif
             flash_view_delay(rune_colour(it.plus), 300);
             mprf("You pick up the %s rune and feel its power.",
                  rune_type_name(it.plus));
@@ -1720,8 +1726,10 @@ int move_item_to_player(int obj, int quant_got, bool quiet,
             {
                 if (!quiet && partial_pickup)
                     mpr("You can only carry some of what is here.");
+#if TAG_MAJOR_VERSION == 34
                 if (!quiet)
                     _fish(it, quant_got);
+#endif
 
                 _check_note_item(it);
 
@@ -1765,8 +1773,10 @@ int move_item_to_player(int obj, int quant_got, bool quiet,
 
     if (!quiet && partial_pickup)
         mpr("You can only carry some of what is here.");
+#if TAG_MAJOR_VERSION == 34
     if (!quiet)
         _fish(it, quant_got);
+#endif
 
     int freeslot = find_free_slot(it);
     ASSERT_RANGE(freeslot, 0, ENDOFPACK);
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index ef32640..7a8d660 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -4682,6 +4682,7 @@ void mon_nearby_ability(monster* mons)
             interrupt_activity(AI_MONSTER_ATTACKS, mons);
 
             int mp = 5 + random2avg(13, 3);
+#if TAG_MAJOR_VERSION == 34
             if (you.species != SP_DJINNI)
                 mp = min(mp, you.magic_points);
             else
@@ -4692,6 +4693,9 @@ void mon_nearby_ability(monster* mons)
                 mp = mp * (you.hp_max - you.duration[DUR_ANTIMAGIC] / 3)
                         / you.hp_max;
             }
+#else
+            mp = min(mp, you.magic_points);
+#endif
             drain_mp(mp);
 
             mons->heal(mp, true); // heh heh {dlb}
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 567bd37..5d46578 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -3974,6 +3974,7 @@ static monsterentry mondata[] =
     MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_LARGE
 },
 
+#if TAG_MAJOR_VERSION == 34
 {
     MONS_DJINNI, 'R', LIGHTBLUE, "djinni",
     M_WARM_BLOOD | M_SPEAKS | M_NO_POLY_TO,
@@ -3985,6 +3986,7 @@ static monsterentry mondata[] =
     I_HIGH, HT_LAND, FL_LEVITATE, 10, DEFAULT_ENERGY,
     MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM
 },
+#endif
 
 {
     MONS_RAKSHASA, 'R', YELLOW, "rakshasa",
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index 96c2f89..63f2cca 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -2083,9 +2083,10 @@ int monster_die(monster* mons, killer_type killer,
                     die("bad kill-on-healing god!");
                 }
 
+#if TAG_MAJOR_VERSION == 34
                 if (you.species == SP_DJINNI)
                     hp_heal = max(hp_heal, mp_heal * 2), mp_heal = 0;
-
+#endif
                 if (hp_heal && you.hp < you.hp_max
                     && !you.duration[DUR_DEATHS_DOOR])
                 {
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 2bb5a38..39b7692 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -520,6 +520,7 @@ string describe_mutations(bool center_title)
             !form_keeps_mutations());
         have_any = true;
         break;
+#if TAG_MAJOR_VERSION == 34
 
     case SP_DJINNI:
         result += "You are immune to all types of fire, even holy and hellish.\n";
@@ -528,6 +529,7 @@ string describe_mutations(bool center_title)
         result += "You have no legs.\n";
         have_any = true;
         break;
+#endif
 
     case SP_LAVA_ORC:
     {
@@ -1393,6 +1395,7 @@ bool physiology_mutation_conflict(mutation_type mutat)
             return true;
         }
     }
+#if TAG_MAJOR_VERSION == 34
 
     // Heat doesn't hurt fire, djinn don't care about hunger.
     if (you.species == SP_DJINNI && (mutat == MUT_HEAT_RESISTANCE
@@ -1403,6 +1406,7 @@ bool physiology_mutation_conflict(mutation_type mutat)
     {
         return true;
     }
+#endif
 
     // Already immune.
     if (you.species == SP_GARGOYLE && mutat == MUT_POISON_RESISTANCE)
diff --git a/crawl-ref/source/ng-restr.cc b/crawl-ref/source/ng-restr.cc
index a8aeaad..d181dcf 100644
--- a/crawl-ref/source/ng-restr.cc
+++ b/crawl-ref/source/ng-restr.cc
@@ -24,7 +24,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         switch (speci)
         {
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_MERFOLK:
         case SP_KOBOLD:
         case SP_SPRIGGAN:
@@ -46,7 +45,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_FELID:
             return CC_BANNED;
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_HALFLING:
         case SP_KOBOLD:
         case SP_SPRIGGAN:
@@ -57,7 +55,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_MUMMY:
         case SP_VAMPIRE:
         case SP_OCTOPODE:
-        case SP_DJINNI:
         case SP_FORMICID:
             return CC_RESTRICTED;
         default:
@@ -78,7 +75,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_DEMIGOD:
         case SP_MUMMY:
         case SP_OCTOPODE:
-        case SP_DJINNI:
         case SP_FORMICID:
             return CC_RESTRICTED;
         default:
@@ -92,13 +88,11 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
             return CC_BANNED;
         case SP_HIGH_ELF:
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_SPRIGGAN:
         case SP_MUMMY:
         case SP_GHOUL:
         case SP_VAMPIRE:
         case SP_OCTOPODE:
-        case SP_DJINNI:
         case SP_FORMICID:
             return CC_RESTRICTED;
         default:
@@ -122,7 +116,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
             return CC_BANNED;
         case SP_HIGH_ELF:
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_DEEP_DWARF:
         case SP_HALFLING:
         case SP_KOBOLD:
@@ -145,7 +138,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
             return CC_BANNED;
         case SP_HIGH_ELF:
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_DEEP_DWARF:
         case SP_KOBOLD:
         case SP_OGRE:
@@ -190,7 +182,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         switch (speci)
         {
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_DEEP_DWARF:
         case SP_KOBOLD:
         case SP_SPRIGGAN:
@@ -204,7 +195,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_FELID:
         case SP_OCTOPODE:
         case SP_FORMICID:
-        case SP_DJINNI:
             return CC_RESTRICTED;
         default:
             return CC_UNRESTRICTED;
@@ -214,7 +204,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         switch (speci)
         {
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_HILL_ORC:
         case SP_LAVA_ORC:
         case SP_MERFOLK:
@@ -259,7 +248,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
     case JOB_CONJURER:
         switch (speci)
         {
-        case SP_SLUDGE_ELF:
         case SP_DEEP_DWARF:
         case SP_LAVA_ORC:
         case SP_MERFOLK:
@@ -281,7 +269,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         switch (speci)
         {
         case SP_HIGH_ELF:
-        case SP_SLUDGE_ELF:
         case SP_DEEP_DWARF:
         case SP_HILL_ORC:
         case SP_LAVA_ORC:
@@ -335,7 +322,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_OGRE:
         case SP_TROLL:
         case SP_MINOTAUR:
-        case SP_DJINNI:
         case SP_GARGOYLE:
         case SP_FORMICID:
             return CC_RESTRICTED;
@@ -360,7 +346,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_MINOTAUR:
         case SP_TENGU:
         case SP_VAMPIRE:
-        case SP_DJINNI:
         case SP_GARGOYLE:
             return CC_RESTRICTED;
         default:
@@ -402,7 +387,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_MINOTAUR:
         case SP_TENGU:
         case SP_FELID:
-        case SP_DJINNI:
         case SP_FORMICID:
             return CC_RESTRICTED;
         default:
@@ -445,7 +429,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_MUMMY:
         case SP_VAMPIRE:
         case SP_FELID:
-        case SP_DJINNI:
             return CC_RESTRICTED;
         default:
             return CC_UNRESTRICTED;
@@ -466,7 +449,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_MUMMY:
         case SP_GHOUL:
         case SP_VAMPIRE:
-        case SP_DJINNI:
             return CC_RESTRICTED;
         default:
             return CC_UNRESTRICTED;
@@ -493,7 +475,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
         case SP_MUMMY:
         case SP_GHOUL:
         case SP_OCTOPODE:
-        case SP_DJINNI:
         case SP_FORMICID:
             return CC_RESTRICTED;
         default:
@@ -530,7 +511,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
             return CC_BANNED;
         case SP_HIGH_ELF:
         case SP_DEEP_ELF:
-        case SP_SLUDGE_ELF:
         case SP_NAGA:
         case SP_CENTAUR:
         case SP_OGRE:
@@ -614,9 +594,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
             // else fall through
         case SP_HIGH_ELF:
         case SP_DEEP_ELF:
-            // Sludge elves have bad aptitudes with short swords (-1), but
-            // are still better with them than any other starting weapon.
-        case SP_SLUDGE_ELF:
         case SP_HALFLING:
         case SP_KOBOLD:
         case SP_SPRIGGAN:
@@ -631,8 +608,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
     case WPN_MACE:
         if (ng.species == SP_TROLL
             || ng.species == SP_OGRE
-            || ng.species == SP_GARGOYLE
-            || ng.species == SP_DJINNI)
+            || ng.species == SP_GARGOYLE)
         {
             return CC_UNRESTRICTED;
         }
@@ -681,7 +657,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         case SP_MUMMY:
         case SP_OCTOPODE:
         case SP_BASE_DRACONIAN:
-        case SP_DJINNI:
         case SP_FORMICID:
         case SP_VINE_STALKER:
             return CC_UNRESTRICTED;
@@ -709,7 +684,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         case SP_CENTAUR:
         case SP_MINOTAUR:
         case SP_HIGH_ELF:
-        case SP_SLUDGE_ELF:
         case SP_DEEP_DWARF:
         case SP_TENGU:
         case SP_DEMIGOD:
@@ -718,7 +692,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         case SP_VAMPIRE:
         case SP_OCTOPODE:
         case SP_BASE_DRACONIAN:
-        case SP_DJINNI:
         case SP_FORMICID:
         case SP_VINE_STALKER:
             return CC_UNRESTRICTED;
@@ -765,9 +738,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         case SP_MINOTAUR:
         case SP_MUMMY:
         case SP_OCTOPODE:
-        case SP_SLUDGE_ELF:
         case SP_BASE_DRACONIAN:
-        case SP_DJINNI:
         case SP_FORMICID:
         case SP_GARGOYLE:
         case SP_VINE_STALKER:
@@ -789,7 +760,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         case SP_LAVA_ORC:
         case SP_SPRIGGAN:
         case SP_TROLL:
-        case SP_SLUDGE_ELF:
             return CC_RESTRICTED;
         case SP_FELID:
             return CC_BANNED;
@@ -807,8 +777,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         case SP_TROLL:
         case SP_HILL_ORC:
         case SP_LAVA_ORC:
-        case SP_SLUDGE_ELF:
-        case SP_DJINNI:
         case SP_FORMICID:
             return CC_RESTRICTED;
         case SP_FELID:
@@ -822,7 +790,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         {
         case SP_DEEP_ELF:
         case SP_HIGH_ELF:
-        case SP_SLUDGE_ELF:
         case SP_TENGU:
         case SP_MERFOLK:
         case SP_OGRE:
@@ -841,7 +808,6 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
         switch (ng.species)
         {
         case SP_DEEP_DWARF:
-        case SP_DJINNI:
             return CC_RESTRICTED;
         case SP_FELID:
             return CC_BANNED;
diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc
index a8e1109..be24efc 100644
--- a/crawl-ref/source/ng-setup.cc
+++ b/crawl-ref/source/ng-setup.cc
@@ -324,9 +324,11 @@ void give_basic_mutations(species_type speci)
         you.mutation[MUT_ANTENNAE]    = 3;
         you.mutation[MUT_EXOSKELETON] = 1;
         break;
+#if TAG_MAJOR_VERSION == 34
     case SP_DJINNI:
         you.mutation[MUT_NEGATIVE_ENERGY_RESISTANCE] = 3;
         break;
+#endif
     case SP_VINE_STALKER:
         you.mutation[MUT_FANGS]          = 2;
         you.mutation[MUT_ANTIMAGIC_BITE] = 1;
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 2db296e..a40d249 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -164,12 +164,14 @@ int check_your_resists(int hurted, beam_type flavour, string source,
         break;
 
     case BEAM_HELLFIRE:
+#if TAG_MAJOR_VERSION == 34
         if (you.species == SP_DJINNI)
         {
             hurted = 0;
             if (doEffects)
                 mpr("You resist completely.");
         }
+#endif
         // Inconsistency: no penalty for rF-, unlike monsters.  That's
         // probably good, and monsters should be changed.
         break;
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 3c25138..63486dd 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -529,9 +529,11 @@ static void _print_stats_temperature(int x, int y)
 
 static void _print_stats_mp(int x, int y)
 {
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         return;
 
+#endif
     // Calculate colour
     short mp_colour = HUD_VALUE_COLOUR;
 
@@ -572,6 +574,7 @@ static void _print_stats_mp(int x, int y)
     MP_Bar.draw(19, y, you.magic_points, you.max_magic_points);
 }
 
+#if TAG_MAJOR_VERSION == 34
 static void _print_stats_contam(int x, int y)
 {
     if (you.species != SP_DJINNI)
@@ -618,12 +621,14 @@ static void _print_stats_contam(int x, int y)
 #endif
     Contam_Bar.draw(19, y, contam, max_contam);
 }
-
+#endif
 static void _print_stats_hp(int x, int y)
 {
     int max_max_hp = get_real_hp(true, true);
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         max_max_hp += get_real_mp(true);
+#endif
 
     // Calculate colour
     short hp_colour = HUD_VALUE_COLOUR;
@@ -647,10 +652,12 @@ static void _print_stats_hp(int x, int y)
     // Health: xxx/yyy (zzz)
     CGOTOXY(x, y, GOTO_STAT);
     textcolor(HUD_CAPTION_COLOUR);
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         CPRINTF(max_max_hp != you.hp_max ? "EP: " : "Essence: ");
     else
-        CPRINTF(max_max_hp != you.hp_max ? "HP: " : "Health: ");
+#endif
+    CPRINTF(max_max_hp != you.hp_max ? "HP: " : "Health: ");
     textcolor(hp_colour);
     CPRINTF("%d", you.hp);
     if (!boosted)
@@ -668,17 +675,21 @@ static void _print_stats_hp(int x, int y)
 #ifdef USE_TILE_LOCAL
     if (tiles.is_using_small_layout())
     {
-        if (you.species != SP_DJINNI)
-            HP_Bar.vdraw(2, 10, you.hp, you.hp_max);
-        else
+#if TAG_MAJOR_VERSION == 34
+        if (you.species == SP_DJINNI)
             EP_Bar.vdraw(2, 10, you.hp, you.hp_max);
+        else
+#endif
+        HP_Bar.vdraw(2, 10, you.hp, you.hp_max);
     }
     else
 #endif
-    if (you.species != SP_DJINNI)
-        HP_Bar.draw(19, y, you.hp, you.hp_max);
-    else
+#if TAG_MAJOR_VERSION == 34
+    if (you.species == SP_DJINNI)
         EP_Bar.draw(19, y, you.hp, you.hp_max);
+    else
+#endif
+        HP_Bar.draw(19, y, you.hp, you.hp_max);
 }
 
 static short _get_stat_colour(stat_type stat)
@@ -1257,7 +1268,9 @@ void print_stats(void)
     }
     if (you.redraw_hit_points)   { you.redraw_hit_points = false;   _print_stats_hp (1, 3); }
     if (you.redraw_magic_points) { you.redraw_magic_points = false; _print_stats_mp (1, 4); }
+#if TAG_MAJOR_VERSION == 34
     _print_stats_contam(1, 4);
+#endif
     if (you.redraw_temperature)  { you.redraw_temperature = false;  _print_stats_temperature (1, temp_pos); }
     if (you.redraw_armour_class) { you.redraw_armour_class = false; _print_stats_ac (1, ac_pos); }
     if (you.redraw_evasion)      { you.redraw_evasion = false;      _print_stats_ev (1, ev_pos); }
@@ -1404,10 +1417,12 @@ void draw_border(void)
 
     //CGOTOXY(1, 3, GOTO_STAT); CPRINTF("Hp:");
     CGOTOXY(1, mp_pos, GOTO_STAT);
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         CPRINTF("Contam:");
     else
-        CPRINTF("Magic:");
+#endif
+    CPRINTF("Magic:");
     CGOTOXY(1, ac_pos, GOTO_STAT); CPRINTF("AC:");
     CGOTOXY(1, ev_pos, GOTO_STAT); CPRINTF("EV:");
     CGOTOXY(1, sh_pos, GOTO_STAT); CPRINTF("SH:");
@@ -2690,11 +2705,13 @@ static string _status_mut_abilities(int sw)
                        + max(0, you.experience_level - 7) * 2 / 5;
         break;
 
+#if TAG_MAJOR_VERSION == 34
     case SP_DJINNI:
         mutations.push_back("fire immunity");
         mutations.push_back("cold vulnerability");
         break;
 
+#endif
     default:
         break;
     }                           //end switch - innate abilities
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc
index f95f869..a6880d5 100644
--- a/crawl-ref/source/player-act.cc
+++ b/crawl-ref/source/player-act.cc
@@ -159,7 +159,11 @@ bool player::is_habitable_feat(dungeon_feature_type actual_grid) const
     if (!can_pass_through_feat(actual_grid))
         return false;
 
-    if (airborne() || species == SP_DJINNI)
+    if (airborne()
+#if TAG_MAJOR_VERSION == 34
+            || species == SP_DJINNI
+#endif
+            )
         return true;
 
     if (actual_grid == DNGN_LAVA && species != SP_LAVA_ORC
@@ -491,8 +495,10 @@ string player::foot_name(bool plural, bool *can_plural) const
         }
         else if (species == SP_FELID)
             str = "paw";
+#if TAG_MAJOR_VERSION == 34
         else if (species == SP_DJINNI)
             str = "underside", *can_plural = false;
+#endif
         else if (fishtail)
         {
             str         = "tail";
@@ -694,6 +700,7 @@ bool player::can_go_berserk(bool intentional, bool potion, bool quiet) const
         return false;
     }
 
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
     {
         if (verbose)
@@ -702,6 +709,7 @@ bool player::can_go_berserk(bool intentional, bool potion, bool quiet) const
         return false;
     }
 
+#endif
     if (is_lifeless_undead())
     {
         if (verbose)
diff --git a/crawl-ref/source/player-equip.cc b/crawl-ref/source/player-equip.cc
index 3761579..bdd9d8e 100644
--- a/crawl-ref/source/player-equip.cc
+++ b/crawl-ref/source/player-equip.cc
@@ -517,10 +517,12 @@ static void _equip_weapon_effect(item_def& item, bool showMsgs, bool unmeld)
             int mp = item.special - you.elapsed_time / POWER_DECAY;
 
             if (mp > 0)
+#if TAG_MAJOR_VERSION == 34
                 if (you.species == SP_DJINNI)
                     you.hp += mp;
                 else
-                    you.magic_points += mp;
+#endif
+                you.magic_points += mp;
 
             if (get_real_mp(true) >= 50)
                 mpr("You feel your magic capacity is already quite full.");
@@ -857,6 +859,7 @@ static void _unequip_weapon_effect(item_def& item, bool showMsgs, bool meld)
     else if (item.base_type == OBJ_STAVES && item.sub_type == STAFF_POWER)
     {
         int mp = you.magic_points;
+#if TAG_MAJOR_VERSION == 34
         if (you.species == SP_DJINNI)
         {
             mp = you.hp;
@@ -868,6 +871,10 @@ static void _unequip_weapon_effect(item_def& item, bool showMsgs, bool meld)
             calc_mp();
             mp -= you.magic_points;
         }
+#else
+        calc_mp();
+        mp -= you.magic_points;
+#endif
 
         // Store the MP in case you'll re-wield quickly.
         item.special = mp + you.elapsed_time / POWER_DECAY;
@@ -984,7 +991,11 @@ static void _equip_armour_effect(item_def& arm, bool unmeld)
             if (!unmeld && you.spirit_shield() < 2)
             {
                 dec_mp(you.magic_points);
-                if (you.species == SP_DJINNI || you.species == SP_VINE_STALKER)
+                if (
+#if TAG_MAJOR_VERSION == 34
+                        you.species == SP_DJINNI ||
+#endif
+                        you.species == SP_VINE_STALKER)
                     mpr("You feel the presence of a powerless spirit.");
                 else
                     mpr("You feel your power drawn to a protective spirit.");
@@ -1382,7 +1393,11 @@ static void _equip_jewellery_effect(item_def &item, bool unmeld)
         if (you.spirit_shield() < 2 && !unmeld)
         {
             dec_mp(you.magic_points);
-            if (you.species == SP_DJINNI || you.species == SP_VINE_STALKER)
+            if (
+#if TAG_MAJOR_VERSION == 34
+                    you.species == SP_DJINNI ||
+#endif
+                    you.species == SP_VINE_STALKER)
                 mpr("You feel the presence of a powerless spirit.");
             else
                 mpr("You feel your power drawn to a protective spirit.");
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 9ac4b47..62b6108 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -728,8 +728,10 @@ bool you_can_wear(int eq, bool special_armour)
         // These species cannot wear boots.
         if (you.species == SP_TROLL
             || you.species == SP_SPRIGGAN
-            || you.species == SP_OGRE
-            || you.species == SP_DJINNI)
+#if TAG_MAJOR_VERSION == 34
+            || you.species == SP_DJINNI
+#endif
+            || you.species == SP_OGRE)
         {
             return false;
         }
@@ -790,7 +792,9 @@ bool player_has_feet(bool temp)
     if (you.species == SP_NAGA
         || you.species == SP_FELID
         || you.species == SP_OCTOPODE
+#if TAG_MAJOR_VERSION == 34
         || you.species == SP_DJINNI
+#endif
         || you.fishtail && temp)
     {
         return false;
@@ -1347,6 +1351,7 @@ int player_regen()
         else if (you.hunger_state >= HS_FULL)
             rr += 10; // Bonus regeneration for full vampires.
     }
+#if TAG_MAJOR_VERSION == 34
 
     // Compared to other races, a starting djinni would have regen of 4 (hp)
     // plus 17 (mp).  So let's compensate them early; they can stand getting
@@ -1354,6 +1359,7 @@ int player_regen()
     if (you.species == SP_DJINNI)
         if (you.hp_max < 100)
             rr += (100 - you.hp_max) / 6;
+#endif
 
     // Slow heal mutation.
     if (player_mutation_level(MUT_SLOW_HEALING) > 0)
@@ -1517,9 +1523,11 @@ int player_likes_chunks(bool permanently)
 // If temp is set to false, temporary sources or resistance won't be counted.
 int player_res_fire(bool calc_unid, bool temp, bool items)
 {
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         return 4; // full immunity
 
+#endif
     int rf = 0;
 
     if (items)
@@ -1722,10 +1730,11 @@ int player_res_cold(bool calc_unid, bool temp, bool items)
             rc++;
     }
 
+#if TAG_MAJOR_VERSION == 34
     // species:
     if (you.species == SP_DJINNI)
         rc--;
-
+#endif
     // mutations:
     rc += player_mutation_level(MUT_COLD_RESISTANCE, temp);
     rc -= player_mutation_level(MUT_COLD_VULNERABILITY, temp);
@@ -3567,11 +3576,13 @@ void level_change(int source, const char* aux, bool skip_attribute_increase)
                     modify_stat(STAT_RANDOM, 1, false, "level gain");
                 break;
 
+#if TAG_MAJOR_VERSION == 34
             case SP_DJINNI:
                 if (!(you.experience_level % 4))
                     modify_stat(STAT_RANDOM, 1, false, "level gain");
                 break;
 
+#endif
             case SP_FORMICID:
                 if (!(you.experience_level % 4))
                     modify_stat(STAT_STR, 1, false, "level gain");
@@ -3698,19 +3709,17 @@ void level_change(int source, const char* aux, bool skip_attribute_increase)
         const int note_maxmp = get_real_mp(false);
 
         char buf[200];
-        if (you.species != SP_DJINNI)
-        {
-            sprintf(buf, "HP: %d/%d MP: %d/%d",
-                    min(you.hp, note_maxhp), note_maxhp,
-                    min(you.magic_points, note_maxmp), note_maxmp);
-        }
-        else
-        {
+#if TAG_MAJOR_VERSION == 34
+        if (you.species == SP_DJINNI)
             // Djinn don't HP/MP
             sprintf(buf, "EP: %d/%d",
                     min(you.hp, note_maxhp + note_maxmp),
                     note_maxhp + note_maxmp);
-        }
+        else
+#endif
+            sprintf(buf, "HP: %d/%d MP: %d/%d",
+                    min(you.hp, note_maxhp), note_maxhp,
+                    min(you.magic_points, note_maxmp), note_maxmp);
         take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, buf));
 
         xom_is_stimulated(12);
@@ -3803,7 +3812,9 @@ int check_stealth(void)
         case SP_TROLL:
         case SP_OGRE:
         case SP_CENTAUR:
+#if TAG_MAJOR_VERSION == 34
         case SP_DJINNI:
+#endif
             race_mod = 9;
             break;
         case SP_MINOTAUR:
@@ -4616,8 +4627,10 @@ void dec_mp(int mp_loss, bool silent)
     if (mp_loss < 1)
         return;
 
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         return dec_hp(mp_loss * DJ_MP_RATE, false);
+#endif
 
     you.magic_points -= mp_loss;
 
@@ -4628,14 +4641,19 @@ void dec_mp(int mp_loss, bool silent)
 
 void drain_mp(int loss)
 {
-    if (you.species != SP_DJINNI)
-        return dec_mp(loss);
+#if TAG_MAJOR_VERSION == 34
+    if (you.species == SP_DJINNI)
+    {
 
-    if (loss <= 0)
-        return;
+        if (loss <= 0)
+            return;
 
-    you.duration[DUR_ANTIMAGIC] = min(you.duration[DUR_ANTIMAGIC] + loss * 3,
-                                      1000); // so it goes away after one '5'
+        you.duration[DUR_ANTIMAGIC] = min(you.duration[DUR_ANTIMAGIC] + loss * 3,
+                                           1000); // so it goes away after one '5'
+    }
+    else
+#endif
+    return dec_mp(loss);
 }
 
 bool enough_hp(int minimum, bool suppress_msg, bool abort_macros)
@@ -4660,9 +4678,7 @@ bool enough_hp(int minimum, bool suppress_msg, bool abort_macros)
     {
         if (!suppress_msg)
         {
-            mpr(you.species != SP_DJINNI ?
-                "You haven't enough vitality at the moment." :
-                "You haven't enough essence at the moment.");
+            mpr("You haven't enough vitality at the moment.");
         }
 
         if (abort_macros)
@@ -4678,8 +4694,10 @@ bool enough_hp(int minimum, bool suppress_msg, bool abort_macros)
 
 bool enough_mp(int minimum, bool suppress_msg, bool abort_macros)
 {
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         return enough_hp(minimum * DJ_MP_RATE, suppress_msg);
+#endif
 
     ASSERT(!crawl_state.game_is_arena());
 
@@ -4726,8 +4744,10 @@ void inc_mp(int mp_gain, bool silent)
     if (mp_gain < 1)
         return;
 
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         return inc_hp(mp_gain * DJ_MP_RATE);
+#endif
 
     bool wasnt_max = (you.magic_points < you.max_magic_points);
 
@@ -6090,7 +6110,9 @@ flight_type player::flight_mode() const
         return FL_NONE;
 
     if (duration[DUR_FLIGHT]
+#if TAG_MAJOR_VERSION == 34
         || you.species == SP_DJINNI
+#endif
         || attribute[ATTR_PERM_FLIGHT]
         || form == TRAN_WISP
         // dragon and bat should be FL_WINGED, but we don't want paralysis
@@ -6807,8 +6829,10 @@ int player::res_fire() const
 
 int player::res_holy_fire() const
 {
+#if TAG_MAJOR_VERSION == 34
     if (species == SP_DJINNI)
         return 3;
+#endif
     return actor::res_holy_fire();
 }
 
@@ -6839,10 +6863,12 @@ int player::res_water_drowning() const
         rw++;
     }
 
+#if TAG_MAJOR_VERSION == 34
     // A fiery lich/hot statue suffers from quenching but not drowning, so
     // neutral resistance sounds ok.
     if (species == SP_DJINNI)
         rw--;
+#endif
 
     return rw;
 }
@@ -7055,15 +7081,21 @@ bool player::cancellable_flight() const
 
 bool player::permanent_flight() const
 {
-    return attribute[ATTR_PERM_FLIGHT] || species == SP_DJINNI;
+    return attribute[ATTR_PERM_FLIGHT]
+#if TAG_MAJOR_VERSION == 34
+        || species == SP_DJINNI
+#endif
+        ;
 }
 
 bool player::racial_permanent_flight() const
 {
     return species == SP_TENGU && experience_level >= 15
+#if TAG_MAJOR_VERSION == 34
+        || species == SP_DJINNI
+#endif
         || species == SP_BLACK_DRACONIAN && experience_level >= 14
-        || species == SP_GARGOYLE && experience_level >= 14
-        || species == SP_DJINNI;
+        || species == SP_GARGOYLE && experience_level >= 14;
 }
 
 bool player::tengu_flight() const
@@ -7665,8 +7697,10 @@ bool player::can_bleed(bool allow_tran) const
     }
 
     if (is_lifeless_undead()
-        || holiness() == MH_NONLIVING
-        || you.species == SP_DJINNI)
+#if TAG_MAJOR_VERSION == 34
+        || you.species == SP_DJINNI
+#endif
+        || holiness() == MH_NONLIVING)
     {   // demonspawn and demigods have a mere drop of taint
         return false;
     }
diff --git a/crawl-ref/source/potion.cc b/crawl-ref/source/potion.cc
index b6d2134..f744901 100644
--- a/crawl-ref/source/potion.cc
+++ b/crawl-ref/source/potion.cc
@@ -425,8 +425,10 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know
 
     case POT_MAGIC:
         // Allow repairing rot, disallow going through Death's Door.
+#if TAG_MAJOR_VERSION == 34
         if (you.species == SP_DJINNI)
             return potion_effect(POT_HEAL_WOUNDS, pow, potion, was_known, from_fountain);
+#endif
 
         inc_mp(10 + random2avg(28, 3));
         mpr("Magic courses through your body.");
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 791d783..64c5e9e 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2598,7 +2598,10 @@ string adjust_abil_message(const char *pmsg, bool allow_upgrades)
 {
     if (brdepth[BRANCH_ABYSS] == -1 && strstr(pmsg, "Abyss"))
         return "";
-    if ((you.species == SP_FORMICID || you.species == SP_DJINNI
+    if ((you.species == SP_FORMICID
+#if TAG_MAJOR_VERSION == 34
+                || you.species == SP_DJINNI
+#endif
          || you.species == SP_MUMMY || you.species == SP_GHOUL)
         && strstr(pmsg, "berserk"))
     {
@@ -3538,8 +3541,11 @@ bool player_can_join_god(god_type which_god)
 
     // Dithmenos hates fiery species.
     if (which_god == GOD_DITHMENOS
-        && (you.species == SP_DJINNI
-            || you.species == SP_LAVA_ORC))
+        && (
+#if TAG_MAJOR_VERSION == 34
+            you.species == SP_DJINNI ||
+#endif
+            you.species == SP_LAVA_ORC))
     {
         return false;
     }
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index 03c4d1f..5c5dc2e 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -214,7 +214,9 @@ static string _stk_walker()
 {
     return Skill_Species == SP_NAGA         ? "Slider"   :
            Skill_Species == SP_TENGU        ? "Glider"   :
+#if TAG_MAJOR_VERSION == 34
            Skill_Species == SP_DJINNI       ? "Floater"  :
+#endif
            Skill_Species == SP_OCTOPODE     ? "Wriggler" :
            Skill_Species == SP_VINE_STALKER ? "Stalker"
                                             : "Walker";
@@ -489,8 +491,10 @@ void calc_hp()
 {
     int oldhp = you.hp, oldmax = you.hp_max;
     you.hp_max = get_real_hp(true, false);
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         you.hp_max += get_real_mp(true);
+#endif
     deflate_hp(you.hp_max, false);
     if (oldhp != you.hp || oldmax != you.hp_max)
         dprf("HP changed: %d/%d -> %d/%d", oldhp, oldmax, you.hp, you.hp_max);
@@ -498,11 +502,13 @@ void calc_hp()
 
 void calc_mp()
 {
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
     {
         you.magic_points = you.max_magic_points = 0;
         return calc_hp();
     }
+#endif
 
     you.max_magic_points = get_real_mp(true);
     you.magic_points = min(you.magic_points, you.max_magic_points);
diff --git a/crawl-ref/source/species.cc b/crawl-ref/source/species.cc
index 3d347c5..bddd750 100644
--- a/crawl-ref/source/species.cc
+++ b/crawl-ref/source/species.cc
@@ -30,7 +30,6 @@ static species_type species_order[] =
     SP_LAVA_ORC,       SP_VINE_STALKER,
     // celestial species
     SP_DEMIGOD,        SP_DEMONSPAWN,
-    SP_DJINNI,
     // undead species
     SP_MUMMY,          SP_GHOUL,
     SP_VAMPIRE,
@@ -62,11 +61,15 @@ static const char * Species_Abbrev_List[NUM_SPECIES] =
       // the draconians
       "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr",
       "Ce", "Dg", "Sp", "Mi", "Ds", "Gh", "Te", "Mf", "Vp", "DD",
-      "Fe", "Op", "Dj", "LO", "Gr", "Fo", "VS",
+      "Fe", "Op",
+#if TAG_MAJOR_VERSION == 34
+      "Dj",
+#endif
+      "LO", "Gr", "Fo", "VS",
       // placeholders
       "El", "HD", "OM", "GE", "Gn", "MD",
 #if TAG_MAJOR_VERSION > 34
-      "SE",
+      "SE", "Dj",
 #endif
 };
 
@@ -219,7 +222,9 @@ string species_name(species_type speci, bool genus, bool adj)
         case SP_GHOUL:      res = (adj ? "Ghoulish"   : "Ghoul");      break;
         case SP_MERFOLK:    res = (adj ? "Merfolkian" : "Merfolk");    break;
         case SP_VAMPIRE:    res = (adj ? "Vampiric"   : "Vampire");    break;
+#if TAG_MAJOR_VERSION == 34
         case SP_DJINNI:     res = (adj ? "Djinn"      : "Djinni");     break;
+#endif
         default:            res = (adj ? "Yakish"     : "Yak");        break;
         }
     }
@@ -278,7 +283,9 @@ genus_type species_genus(species_type species)
 
     case SP_HIGH_ELF:
     case SP_DEEP_ELF:
+#if TAG_MAJOR_VERSION == 34
     case SP_SLUDGE_ELF:
+#endif
         return GENPC_ELVEN;
 
     case SP_HILL_ORC:
@@ -320,7 +327,9 @@ monster_type player_species_to_mons_species(species_type species)
         return MONS_HUMAN;
     case SP_HIGH_ELF:
     case SP_DEEP_ELF:
+#if TAG_MAJOR_VERSION == 34
     case SP_SLUDGE_ELF:
+#endif
         return MONS_ELF;
     case SP_HALFLING:
         return MONS_HALFLING;
@@ -384,8 +393,10 @@ monster_type player_species_to_mons_species(species_type species)
         return MONS_FELID;
     case SP_OCTOPODE:
         return MONS_OCTOPODE;
+#if TAG_MAJOR_VERSION == 34
     case SP_DJINNI:
         return MONS_DJINNI;
+#endif
     case SP_FORMICID:
         return MONS_FORMICID;
     case SP_VINE_STALKER:
@@ -396,6 +407,10 @@ monster_type player_species_to_mons_species(species_type species)
     case SP_OGRE_MAGE:
     case SP_GREY_ELF:
     case SP_GNOME:
+#if TAG_MAJOR_VERSION > 34
+    case SP_SLUDGE_ELF:
+    case SP_DJINNI:
+#endif
     case NUM_SPECIES:
     case SP_UNKNOWN:
     case SP_RANDOM:
@@ -414,10 +429,10 @@ bool is_valid_species(species_type species)
 bool is_species_valid_choice(species_type species)
 {
 #if TAG_MAJOR_VERSION == 34
-    if (species == SP_SLUDGE_ELF)
+    if (species == SP_SLUDGE_ELF || species == SP_DJINNI)
         return false;
 #endif
-    if ((species == SP_LAVA_ORC || species == SP_DJINNI)
+    if ((species == SP_LAVA_ORC)
         && Version::ReleaseType != VER_ALPHA)
     {
         return false;
@@ -440,7 +455,9 @@ int species_exp_modifier(species_type species)
         return 1;
     case SP_HILL_ORC:
     case SP_OGRE:
+#if TAG_MAJOR_VERSION == 34
     case SP_SLUDGE_ELF:
+#endif
     case SP_NAGA:
     case SP_GHOUL:
     case SP_MERFOLK:
@@ -470,7 +487,9 @@ int species_exp_modifier(species_type species)
     case SP_VAMPIRE:
     case SP_TROLL:
     case SP_DEMONSPAWN:
+#if TAG_MAJOR_VERSION == 34
     case SP_DJINNI:
+#endif
     case SP_LAVA_ORC:
         return -1;
     case SP_DEMIGOD:
@@ -495,10 +514,12 @@ int species_hp_modifier(species_type species)
     case SP_GARGOYLE:
         return -2;
     case SP_HIGH_ELF:
+#if TAG_MAJOR_VERSION == 34
     case SP_SLUDGE_ELF:
+    case SP_DJINNI:
+#endif
     case SP_HALFLING:
     case SP_OCTOPODE:
-    case SP_DJINNI:
     case SP_FORMICID:
         return -1;
     default:
@@ -541,7 +562,9 @@ int species_mp_modifier(species_type species)
         return -1;
     default:
         return 0;
+#if TAG_MAJOR_VERSION == 34
     case SP_SLUDGE_ELF:
+#endif
     case SP_TENGU:
     case SP_VINE_STALKER:
         return 1;
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index e8d64cd..453d28a 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -573,6 +573,7 @@ bool you_cannot_memorise(spell_type spell, bool &form)
     {
         rc = true, form = false;
     }
+#if TAG_MAJOR_VERSION == 34
 
     if (you.species == SP_DJINNI
         && (spell == SPELL_ICE_FORM
@@ -581,6 +582,7 @@ bool you_cannot_memorise(spell_type spell, bool &form)
     {
         rc = true, form = false;
     }
+#endif
 
     if (you.species == SP_LAVA_ORC
         && (spell == SPELL_STONESKIN
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 1678372..e98c5a0 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -164,7 +164,11 @@ int list_spells(bool toggle_with_I, bool viewing, bool allow_preselect,
                               | MF_ALWAYS_SHOW_MORE | MF_ALLOW_FORMATTING,
                               text_only);
     string titlestring = make_stringf("%-25.25s", title.c_str());
-    string hungerstring = you.species == SP_DJINNI ? "Glow  " : "Hunger";
+    string hungerstring =
+#if TAG_MAJOR_VERSION == 34
+        you.species == SP_DJINNI ? "Glow  " :
+#endif
+        "Hunger";
 #ifdef USE_TILE_LOCAL
     {
         // [enne] - Hack.  Make title an item so that it's aligned.
@@ -341,6 +345,7 @@ int spell_fail(spell_type spell)
     default: chance += 750; break;
     }
 
+#if TAG_MAJOR_VERSION == 34
     // Only apply this penalty to Dj because other species lose nutrition
     // rather than gaining contamination when casting spells.
     // Also, this penalty gives fairly precise information about contam
@@ -354,6 +359,7 @@ int spell_fail(spell_type spell)
         // forget casting when in orange.
         chance += contam * contam * contam / 5000000000LL;
     }
+#endif
 
     int chance2 = chance;
 
@@ -809,6 +815,7 @@ bool cast_a_spell(bool check_range, spell_type spell)
     else
         practise(EX_DID_MISCAST, spell);
 
+#if TAG_MAJOR_VERSION == 34
     // Nasty special cases.
     if (you.species == SP_DJINNI && cast_result == SPRET_SUCCESS
         && (spell == SPELL_BORGNJORS_REVIVIFICATION
@@ -818,6 +825,7 @@ bool cast_a_spell(bool check_range, spell_type spell)
         inc_mp(cost, true);
     }
     else // Redraw MP
+#endif
         flush_mp();
 
     if (!staff_energy && you.is_undead != US_UNDEAD)
diff --git a/crawl-ref/source/spl-miscast.cc b/crawl-ref/source/spl-miscast.cc
index 310ff3a..91c1085 100644
--- a/crawl-ref/source/spl-miscast.cc
+++ b/crawl-ref/source/spl-miscast.cc
@@ -1516,7 +1516,11 @@ void MiscastEffect::_divination_you(int severity)
             break;
         case 1:
             mpr("You lose your focus.");
-            if (you.magic_points > 0 || you.species == SP_DJINNI)
+            if (you.magic_points > 0
+#if TAG_MAJOR_VERSION == 34
+                    || you.species == SP_DJINNI
+#endif
+                    )
             {
                 drain_mp(3 + random2(10));
                 mprf(MSGCH_WARN, "You suddenly feel drained of magical energy!");
@@ -1532,7 +1536,11 @@ void MiscastEffect::_divination_you(int severity)
         {
         case 0:
             mpr("You lose concentration completely!");
-            if (you.magic_points > 0 || you.species == SP_DJINNI)
+            if (you.magic_points > 0 ||
+#if TAG_MAJOR_VERSION == 34
+                    you.species == SP_DJINNI
+#endif
+                    )
             {
                 drain_mp(5 + random2(20));
                 mprf(MSGCH_WARN, "You suddenly feel drained of magical energy!");
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index cf6d7ae..c441a5b 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -259,8 +259,12 @@ bool interrupt_cmd_repeat(activity_interrupt_type ai,
             crawl_state.cancel_cmd_repeat("Magic restored.");
         else if (ai == AI_FULL_HP)
         {
+#if TAG_MAJOR_VERSION == 34
             string health = (you.species == SP_DJINNI ? "EP" : "HP");
             crawl_state.cancel_cmd_repeat(health + " restored");
+#else
+            crawl_state.cancel_cmd_repeat("HP restored");
+#endif
         }
         else
             crawl_state.cancel_cmd_repeat("Command repetition interrupted.");
diff --git a/crawl-ref/source/status.cc b/crawl-ref/source/status.cc
index 90cc3ff..a44c828 100644
--- a/crawl-ref/source/status.cc
+++ b/crawl-ref/source/status.cc
@@ -746,7 +746,11 @@ static void _describe_glow(status_info* inf)
         inf->light_colour = DARKGREY;
         if (cont > 1)
             inf->light_colour = _bad_ench_colour(cont, 2, 3);
-        if (cont > 1 || you.species != SP_DJINNI)
+        if (cont > 1
+#if TAG_MAJOR_VERSION == 34
+                || you.species != SP_DJINNI
+#endif
+                )
             inf->light_text = "Contam";
     }
 
diff --git a/crawl-ref/source/tilepick-p.cc b/crawl-ref/source/tilepick-p.cc
index 88bd3e7..d44726d 100644
--- a/crawl-ref/source/tilepick-p.cc
+++ b/crawl-ref/source/tilepick-p.cc
@@ -626,8 +626,10 @@ tileidx_t tilep_species_to_base_tile(int sp, int level)
         return TILEP_BASE_FELID;
     case SP_OCTOPODE:
         return TILEP_BASE_OCTOPODE;
+#if TAG_MAJOR_VERSION == 34
     case SP_DJINNI:
         return TILEP_BASE_DJINNI;
+#endif
     case SP_FORMICID:
         return TILEP_BASE_FORMICID;
     case SP_VINE_STALKER:
@@ -764,9 +766,11 @@ void tilep_race_default(int sp, int level, dolls_data *doll)
         case SP_FORMICID:
             hair = 0;
             break;
+#if TAG_MAJOR_VERSION == 34
         case SP_DJINNI:
             hair = TILEP_HAIR_DJINN2;
             break;
+#endif
         default:
             // nothing to do
             break;
@@ -1038,6 +1042,7 @@ void tilep_calc_flags(const dolls_data &doll, int flag[])
         flag[TILEP_PART_LEG]    = TILEP_FLAG_HIDE;
         flag[TILEP_PART_SHADOW] = TILEP_FLAG_HIDE;
     }
+#if TAG_MAJOR_VERSION == 34
     else if (is_player_tile(doll.parts[TILEP_PART_BASE], TILEP_BASE_DJINNI))
     {
         flag[TILEP_PART_BOOTS]  = TILEP_FLAG_HIDE;
@@ -1045,6 +1050,7 @@ void tilep_calc_flags(const dolls_data &doll, int flag[])
         flag[TILEP_PART_SHADOW] = TILEP_FLAG_HIDE;
         flag[TILEP_PART_BODY]   = TILEP_FLAG_CUT_NAGA; // Do they need their own flag?
     }
+#endif
     else if (doll.parts[TILEP_PART_BASE] >= TILEP_BASE_DRACONIAN_FIRST
              && doll.parts[TILEP_PART_BASE] <= TILEP_BASE_DRACONIAN_LAST)
     {
diff --git a/crawl-ref/source/tileweb.cc b/crawl-ref/source/tileweb.cc
index 3b689f1..533fb1c 100644
--- a/crawl-ref/source/tileweb.cc
+++ b/crawl-ref/source/tileweb.cc
@@ -698,8 +698,10 @@ void TilesFramework::_send_player(bool force_full)
     _update_int(force_full, c.hp, you.hp, "hp");
     _update_int(force_full, c.hp_max, you.hp_max, "hp_max");
     int max_max_hp = get_real_hp(true, true);
+#if TAG_MAJOR_VERSION == 34
     if (you.species == SP_DJINNI)
         max_max_hp += get_real_mp(true); // compare _print_stats_hp
+
     _update_int(force_full, c.real_hp_max, max_max_hp, "real_hp_max");
 
     if (you.species != SP_DJINNI)
@@ -719,6 +721,11 @@ void TilesFramework::_send_player(bool force_full)
             contam = 16000;
         _update_int(force_full, c.contam, contam, "contam");
     }
+#else
+    _update_int(force_full, c.real_hp_max, max_max_hp, "real_hp_max");
+    _update_int(force_full, c.mp, you.magic_points, "mp");
+    _update_int(force_full, c.mp_max, you.max_magic_points, "mp_max");
+#endif
 
     if (you.species == SP_LAVA_ORC)
         _update_int(force_full, c.heat, temperature(), "heat");
diff --git a/crawl-ref/source/transform.cc b/crawl-ref/source/transform.cc
index a37b759..e993452 100644
--- a/crawl-ref/source/transform.cc
+++ b/crawl-ref/source/transform.cc
@@ -694,9 +694,11 @@ static bool _transformation_is_safe(transformation_type which_trans,
         if (cloud != EMPTY_CLOUD && is_damaging_cloud(env.cloud[cloud].type, false))
             return false;
     }
+#if TAG_MAJOR_VERSION == 34
 
     if (which_trans == TRAN_ICE_BEAST && you.species == SP_DJINNI)
         return false; // melting is fatal...
+#endif
 
     if (!feat_dangerous_for_form(which_trans, feat))
         return true;
diff --git a/crawl-ref/source/util/gen-apt.pl b/crawl-ref/source/util/gen-apt.pl
index f01997c..5458954 100755
--- a/crawl-ref/source/util/gen-apt.pl
+++ b/crawl-ref/source/util/gen-apt.pl
@@ -124,6 +124,7 @@ sub aptitude_table
     for my $sp (sort_species(@SPECIES))
     {
         next if $sp eq 'Sludge Elf';
+        next if $sp eq 'Djinni';
 
         my $line = '';
         $line .= fix_draco_species($sp, \$seen_draconian_length);
@@ -273,7 +274,4 @@ sub load_mods
     {
         die "Can't find table: $_ in $modfile\n" unless $SPECIES_SKILLS{Spriggan}{$_};
     }
-
-    $SPECIES_SKILLS{Djinni}{'Hit Points'} = -99;
-    $SPECIES_SKILLS{Djinni}{'Magic Points'} = -99;
 }
-- 
1.8.1.4

