Attached Files |
0001-Three-unrandart-boots.patch [^] (9,105 bytes) 2013-09-22 20:55 [Show Content] [Hide Content]From 5b7963fb5ec4353aea6244a9b539f91fe8c6393d Mon Sep 17 00:00:00 2001
From: Shayne Halvorson <N78291@gmail.com>
Date: Sun, 22 Sep 2013 13:17:29 -0500
Subject: [PATCH] Three unrandart boots.
---
crawl-ref/source/art-data.txt | 21 ++++++++++++++++++---
crawl-ref/source/art-func.h | 16 ++++++++++++++++
crawl-ref/source/dat/descript/unrand.txt | 13 +++++++++++--
crawl-ref/source/main.cc | 3 ++-
crawl-ref/source/melee_attack.cc | 6 ++++--
crawl-ref/source/mutation.cc | 5 +++++
crawl-ref/source/spl-transloc.cc | 18 +++++++++++-------
crawl-ref/source/spl-transloc.h | 2 +-
8 files changed, 68 insertions(+), 16 deletions(-)
diff --git a/crawl-ref/source/art-data.txt b/crawl-ref/source/art-data.txt
index 7772b51..60a795f 100644
--- a/crawl-ref/source/art-data.txt
+++ b/crawl-ref/source/art-data.txt
@@ -727,7 +727,6 @@ TILE_EQ: red
EV: 4
BOOL: fly
-# TAG_MAJOR_VERSION == 34
ENUM: BOOTS_ASSASSIN
NAME: boots of the Assassin
OBJ: OBJ_ARMOUR/ARM_BOOTS
@@ -735,9 +734,7 @@ PLUS: +2
COLOUR: BROWN
TILE: urand_assassin
TILE_EQ: middle_gray
-DEX: 3
STEALTH: 80
-BOOL: inv, nogen
ENUM: LEAR
NAME: Lear's hauberk
@@ -1082,6 +1079,24 @@ TILE_EQ: moon_troll_leather_armour
MP: +5
REGEN: 40
+NAME: stone boots
+OBJ: OBJ_ARMOUR/ARM_BOOTS
+PLUS: +8
+COLOUR: ETC_EARTH
+BRAND: SPARM_PONDEROUSNESS
+TILE: urand_assassin
+TILE_EQ: middle_gray
+
+NAME: shoes of Golubria
+OBJ: OBJ_ARMOUR/ARM_BOOTS
+PLUS: +1
+COLOUR: ETC_DISJUNCTION
+TILE: urand_assassin
+TILE_EQ: middle_gray
+BOOL: blink
+EV: +2
+
+
# This is the first of two amulets used to test suppression aura.
# Together, they confer every randart effect except for a few that are
# determined explicitly by checking whether a certain amulet is worn
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h
index 53b8327..d410863 100644
--- a/crawl-ref/source/art-func.h
+++ b/crawl-ref/source/art-func.h
@@ -34,6 +34,7 @@
#include "spl-damage.h" // For the Singing Sword.
#include "spl-miscast.h" // For Staff of Wucad Mu and Scythe of Curses miscasts
#include "spl-summoning.h" // For Zonguldrok animating dead
+#include "spl-transloc.h"
#include "terrain.h" // For storm bow
/*******************
@@ -836,3 +837,18 @@ static void _WOE_melee_effect(item_def* weapon, actor* attacker,
if (!mondied)
defender->hurt(attacker, defender->stat_hp());
}
+
+///////////////////////////////////////////////////
+
+static void _GOLUBRIA_world_reacts(item_def *item)
+{
+ coord_def target = you.pos();
+
+ if (one_chance_in(50) && allow_control_teleport(true))
+ {
+ target.x += random_range(-4,4);
+ target.y += random_range(-4,4);
+
+ cast_golubrias_passage(target, false, false);
+ }
+}
diff --git a/crawl-ref/source/dat/descript/unrand.txt b/crawl-ref/source/dat/descript/unrand.txt
index 474a1d2..a40442e 100644
--- a/crawl-ref/source/dat/descript/unrand.txt
+++ b/crawl-ref/source/dat/descript/unrand.txt
@@ -277,10 +277,10 @@ cloak of Flash
A vibrating cloak.
%%%%
-# TAG_MAJOR_VERSION == 34
boots of the Assassin
-Some soft boots, specially designed by the Assassin's Guild.
+Some soft boots with a concealed dagger inside, specially designed by the
+Assassin's Guild. It makes the wearer more perceptive of potential victims.
%%%%
Lear's hauberk
@@ -477,6 +477,15 @@ unseen terrors of the wind or merely an appropriation of the name to add
mystique is something of a mystery; its power of rapid regeneration at the
occasional expense of the wearer's magic power, however, is hard to dispute.
%%%%
+stone boots
+
+These rocky boots provide unsurpassed protection at the expense of
+mobility and comfort.
+%%%%
+shoes of Golubria
+
+Those who wear these shoes may find that new passages appear before them.
+%%%%
milk chocolate
This item is a debugging aid, granting a vast array of mostly beneficial
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 679115f..85bbb07 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -3343,7 +3343,8 @@ static void _player_reacts_to_monsters()
manage_fire_shield(you.time_taken);
// penance checked there (as you can have antennae too)
- if (player_mutation_level(MUT_ANTENNAE) || you_worship(GOD_ASHENZARI))
+ if (player_mutation_level(MUT_ANTENNAE) || you_worship(GOD_ASHENZARI)
+ || player_equip_unrand(UNRAND_BOOTS_ASSASSIN))
check_antennae_detect();
if ((you_worship(GOD_ASHENZARI) && !player_under_penance())
diff --git a/crawl-ref/source/melee_attack.cc b/crawl-ref/source/melee_attack.cc
index 612f657..7e7daaf 100644
--- a/crawl-ref/source/melee_attack.cc
+++ b/crawl-ref/source/melee_attack.cc
@@ -1856,6 +1856,8 @@ int melee_attack::player_apply_final_multipliers(int damage)
int melee_attack::player_stab_weapon_bonus(int damage)
{
int stab_skill = you.skill(wpn_skill, 50) + you.skill(SK_STEALTH, 50);
+ int modified_wpn_skill = (player_equip_unrand(UNRAND_BOOTS_ASSASSIN)
+ ? SK_SHORT_BLADES : wpn_skill);
if (weapon && weapon->base_type == OBJ_WEAPONS
&& (weapon->sub_type == WPN_CLUB
@@ -1868,7 +1870,7 @@ int melee_attack::player_stab_weapon_bonus(int damage)
goto ok_weaps;
}
- switch (wpn_skill)
+ switch (modified_wpn_skill)
{
case SK_SHORT_BLADES:
{
@@ -1884,7 +1886,7 @@ int melee_attack::player_stab_weapon_bonus(int damage)
ok_weaps:
case SK_LONG_BLADES:
damage *= 10 + div_rand_round(stab_skill, 100 *
- (stab_bonus + (wpn_skill == SK_SHORT_BLADES ? 0 : 2)));
+ (stab_bonus + (modified_wpn_skill == SK_SHORT_BLADES ? 0 : 2)));
damage /= 10;
// fall through
default:
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index cfd75bd..e5a0569 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -16,6 +16,8 @@
#include "externs.h"
#include "abl-show.h"
+#include "art-enum.h"
+#include "artefact.h"
#include "cio.h"
#include "coordit.h"
#include "delay.h"
@@ -2547,6 +2549,9 @@ void check_demonic_guardian()
void check_antennae_detect()
{
int radius = player_mutation_level(MUT_ANTENNAE) * 2;
+
+ if (player_equip_unrand(UNRAND_BOOTS_ASSASSIN))
+ radius = max(radius, 4);
if (you_worship(GOD_ASHENZARI) && !player_under_penance())
radius = max(radius, you.piety / 20);
if (radius <= 0)
diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc
index f6d78f8..79db30c 100644
--- a/crawl-ref/source/spl-transloc.cc
+++ b/crawl-ref/source/spl-transloc.cc
@@ -1088,7 +1088,7 @@ spret_type cast_semi_controlled_blink(int pow, bool cheap_cancel, bool end_ctele
return SPRET_SUCCESS;
}
-spret_type cast_golubrias_passage(const coord_def& where, bool fail)
+spret_type cast_golubrias_passage(const coord_def& where, bool fail, bool msg)
{
// randomize position a bit to make it not as useful to use on monsters
// chasing you, as well as to not give away hidden trap positions
@@ -1127,17 +1127,21 @@ spret_type cast_golubrias_passage(const coord_def& where, bool fail)
if (tries >= 100 || tries2 >= 100)
{
- if (you.trans_wall_blocking(randomized_where))
- mpr("You cannot create a passage on the other side of the transparent wall.");
- else
- // XXX: bleh, dumb message
- mpr("Creating passages of Golubria requires sufficient empty space.");
+ if (msg)
+ {
+ if (you.trans_wall_blocking(randomized_where))
+ mpr("You cannot create a passage on the other side of the transparent wall.");
+ else
+ // XXX: bleh, dumb message
+ mpr("Creating passages of Golubria requires sufficient empty space.");
+ }
return SPRET_ABORT;
}
- if (!allow_control_teleport(true) ||
+ if ((!allow_control_teleport(true) ||
testbits(env.pgrid(randomized_where), FPROP_NO_CTELE_INTO) ||
testbits(env.pgrid(randomized_here), FPROP_NO_CTELE_INTO))
+ && msg)
{
mpr("A powerful magic interferes with the creation of the passage.");
return SPRET_ABORT;
diff --git a/crawl-ref/source/spl-transloc.h b/crawl-ref/source/spl-transloc.h
index 9a89698..ee07e2c 100644
--- a/crawl-ref/source/spl-transloc.h
+++ b/crawl-ref/source/spl-transloc.h
@@ -28,6 +28,6 @@ spret_type cast_apportation(int pow, bolt& beam, bool fail);
spret_type cast_semi_controlled_blink(int pow, bool cheap_cancel,
bool end_ctele,
bool fail = false);
-spret_type cast_golubrias_passage(const coord_def& where, bool fail);
+spret_type cast_golubrias_passage(const coord_def& where, bool fail, bool msg = true);
#endif
--
1.7.9.5
|