Functions | Variables
player-quest.c File Reference

All quest-related code. More...

#include "angband.h"
#include "datafile.h"
#include "init.h"
#include "mon-util.h"
#include "monster.h"
#include "obj-pile.h"
#include "obj-util.h"
#include "player-calcs.h"
#include "player-quest.h"


static enum parser_error parse_quest_name (struct parser *p)
 Parsing functions for quest.txt. More...
static enum parser_error parse_quest_level (struct parser *p)
static enum parser_error parse_quest_race (struct parser *p)
static enum parser_error parse_quest_number (struct parser *p)
struct parserinit_parse_quest (void)
static errr run_parse_quest (struct parser *p)
static errr finish_parse_quest (struct parser *p)
static void cleanup_quest (void)
bool is_quest (int level)
 Check if the given level is a quest level. More...
void player_quests_reset (struct player *p)
 Copy all the standard quests to the player quest history. More...
void player_quests_free (struct player *p)
 Free the player quests. More...
static void build_quest_stairs (struct loc grid)
 Creates magical stairs after finishing a quest monster. More...
bool quest_check (const struct monster *m)
 Check if this (now dead) monster is a quest monster, and act appropriately. More...


struct questquests
 Array of quests. More...
struct file_parser quests_parser

Detailed Description

All quest-related code.

Copyright (c) 2013 Angband developers

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Function Documentation

◆ build_quest_stairs()

static void build_quest_stairs ( struct loc  grid)

◆ cleanup_quest()

static void cleanup_quest ( void  )

◆ finish_parse_quest()

static errr finish_parse_quest ( struct parser p)

◆ init_parse_quest()

struct parser* init_parse_quest ( void  )

◆ is_quest()

bool is_quest ( int  level)

◆ parse_quest_level()

static enum parser_error parse_quest_level ( struct parser p)

◆ parse_quest_name()

static enum parser_error parse_quest_name ( struct parser p)

Parsing functions for quest.txt.

References h, mem_zalloc(), quest::name, quest::next, parser_getstr(), parser_priv(), parser_setpriv(), and string_make().

Referenced by init_parse_quest().

◆ parse_quest_number()

static enum parser_error parse_quest_number ( struct parser p)

◆ parse_quest_race()

static enum parser_error parse_quest_race ( struct parser p)

◆ player_quests_free()

void player_quests_free ( struct player p)

◆ player_quests_reset()

void player_quests_reset ( struct player p)

Copy all the standard quests to the player quest history.

References i, quest::level, quest::max_num, mem_zalloc(), quest::name, player_quests_free(), angband_constants::quest_max, player::quests, quest::race, string_make(), and z_info.

Referenced by player_init(), and rd_quests().

◆ quest_check()

bool quest_check ( const struct monster m)

◆ run_parse_quest()

static errr run_parse_quest ( struct parser p)

Variable Documentation

◆ quests

struct quest* quests

Array of quests.

Referenced by setup_tests().

◆ quests_parser

struct file_parser quests_parser
Initial value:
= {
static void cleanup_quest(void)
Definition: player-quest.c:121
static errr run_parse_quest(struct parser *p)
Definition: player-quest.c:86
struct parser * init_parse_quest(void)
Definition: player-quest.c:76
static errr finish_parse_quest(struct parser *p)
Definition: player-quest.c:90