Tips on how to fork and put MD back in?


Questions, Explanations, Howtos

Halls Hopper

Posts: 85

Joined: Sunday, 23rd January 2011, 08:19

Post Monday, 7th November 2011, 01:21

Tips on how to fork and put MD back in?

I've got a static IP, a box I can put Linux on, and free time that I'm willing to devote to a project. However, I currently can't code my way out of a paper bag.

Can anybody offer me some tips on how to get started on a "fork" so I can put my beloved MD back into the game?

I'm not interested in arguing with the devs, it's their game and they can do what they want with it - all I'd like is some advice on how to get the "fork" going that was mentioned in the farewell to dwarves thread.

Thanks in advance for the help.

AtT

Blades Runner

Posts: 567

Joined: Saturday, 10th September 2011, 14:40

Post Monday, 7th November 2011, 03:13

Re: Tips on how to fork and put MD back in?

Start your game.
Type 'I'm a dwarf' and hit enter.
Press f.
Choose a class.
Play game.

For this message the author AtT has received thanks:
XuaXua

Shoals Surfer

Posts: 293

Joined: Tuesday, 25th October 2011, 05:04

Post Monday, 7th November 2011, 03:32

Re: Tips on how to fork and put MD back in?

1. Get the latest version of trunk.

2. Look through the files and manually revert the changes seen here: https://gitorious.org/crawl/crawl/commi ... 9a3c70d329
User avatar

Vestibule Violator

Posts: 1593

Joined: Thursday, 19th May 2011, 16:38

Location: Penza, Russia

Post Monday, 7th November 2011, 08:38

Re: Tips on how to fork and put MD back in?

It's hard to fork a big game. The chances are it will fork your fork with nothing but a fork of forks.
If you find any mistakes or typos in my post, feel free to PM me about it. Thanks in advance!

The Verse flows throughout Aquaria...
Through each ripple and wave...
Through every living being...
The Verse binds us all as one.

Vestibule Violator

Posts: 1567

Joined: Friday, 21st January 2011, 22:56

Post Monday, 7th November 2011, 12:08

Re: Tips on how to fork and put MD back in?

If you want to fork all you need is a place to put your repository (gitorious is what crawl uses, sourceforge and google code also provide free project hosting) and a git installation and C++ compiler (available for both windows (for example as msysgit which includes a compiler) and linux). The problem with a fork is that you need to continuously maintain it, and merging updates can require some coding ability. Probably not that much if all you want to change is to keep MD in the game. Other than that google should be able to help you there. You need to learn how to use git, after that it's just a matter of picking a host for your project.

If you actually want to set up a server for your fork things get much more complicated, I wouldn't recommend it for someone without some decent linux experience. Expect to do a fair bit of reading and experimentation if you want to try that. The scripts used on the servers are in many languages, probably including at least perl, python and ruby. Many of those are not required for a functional crawl server of course, and most aren't public. Something that is required is dgamelaunch, which handles the game list and starting the crawl processes for each player. There's a repository for it on gitorious I think. If you want webtiles things get even more complicated.

That's pretty much all I know, I know neither git nor dgamelaunch, and don't have a lot of experience with Linux. Should be enough to get you started though. Once you know the basics asking about this on ##crawl-dev is probably a good idea, but don't expect anyone to hold your hand through things you can just as easily find out by googling.

Edit: also this should probably be moved to Interface and Software, people who can help are unlikely to see it here.

For this message the author Galefury has received thanks:
zogre
User avatar

Zot Zealot

Posts: 1060

Joined: Tuesday, 21st December 2010, 17:22

Location: United Kingdom

Post Monday, 7th November 2011, 12:20

Re: Tips on how to fork and put MD back in?

Agreed, moved to where it might get a more helpful audience!
I am sure I played flawflessly. This was an utmost unfair death. -- gorbeh

Dungeon Master

Posts: 115

Joined: Thursday, 16th December 2010, 19:43

Location: Oulu, Finland

Post Monday, 7th November 2011, 12:38

Re: Tips on how to fork and put MD back in?

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

For this message the author evktalo has received thanks: 2
rchandra, zogre

Halls Hopper

Posts: 85

Joined: Sunday, 23rd January 2011, 08:19

Post Monday, 7th November 2011, 18:10

Re: Tips on how to fork and put MD back in?

That was exactly what I needed - I'll get going on it as my weekly freetime permits.

Hopefully I'll have an update to post in the next week or so.

Thanks again!

AtT

Blades Runner

Posts: 567

Joined: Saturday, 10th September 2011, 14:40

Post Wednesday, 9th November 2011, 17:27

Re: Tips on how to fork and put MD back in?

Hmm.. I realize that I responded rudely earlier but editing the game for personal preferences does actually sound like an interesting proposal. I also have limited coding experience (Some C++ but hardly any) and would be interested in what results you can come up with. Good luck!

Halls Hopper

Posts: 85

Joined: Sunday, 23rd January 2011, 08:19

Post Saturday, 12th November 2011, 07:26

Re: Tips on how to fork and put MD back in?

This is tougher than I thought it'd be :)

I'm still working on it, though!

EDIT: I got git working, and have made the reversions, now I need to get make working. Progress is fun!

Return to Coding

Who is online

Users browsing this forum: No registered users and 5 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.