Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
poschengband committed Jun 15, 2014
2 parents 6bf1d40 + 67e14a8 commit f989084
Show file tree
Hide file tree
Showing 35 changed files with 954 additions and 153 deletions.
2 changes: 1 addition & 1 deletion lib/file/news.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
****************************************
** PosChengband 3.3.2 **
** PosChengband 3.3.3 **
****************************************

Based on Moria: Copyright (c) 1985 Robert Alan Koeneke
Expand Down
20 changes: 1 addition & 19 deletions lib/help/defend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,25 +109,7 @@ There are two categories of resistances: (1) the low (or elemental)
resistances - acid, fire, cold and electricity; and (2) the high
resistances - poison, confusion, light, dark, blindness, sound, fear,
shards, nexus, chaos, nether, gravity, disenchantment and time. In
general, the low resistances are more commonly available, they can be
double-resisted and the corresponding attacks have a higher maximum
damage potential.

A common misconception amongst new players is that having multiple
sources of a particular resistance will increase your character's
resistance to attacks of that form. This is not true. You will get the
same benefit from wielding a single Amulet of Resist Acid as wielding a
Shield of Resist Acid, an {Armor-type} of Resist Acid and an artifact
weapon which grants acid resistance all at the same time.

As stated above, however, it is possible to get double resistance for
the low resists (and also poison). This is because these resistances
are also available on a temporary basis by casting certain spells or by
quaffing a Potion of Resistance. Some items may also activate for
temporary resistance and it may also be gained from one of the many
possible mutations. This temporary effect is cumulative with the
permanent effect and will increase your protection against these kinds
of attacks.
general, the low resistances are more commonly available.


***** <EgoArtifact>
Expand Down
2 changes: 2 additions & 0 deletions src/autopick.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,8 @@ static void autopick_delayed_alter_aux(int item)
char o_name[MAX_NLEN];
bool msg = FALSE;

stats_on_destroy(o_ptr, o_ptr->number);

if (prace_is_(RACE_MON_JELLY))
jelly_eat_object(o_ptr);
else if (prace_is_(RACE_MON_SWORD) && object_is_melee_weapon(o_ptr))
Expand Down
18 changes: 17 additions & 1 deletion src/birth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1962,6 +1962,20 @@ static void birth_put_stats(void)
}
}

void e_info_reset(void)
{
int i;

/* Reset the "objects" */
for (i = 1; i < max_e_idx; i++)
{
ego_item_type *e_ptr = &e_info[i];

e_ptr->aware = FALSE;
WIPE(&e_ptr->counts, counts_t);
}
}

static void k_info_reset(void)
{
int i;
Expand All @@ -1973,7 +1987,7 @@ static void k_info_reset(void)

k_ptr->tried = FALSE;
k_ptr->aware = FALSE;
k_ptr->count = 0;
WIPE(&k_ptr->counts, counts_t);
}
}

Expand Down Expand Up @@ -2027,6 +2041,7 @@ static void player_wipe(void)

/* Reset the objects */
k_info_reset();
e_info_reset();

/* Reset the "monsters" */
for (i = 1; i < max_r_idx; i++)
Expand Down Expand Up @@ -2723,6 +2738,7 @@ void add_outfit(object_type *o_ptr)
int slot;

object_aware(o_ptr);
ego_aware(o_ptr);
object_known(o_ptr);
o_ptr->ident |= IDENT_MENTAL;

Expand Down
7 changes: 5 additions & 2 deletions src/bldg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ void have_nightmare(int r_idx)
}
if (!p_ptr->free_act)
{
(void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4, FALSE);
(void)set_paralyzed(randint1(4), FALSE);
}
while (!saving_throw(p_ptr->skills.sav))
{
Expand Down Expand Up @@ -2664,6 +2664,7 @@ static bool _gamble_shop_aux(object_type *o_ptr)
int slot, auto_pick_idx;

identify_item(o_ptr);
ego_aware(o_ptr);
o_ptr->ident |= (IDENT_MENTAL);
object_desc(buf, o_ptr, 0);

Expand Down Expand Up @@ -3825,7 +3826,7 @@ static void bldg_process_command(building_type *bldg, int i)
msg_print("You do not have the gold!");
return;
}

store_hack = TRUE;
switch (bact)
{
case BACT_NOTHING:
Expand Down Expand Up @@ -4061,6 +4062,8 @@ static void bldg_process_command(building_type *bldg, int i)
if (prace_is_(RACE_MON_LEPRECHAUN))
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA);
}

