You need to also revert parts of 5955a17, which removes GENPC_DWARVEN and GENPC_OGRISH, and replaces them with just checking for species (since in master, there's only one of dwarven and ogrish species each).
Here's an alternative method that employs git (version control). I'm by no means a git expert, or a great coder, but you can also do this:
1. install git
2. git clone
git://gitorious.org/crawl/crawl.git (directory name here)
3. (go to the directory/crawl-ref/source)
4. git revert 0edc768 (that's the MD axing commit)
5. Now you'll need to resolve some conflicts in species.cc. You can find them by searching for '<<<<'. The top part of the conflict block (separated with =======) has what the current version which has the commit has, and the lower part (down to >>>>>>) has the MD stuff. You want to remove the upper part and the <<<, ===, >>> markers.
5a. In the conflict block that begins on ling 266, remove the "case SP_OGRE: return (GENPC_OGREISH);" line.
5b. In the block that begins at line 410 the conflict comes from Kenku->Tengu renaming. Keep Tengu, drop Kenku.
5c. In the last block, since the change, the Hill Orcs have been given 0 mp modifier (instead of -1), so you want to remove the whole block.
6. Look at what 5955a17 changed with git show 5955a17
7. You need to change back the lines that change player_genus(GENPC_DWARVEN) checks to you.species(SP_DEEP_DWARF). Also, add GENPC_DWARVEN back to species.h.
8. run 'make' to test compile, go back to fix errors, run make again
9. To commit the revert to your local clone of the repository do, git commit -a
I also tested the above, so it should work.
Now, you should be able to 'git pull --rebase' to keep your MD version up to date with the DCSS master version. You'll encounter some conflicts, especially as player species change, and you need to deal with those. Good luck!
Below is also the resulting patch, which you can apply to your cloned git with git am. (edit: it should apply against b45cf1b). But I'd say the above process is useful to go through, if you intend to maintain your fork. Also, personally I stand by the removal, but hopefully this will result in fun!
- Code:
From 24956bcba0a28f06b5a5c5e5bc8c96cc7eb6f51e Mon Sep 17 00:00:00 2001
From: Eino Keskitalo <eino.keskitalo@gmail.com>
Date: Mon, 7 Nov 2011 14:32:00 +0200
Subject: [PATCH] Example patch to bring mountain dwarves back into the game for forking purposes.
Revert "Give mountain dwarves the axe."
This reverts commit 0edc7688ee170c182dc86189be4ef89a3c70d329.
Conflicts:
crawl-ref/source/species.cc
---
crawl-ref/source/aptitudes.h | 2 --
crawl-ref/source/enum.h | 6 ------
crawl-ref/source/fight.cc | 2 +-
crawl-ref/source/item_use.cc | 2 +-
crawl-ref/source/mon-util.cc | 2 +-
crawl-ref/source/ng-restr.cc | 28 +++++++++++++++++++++++-----
crawl-ref/source/ng-setup.cc | 4 +---
crawl-ref/source/player.cc | 4 ----
crawl-ref/source/species.cc | 32 ++++++++++++++++++++++----------
crawl-ref/source/species.h | 1 +
crawl-ref/source/transform.cc | 2 +-
11 files changed, 51 insertions(+), 34 deletions(-)
diff --git a/crawl-ref/source/aptitudes.h b/crawl-ref/source/aptitudes.h
index a3af937..2e2a1e3 100644
--- a/crawl-ref/source/aptitudes.h
+++ b/crawl-ref/source/aptitudes.h
@@ -152,7 +152,6 @@ static const species_skill_aptitude species_skill_aptitudes[] =
APT(SP_SLUDGE_ELF, SK_INVOCATIONS, 0),
APT(SP_SLUDGE_ELF, SK_EVOCATIONS, 0),
-#if TAG_MAJOR_VERSION == 32
// SP_MOUNTAIN_DWARF
APT(SP_MOUNTAIN_DWARF, SK_FIGHTING, 2),
APT(SP_MOUNTAIN_DWARF, SK_SHORT_BLADES, 1),
@@ -187,7 +186,6 @@ static const species_skill_aptitude species_skill_aptitudes[] =
APT(SP_MOUNTAIN_DWARF, SK_POISON_MAGIC, -2),
APT(SP_MOUNTAIN_DWARF, SK_INVOCATIONS, 0),
APT(SP_MOUNTAIN_DWARF, SK_EVOCATIONS, 1),
-#endif
// SP_HALFLING
APT(SP_HALFLING, SK_FIGHTING, -1),
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 566240d..c53f2cf 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2982,9 +2982,7 @@ enum species_type
SP_HIGH_ELF,
SP_DEEP_ELF,
SP_SLUDGE_ELF,
-#if TAG_MAJOR_VERSION == 32
SP_MOUNTAIN_DWARF,
-#endif
SP_HALFLING,
SP_HILL_ORC,
SP_KOBOLD,
@@ -3014,15 +3012,11 @@ enum species_type
SP_DEEP_DWARF,
SP_FELID,
SP_OCTOPODE,
-// The high scores viewer still needs enums for removed species.
SP_ELF, // (placeholder)
SP_HILL_DWARF, // (placeholder)
SP_OGRE_MAGE, // (placeholder)
SP_GREY_ELF, // (placeholder)
SP_GNOME, // (placeholder)
-#if TAG_MAJOR_VERSION != 32
- SP_MOUNTAIN_DWARF, // (placeholder)
-#endif
NUM_SPECIES, // always after the last species
SP_UNKNOWN = 100,
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 2c0c149..4008ee9 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1642,7 +1642,7 @@ int melee_attack::player_apply_weapon_bonuses(int damage)
: (-random2(1 - wpn_damage_plus));
if (get_equip_race(*weapon) == ISFLAG_DWARVEN
- && you.species == SP_DEEP_DWARF)
+ && player_genus(GENPC_DWARVEN))
{
damage += random2(3);
}
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index dd29fb0..77e36e7 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2880,7 +2880,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
// Dwarves/orcs with dwarven/orcish weapons.
if (get_equip_race(item) == ISFLAG_DWARVEN
- && you.species == SP_DEEP_DWARF
+ && player_genus(GENPC_DWARVEN)
|| get_equip_race(item) == ISFLAG_ORCISH
&& you.species == SP_HILL_ORC)
{
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index e4a7211..7494b16 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -3578,7 +3578,7 @@ static std::string _pluralise_player_genus()
{
std::string sp = species_name(you.species, true, false);
if (player_genus(GENPC_ELVEN, you.species)
- || you.species == SP_DEEP_DWARF)
+ || player_genus(GENPC_DWARVEN, you.species))
{
sp = sp.substr(0, sp.find("f"));
sp += "ves";
diff --git a/crawl-ref/source/ng-restr.cc b/crawl-ref/source/ng-restr.cc
index f155d7e..26f7768 100644
--- a/crawl-ref/source/ng-restr.cc
+++ b/crawl-ref/source/ng-restr.cc
@@ -14,11 +14,6 @@
char_choice_restriction job_allowed(species_type speci, job_type job)
{
-#if TAG_MAJOR_VERSION == 32
- if (speci == SP_MOUNTAIN_DWARF)
- return CC_BANNED;
-#endif
-
switch (job)
{
case JOB_FIGHTER:
@@ -69,6 +64,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
{
case SP_HIGH_ELF:
case SP_DEEP_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_MERFOLK:
case SP_HALFLING:
@@ -142,6 +138,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
case SP_HIGH_ELF:
case SP_DEEP_ELF:
case SP_SLUDGE_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_HALFLING:
@@ -170,6 +167,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
return (CC_BANNED);
case SP_DEEP_ELF:
case SP_SLUDGE_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_MERFOLK:
case SP_HALFLING:
@@ -216,6 +214,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
{
case SP_DEEP_ELF:
case SP_SLUDGE_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_KOBOLD:
case SP_SPRIGGAN:
@@ -238,6 +237,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
{
case SP_DEEP_ELF:
case SP_SLUDGE_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_HILL_ORC:
case SP_MERFOLK:
case SP_KOBOLD:
@@ -260,6 +260,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
case JOB_WIZARD:
switch (speci)
{
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_MERFOLK:
@@ -279,6 +280,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
switch (speci)
{
case SP_SLUDGE_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_MERFOLK:
@@ -302,6 +304,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
{
case SP_HIGH_ELF:
case SP_SLUDGE_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_CENTAUR:
@@ -325,6 +328,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
switch (speci)
{
case SP_HIGH_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_MERFOLK:
@@ -345,6 +349,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
switch (speci)
{
case SP_HIGH_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_MERFOLK:
case SP_HALFLING:
case SP_CENTAUR:
@@ -364,6 +369,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
return (CC_BANNED);
case SP_HIGH_ELF:
case SP_DEEP_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_HALFLING:
@@ -401,6 +407,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
case JOB_ICE_ELEMENTALIST:
switch (speci)
{
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_HALFLING:
@@ -419,6 +426,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
case JOB_AIR_ELEMENTALIST:
switch (speci)
{
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_MERFOLK:
@@ -458,6 +466,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
switch (speci)
{
case SP_HIGH_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_HALFLING:
@@ -478,6 +487,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
{
case SP_HIGH_ELF:
case SP_DEEP_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_MERFOLK:
@@ -506,6 +516,7 @@ char_choice_restriction job_allowed(species_type speci, job_type job)
return (CC_BANNED);
case SP_HIGH_ELF:
case SP_DEEP_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_NAGA:
@@ -665,6 +676,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
switch (ng.species)
{
case SP_HUMAN:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_HILL_ORC:
case SP_MUMMY:
@@ -726,6 +738,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
case SP_MINOTAUR:
case SP_HIGH_ELF:
case SP_SLUDGE_ELF:
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_TENGU:
case SP_DEMIGOD:
@@ -751,6 +764,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
// for some species whose Polearm aptitudes are not too bad.
switch (ng.species)
{
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_DWARF:
case SP_GHOUL:
case SP_VAMPIRE:
@@ -809,6 +823,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
switch(ng.species)
{
case SP_DEEP_DWARF:
+ case SP_MOUNTAIN_DWARF:
case SP_KOBOLD:
case SP_MERFOLK:
case SP_OGRE:
@@ -825,6 +840,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
case WPN_SLING:
switch(ng.species)
{
+ case SP_MOUNTAIN_DWARF:
case SP_DEEP_ELF:
case SP_HIGH_ELF:
case SP_SLUDGE_ELF:
@@ -854,6 +870,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
switch(ng.species)
{
case SP_DEEP_DWARF:
+ case SP_MOUNTAIN_DWARF:
return CC_RESTRICTED;
case SP_SPRIGGAN:
case SP_FELID:
@@ -866,6 +883,7 @@ char_choice_restriction weapon_restriction(weapon_type wpn,
switch(ng.species)
{
case SP_DEEP_DWARF:
+ case SP_MOUNTAIN_DWARF:
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 8f786ec..3832522 100644
--- a/crawl-ref/source/ng-setup.cc
+++ b/crawl-ref/source/ng-setup.cc
@@ -58,9 +58,7 @@ static void _species_stat_init(species_type which_species)
case SP_DEEP_ELF: sb = 3; ib = 10; db = 8; break; // 21
case SP_SLUDGE_ELF: sb = 6; ib = 7; db = 7; break; // 20
-#if TAG_MAJOR_VERSION == 32
case SP_MOUNTAIN_DWARF: sb = 9; ib = 4; db = 5; break; // 18
-#endif
case SP_DEEP_DWARF: sb = 9; ib = 6; db = 6; break; // 21
case SP_TROLL: sb = 13; ib = 2; db = 3; break; // 18
@@ -1149,7 +1147,7 @@ static void _racialise_starting_equipment()
// Now add appropriate species type mod.
if (player_genus(GENPC_ELVEN))
set_equip_race(you.inv[i], ISFLAG_ELVEN);
- else if (you.species == SP_DEEP_DWARF)
+ else if (player_genus(GENPC_DWARVEN))
set_equip_race(you.inv[i], ISFLAG_DWARVEN);
else if (you.species == SP_HILL_ORC)
set_equip_race(you.inv[i], ISFLAG_ORCISH);
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 1f0948e..708d6aa 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -3075,12 +3075,10 @@ void level_change(bool skip_attribute_increase)
}
break;
-#if TAG_MAJOR_VERSION == 32
case SP_MOUNTAIN_DWARF:
if (!(you.experience_level % 4))
modify_stat(STAT_STR, 1, false, "level gain");
break;
-#endif
case SP_DEEP_DWARF:
if (you.experience_level == 14)
@@ -6305,9 +6303,7 @@ int player_res_magic(bool calc_unid, bool temp)
case SP_HIGH_ELF:
case SP_SLUDGE_ELF:
case SP_DEEP_ELF:
-#if TAG_MAJOR_VERSION == 32
case SP_MOUNTAIN_DWARF:
-#endif
case SP_VAMPIRE:
case SP_DEMIGOD:
case SP_OGRE:
diff --git a/crawl-ref/source/species.cc b/crawl-ref/source/species.cc
index d38feb1..6e816bb 100644
--- a/crawl-ref/source/species.cc
+++ b/crawl-ref/source/species.cc
@@ -21,7 +21,7 @@ static species_type species_order[] = {
// comparatively human-like looks
SP_HUMAN, SP_HIGH_ELF,
SP_DEEP_ELF, SP_SLUDGE_ELF,
- SP_DEEP_DWARF,
+ SP_MOUNTAIN_DWARF, SP_DEEP_DWARF,
SP_HILL_ORC, SP_MERFOLK,
// small species
SP_HALFLING, SP_KOBOLD,
@@ -37,7 +37,8 @@ static species_type species_order[] = {
SP_MUMMY, SP_GHOUL,
SP_VAMPIRE,
// not humanoid at all
- SP_FELID, SP_OCTOPODE,
+ SP_FELID,
+ SP_OCTOPODE,
};
species_type random_draconian_player_species()
@@ -159,6 +160,21 @@ std::string species_name(species_type speci, bool genus, bool adj)
}
}
break;
+ case GENPC_DWARVEN:
+ if (adj) // doesn't care about species/genus
+ res = "Dwarven";
+ else if (genus)
+ res = "Dwarf";
+ else
+ {
+ switch (speci)
+ {
+ case SP_MOUNTAIN_DWARF: res = "Mountain Dwarf"; break;
+ case SP_DEEP_DWARF: res = "Deep Dwarf"; break;
+ default: res = "Dwarf"; break;
+ }
+ }
+ break;
case GENPC_NONE:
default:
switch (speci)
@@ -247,6 +263,10 @@ genus_type species_genus(species_type species)
case SP_SLUDGE_ELF:
return (GENPC_ELVEN);
+ case SP_MOUNTAIN_DWARF:
+ case SP_DEEP_DWARF:
+ return (GENPC_DWARVEN);
+
default:
return (GENPC_NONE);
}
@@ -289,10 +309,8 @@ monster_type player_species_to_mons_species(species_type species)
case SP_DEEP_ELF:
case SP_SLUDGE_ELF:
return (MONS_ELF);
-#if TAG_MAJOR_VERSION == 32
case SP_MOUNTAIN_DWARF:
return (MONS_DWARF);
-#endif
case SP_HALFLING:
return (MONS_HALFLING);
case SP_HILL_ORC:
@@ -390,9 +408,7 @@ int species_exp_modifier(species_type species)
return 12;
case SP_SPRIGGAN:
case SP_TENGU:
-#if TAG_MAJOR_VERSION == 32
case SP_MOUNTAIN_DWARF:
-#endif
case SP_DEEP_DWARF:
case SP_MINOTAUR:
return 13;
@@ -454,9 +470,7 @@ int species_hp_modifier(species_type species)
case SP_PURPLE_DRACONIAN:
case SP_MOTTLED_DRACONIAN:
case SP_PALE_DRACONIAN:
-#if TAG_MAJOR_VERSION == 32
case SP_MOUNTAIN_DWARF:
-#endif
case SP_GHOUL:
case SP_HILL_ORC:
case SP_MINOTAUR:
@@ -477,9 +491,7 @@ int species_mp_modifier(species_type species)
case SP_TROLL:
case SP_MINOTAUR:
return -2;
-#if TAG_MAJOR_VERSION == 32
case SP_MOUNTAIN_DWARF:
-#endif
case SP_CENTAUR:
case SP_GHOUL:
return -1;
diff --git a/crawl-ref/source/species.h b/crawl-ref/source/species.h
index 3f11679..c50e4a1 100644
--- a/crawl-ref/source/species.h
+++ b/crawl-ref/source/species.h
@@ -5,6 +5,7 @@ enum genus_type
{
GENPC_DRACONIAN,
GENPC_ELVEN,
+ GENPC_DWARVEN,
GENPC_NONE,
};
diff --git a/crawl-ref/source/transform.cc b/crawl-ref/source/transform.cc
index 717da7f..a88acb3 100644
--- a/crawl-ref/source/transform.cc
+++ b/crawl-ref/source/transform.cc
@@ -664,7 +664,7 @@ bool transform(int pow, transformation_type which_trans, bool force,
tran_name = "statue";
str = 2;
dex = -2;
- if (you.species == SP_DEEP_DWARF && one_chance_in(10))
+ if (player_genus(GENPC_DWARVEN) && one_chance_in(10))
msg = "You inwardly fear your resemblance to a lawn ornament.";
else
msg += "a living statue of rough stone.";
--
1.7.0.4
--Eino