Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ lib/user/*.prf
.new
*~
*.DS_Store
sil.INI
src/sil.res
65 changes: 37 additions & 28 deletions lib/edit/artefact.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1668,34 +1668,43 @@ F:HAUNTED | FEAR | VUL_FIRE | VUL_COLD | VUL_POIS
F:INSTA_ART


## The Ultimate TV_RING

N:188:'Ultimate'
I:45:0:0
F:STR | DEX | NEG_STR | NEG_DEX
F:ARCHERY | STEALTH | PERCEPTION
F:DAMAGE_SIDES
F:TUNNEL
F:SUST_STR | SUST_DEX
F:RES_FIRE | RES_COLD | RES_POIS
F:RES_FEAR | RES_BLIND | RES_CONFU | RES_STUN | RES_HALLU
F:SLOW_DIGEST | REGEN | SEE_INVIS | FREE_ACT | SPEED
F:HUNGER | DANGER | AGGRAVATE | LIGHT_CURSE
F:HAUNTED | FEAR | VUL_FIRE | VUL_COLD | VUL_POIS
F:INSTA_ART


## The Ultimate TV_AMULET

N:189:'Ultimate'
I:40:0:0
F:CON | GRA | NEG_CON | NEG_GRA
F:ARCHERY | STEALTH | PERCEPTION | WILL | SONG
F:SUST_CON | SUST_GRA
F:RES_FEAR | RES_BLIND | RES_CONFU | RES_STUN | RES_HALLU
F:SLOW_DIGEST | LIGHT | REGEN | SEE_INVIS | FREE_ACT
F:HUNGER | DARKNESS | DANGER | AGGRAVATE | LIGHT_CURSE
F:HAUNTED | FEAR | VUL_FIRE | VUL_COLD | VUL_POIS
## The Ultimate TV_RING

N:188:'Ultimate'
I:45:0:0
F:STR | DEX | CON | GRA | NEG_STR | NEG_DEX | NEG_CON | NEG_GRA
F:MELEE |ARCHERY | STEALTH | PERCEPTION | WILL | SMITHING | SONG
F:DAMAGE_SIDES
F:TUNNEL | VAMPIRIC | SHARPNESS
F:SLAY_ORC | SLAY_TROLL | SLAY_WOLF | SLAY_SPIDER
F:SLAY_UNDEAD | SLAY_RAUKO | SLAY_DRAGON
F:BRAND_ELEC | BRAND_FIRE | BRAND_COLD | BRAND_POIS
F:SUST_STR | SUST_DEX | SUST_CON | SUST_GRA
F:RES_FIRE | RES_COLD | RES_POIS
F:RES_FEAR | RES_BLIND | RES_CONFU | RES_STUN | RES_HALLU
F:RADIANCE | SLOW_DIGEST | LIGHT | REGEN | SEE_INVIS | FREE_ACT | SPEED
F:HUNGER | DARKNESS | SLOWNESS | DANGER | AGGRAVATE | LIGHT_CURSE | HAUNTED | FEAR
F:VUL_FIRE | VUL_COLD | VUL_POIS
F:INSTA_ART


## The Ultimate TV_AMULET

N:189:'Ultimate'
I:40:0:0
F:STR | DEX | CON | GRA | NEG_STR | NEG_DEX | NEG_CON | NEG_GRA
F:MELEE |ARCHERY | STEALTH | PERCEPTION | WILL | SMITHING | SONG
F:DAMAGE_SIDES
F:TUNNEL | VAMPIRIC | SHARPNESS
F:SLAY_ORC | SLAY_TROLL | SLAY_WOLF | SLAY_SPIDER
F:SLAY_UNDEAD | SLAY_RAUKO | SLAY_DRAGON
F:BRAND_ELEC | BRAND_FIRE | BRAND_COLD | BRAND_POIS
F:SUST_STR | SUST_DEX | SUST_CON | SUST_GRA
F:RES_FIRE | RES_COLD | RES_POIS
F:RES_FEAR | RES_BLIND | RES_CONFU | RES_STUN | RES_HALLU
F:RADIANCE | SLOW_DIGEST | LIGHT | REGEN | SEE_INVIS | FREE_ACT | SPEED
F:HUNGER | DARKNESS | SLOWNESS | DANGER | AGGRAVATE | LIGHT_CURSE | HAUNTED | FEAR
F:VUL_FIRE | VUL_COLD | VUL_POIS
F:INSTA_ART


Expand Down
11 changes: 5 additions & 6 deletions src/Makefile.cyg
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

CC = gcc
WRES = windres
LIBS = -s -mno-cygwin -mwindows -e _mainCRTStartup -lwinmm
CFLAGS = -Wall -mno-cygwin -O2 -fno-strength-reduce -DWINDOWS
LIBS = -s -mwindows -e _mainCRTStartup -lwinmm
CFLAGS = -Wall -O2 -fno-strength-reduce -DWINDOWS

EXOBJS = \
sil.res \
Expand Down Expand Up @@ -158,7 +158,7 @@ generate.o: generate.c $(INCS)
init1.o: init1.c $(INCS) init.h
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<

init2.o: init2.c $(INCS) init.h
init2.o: init2.c $(INCS) init.h
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<

load.o: load.c $(INCS) init.h
Expand Down Expand Up @@ -226,13 +226,13 @@ variable.o: variable.c $(INCS)
wizard1.o: wizard1.c $(INCS)
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<

wizard2.o: wizard2.c $(INCS)
wizard2.o: wizard2.c $(INCS)
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<

squelch.o: squelch.c $(INCS)
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<

xtra1.o: xtra1.c $(INCS)
xtra1.o: xtra1.c $(INCS)
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<

xtra2.o: xtra2.c $(INCS)
Expand All @@ -258,4 +258,3 @@ z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h

.c.o:
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<

37 changes: 18 additions & 19 deletions src/cmd1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1907,9 +1907,9 @@ void ident_bow_arrow_by_use(object_type *j_ptr, object_type *i_ptr, object_type

u32b maybe_notice_slay(const object_type *o_ptr, u32b flag)
{
u32b noticed_flag = 0L;
u32b noticed_flag = 0L, f1, f2, f3;

if (!object_known_p(o_ptr))
if ((f1 & flag) && !object_known_p(o_ptr))
{
noticed_flag = flag;
}
Expand Down Expand Up @@ -1951,7 +1951,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
case TV_DIGGING:
{
/* Slay Wolf */
if ((f1 & (TR1_SLAY_WOLF)) &&
if ((p_ptr->slay_wolf) &&
(r_ptr->flags3 & (RF3_WOLF)))
{
if (m_ptr->ml)
Expand All @@ -1965,7 +1965,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Slay Spider */
if ((f1 & (TR1_SLAY_SPIDER)) &&
if ((p_ptr->slay_spider) &&
(r_ptr->flags3 & (RF3_SPIDER)))
{
if (m_ptr->ml)
Expand All @@ -1979,7 +1979,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Slay Undead */
if ((f1 & (TR1_SLAY_UNDEAD)) &&
if ((p_ptr->slay_undead) &&
(r_ptr->flags3 & (RF3_UNDEAD)))
{
if (m_ptr->ml)
Expand All @@ -1993,7 +1993,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Slay Rauko */
if ((f1 & (TR1_SLAY_RAUKO)) &&
if ((p_ptr->slay_rauko) &&
(r_ptr->flags3 & (RF3_RAUKO)))
{
if (m_ptr->ml)
Expand All @@ -2007,7 +2007,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Slay Orc */
if ((f1 & (TR1_SLAY_ORC)) &&
if ((p_ptr->slay_orc) &&
(r_ptr->flags3 & (RF3_ORC)))
{
if (m_ptr->ml)
Expand All @@ -2021,7 +2021,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Slay Troll */
if ((f1 & (TR1_SLAY_TROLL)) &&
if ((p_ptr->slay_troll) &&
(r_ptr->flags3 & (RF3_TROLL)))
{
if (m_ptr->ml)
Expand All @@ -2035,7 +2035,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Slay Dragon */
if ((f1 & (TR1_SLAY_DRAGON)) &&
if ((p_ptr->slay_dragon) &&
(r_ptr->flags3 & (RF3_DRAGON)))
{
if (m_ptr->ml)
Expand Down Expand Up @@ -2070,7 +2070,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Brand (Fire) */
if (f1 & (TR1_BRAND_FIRE))
if (p_ptr->fire_branded)
{
/* Notice immunity */
if (r_ptr->flags3 & (RF3_RES_FIRE))
Expand Down Expand Up @@ -2101,7 +2101,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Brand (Cold) */
if (f1 & (TR1_BRAND_COLD))
if (p_ptr->cold_branded)
{
/* Notice immunity */
if (r_ptr->flags3 & (RF3_RES_COLD))
Expand Down Expand Up @@ -2131,7 +2131,7 @@ int slay_bonus(const object_type *o_ptr, const monster_type *m_ptr, u32b *notice
}

/* Brand (Poison) */
if (f1 & (TR1_BRAND_POIS))
if (p_ptr->poison_branded)
{
/* Notice immunity */
if (r_ptr->flags3 & (RF3_RES_POIS))
Expand Down Expand Up @@ -2177,14 +2177,14 @@ extern int prt_after_sharpness(const object_type *o_ptr, u32b *noticed_flag)
object_flags(o_ptr, &f1, &f2, &f3);

/* Sharpness */
if (f1 & (TR1_SHARPNESS))
if (p_ptr->sharp)
{
*noticed_flag = maybe_notice_slay(o_ptr, TR1_SHARPNESS);
protection = 50;
}

/* Sharpness 2 */
if (f1 & (TR1_SHARPNESS2))
if (p_ptr->sharpest)
{
*noticed_flag = maybe_notice_slay(o_ptr, TR1_SHARPNESS2);
protection = 0;
Expand Down Expand Up @@ -3859,10 +3859,11 @@ void py_attack_aux(int y, int x, int attack_type)
// deal with killing blows
if (fatal_blow)
{
// heal with a vampiric weapon
if ((f1 & (TR1_VAMPIRIC)) && !monster_nonliving(r_ptr))
// heal when having the vampiric quality
if (p_ptr->vampiric && !monster_nonliving(r_ptr))
{
if (hp_player(7, FALSE, FALSE) && !object_known_p(o_ptr))
//chance to identify the weapon if it was indeed the weapon the provider of the vampiric quality
if (hp_player(7, FALSE, FALSE) && (f1 & (TR1_VAMPIRIC)) && !object_known_p(o_ptr))
{
ident_weapon_by_use(o_ptr, m_ptr, TR1_VAMPIRIC);
}
Expand Down Expand Up @@ -5360,5 +5361,3 @@ void run_step(int dir)
/* Move the player */
move_player(p_ptr->run_cur_dir);
}


37 changes: 16 additions & 21 deletions src/cmd2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,6 @@ static bool do_cmd_tunnel_aux(int y, int x)
bool digger_choice = FALSE;
int difficulty;
int digging_score = 0;
char o_name[80];
char success_message[80];
char failure_message[80];
object_type *o_ptr;
Expand All @@ -1798,15 +1797,15 @@ static bool do_cmd_tunnel_aux(int y, int x)
/* Verify legality */
if (!do_cmd_tunnel_test(y, x)) return (FALSE);

// examine the wielded weapon
o_ptr = &inventory[INVEN_WIELD];
object_flags(o_ptr, &f1, &f2, &f3);

// if it is a digger, then use it
if (f1 & (TR1_TUNNEL))
// check to see if some equipment is allowing us to tunnel
if (p_ptr->tunneling > 0)
{
digging_score = o_ptr->pval;
digger_ptr = o_ptr;
digging_score = p_ptr->tunneling;

// examine the wielded weapon to see if it was the equipment in question
o_ptr = &inventory[INVEN_WIELD];
object_flags(o_ptr, &f1, &f2, &f3);
if (f1 & (TR1_TUNNEL)) digger_ptr = o_ptr;
}
else
{
Expand Down Expand Up @@ -1834,7 +1833,7 @@ static bool do_cmd_tunnel_aux(int y, int x)
item_tester_hook = item_tester_hook_digger;

/* Get an item */
if (!get_item(&item, "Use which digger? ", "You are not carrying a shovel or mattock.", (USE_INVEN))) return (FALSE);
if (!get_item(&item, "Use which digger? ", "You are not carrying an item which lets you dig.", (USE_INVEN))) return (FALSE);
else
{
/* Get the object */
Expand All @@ -1855,7 +1854,7 @@ static bool do_cmd_tunnel_aux(int y, int x)
// abort if you have no digger
if (digging_score == 0)
{
msg_print("You are not carrying a shovel or mattock.");
msg_print("You are not carrying an item which lets you dig.");

// reset the action type
p_ptr->previous_action[0] = ACTION_NOTHING;
Expand All @@ -1866,9 +1865,6 @@ static bool do_cmd_tunnel_aux(int y, int x)
return (FALSE);
}

// get the short name of the item
object_desc(o_name, sizeof(o_name), digger_ptr, FALSE, -1);

/* Granite */
if (cave_feat[y][x] >= FEAT_WALL_EXTRA)
{
Expand All @@ -1877,7 +1873,7 @@ static bool do_cmd_tunnel_aux(int y, int x)

if (difficulty > digging_score)
{
strnfmt(failure_message, sizeof(failure_message), "You are unable to break the granite with your %s.", o_name);
strnfmt(failure_message, sizeof(failure_message), "You are unable to break the granite.");
}
else
{
Expand All @@ -1892,7 +1888,7 @@ static bool do_cmd_tunnel_aux(int y, int x)

if (difficulty > digging_score)
{
strnfmt(failure_message, sizeof(failure_message), "You are unable to break the quartz with your %s.", o_name);
strnfmt(failure_message, sizeof(failure_message), "You are unable to break the quartz.");
}
else
{
Expand All @@ -1907,7 +1903,7 @@ static bool do_cmd_tunnel_aux(int y, int x)

if (difficulty > digging_score)
{
strnfmt(failure_message, sizeof(failure_message), "You are unable to shift the rubble with your %s.", o_name);
strnfmt(failure_message, sizeof(failure_message), "You are unable to shift the rubble.");
}
else
{
Expand All @@ -1922,7 +1918,7 @@ static bool do_cmd_tunnel_aux(int y, int x)

if (difficulty > digging_score)
{
strnfmt(failure_message, sizeof(failure_message), "You are unable to break the granite with your %s.", o_name);
strnfmt(failure_message, sizeof(failure_message), "You are unable to break the granite.");
}
else
{
Expand All @@ -1934,7 +1930,7 @@ static bool do_cmd_tunnel_aux(int y, int x)
if ((difficulty <= digging_score) && (difficulty <= p_ptr->stat_use[A_STR]))
{
u32b f1, f2, f3;
object_flags(digger_ptr, &f1, &f2, &f3);
if (digger_ptr) object_flags(digger_ptr, &f1, &f2, &f3);

/* Make a lot of noise */
monster_perception(TRUE, FALSE, -10);
Expand All @@ -1943,7 +1939,7 @@ static bool do_cmd_tunnel_aux(int y, int x)
msg_print(success_message);

// Possibly identify the digger
if (!object_known_p(digger_ptr) && (f1 & (TR1_TUNNEL)))
if (digger_ptr && !object_known_p(digger_ptr) && (f1 & (TR1_TUNNEL)))
{
char o_short_name[80];
char o_full_name[80];
Expand Down Expand Up @@ -4427,4 +4423,3 @@ void do_cmd_throw(bool automatic)
// Break the truce if creatures see
break_truce(FALSE);
}

Loading