store_hack = FALSE;
}


Expand Down
2 changes: 1 addition & 1 deletion src/cave.c
Original file line number Diff line number Diff line change
Expand Up @@ -4516,7 +4516,7 @@ void wiz_dark(void)
if (o_ptr->held_m_idx) continue;

/* Forget the object */
o_ptr->marked &= OM_TOUCHED;
o_ptr->marked &= (OM_TOUCHED | OM_COUNTED | OM_EGO_COUNTED);
}

/* Mega-Hack -- Forget the view and lite */
Expand Down
8 changes: 7 additions & 1 deletion src/cmd1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ static void hit_trap(bool break_trap)
/* Remove the monster restriction */
get_mon_num_prep(NULL, NULL);
}
(void)set_paralyzed(p_ptr->paralyzed + randint0(10) + 5, FALSE);
(void)set_paralyzed(randint1(4), FALSE);
}
break;
}
Expand Down Expand Up @@ -2867,6 +2867,12 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
}
}

if (p_ptr->stun >= 100) /* Grand Master Mystic retaliation knocked the player out! */
break;

if (p_ptr->paralyzed)
break;

/* Weaponmaster Whirlwind turns a normal strike into a sweeping whirlwind strike */
if (p_ptr->whirlwind && mode == 0)
{
Expand Down
12 changes: 5 additions & 7 deletions src/cmd2.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static void chest_trap(int y, int x, s16b o_idx)

if (!p_ptr->free_act)
{
(void)set_paralyzed(p_ptr->paralyzed + 10 + randint1(20), FALSE);
(void)set_paralyzed(randint1(4), FALSE);
}
}

Expand Down Expand Up @@ -673,11 +673,9 @@ static void chest_trap(int y, int x, s16b o_idx)
else if (one_in_(4))
{
if (!p_ptr->free_act)
(void)set_paralyzed(p_ptr->paralyzed + 2 +
randint0(6), FALSE);
(void)set_paralyzed(randint1(4), FALSE);
else
(void)set_stun(p_ptr->stun + 10 +
randint0(100), FALSE);
(void)set_stun(p_ptr->stun + 10 + randint0(100), FALSE);
}
else if (one_in_(3)) apply_disenchant(0);
else if (one_in_(2))
Expand Down Expand Up @@ -2035,7 +2033,7 @@ static bool do_cmd_bash_aux(int y, int x, int dir)


/* Hack -- Lose balance ala paralysis */
(void)set_paralyzed(p_ptr->paralyzed + 2 + randint0(2), FALSE);
(void)set_paralyzed(randint1(4), FALSE);
}

/* Result */
Expand Down Expand Up @@ -3961,7 +3959,7 @@ void do_cmd_fire_aux2(int item, object_type *bow, int sx, int sy, int tx, int ty
o_ptr = &o_list[o_idx];
object_copy(o_ptr, q_ptr);

o_ptr->marked &= OM_TOUCHED;
o_ptr->marked &= (OM_TOUCHED | OM_COUNTED | OM_EGO_COUNTED);
o_ptr->iy = o_ptr->ix = 0;
o_ptr->held_m_idx = m_idx;
o_ptr->next_o_idx = m_ptr->hold_o_idx;
Expand Down
24 changes: 11 additions & 13 deletions src/cmd3.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,15 @@ static bool high_level_book(object_type *o_ptr)
*/
void do_cmd_destroy(void)
{
int item, amt = 1;
int old_number;

bool force = FALSE;

object_type *o_ptr;
object_type forge;
object_type *q_ptr = &forge;
bool is_equipped = FALSE;

char o_name[MAX_NLEN];

char out_val[MAX_NLEN+40];
int item, amt = 1;
int old_number;
bool force = FALSE;
object_type *o_ptr;
object_type forge;
object_type *q_ptr = &forge;
bool is_equipped = FALSE;
char o_name[MAX_NLEN];
char out_val[MAX_NLEN+40];

cptr q, s;
int mode = USE_INVEN | USE_FLOOR;
Expand Down Expand Up @@ -422,6 +418,8 @@ void do_cmd_destroy(void)

object_copy(q_ptr, o_ptr);

stats_on_destroy(o_ptr, amt);

if (prace_is_(RACE_MON_JELLY))
jelly_eat_object(o_ptr);
else if (prace_is_(RACE_MON_SWORD) && object_is_melee_weapon(o_ptr))
Expand Down
Loading

0 comments on commit f989084

Please sign in to comment.