summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-14 08:55:24 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-14 08:55:24 +0000
commit6dba2ac32df50d8a0d3628fbc65fb81825a96fdd (patch)
treec5db7daf782a95707f90fd4351e85c3dfa070b49 /crawl-ref/source
parent60f850418fc4a37a5f2eccec19a83065fa7769e5 (diff)
downloadcrawl-ref-6dba2ac32df50d8a0d3628fbc65fb81825a96fdd.tar.gz
crawl-ref-6dba2ac32df50d8a0d3628fbc65fb81825a96fdd.zip
Implemented Beogh, god of Orcs.
+ added information about random choice to newgame git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1585 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/abl-show.cc17
-rw-r--r--crawl-ref/source/acr.cc3
-rw-r--r--crawl-ref/source/describe.cc26
-rw-r--r--crawl-ref/source/direct.cc6
-rw-r--r--crawl-ref/source/dungeon.cc10
-rw-r--r--crawl-ref/source/enum.h10
-rw-r--r--crawl-ref/source/fight.cc16
-rw-r--r--crawl-ref/source/hiscores.cc7
-rw-r--r--crawl-ref/source/items.cc3
-rw-r--r--crawl-ref/source/message.cc1
-rw-r--r--crawl-ref/source/newgame.cc51
-rw-r--r--crawl-ref/source/player.cc15
-rw-r--r--crawl-ref/source/religion.cc341
-rw-r--r--crawl-ref/source/travel.cc1
-rw-r--r--crawl-ref/source/view.cc106
15 files changed, 588 insertions, 25 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 6541b39445..48365e448b 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -136,7 +136,11 @@ ability_type god_abilities[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
// Lugonu
{ ABIL_LUGONU_ABYSS_EXIT, ABIL_LUGONU_BEND_SPACE,
ABIL_LUGONU_SUMMON_DEMONS, ABIL_NON_ABILITY,
- ABIL_LUGONU_ABYSS_ENTER }
+ ABIL_LUGONU_ABYSS_ENTER },
+ // Beogh
+ { ABIL_NON_ABILITY, ABIL_BEOGH_SMITING,
+ ABIL_NON_ABILITY, ABIL_NON_ABILITY,
+ ABIL_NON_ABILITY }
};
// The description screen was way out of date with the actual costs.
@@ -274,6 +278,9 @@ static const ability_def Ability_List[] =
{ ABIL_NEMELEX_PEEK, "Deck Peek", 3, 0, 0, 1, ABFLAG_INSTANT },
{ ABIL_NEMELEX_STACK_DECK, "Stack Deck", 5, 0, 150, 6, ABFLAG_NONE },
+ // Beogh
+ { ABIL_BEOGH_SMITING, "Smiting", 3, 0, 50, 2, ABFLAG_NONE },
+
// These six are unused "evil" god abilities:
{ ABIL_CHARM_SNAKE, "Charm Snake", 6, 0, 200, 5, ABFLAG_NONE },
{ ABIL_TRAN_SERPENT_OF_HELL, "Turn into Demonic Serpent", 16, 0, 600, 8, ABFLAG_NONE },
@@ -625,6 +632,7 @@ static talent get_talent(ability_type ability, bool check_confused)
case ABIL_ZIN_HEALING:
case ABIL_TSO_SMITING:
+ case ABIL_BEOGH_SMITING:
case ABIL_OKAWARU_HEALING:
case ABIL_MAKHLEB_MINOR_DESTRUCTION:
case ABIL_SIF_MUNA_FORGET_SPELL:
@@ -1568,6 +1576,13 @@ static bool do_ability(const ability_def& abil)
return false;
break;
+ case ABIL_BEOGH_SMITING:
+ if (your_spells( SPELL_SMITING, (2 + skill_bump(SK_INVOCATIONS)) * 6,
+ false ) == SPRET_ABORT)
+ return (false);
+ exercise( SK_INVOCATIONS, (coinflip()? 3 : 2) );
+ break;
+
//jmf: intended as invocations from evil god(s):
case ABIL_CHARM_SNAKE:
cast_snake_charm( you.experience_level * 2
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 721fd28e31..940954b816 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -296,6 +296,9 @@ int main( int argc, char *argv[] )
case GOD_ELYVILON:
simple_god_message( " says: Go forth and aid the weak!" );
break;
+ case GOD_BEOGH:
+ simple_god_message( " says: Let disbelievers drown in blood!" );
+ break;
default:
break;
}
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index e03fb32164..4eb3b343ea 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -5104,6 +5104,14 @@ void describe_god( god_type which_god, bool give_title )
"to cause bloodshed and disorder in the world, and must do so unflaggingly to" EOL
"earn Lugonu's favour.";
break;
+
+ case GOD_BEOGH:
+ description = "Beogh is a deity worshipped by the cave orcs native to parts of the dungeon." EOL
+ "Only proper orcs may devote their service to Beogh, proving their devotion " EOL
+ "with kills and remnants. Pious orcs may gain the priestly power of smiting. " EOL
+ "Also, there are rumours that the orcs still look out for their Messiah. ";
+ break;
+
default:
description = "God of Program Bugs is a weird and dangerous God and his presence should" EOL
"be reported to dev-team.";
@@ -5135,6 +5143,7 @@ void describe_god( god_type which_god, bool give_title )
(which_god == GOD_NEMELEX_XOBEH) ? "Great Trickster" :
(which_god == GOD_SIF_MUNA) ? "Master of the Arcane" :
(which_god == GOD_LUGONU) ? "Agent of Entropy" :
+ (which_god == GOD_BEOGH) ? "Messiah" :
(which_god == GOD_XOM) ? "Teddy Bear" :
"Bogy the Lord of the Bugs"); // Xom and no god is handled before
}
@@ -5169,7 +5178,15 @@ void describe_god( god_type which_god, bool give_title )
(you.piety > 5) ? "Believer"
: "Sinner" );
break;
-
+ case GOD_BEOGH:
+ cprintf ( (you.piety >= 120) ? "Saint" :
+ (you.piety >= 100) ? "High Priest" :
+ (you.piety >= 75) ? "Missionary" :
+ (you.piety >= 50) ? "Priest" :
+ (you.piety >= 30) ? "Disciple" :
+ (you.piety > 5) ? "Believer"
+ : "Sinner" );
+ break;
case GOD_XOM:
cprintf("Toy");
break;
@@ -5238,6 +5255,13 @@ void describe_god( god_type which_god, bool give_title )
EOL, god_name(which_god));
}
+ if (which_god == GOD_BEOGH && you.piety >= 30)
+ {
+ have_any = true;
+ cprintf( "%s supports the use of orcish gear." EOL,
+ god_name(which_god));
+ }
+
// mv: No abilities (except divine protection) under penance
if (!player_under_penance())
{
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index bf044736fc..16aa831cf4 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -1228,6 +1228,10 @@ std::string feature_description(int grid)
case DNGN_GREEN_CRYSTAL_WALL:
return ("A wall of green crystal.");
case DNGN_ORCISH_IDOL:
+ if (you.species == SP_HILL_ORC)
+ {
+ return ("An idol of Beogh.");
+ }
return ("An orcish idol.");
case DNGN_WAX_WALL:
return ("A wall of solid wax.");
@@ -1366,6 +1370,8 @@ std::string feature_description(int grid)
return ("A silver altar of Elyvilon.");
case DNGN_ALTAR_LUGONU:
return ("A corrupted altar of Lugonu.");
+ case DNGN_ALTAR_BEOGH:
+ return ("A roughly hewn altar of Beogh.");
case DNGN_BLUE_FOUNTAIN:
return ("A fountain of clear blue water.");
case DNGN_SPARKLING_FOUNTAIN:
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 698af2f03e..748048a9aa 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3717,13 +3717,14 @@ static dungeon_feature_type pick_an_altar()
break;
case BRANCH_ORCISH_MINES: // violent gods
- temp_rand = random2(5);
+ temp_rand = random2(10); // 50% chance of Beogh
altar_type = ((temp_rand == 0) ? DNGN_ALTAR_VEHUMET :
(temp_rand == 1) ? DNGN_ALTAR_MAKHLEB :
(temp_rand == 2) ? DNGN_ALTAR_OKAWARU :
- (temp_rand == 3) ? DNGN_ALTAR_TROG
- : DNGN_ALTAR_XOM);
+ (temp_rand == 3) ? DNGN_ALTAR_TROG :
+ (temp_rand == 4) ? DNGN_ALTAR_XOM
+ : DNGN_ALTAR_BEOGH);
break;
case BRANCH_VAULTS: // "lawful" gods
@@ -3761,7 +3762,8 @@ static dungeon_feature_type pick_an_altar()
random2(NUM_GODS - 1));
}
while (altar_type == DNGN_ALTAR_NEMELEX_XOBEH
- || altar_type == DNGN_ALTAR_LUGONU);
+ || altar_type == DNGN_ALTAR_LUGONU
+ || altar_type == DNGN_ALTAR_BEOGH);
break;
}
}
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index a423412ad5..7f786bf09b 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -116,6 +116,7 @@ enum ability_type
ABIL_NEMELEX_TRIPLE_DRAW,
ABIL_NEMELEX_PEEK,
ABIL_NEMELEX_STACK_DECK,
+ ABIL_BEOGH_SMITING,
ABIL_CHARM_SNAKE,
ABIL_TRAN_SERPENT_OF_HELL,
@@ -781,7 +782,7 @@ enum conduct_type
DID_DEDICATED_KILL_DEMON,
DID_DEDICATED_KILL_NATURAL_EVIL, // unused
DID_DEDICATED_KILL_WIZARD,
- DID_DEDICATED_KILL_PRIEST, // unused
+ DID_DEDICATED_KILL_PRIEST,
// [dshaligram] No distinction between killing Angels during prayer or
// otherwise, borrowed from bwr 4.1.
@@ -1091,6 +1092,7 @@ enum dungeon_feature_type
DNGN_ALTAR_NEMELEX_XOBEH, // 190
DNGN_ALTAR_ELYVILON, // 191
DNGN_ALTAR_LUGONU,
+ DNGN_ALTAR_BEOGH,
DNGN_BLUE_FOUNTAIN = 200, // 200
DNGN_DRY_FOUNTAIN_I,
@@ -1392,6 +1394,7 @@ enum god_type
GOD_NEMELEX_XOBEH,
GOD_ELYVILON,
GOD_LUGONU,
+ GOD_BEOGH,
NUM_GODS, // always after last god
GOD_RANDOM = 100
@@ -1657,6 +1660,7 @@ enum kill_method_type
KILLED_BY_CURARE,
KILLED_BY_MELTING,
KILLED_BY_BLEEDING,
+ KILLED_BY_BEOGH_SMITING,
NUM_KILLBY
};
@@ -2397,7 +2401,9 @@ enum monster_flag_type
MF_KNOWN_MIMIC = 0x100, // Mimic that has taken a swing at the PC,
// or that the player has inspected with ?
MF_BANISHED = 0x200, // Monster that has been banished.
- MF_HARD_RESET = 0x400 // Summoned, should not drop gear on reset
+ MF_HARD_RESET = 0x400, // Summoned, should not drop gear on reset
+ MF_CONVERT_ATTEMPT = 0x800 // Orcs only: seen player and was converted
+ // (or not)
};
enum mon_dam_level_type
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index f315f89b46..4e01f554f8 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -999,11 +999,19 @@ int melee_attack::player_apply_weapon_bonuses(int damage)
}
if (get_equip_race(*weapon) == ISFLAG_ORCISH
- && you.species == SP_HILL_ORC && coinflip())
+ && you.species == SP_HILL_ORC)
+ {
+ if (you.religion == GOD_BEOGH)
+ {
+ damage++;
+ }
+
+ if (coinflip())
{
damage++;
}
}
+ }
return (damage);
}
@@ -2114,6 +2122,12 @@ int melee_attack::player_to_hit(bool random_factor)
{
your_to_hit += (random_factor && coinflip() ? 2 : 1);
}
+ else if (get_equip_race(*weapon) == ISFLAG_ORCISH
+ && you.religion == GOD_BEOGH)
+ {
+ your_to_hit++;
+ }
+
}
else if (item_is_staff( *weapon ))
{
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 6dcaad88da..4d72f3e42a 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -486,7 +486,7 @@ static const char *kill_method_names[] =
"quitting", "draining", "starvation", "freezing", "burning", "wild_magic",
"xom", "statue", "rotting", "targeting", "spore", "tso_smiting",
"petrification", "unknown", "something", "falling_down_stairs", "acid",
- "curare", "melting", "bleeding",
+ "curare", "melting", "bleeding", "bog_smiting",
};
const char *kill_method_name(kill_method_type kmt)
@@ -1717,6 +1717,11 @@ scorefile_entry::death_description(death_desc_verbosity verbosity) const
needs_damage = true;
break;
+ case KILLED_BY_BEOGH_SMITING:
+ desc += terse? "smote by Beogh" : "Smote by Beogh";
+ needs_damage = true;
+ break;
+
case KILLED_BY_PETRIFICATION:
desc += terse? "petrified" : "Turned to stone";
break;
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 59b04c9161..e970be60a1 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -680,6 +680,9 @@ static void describe_floor() {
case DNGN_ALTAR_LUGONU:
mpr("There is a corrupted altar of Lugonu here.");
break;
+ case DNGN_ALTAR_BEOGH:
+ mpr("There is a roughly hewn altar of Beogh here.");
+ break;
case DNGN_BLUE_FOUNTAIN:
mpr("There is a fountain here (q to drink).");
break;
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 3e92777930..8c947fb4d7 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -164,6 +164,7 @@ static char god_message_altar_colour( char god )
return (CYAN);
case GOD_YREDELEMNUL:
+ case GOD_BEOGH:
return (coinflip() ? DARKGREY : RED);
case GOD_KIKUBAAQUDGHA:
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 20b1be1154..1832b8d00a 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -3604,11 +3604,20 @@ void give_items_skills()
you.skills[SK_INVOCATIONS] = 4;
+ // disallow invalid choices
+ if (you.species != SP_HILL_ORC && Options.priest == GOD_BEOGH)
+ Options.priest = GOD_NO_GOD;
+
if (Options.priest != GOD_NO_GOD && Options.priest != GOD_RANDOM)
ng_pr = you.religion = static_cast<god_type>( Options.priest );
else if (Options.random_pick || Options.priest == GOD_RANDOM)
{
you.religion = coinflip() ? GOD_YREDELEMNUL : GOD_ZIN;
+
+ // for orcs 50% chance of Beogh instead
+ if (you.species == SP_HILL_ORC && coinflip())
+ you.religion = GOD_BEOGH;
+
ng_pr = GOD_RANDOM;
}
else
@@ -3621,6 +3630,14 @@ void give_items_skills()
textcolor( LIGHTGREY );
cprintf("a - Zin (for traditional priests)" EOL);
cprintf("b - Yredelemnul (for priests of death)" EOL);
+ if (you.species == SP_HILL_ORC)
+ cprintf("c - Beogh (priest of Orcs)" EOL);
+
+ textcolor( BROWN );
+ cprintf(EOL "* - random choice" EOL);
+
+ if (Options.prev_pr == GOD_BEOGH && you.species != SP_HILL_ORC)
+ Options.prev_pr = GOD_NO_GOD;
if (Options.prev_pr != GOD_NO_GOD)
{
@@ -3628,6 +3645,7 @@ void give_items_skills()
cprintf(EOL "Enter - %s" EOL,
Options.prev_pr == GOD_ZIN? "Zin" :
Options.prev_pr == GOD_YREDELEMNUL? "Yredelemnul" :
+ Options.prev_pr == GOD_BEOGH? "Beogh" :
"Random");
}
@@ -3639,14 +3657,17 @@ void give_items_skills()
{
keyn = Options.prev_pr == GOD_ZIN? 'a' :
Options.prev_pr == GOD_YREDELEMNUL? 'b' :
- '?';
+ Options.prev_pr == GOD_BEOGH? 'c' :
+ '*';
}
switch (keyn)
{
- case '?':
+ case '*':
you.religion = coinflip()? GOD_ZIN : GOD_YREDELEMNUL;
+ if (you.species == SP_HILL_ORC && coinflip())
+ you.religion = GOD_BEOGH;
break;
case 'a':
you.religion = GOD_ZIN;
@@ -3654,11 +3675,17 @@ void give_items_skills()
case 'b':
you.religion = GOD_YREDELEMNUL;
break;
+ case 'c':
+ if (you.species == SP_HILL_ORC)
+ {
+ you.religion = GOD_BEOGH;
+ break;
+ } // else fall through
default:
goto getkey;
}
- ng_pr = keyn == '?'? GOD_RANDOM : you.religion;
+ ng_pr = keyn == '*'? GOD_RANDOM : you.religion;
}
break;
@@ -4505,6 +4532,9 @@ void give_items_skills()
cprintf("a - Necromantic magic" EOL);
cprintf("b - the god Yredelemnul" EOL);
+ textcolor( BROWN );
+ cprintf(EOL "* - random choice" EOL);
+
if (Options.prev_dk != DK_NO_SELECTION)
{
textcolor(BROWN);
@@ -4522,12 +4552,12 @@ void give_items_skills()
{
keyn = Options.prev_dk == DK_NECROMANCY? 'a' :
Options.prev_dk == DK_YREDELEMNUL? 'b' :
- '?';
+ '*';
}
switch (keyn)
{
- case '?':
+ case '*':
choice = coinflip()? DK_NECROMANCY : DK_YREDELEMNUL;
break;
case 'a':
@@ -4541,7 +4571,7 @@ void give_items_skills()
goto getkey1;
}
- ng_dk = keyn == '?'? DK_RANDOM : choice;
+ ng_dk = keyn == '*'? DK_RANDOM : choice;
}
switch (choice)
@@ -4622,6 +4652,9 @@ void give_items_skills()
cprintf("a - Xom of Chaos" EOL);
cprintf("b - Makhleb the Destroyer" EOL);
+ textcolor( BROWN );
+ cprintf(EOL "* - random choice" EOL);
+
if (Options.prev_ck != GOD_NO_GOD)
{
textcolor(BROWN);
@@ -4641,12 +4674,12 @@ void give_items_skills()
{
keyn = Options.prev_ck == GOD_XOM? 'a' :
Options.prev_ck == GOD_MAKHLEB? 'b' :
- '?';
+ '*';
}
switch (keyn)
{
- case '?':
+ case '*':
you.religion = coinflip()? GOD_XOM : GOD_MAKHLEB;
break;
case 'a':
@@ -4659,7 +4692,7 @@ void give_items_skills()
goto getkey2;
}
- ng_ck = keyn == '?'? GOD_RANDOM : you.religion;
+ ng_ck = keyn == '*'? GOD_RANDOM : you.religion;
}
if (you.religion == GOD_XOM)
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 258fefa122..e266d6d620 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1511,6 +1511,21 @@ int player_AC(void)
racial_bonus++;
else
racial_bonus += 2;
+
+ // an additional bonus for Beogh worshippers
+ if (you.religion == GOD_BEOGH && !you.penance[GOD_BEOGH])
+ {
+ if (you.piety >= 120)
+ racial_bonus *= 6;
+ else if (you.piety >= 100)
+ racial_bonus *= 5;
+ else if (you.piety >= 75)
+ racial_bonus *= 4;
+ else if (you.piety >= 50)
+ racial_bonus *= 3;
+ else if (you.piety >= 30)
+ racial_bonus *= 2;
+ }
}
AC += ac_value * (15 + you.skills[SK_ARMOUR] + racial_bonus) / 15;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 73c8efd006..a565607775 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -99,7 +99,9 @@ const char *sacrifice[] =
// Elyvilon
" evaporate%.",
// Lugonu
- " & consumed by the void."
+ " & consumed by the void.",
+ // Beogh
+ " crumble% into the ground."
};
const char* god_gain_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
@@ -178,7 +180,12 @@ const char* god_gain_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
"bend space around yourself",
"summon the demons of the Abyss to your aid",
"",
- "gate yourself to the Abyss" }
+ "gate yourself to the Abyss" },
+ // Beogh
+ { "",
+ "smite your foes",
+ "gain orcish followers",
+ "", "" }
};
const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
@@ -258,7 +265,12 @@ const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
"bend space around yourself",
"summon the demons of the Abyss to your aid",
"",
- "gate yourself to the Abyss" }
+ "gate yourself to the Abyss" },
+ // Beogh
+ { "",
+ "smite your foes",
+ "gain orcish followers",
+ "", "" }
};
@@ -267,6 +279,7 @@ void dec_penance(int god, int val);
void divine_retribution(god_type god);
void inc_penance(int god, int val);
void inc_penance(int val);
+int followers_abandon_you(void); // Beogh
static bool is_evil_god(god_type god)
{
@@ -275,6 +288,7 @@ static bool is_evil_god(god_type god)
god == GOD_MAKHLEB ||
god == GOD_YREDELEMNUL ||
god == GOD_VEHUMET ||
+ god == GOD_BEOGH ||
god == GOD_LUGONU;
}
@@ -855,6 +869,9 @@ const char *god_name( god_type which_god, bool long_name ) // mv - rewritten
case GOD_LUGONU:
sprintf(godname_buff, "Lugonu%s", long_name? " the Unformed" : "");
break;
+ case GOD_BEOGH:
+ sprintf(godname_buff, "Beogh%s", long_name? " the Brigand" : "");
+ break;
default:
sprintf(godname_buff, "The Buggy One (%d)", which_god);
}
@@ -918,6 +935,10 @@ bool did_god_conduct( int thing_done, int level )
penance = level * 3;
ret = true;
break;
+ case GOD_BEOGH:
+ piety_change = -level;
+ // no penance as Beogh is not a good god
+ ret = true;
default:
break;
}
@@ -953,6 +974,7 @@ bool did_god_conduct( int thing_done, int level )
case GOD_OKAWARU:
case GOD_MAKHLEB:
case GOD_TROG:
+ case GOD_BEOGH:
case GOD_LUGONU:
simple_god_message(" accepts your offering.");
ret = true;
@@ -981,6 +1003,7 @@ bool did_god_conduct( int thing_done, int level )
case GOD_VEHUMET:
case GOD_MAKHLEB:
case GOD_TROG:
+ case GOD_BEOGH:
case GOD_LUGONU:
simple_god_message(" accepts your kill.");
ret = true;
@@ -1034,6 +1057,16 @@ bool did_god_conduct( int thing_done, int level )
}
break;
+ case DID_DEDICATED_KILL_PRIEST:
+ if (you.religion == GOD_BEOGH)
+ {
+ simple_god_message(" appreciates your killing of a heretic priest.");
+ ret = true;
+ if (random2(level + 10) > 5)
+ piety_change = 1;
+ }
+ break;
+
case DID_DEDICATED_KILL_WIZARD:
if (you.religion == GOD_TROG)
{
@@ -1109,6 +1142,7 @@ bool did_god_conduct( int thing_done, int level )
case GOD_KIKUBAAQUDGHA: // note: reapers aren't undead
case GOD_VEHUMET:
case GOD_MAKHLEB:
+ case GOD_BEOGH:
case GOD_LUGONU:
simple_god_message(" accepts your collateral kill.");
ret = true;
@@ -1338,9 +1372,14 @@ void gain_piety(int pgn)
snprintf(info, INFO_SIZE, "You can now %s.", pmsg);
god_speaks(you.religion, info);
}
- }
learned_something_new(TUT_NEW_ABILITY);
}
+ if (you.religion == GOD_BEOGH)
+ {
+ // every piety level change also affects AC from orcish gear
+ you.redraw_armour_class = 1;
+ }
+ }
}
if ( you.piety > 160 && old_piety <= 160 &&
@@ -1388,6 +1427,11 @@ void lose_piety(int pgn)
god_speaks(you.religion, info);
}
}
+ if (you.religion == GOD_BEOGH)
+ {
+ // every piety level change also affects AC from orcish gear
+ you.redraw_armour_class = 1;
+ }
}
}
}
@@ -1811,6 +1855,214 @@ void divine_retribution( god_type god )
}
break;
+ case GOD_BEOGH:
+
+ // orcish theme
+ switch (random2(8))
+ {
+ case 0: // smiting (25%)
+ case 1:
+ divine_hurt = 10 + random2(10);
+
+ for (loopy = 0; loopy < 5; loopy++)
+ divine_hurt += random2( you.experience_level );
+
+ if (!player_under_penance() && you.piety > random2(400))
+ {
+ snprintf(info, INFO_SIZE, "Mortal, I have averted the wrath "
+ "of %s... this time.", god_name(GOD_BEOGH));
+ god_speaks(you.religion, info);
+ }
+ else
+ {
+ simple_god_message( " smites you!", god );
+ ouch( divine_hurt, 0, KILLED_BY_BEOGH_SMITING );
+ dec_penance( GOD_BEOGH, 1 );
+ }
+ break;
+// taken from makeitem.cc and spells3.cc:
+ case 2: // send out one or two dancing weapons of orc slaying (12.5%)
+ {
+ // check num of (hostile) orcs around
+ int num_wpn = 0;
+ for (int i=0 ;i <= random2(2); i++)
+ {
+ bool created = false;
+
+ // first create item
+ int it = get_item_slot();
+ if (it != NON_ITEM)
+ {
+ item_def &item = mitm[it];
+
+ item.quantity = 1;
+ item.base_type = OBJ_WEAPONS;
+ // any melee weapon
+ item.sub_type = WPN_CLUB + random2(13);
+
+ set_item_ego_type( item, OBJ_WEAPONS, SPWPN_ORC_SLAYING );
+ // just how good should this weapon be?
+ item.plus = random2(3);
+ item.plus2 = random2(3);
+
+ if (coinflip())
+ item.flags |= ISFLAG_CURSED;
+
+ set_ident_type( item.base_type, item.sub_type, ID_KNOWN_TYPE );
+ // for debugging + makes things more interesting
+ // (doesn't seem to have any effect, though)
+ set_ident_flags( item, ISFLAG_KNOW_PLUSES );
+ set_ident_flags( item, ISFLAG_IDENT_MASK );
+
+ // now create monster
+ int mons = create_monster( MONS_DANCING_WEAPON, 0,
+ BEH_HOSTILE, you.x_pos, you.y_pos, MHITYOU, 250 );
+
+ // hand item information over to monster
+ if (mons != -1 && mons != NON_MONSTER)
+ {
+ mitm[it] = item;
+ mitm[it].quantity = 1;
+ mitm[it].x = 0;
+ mitm[it].y = 0;
+ mitm[it].link = NON_ITEM;
+ menv[mons].inv[MSLOT_WEAPON] = it;
+ created = true;
+ num_wpn++;
+
+ if (coinflip()) // 50% chance of weapon disappearing on "death"
+ menv[mons].flags |= MF_HARD_RESET;
+ }
+ }
+ if (!created) // didn't work out! delete item
+ {
+ mitm[it].base_type = OBJ_UNASSIGNED;
+ mitm[it].quantity = 0;
+ }
+ }
+ if (num_wpn > 0)
+ {
+ snprintf(info, INFO_SIZE, " throws %s of orc slaying at you.",
+ num_wpn > 1 ? "implements" : "an implement");
+ simple_god_message(info, god);
+ break;
+ } // else fall through
+ }
+ default: // send orcs after you (5/8)
+ {
+
+ int points = you.experience_level * 2 + 3
+ + random2(you.experience_level * 3);
+
+ // "natural" bands
+ if (points >= 30) // min: lvl 6, always: lvl 15
+ punisher = MONS_ORC_HIGH_PRIEST;
+ else if (points >= 24) // min: lvl 5, always: lvl 11
+ punisher = MONS_ORC_KNIGHT;
+ else if (points >= 18) // min: lvl 4, always: lvl 8
+ punisher = MONS_ORC_WARLORD;
+ else if (points >= 12) // min: lvl 2, always: lvl 5
+ punisher = MONS_ORC_WARRIOR;
+ else
+ punisher = MONS_ORC;
+
+ int mons = create_monster(punisher, 0, BEH_HOSTILE, you.x_pos,
+ you.y_pos, MHITYOU, 250, true);
+
+ if (mons != -1 && mons != NON_MONSTER)
+ simple_god_message(" sends forth an army of orcs.", god);
+ else
+ simple_god_message(" is still gathering forces against you.", god);
+
+/*
+ success = false;
+ int count = 0;
+ int points = 3 + you.experience_level * 3;
+
+ // artificial choice of band members
+ while (points > 0 || count <= 1)
+ {
+ if (points > 30 && coinflip())
+ {
+ // quick reduction for large values
+ punisher = MONS_ORC_HIGH_PRIEST;
+ points -= 25;
+ break;
+ }
+ else
+ {
+ switch (random2(15))
+ {
+ case 0: //(1/15)
+ punisher = MONS_ORC_SORCERER;
+ points -= 20;
+ break;
+
+ case 1: //(1/15)
+ punisher = MONS_ORC_WARLORD;
+ points -= 18;
+ break;
+
+ case 2: //(1/15)
+ punisher = MONS_ORC_KNIGHT;
+ points -= 15;
+ break;
+
+ case 3:
+ case 4: //(2/15)
+ punisher = MONS_ORC_WARRIOR;
+ points -= 10;
+ break;
+
+ case 5:
+ case 6:
+ case 7: //(1/5)
+ punisher = MONS_ORC_PRIEST;
+ points -= 7;
+ break;
+
+ case 8:
+ case 9: //(2/15)
+ punisher = MONS_ORC_WIZARD;
+ punisher -= 5;
+ break;
+
+ default: //(1/3)
+ punisher = MONS_ORC;
+ points -= 3;
+ }
+ }
+
+ int mons = create_monster(punisher, 0, BEH_HOSTILE,
+ you.x_pos, you.y_pos, MHITYOU, 250);
+ if (mons != -1 && mons != NON_MONSTER)
+ {
+ count++;
+ success = true;
+ // just to make sure
+ menv[mons].flags |= MF_CONVERT_ATTEMPT;
+ }
+ }
+
+ if (success)
+ {
+ std::string army_size;
+ if (count > 5)
+ army_size = "an army of";
+ else
+ army_size = "some";
+
+ snprintf(info, INFO_SIZE, " sends forth %s orcs.", army_size.c_str());
+ simple_god_message(info, god);
+ }
+ else
+ simple_god_message(" is still gathering forces against you.", god);
+*/
+ }
+ break;
+ }
+ break;
+
case GOD_OKAWARU:
{
// warrior theme:
@@ -1937,6 +2189,70 @@ void divine_retribution( god_type god )
return;
} // end divine_retribution()
+// upon excommunication, (now ex) Beogh adepts lose their orcish followers
+int followers_abandon_you()
+{
+ int ystart = you.y_pos - 9, xstart = you.x_pos - 9;
+ int yend = you.y_pos + 9, xend = you.x_pos + 9;
+ if ( xstart < 0 ) xstart = 0;
+ if ( ystart < 0 ) ystart = 0;
+ if ( xend >= GXM ) xend = GXM;
+ if ( ystart >= GYM ) yend = GYM;
+
+ bool reconvert = false;
+ int num_reconvert = 0;
+
+ std::vector<const monsters *> mons;
+ // monster check
+ for ( int y = ystart; y < yend; ++y )
+ {
+ for ( int x = xstart; x < xend; ++x )
+ {
+
+ const unsigned char targ_monst = mgrd[x][y];
+ if ( targ_monst != NON_MONSTER )
+ {
+ struct monsters *monster = &menv[targ_monst];
+ if ( mons_species(monster->type) == MONS_ORC
+ && monster->attitude == ATT_FRIENDLY
+ && (monster->flags & MF_CONVERT_ATTEMPT))
+ {
+
+ if (mons_player_visible(monster)
+ && !mons_is_confused(monster)
+ && !mons_is_paralysed(monster))
+ {
+ monster->attitude = ATT_HOSTILE;
+ monster->behaviour = BEH_HOSTILE;
+ // for now CREATED_FRIENDLY stays
+
+ if (player_monster_visible(monster))
+ {
+ num_reconvert++; // only visible ones
+ }
+ reconvert = true;
+ }
+ }
+ }
+ }
+ }
+ if (reconvert) // maybe all of them invisible
+ {
+ snprintf(info, INFO_SIZE, "%s booms out: \"Who do you think you are?\"",
+ god_name(GOD_BEOGH));
+ god_speaks(GOD_BEOGH, info);
+
+ if (num_reconvert > 0)
+ {
+ snprintf(info, INFO_SIZE, "Your follower%s decide%s to abandon you.",
+ (num_reconvert > 1) ? "s" : "", (num_reconvert > 1) ? "" : "s");
+ mpr(info, MSGCH_MONSTER_ENCHANT);
+ return 1;
+ }
+ }
+ return 0;
+}
+
void excommunication(void)
{
const god_type old_god = you.religion;
@@ -1996,6 +2312,15 @@ void excommunication(void)
divine_retribution( old_god );
break;
+ case GOD_BEOGH:
+ simple_god_message( " does not appreciate desertion!", old_god );
+ followers_abandon_you(); // check if friendly orcs around -> hostile
+
+ // Penance has to come before retribution to prevent "mollify"
+ inc_penance( old_god, 50 );
+ divine_retribution( old_god );
+ break;
+
// these like to haunt players for a bit more than the standard
case GOD_NEMELEX_XOBEH:
case GOD_SIF_MUNA:
@@ -2231,7 +2556,8 @@ void god_pitch(god_type which_god)
if ((you.is_undead || you.species == SP_DEMONSPAWN)
&& (which_god == GOD_ZIN || which_god == GOD_SHINING_ONE
- || which_god == GOD_ELYVILON))
+ || which_god == GOD_ELYVILON) ||
+ which_god == GOD_BEOGH && you.species != SP_HILL_ORC)
{
simple_god_message(" does not accept worship from those such as you!",
which_god);
@@ -2319,7 +2645,8 @@ void god_pitch(god_type which_god)
bool god_likes_butchery(god_type god)
{
return (you.religion == GOD_OKAWARU || you.religion == GOD_MAKHLEB ||
- you.religion == GOD_TROG || you.religion == GOD_LUGONU);
+ you.religion == GOD_TROG || you.religion == GOD_BEOGH ||
+ you.religion == GOD_LUGONU);
}
bool god_hates_butchery(god_type god)
@@ -2459,6 +2786,7 @@ void handle_god_time(void)
case GOD_OKAWARU: // These gods accept corpses, so they time-out faster
case GOD_TROG:
+ case GOD_BEOGH:
if (one_chance_in(14))
lose_piety(1);
if (you.piety < 1)
@@ -2526,6 +2854,7 @@ int god_colour( god_type god ) //mv - added
case GOD_MAKHLEB:
case GOD_VEHUMET:
case GOD_TROG:
+ case GOD_BEOGH:
case GOD_LUGONU:
return(LIGHTRED);
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 4f7c4c63ca..196d897c61 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -525,6 +525,7 @@ void initialise_travel()
traversable_terrain[DNGN_ALTAR_NEMELEX_XOBEH] =
traversable_terrain[DNGN_ALTAR_ELYVILON] =
traversable_terrain[DNGN_ALTAR_LUGONU] =
+ traversable_terrain[DNGN_ALTAR_BEOGH] =
traversable_terrain[DNGN_BLUE_FOUNTAIN] =
traversable_terrain[DNGN_DRY_FOUNTAIN_I] =
traversable_terrain[DNGN_SPARKLING_FOUNTAIN] =
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 9e6494456b..e6ece3e0e7 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -712,6 +712,103 @@ void monster_grid(bool do_updates)
env.show[ex][ey] = monster->type + DNGN_START_OF_MONSTERS;
env.show_col[ex][ey] = get_mons_colour( monster );
+
+ // for followers of Beogh, decide whether orcs will join you
+ if (mons_species(monster->type) == MONS_ORC
+ && you.religion == GOD_BEOGH
+ && !(monster->flags & MF_CONVERT_ATTEMPT)
+ // && !mons_is_unique(monster->type) // does not work on Blork
+ && monster->foe == MHITYOU
+ && mons_player_visible(monster) && !mons_is_sleeping(monster)
+ && !mons_is_confused(monster) && !mons_is_paralysed(monster))
+ {
+ monster->flags |= MF_CONVERT_ATTEMPT;
+
+ int hd = monster->hit_dice;
+
+ if (you.piety >= 75 && !you.penance[GOD_BEOGH] &&
+ random2(you.piety/9) > random2(hd) + hd + random2(5))
+ {
+ int wpn = you.equip[EQ_WEAPON];
+ if (wpn != -1
+ && you.inv[wpn].base_type == OBJ_WEAPONS
+ && get_weapon_brand( you.inv[wpn] ) == SPWPN_ORC_SLAYING
+ && coinflip()) // 50% chance of conversion failing
+ {
+ snprintf(info, INFO_SIZE, "%s flinches from your weapon.",
+ monster->name(DESC_CAP_THE).c_str());
+ mpr(info);
+ continue;
+ }
+
+ if (player_monster_visible(monster)) // show reaction
+ {
+ std::string reaction;
+
+ switch (random2(3))
+ {
+ case 1: reaction = " stares at you in amazement and kneels.";
+ break;
+ case 2: reaction = " relaxes his fighting stance and smiles at you.";
+ break;
+ default: reaction = " falls on his knees before you.";
+ }
+
+ snprintf(info, INFO_SIZE, "%s%s",
+ monster->name(DESC_CAP_THE).c_str(),reaction.c_str());
+ mpr(info, MSGCH_MONSTER_ENCHANT);
+
+ if (random2(3))
+ {
+ switch (random2(4))
+ {
+ case 0: reaction = "shouts, \"I'll follow thee gladly!\"";
+ break;
+ case 1: reaction = "shouts, \"Surely Beogh must have sent you!\"";
+ break;
+ case 2: reaction = "asks, \"Are you our saviour?\"";
+ break;
+ default: reaction = "says, \"I'm so glad you are here now.\"";
+ }
+
+ snprintf(info, INFO_SIZE, "He %s", reaction.c_str());
+ mpr(info, MSGCH_TALK);
+ }
+
+ }
+
+ monster->attitude = ATT_FRIENDLY;
+ monster->behaviour = BEH_GOD_GIFT; // alternative to BEH_FRIENDLY
+ // not really "created" friendly, but should it become
+ // hostile later on, it won't count as a good kill
+ monster->flags |= MF_CREATED_FRIENDLY;
+ monster->flags |= MF_GOD_GIFT;
+ }
+ }
+ else if (mons_species(monster->type) == MONS_ORC
+ && you.species == SP_HILL_ORC
+ && !(you.religion == GOD_BEOGH)
+// && monster->foe == MHITYOU
+ && monster->attitude == ATT_FRIENDLY
+ && (monster->flags & MF_CONVERT_ATTEMPT)
+ && (monster->flags & MF_GOD_GIFT)
+ && mons_player_visible(monster) && !mons_is_sleeping(monster)
+ && !mons_is_confused(monster) && !mons_is_paralysed(monster))
+ { // reconversion if no longer Beogh
+
+ monster->attitude = ATT_HOSTILE;
+ monster->behaviour = BEH_HOSTILE;
+ // CREATED_FRIENDLY stays -> no piety bonus on killing these
+
+ // give message only sometimes
+ if (player_monster_visible(monster) && random2(4))
+ {
+ snprintf(info, INFO_SIZE, "%s deserts you.",
+ monster->name(DESC_CAP_THE).c_str());
+ mpr(info, MSGCH_MONSTER_ENCHANT);
+ }
+ } // end of Beogh routine
+
} // end "if (monster->type != -1 && mons_ner)"
} // end "for s"
} // end monster_grid()
@@ -2058,6 +2155,7 @@ bool is_feature(int feature, int x, int y)
case DNGN_ALTAR_NEMELEX_XOBEH:
case DNGN_ALTAR_ELYVILON:
case DNGN_ALTAR_LUGONU:
+ case DNGN_ALTAR_BEOGH:
return true;
default:
return false;
@@ -3443,6 +3541,14 @@ void init_feature_table( void )
Feature[i].seen_colour = GREEN;
break;
+ case DNGN_ALTAR_BEOGH:
+ Feature[i].colour = EC_UNHOLY;
+ Feature[i].symbol = Options.char_table[ DCHAR_ALTAR ];
+ Feature[i].notable = true;
+ Feature[i].map_colour = DARKGREY;
+ Feature[i].seen_colour = RED;
+ break;
+
case DNGN_BLUE_FOUNTAIN:
Feature[i].colour = BLUE;
Feature[i].symbol = Options.char_table[ DCHAR_FOUNTAIN ];