From ea1539f36cf2b1225f63a9759d73bd67ed0acd41 Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 5 Dec 2006 10:52:18 +0000 Subject: Changed minotaur horns so that they're a standard mutation by abusing demon_pow[]. This also means that the horns can now grow (but not shrink.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@571 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/effects.cc | 1 - crawl-ref/source/fight.cc | 9 +++---- crawl-ref/source/itemprop.cc | 2 +- crawl-ref/source/mutation.cc | 3 --- crawl-ref/source/newgame.cc | 58 ++++++++++++++++++++++++++------------------ crawl-ref/source/transfor.cc | 1 - 6 files changed, 39 insertions(+), 35 deletions(-) diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 81b9c915e7..86cf3d4061 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1339,7 +1339,6 @@ bool acquirement(unsigned char force_class, int agent) || get_helmet_type(thing) == THELM_HELMET) && ((you.species >= SP_OGRE && you.species <= SP_OGRE_MAGE) || player_genus(GENPC_DRACONIAN) - || you.species == SP_MINOTAUR || you.species == SP_KENKU || you.species == SP_SPRIGGAN || you.mutation[MUT_HORNS])) diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 48444db55e..02eacbf29c 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1691,9 +1691,7 @@ bool you_attack(int monster_attacked, bool unarmed_attacks) case 1: if (unarmed_attack != UNAT_HEADBUTT) { - if ((you.species != SP_MINOTAUR - && (!you.mutation[MUT_HORNS] - && you.species != SP_KENKU)) + if ((!you.mutation[MUT_HORNS] && you.species != SP_KENKU) || !one_chance_in(3)) { continue; @@ -1712,9 +1710,8 @@ bool you_attack(int monster_attacked, bool unarmed_attacks) : "headbutt"); sc_dam = 5 + you.mutation[MUT_HORNS] * 3; - - if (you.species == SP_MINOTAUR) - sc_dam += 5; + // minotaurs used to get +5 damage here, now they get + // +6 because of the horns. if (you.equip[EQ_HELMET] != -1 && (get_helmet_type(you.inv[you.equip[EQ_HELMET]]) == THELM_HELMET diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index c189c13c55..c69530d91d 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1028,7 +1028,7 @@ bool check_armour_shape( const item_def &item, bool quiet ) return (false); } - if (you.species == SP_MINOTAUR || you.mutation[MUT_HORNS]) + if (you.mutation[MUT_HORNS]) { if (!quiet) mpr( "You can't wear that with your horns!" ); diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index d5d5c7d9ab..62b06e3d70 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -1264,9 +1264,6 @@ bool mutate(int which_mutation, bool failMsg) return false; } - if (mutat == MUT_HORNS && you.species == SP_MINOTAUR) - return false; - // nagas have see invis and res poison and can spit poison if (you.species == SP_NAGA) { diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index 7901f32611..f20a672835 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -92,17 +92,18 @@ extern std::string init_file_location; #define MIN_START_STAT 1 -bool class_allowed(unsigned char speci, int char_class); -bool verifyPlayerName(void); -void choose_weapon(void); -void enterPlayerName(bool blankOK); -void give_basic_knowledge(int which_job); -void give_basic_spells(int which_job); -void give_last_paycheck(int which_job); -void init_player(void); -void jobs_stat_init(int which_job); -void openingScreen(void); -void species_stat_init(unsigned char which_species); +static bool class_allowed(unsigned char speci, int char_class); +static bool verifyPlayerName(void); +static void choose_weapon(void); +static void enterPlayerName(bool blankOK); +static void give_basic_knowledge(int which_job); +static void give_basic_spells(int which_job); +static void give_basic_mutations(unsigned char speci); +static void give_last_paycheck(int which_job); +static void init_player(void); +static void jobs_stat_init(int which_job); +static void openingScreen(void); +static void species_stat_init(unsigned char which_species); #if 0 // currently unused -- bwr @@ -788,6 +789,8 @@ bool new_game(void) tmp_file_pairs[lvl][dng] = false; } } + + give_basic_mutations(you.species); // places staircases to the branch levels: for (i = 0; i < 30; i++) @@ -837,7 +840,7 @@ static bool species_is_undead( unsigned char speci ) return (speci == SP_MUMMY || speci == SP_GHOUL); } -bool class_allowed( unsigned char speci, int char_class ) +static bool class_allowed( unsigned char speci, int char_class ) { switch (char_class) { @@ -1513,7 +1516,7 @@ static void choose_book( item_def& book, int firstbook, int numbooks ) static char startwep[5] = { WPN_SHORT_SWORD, WPN_MACE, WPN_HAND_AXE, WPN_SPEAR, WPN_TRIDENT }; -void choose_weapon( void ) +static void choose_weapon( void ) { char wepName[ ITEMNAME_SIZE ]; unsigned char keyin = 0; @@ -1630,12 +1633,12 @@ void choose_weapon( void ) ? WPN_RANDOM : you.inv[0].sub_type; } -void init_player(void) +static void init_player(void) { you.init(); } -void give_last_paycheck(int which_job) +static void give_last_paycheck(int which_job) { switch (which_job) { @@ -1663,8 +1666,8 @@ void give_last_paycheck(int which_job) // requires stuff::modify_all_stats() and works because // stats zeroed out by newgame::init_player()... recall -// that demonspawn & demingods get more later on {dlb} -void species_stat_init(unsigned char which_species) +// that demonspawn & demigods get more later on {dlb} +static void species_stat_init(unsigned char which_species) { int sb = 0; // strength base int ib = 0; // intelligence base @@ -1728,7 +1731,7 @@ void species_stat_init(unsigned char which_species) modify_all_stats( sb, ib, db ); } -void jobs_stat_init(int which_job) +static void jobs_stat_init(int which_job) { int s = 0; // strength mod int i = 0; // intelligence mod @@ -1783,7 +1786,16 @@ void jobs_stat_init(int which_job) set_mp( mp, true ); } -void give_basic_knowledge(int which_job) +static void give_basic_mutations(unsigned char speci) +{ + if (speci == SP_MINOTAUR) + { + you.mutation[MUT_HORNS] = 2; + you.demon_pow[MUT_HORNS] = 2; + } +} + +static void give_basic_knowledge(int which_job) { switch (which_job) { @@ -1820,7 +1832,7 @@ void give_basic_knowledge(int which_job) return; } // end give_basic_knowledge() -void give_basic_spells(int which_job) +static void give_basic_spells(int which_job) { // wanderers may or may not already have a spell -- bwr if (which_job == JOB_WANDERER) @@ -1910,7 +1922,7 @@ void give_basic_spells(int which_job) // eventually, this should be something more grand {dlb} -void openingScreen(void) +static void openingScreen(void) { textcolor( YELLOW ); cprintf("Hello, welcome to " CRAWL " " VERSION "!"); @@ -2064,7 +2076,7 @@ static bool read_player_name( } } -void enterPlayerName(bool blankOK) +static void enterPlayerName(bool blankOK) { int prompt_start = wherey(); bool ask_name = true; @@ -2110,7 +2122,7 @@ void enterPlayerName(bool blankOK) while (ask_name = !is_good_name(you.your_name, blankOK)); } // end enterPlayerName() -bool verifyPlayerName(void) +static bool verifyPlayerName(void) { #if defined(DOS) || defined(WIN32CONSOLE) static int william_tanksley_asked_for_this = 2; diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 697bd4aef7..2499ee9fb4 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -482,7 +482,6 @@ bool can_equip( equipment_type use_which ) { switch (you.species) { - case SP_MINOTAUR: case SP_KENKU: return (false); default: -- cgit v1.2.3-54-g00ecf