Angband
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"

Functions

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 (int y, int x)
 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...
 

Variables

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

static void build_quest_stairs ( int  y,
int  x 
)
static
static void cleanup_quest ( void  )
static
static errr finish_parse_quest ( struct parser p)
static
struct parser* init_parse_quest ( void  )
bool is_quest ( int  level)
static enum parser_error parse_quest_level ( struct parser p)
static
static enum parser_error parse_quest_name ( struct parser p)
static

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().

static enum parser_error parse_quest_number ( struct parser p)
static
static enum parser_error parse_quest_race ( struct parser p)
static
void player_quests_free ( struct player p)
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().

bool quest_check ( const struct monster m)
static errr run_parse_quest ( struct parser p)
static

Variable Documentation

struct quest* quests

Array of quests.

Referenced by setup_tests().

struct file_parser quests_parser
Initial value:
= {
"quest",
}
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