Attached Files |
0001-Adds-new-fixed-game-style-tutorial-mode.patch [^] (24,447 bytes) 2010-04-21 17:49 [Show Content] [Hide Content]From d269342ca18371b70fe10ce691f86099dd5581db Mon Sep 17 00:00:00 2001
From: Janne Lahdenpera <felirx@gmail.com>
Date: Wed, 21 Apr 2010 18:37:47 +0300
Subject: [PATCH] Adds new fixed game style tutorial mode
Old tutorial code is preserved for future refactoring to a hints
mode.
Signed-off-by: Janne Lahdenpera <felirx@gmail.com>
---
crawl-ref/source/dat/des/tutorial/tutorial.des | 198 ++++++++++++++++++++++++
crawl-ref/source/dungeon.cc | 26 ++--
crawl-ref/source/hiscores.cc | 2 +
crawl-ref/source/main.cc | 23 +++
crawl-ref/source/newgame.cc | 38 +++++
crawl-ref/source/religion.cc | 4 +
6 files changed, 281 insertions(+), 10 deletions(-)
create mode 100644 crawl-ref/source/dat/des/tutorial/tutorial.des
diff --git a/crawl-ref/source/dat/des/tutorial/tutorial.des b/crawl-ref/source/dat/des/tutorial/tutorial.des
new file mode 100644
index 0000000..80075be
--- /dev/null
+++ b/crawl-ref/source/dat/des/tutorial/tutorial.des
@@ -0,0 +1,198 @@
+# TODO: Use dynamic commands instead of hard-coding them to text.
+
+NAME: tutorial_basic_1
+TAGS: no_rotate no_monster_gen no_item_gen no_hmirror no_vmirror no_trap_gen no_shop_gen
+BFLAGS: islanded
+KMASK: + = no_secret_doors
+ORIENT: encompass
+ITEM: mace ego:none, helmet ego:none
+# TODO: Include a travel stopper to the message square.
+MARKER: A = lua:message_at_spot ( "\nYou need to move diagonally here. <white>Click</white> with \
+ mouse, <white>3</white> or <white>n</white>.", "tutorial", "true" )
+MARKER: B = lua:message_at_spot ( "\nNow use <white>1</white> or <white>b</white>.", "tutorial", "true" )
+MARKER: C = lua:message_at_spot ( "\nExploring manually can be tedious, try auto-explore <white>o</white>.", "tutorial", "true" )
+MARKER: D = lua:message_at_spot ( "\nThis is a door. Open it by moving into it, you can close it with <white>C</white>. Note that it is a capital <white>C</white> - keyboard commands are case-sensitive. <white>Ctrl-click</white> and <white>Ctrl-direction</white> also works.", "tutorial", "true" )
+MARKER: } = lua:message_at_spot ( "\nTake stairs down with <white>shift-click</white> or <white>></white>.", "tutorial", "true" )
+MARKER: E = lua:message_at_spot ( "\nPick up the mace and the helmet with <white>g</white> or <white>clicking</white> your character while standing on the items. You can also <white>click</white> items in the floor section in the inventory region to pick them up.", "tutorial", "true" )
+# TODO: Make the messages sensitive to if the game is tiles or console.
+MARKER: F = lua:message_at_spot ( "\nWield it by <white>clicking</white> the mace in the inventory in the lower right (or by hitting <white>w</white>). Wear the helmet by <white>clicking</white> in the inventory (or by hitting <white>W</white> - again, note the capital <white>W</white>.", "tutorial", "true" )
+MARKER: G = lua:message_at_spot ( "\nTo attack monsters, move into them (or <white>click</white> while adjecent).", "tutorial", "true" )
+MARKER: H = lua:message_at_spot ( "\nRest! You have probably lost health in your battle. (See upper right stat area.) You regain health by resting. Press <white>5</white> to rest untill healed. ", "tutorial", "true" )
+KFEAT: ABCDEFGH = .
+COLOUR: ABCDEFGH = blue
+#TILE: ABCDEFGH = tutorial_message_tile_name_here
+MONS: training dummy ; club ego:none
+MAP
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+x..[..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+x.....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+x..{.............Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+x.....xxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx....xxxxxxxxxxxxxxxxxxxxxxxxxxx
+x..(..xxxxxxxxxxxxx.xxxxxxxxxxxxxxxx...EdeF.........xxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxx.xxxxxxx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xxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxx.xxxxx.xxxxxxxxx.xx.xxxxxxxxxxxxxx)xxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxx.xxx.xxxxxxxxxx.x.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxx.x.xxxxxxxxxx.xx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ENDMAP
+
+NAME: tutorial_basic_2
+TAGS: no_rotate no_monster_gen no_item_gen no_hmirror no_vmirror no_trap_gen no_shop_gen
+KPROP: l = no_cloud_gen
+ORIENT: encompass
+PLACE: D:2
+KITEM: A = dart q:25
+ITEM: randbook disc:conjuration numspells:1 slevels:1 spell:magic_dart \
+ owner:Newbie
+KFEAT: ABCDEF = .
+COLOUR: ABCDEF = blue
+MARKER: [ = lua:message_at_spot ( "\nPress <white>shift-click</white> your character or <white><<</white> to climb these stairs.", "tutorial", "true" )
+MARKER: A = lua:message_at_spot ( "\nHere are some darts, pick them up.", "tutorial", "true" )
+# TODO: Targetting needs tutorial messages; these can't be done on the map side.
+MARKER: B = lua:message_at_spot ( "\nPress <white>f</white> to throw darts.", "tutorial", "true" )
+MARKER: C = lua:message_at_spot ( "\nRemember to rest with <white>5</white>.", "tutorial", "true" )
+MARKER: D = lua:message_at_spot ( "\nMemorize the spell from this spellbook by <white>clicking</white> on the memorize tab on the lower right. You can also press <white>M</white> to enter memorization screen.", "tutorial", "true" )
+MARKER: E = lua:message_at_spot ( "\n<white>Click</white> magic dart in the spell tab, or press <white>z</white>, or <white>ctrl-click</white> on the monster.", "tutorial", "true" )
+MARKER: F = lua:message_at_spot ( "\nRest up!", "tutorial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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxx}.]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ENDMAP
+
+NAME: tutorial_basic_3
+TAGS: no_rotate no_monster_gen no_item_gen no_hmirror no_vmirror no_trap_gen no_shop_gen
+KPROP: l = no_cloud_gen
+ORIENT: encompass
+PLACE: D:3
+KFEAT: , = .
+KPROP: , = bloody
+ITEM: hand axe ego:none
+ITEM: bread ration
+ITEM: scroll of identify q:3, ring of slaying good_item no_uniq
+ITEM: meat ration q:50
+ITEM: cursed great sword ego:none, scroll of remove curse q:3
+KITEM: p = potion of healing q:3
+KITEM: m = potion of restore abilities q:3
+KITEM: n = potion of degeneration q:3
+KFEAT: pmn = .
+KITEM: o = wand of fireball
+KFEAT: o = .
+KFEAT: ABCDEFGH = .
+COLOUR: ABCDEFGH = blue
+MARKER: A = lua:message_at_spot ( "\nYou can chop up corpses with <white>c</white> into edible meat chunks. You need a sharp object, such as the axe here.", "tutorial", "true" )
+MARKER: d = lua:message_at_spot ( "\nThis axe was picked up automatically because you didn't have a butchering tool.", "tutorial", "true" )
+MARKER: B = lua:message_at_spot ( "\nThis bread ration is permanent food. It will not rot, like the chunks from corpses.", "tutorial", "true" )
+MARKER: C = lua:message_at_spot ( "\nHere is a scroll of identify and an unknown ring. Item properties are often hidden and you need to find out what they do by experimentation or identification. Try the scroll on the ring. (use it by <white>clicking</white> or <white>r</white>ead). You can put on jewellery with capital <white>P</white> or <white>clicking</white> it in the inventory.", "tutorial", "true" )
+MARKER: D = lua:message_at_spot ( "\nThese meat rations weigh too much. You can drop them with <white>d</white>. You can also drop e.g. only 10, by typing <white>d</white>, <white>10</white> and then selecting the meat rations.", "tutorial", "true" )
+MARKER: E = lua:message_at_spot ( "\nThis sword is cursed. If you wield it, you can uncurse it by reading this remove curse scroll. Remove curse scrolls uncurses all the cursed items you have currently equipped. The other items in your inventory are not affected.", "tutorial", "true" )
+MARKER: F = lua:message_at_spot ( "\nHere are three stacks of unknown potions. Go ahead and experiment! <white>Click</white> or <white>q</white>uaff.", "tutorial", "true" )
+MARKER: G = lua:message_at_spot ( "\nYou can evoke wands with <white>V</white>.", "tutorial", "true" )
+MARKER: H = lua:message_at_spot ( "\nHere's some gold. Shops exist in the game. Note that they don't buy items from you, so there's no need to carry stuff around that you can't use. Gold is picked up automatically.", "tutorial", "true" )
+MONS: rat, rat always_corpse
+MONS: training dummy ; stone q:30
+MAP
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxx..3..xxxxxx....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxlllllxxxxxx.$$.xx)xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xx[.(xxxxxxxxxxxxxx..........H.$$..}.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxx{xxxxxxxxxxxxxxx..o..xxxxxx.$$.xx]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxAxxxxxxxxxxxxxxxxxGxxxxxxxx....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+x.....xxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+x,....xxxxxxxxxxxxxxx.xx.....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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+xxxxxxx.xxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxx.........xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ENDMAP
+
+NAME: tutorial_basic_4
+TAGS: no_rotate no_monster_gen no_item_gen no_hmirror no_vmirror no_trap_gen no_shop_gen
+KMASK: + = no_secret_doors
+ORIENT: encompass
+PLACE: D:4
+KFEAT: ^ = needle trap
+KFEAT: _ = altar_makhleb
+KMONS: S = Sigmund
+KFEAT: S = .
+KFEAT: ABCDEF = .
+COLOUR: ABCDEF = blue
+MONS: rat, rat always_corpse
+MONS: training dummy spells:blink;blink;blink;blink;blink;blink ; whip ego:reaching
+MARKER: A = lua:message_at_spot ( "\nYou may have got poisoned from the trap. Drink a potion of healing, or rest with <white>5</white> to try to wait it out.", "tutorial", "true" )
+MARKER: B = lua:message_at_spot ( "\nLook for the secret door in the glass wall. Either wait a single turn with <white>s</white> or <white>.</white>, or search longer with <white>5</white>.", "tutorial", "true" )
+# TODO: Hax some piety for the player so that minor destruction is immediately usable.
+MARKER: C = lua:message_at_spot ( "\nHere's an altar to one of the gods in the game. You can <white>p</white>ray on an altar to start worshipping.", "tutorial", "true" )
+MARKER: D = lua:message_at_spot ( "\nMakheb accepts kills and corpse sacrifices. Kill these rats, and then <white>p</white>ray over their corpses to sacrifice them to Makheb", "tutorial", "true" )
+MARKER: E = lua:message_at_spot ( "\nUse minor destruction <white>a</white>bility to attack this annoying dummy.", "tutorial", "true" )
+MARKER: F = lua:message_at_spot ( "\nBehind this door is Sigmund. He is a powerful unique monster, and is likely to kill you. In Crawl, running away is often a very important tactic. Thanks for playing the tutorial!", "tutorial", "true" )
+MAP
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ENDMAP
+
+# TODO: The game should end after dying to Sigm.. after managing to enter D:5
+# Could have a conglatulatory map as D:5 with nice scenery.
+
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 75767cf..0118f00 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -1083,7 +1083,9 @@ void dgn_reset_level(bool enable_random_maps)
// except that 0 == no random monsters).
if (you.level_type == LEVEL_DUNGEON)
{
- if (you.where_are_you == BRANCH_ECUMENICAL_TEMPLE)
+ if (you.where_are_you == BRANCH_ECUMENICAL_TEMPLE
+ || crawl_state.game_is_tutorial())
+ // No random monsters in tutorial or ecu temple
env.spawn_random_rate = 0;
else
env.spawn_random_rate = 240;
@@ -1823,7 +1825,8 @@ static void _build_dungeon_level(int level_number, int level_type)
// Hook up the special room (if there is one, and it hasn't
// been hooked up already in roguey_level()).
- if (sr.created && !sr.hooked_up && !crawl_state.game_is_sprint())
+ if (sr.created && !sr.hooked_up && !crawl_state.game_is_sprint()
+ && !crawl_state.game_is_tutorial())
_specr_2(sr);
// Now place items, monster, gates, etc.
@@ -1865,7 +1868,7 @@ static void _build_dungeon_level(int level_number, int level_type)
// Any further vaults must make sure not to disrupt level layout.
dgn_check_connectivity = !player_in_branch(BRANCH_SHOALS);
- if (you.where_are_you == BRANCH_MAIN_DUNGEON)
+ if (you.where_are_you == BRANCH_MAIN_DUNGEON && !crawl_state.game_is_tutorial())
{
_build_overflow_temples(level_number);
@@ -1875,7 +1878,7 @@ static void _build_dungeon_level(int level_number, int level_type)
// Try to place minivaults that really badly want to be placed. Still
// no guarantees, seeing this is a minivault.
- if (!crawl_state.game_is_sprint()) {
+ if (!crawl_state.game_is_sprint() && !crawl_state.game_is_tutorial()) {
_place_minivaults();
_place_branch_entrances( level_number, level_type );
_place_extra_vaults();
@@ -1891,7 +1894,7 @@ static void _build_dungeon_level(int level_number, int level_type)
_place_shops(level_number);
// Any vault-placement activity must happen before this check.
- if (!crawl_state.game_is_sprint()) {
+ if (!crawl_state.game_is_sprint() && !crawl_state.game_is_tutorial()) {
_dgn_verify_connectivity(nvaults);
}
@@ -1904,7 +1907,7 @@ static void _build_dungeon_level(int level_number, int level_type)
_place_fog_machines(level_number);
// Place items.
- if (!crawl_state.game_is_sprint()) {
+ if (!crawl_state.game_is_sprint() && !crawl_state.game_is_tutorial()) {
_builder_items(level_number, level_type,
_num_items_wanted(level_number));
}
@@ -1912,7 +1915,7 @@ static void _build_dungeon_level(int level_number, int level_type)
// Place monsters.
_builder_monsters(level_number, level_type, _num_mons_wanted(level_type));
- if (!crawl_state.game_is_sprint()) {
+ if (!crawl_state.game_is_sprint() && !crawl_state.game_is_tutorial()) {
_fixup_walls();
_fixup_branch_stairs();
}
@@ -2399,14 +2402,17 @@ static const map_def *_dgn_random_map_for_place(bool minivault)
const map_def *vault = random_map_for_place(lid, minivault);
- // Disallow entry vaults for tutorial (only complicates things).
if (!vault
&& lid.branch == BRANCH_MAIN_DUNGEON
- && lid.depth == 1 && !Tutorial.tutorial_left)
+ && lid.depth == 1)
{
if (crawl_state.game_is_sprint()) {
vault = random_map_for_tag("sprint");
}
+ else if (crawl_state.game_is_tutorial())
+ {
+ vault = find_map_by_name("tutorial_basic_1");
+ }
else {
vault = random_map_for_tag("entry");
}
@@ -4326,7 +4332,7 @@ bool dgn_place_map(const map_def *mdef,
if (rune_subst == -1 && mdef->has_tag_suffix("_entry"))
rune_subst = _dgn_find_rune_subst_tags(mdef->tags);
- if (!crawl_state.game_is_sprint()) {
+ if (!crawl_state.game_is_sprint() && !crawl_state.game_is_tutorial()) {
did_map = _build_secondary_vault(you.absdepth0, mdef, rune_subst,
clobber, make_no_exits, where);
}
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index f9d13ba..1dc0498 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -91,6 +91,8 @@ std::string score_file_name()
if (crawl_state.game_is_sprint())
ret += "-sprint";
+ if (crawl_state.game_is_tutorial())
+ ret += "-tutorial";
return (ret);
}
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index f8eabf4..32d7331 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -200,6 +200,7 @@ static void _wanderer_startup_message();
static void _god_greeting_message(bool game_start);
static void _take_starting_note();
static void _startup_tutorial();
+static void _print_tutorial_welcome();
static void _compile_time_asserts();
@@ -297,6 +298,11 @@ int main(int argc, char *argv[])
if (game_start)
{
+ if (crawl_state.game_is_tutorial())
+ {
+ _print_tutorial_welcome();
+ }
+ // TODO: convert this to the hints mode
if (Tutorial.tutorial_left)
_startup_tutorial();
_take_starting_note();
@@ -487,6 +493,23 @@ static void _startup_tutorial()
tut_starting_screen();
}
+static void _print_tutorial_welcome()
+{
+#ifdef USE_TILE
+ msg::streams(MSGCH_TUTORIAL)
+ << "Welcome to the tutorial. We start with basic movement."
+ << "You can <white>click</white> on a square to move there."
+ << "You can also use <white>numpad</white> or vi-keys to move."
+ << std::endl;
+#else
+ msg::streams(MSGCH_TUTORIAL)
+ << "Welcome to the tutorial. We start with basic movement."
+ << "You can use <white>numpad</white> or vi-keys to move."
+ << std::endl;
+#endif
+ // TODO: draw numpad / vi-keys chart here
+}
+
#ifdef WIZARD
static void _do_wizard_command(int wiz_command, bool silent_fail)
{
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 04ad2eb..22bf9e1 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -636,6 +636,35 @@ static void _apply_job_colour(item_def &item)
}
}
+void _setup_tutorial_character()
+{
+ you.species = SP_HIGH_ELF;
+ you.char_class = JOB_FIGHTER;
+
+ Options.weapon = WPN_MACE;
+}
+
+static void _newgame_make_item(int, equipment_type, object_class_type base,
+ int, int, int, int, int);
+void _setup_tutorial_miscs()
+{
+ // Give him spellcasting
+ you.skills[SK_SPELLCASTING] = 3;
+ you.skills[SK_CONJURATIONS] = 1;
+ // Give him some mana to play around with
+ inc_max_mp(2);
+ // Get rid of the starting items!
+ you.equip[EQ_WEAPON] = -1;
+ you.equip[EQ_BODY_ARMOUR] = -1;
+ you.equip[EQ_SHIELD] = -1;
+ _newgame_make_item(0, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE, -1,
+ 1, 0, 0);
+ _newgame_make_item(1, EQ_BOOTS, OBJ_ARMOUR, ARM_BOOTS, -1, 1, 0, 0);
+ _newgame_make_item(2, EQ_WEAPON, OBJ_WEAPONS, WPN_CLUB, -1, 1, 0, 0);
+ // Make him hungry for the butchering tutorial
+ you.hunger = 2650;
+}
+
bool new_game(const std::string& name)
{
clrscr();
@@ -680,6 +709,10 @@ game_start:
_pick_random_species_and_job(Options.good_random);
ng_random = true;
}
+ else if (crawl_state.game_is_tutorial())
+ {
+ _setup_tutorial_character();
+ }
else
{
if (Options.race != 0 && Options.cls != 0
@@ -810,6 +843,11 @@ game_start:
if (crawl_state.game_is_sprint()) {
sprint_give_items();
}
+ // Give tutorial skills etc
+ if (crawl_state.game_is_tutorial())
+ {
+ _setup_tutorial_miscs();
+ }
_mark_starting_books();
_racialise_starting_equipment();
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 91605bb..45d37f1 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3347,6 +3347,10 @@ void god_pitch(god_type which_god)
make_stringf(" welcomes you%s!",
you.worshipped[which_god] ? " back" : "").c_str());
more();
+ if (crawl_state.game_is_tutorial())
+ {
+ gain_piety(35, true, true); // tutorial needs minor destruction usable
+ }
god_welcome_identify_gear();
--
1.6.5.1
|