summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-06-10 09:31:59 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-06-10 09:36:48 -0400
commitffd391d7850bbbc282688706f5714a885f07b182 (patch)
tree9ef1f9d7ee4e051216b42ee4dd5a782ea38e6209 /crawl-ref
parent897c189157c822dcb87e64f4a38373bdd258e554 (diff)
downloadcrawl-ref-ffd391d7850bbbc282688706f5714a885f07b182.tar.gz
crawl-ref-ffd391d7850bbbc282688706f5714a885f07b182.zip
Combine the frost/flame and freezing/flaming brands.
Elec and venom launchers already use the same brands, and with ranged code more similar to melee code this change actually simplifies most code. There should be no gameplay change though some weird brand picking code for launchers was refactored, which might have some effect.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/artefact.cc6
-rw-r--r--crawl-ref/source/attack.cc7
-rw-r--r--crawl-ref/source/dat/des/branches/depths_encompass.des4
-rw-r--r--crawl-ref/source/dat/des/branches/elf.des2
-rw-r--r--crawl-ref/source/dat/des/branches/orc.des2
-rw-r--r--crawl-ref/source/dat/des/portals/icecave.des4
-rw-r--r--crawl-ref/source/dat/des/portals/volcano.des7
-rw-r--r--crawl-ref/source/dat/des/sprint/sprint_mu.des2
-rw-r--r--crawl-ref/source/dat/des/variable/float.des6
-rw-r--r--crawl-ref/source/describe.cc46
-rw-r--r--crawl-ref/source/ghost.cc4
-rw-r--r--crawl-ref/source/goditem.cc2
-rw-r--r--crawl-ref/source/item_use.cc7
-rw-r--r--crawl-ref/source/itemname.cc10
-rw-r--r--crawl-ref/source/itemprop-enum.h2
-rw-r--r--crawl-ref/source/makeitem.cc26
-rw-r--r--crawl-ref/source/mon-gear.cc6
-rw-r--r--crawl-ref/source/monster.cc13
-rw-r--r--crawl-ref/source/player-equip.cc11
-rw-r--r--crawl-ref/source/player-reacts.cc4
-rw-r--r--crawl-ref/source/ranged_attack.cc8
-rw-r--r--crawl-ref/source/shopping.cc2
-rw-r--r--crawl-ref/source/spl-wpnench.cc27
-rw-r--r--crawl-ref/source/tags.cc7
-rw-r--r--crawl-ref/source/xom.cc2
25 files changed, 84 insertions, 133 deletions
diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc
index 574ccf5151..ef346c1cb4 100644
--- a/crawl-ref/source/artefact.cc
+++ b/crawl-ref/source/artefact.cc
@@ -224,7 +224,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
case GOD_DITHMENOS:
// No fiery weapons.
if (item.base_type == OBJ_WEAPONS
- && (brand == SPWPN_FLAME || brand == SPWPN_FLAMING))
+ && brand == SPWPN_FLAMING)
{
return false;
}
@@ -735,8 +735,8 @@ static void _get_randart_properties(const item_def &item,
2, SPWPN_SPEED,
4, SPWPN_VENOM,
4, SPWPN_VORPAL,
- 4, SPWPN_FLAME,
- 4, SPWPN_FROST,
+ 4, SPWPN_FLAMING,
+ 4, SPWPN_FREEZING,
0);
if (atype == WPN_BLOWGUN)
diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc
index d2d43fb351..7d2622f2de 100644
--- a/crawl-ref/source/attack.cc
+++ b/crawl-ref/source/attack.cc
@@ -983,9 +983,6 @@ brand_type attack::random_chaos_brand()
case SPWPN_VAMPIRICISM: brand_name += "vampiricism"; break;
case SPWPN_VORPAL: brand_name += "vorpal"; break;
case SPWPN_ANTIMAGIC: brand_name += "antimagic"; break;
- // ranged weapon brands
- case SPWPN_FLAME: brand_name += "flame"; break;
- case SPWPN_FROST: brand_name += "frost"; break;
// both ranged and non-ranged
case SPWPN_CHAOS: brand_name += "chaos"; break;
@@ -1641,7 +1638,6 @@ bool attack::apply_damage_brand(const char *what)
brand = damage_brand == SPWPN_CHAOS ? random_chaos_brand() : damage_brand;
if (brand != SPWPN_FLAMING && brand != SPWPN_FREEZING
- && brand != SPWPN_FLAME && brand != SPWPN_FROST
&& brand != SPWPN_ELECTROCUTION && brand != SPWPN_VAMPIRICISM
&& !defender->alive())
{
@@ -1652,7 +1648,6 @@ bool attack::apply_damage_brand(const char *what)
if (!damage_done
&& (brand == SPWPN_FLAMING || brand == SPWPN_FREEZING
- || brand == SPWPN_FLAME || brand == SPWPN_FROST
|| brand == SPWPN_HOLY_WRATH || brand == SPWPN_DRAGON_SLAYING
|| brand == SPWPN_VORPAL || brand == SPWPN_VAMPIRICISM
|| brand == SPWPN_ANTIMAGIC))
@@ -1664,7 +1659,6 @@ bool attack::apply_damage_brand(const char *what)
switch (brand)
{
case SPWPN_FLAMING:
- case SPWPN_FLAME:
calc_elemental_brand_damage(BEAM_FIRE, defender->res_fire(),
defender->is_icy() ? "melt" : "burn",
what);
@@ -1673,7 +1667,6 @@ bool attack::apply_damage_brand(const char *what)
break;
case SPWPN_FREEZING:
- case SPWPN_FROST:
calc_elemental_brand_damage(BEAM_COLD, defender->res_cold(), "freeze",
what);
defender->expose_to_element(BEAM_COLD, 2);
diff --git a/crawl-ref/source/dat/des/branches/depths_encompass.des b/crawl-ref/source/dat/des/branches/depths_encompass.des
index c08f822f18..f5727ded24 100644
--- a/crawl-ref/source/dat/des/branches/depths_encompass.des
+++ b/crawl-ref/source/dat/des/branches/depths_encompass.des
@@ -655,7 +655,7 @@ NAME: hangedman_crystal_crosses_colossus
TAGS: no_monster_gen no_item_gen no_pool_fixup uniq_d_encompass
ORIENT: encompass
MONS: deep elf conjurer / deep elf knight w:7 / wizard / ogre mage / \
- centaur warrior w:8 ; shortbow ego:flame | shortbow ego:frost . arrow / \
+ centaur warrior w:8 ; shortbow ego:flaming | shortbow ego:freezing . arrow / \
two-headed ogre w:5 ; great mace ego:freezing ident:type . \
great mace ego:flaming ident:type / efreet w:5 / \
rakshasa w:5 ; wand of flame | wand of frost . whip . robe
@@ -671,7 +671,7 @@ MONS: very ugly thing w:15 / shapeshifter / unseen horror w:15 / \
dire flail w:5 ego:flaming | dire flail w:5 ego:freezing
MONS: frost giant w:5 / fire giant w:5 / naga mage w:15 / hell knight w:5 / \
salamander mystic w:5 / spriggan air mage / deep troll earth mage / \
- yaktaur captain ; crossbow ego:flame | crossbow ego:frost . bolt / \
+ yaktaur captain ; crossbow ego:flaming | crossbow ego:freezing . bolt / \
rakshasa w:5 ; robe . wand of fire | wand of cold . \
glaive w:2 ego:flaming | glaive w:2 ego:freezing
MONS: lorocyproca w:5 / fire dragon perm_ench:shapeshifter w:12 / fire dragon w:3 / \
diff --git a/crawl-ref/source/dat/des/branches/elf.des b/crawl-ref/source/dat/des/branches/elf.des
index 572ef70a67..0bba6bf070 100644
--- a/crawl-ref/source/dat/des/branches/elf.des
+++ b/crawl-ref/source/dat/des/branches/elf.des
@@ -762,7 +762,7 @@ MONS: deep elf conjurer / deep elf mage / deep elf summoner
MONS: deep elf annihilator / deep elf death mage / deep elf demonologist
KFEAT: v = general shop type:Elven suffix:Fire count:7 ; \
w:10 ring of fire | w:5 scroll of immolation | w:10 ring of protection from fire | \
- w:4 any weapon ego:flaming | w:4 shortbow ego:flame | w:12 arrow ego:flame | \
+ w:4 any weapon ego:flaming | w:4 shortbow ego:flaming | w:12 arrow ego:flame | \
w:7 wand of flame | w:5 wand of fire | w:3 wand of fireball | \
w:4 staff of fire | w:17 randbook disc:fire | w:6 robe ego:fire_resistance | \
w:9 any armour ego:fire_resistance
diff --git a/crawl-ref/source/dat/des/branches/orc.des b/crawl-ref/source/dat/des/branches/orc.des
index 562a9030c1..4c2dc1251a 100644
--- a/crawl-ref/source/dat/des/branches/orc.des
+++ b/crawl-ref/source/dat/des/branches/orc.des
@@ -881,7 +881,7 @@ NAME: mines_bat_river
TAGS: no_item_gen no_monster_gen no_pool_fixup
DEPTH: Orc
MONS: bat
-MONS: generate_awake orc ; shortbow ego:flame | shortbow ego:frost | shortbow ego:vorpal . arrow q:10
+MONS: generate_awake orc ; shortbow ego:flaming | shortbow ego:freezing | shortbow ego:vorpal . arrow q:10
NSUBST: . = 2:2 / 2:c
NSUBST: c = *: 2 .
KITEM: d = arrow q:1
diff --git a/crawl-ref/source/dat/des/portals/icecave.des b/crawl-ref/source/dat/des/portals/icecave.des
index b32d30d8bf..91f29f3f2d 100644
--- a/crawl-ref/source/dat/des/portals/icecave.des
+++ b/crawl-ref/source/dat/des/portals/icecave.des
@@ -213,8 +213,8 @@ function ice_cave_caverns_natural_giant_loot(e)
glaive " .. goodfreezeweap .. " w:4 / \
great sword " .. goodfreezeweap .. " w:2 / nothing")
e.item("book of ice / randbook disc:ice numspells:6 w:2 / \
- crossbow ego:frost good_item no_uniq ident:type / \
- longbow ego:frost good_item no_uniq ident:type / nothing w:20")
+ crossbow ego:freezing good_item no_uniq ident:type / \
+ longbow ego:freezing good_item no_uniq ident:type / nothing w:20")
e.item("ring of ice / ring of protection from cold / wand of cold / \
arrow ego:frost q:25 / bolt ego:frost q:20 / nothing")
end
diff --git a/crawl-ref/source/dat/des/portals/volcano.des b/crawl-ref/source/dat/des/portals/volcano.des
index 83167f6a55..5028cf778c 100644
--- a/crawl-ref/source/dat/des/portals/volcano.des
+++ b/crawl-ref/source/dat/des/portals/volcano.des
@@ -177,10 +177,7 @@ end
function make_fiery_weapon (e, weapon)
local weapon_string = ""
for _, wt in ipairs(weapon) do
- if string.find(wt, "bow") == nil
- then weapon_string = weapon_string .. " / " .. wt .. " ego:flaming ident:type good_item"
- else weapon_string = weapon_string .. " / " .. wt .. " ego:flame ident:type good_item"
- end
+ weapon_string = weapon_string .. " / " .. wt .. " ego:flaming ident:type good_item"
end
local n_weapon = string.gsub(weapon_string, "%s*/$", "")
e.item(n_weapon)
@@ -250,7 +247,7 @@ function fiery_guardians (e, intelligent, village)
local ogrestuff = "great mace " .. flame .. " | giant club " .. flame
local centaur = "centaur ; shortbow ego:none . arrow ego:flame"
local centaurstuff = "robe " .. res
- .. " . shortbow ego:flame ident:type . arrow"
+ .. " . shortbow ego:flaming ident:type . arrow"
local elfstuff = "long sword " .. flame
.. " | short sword " .. flame
.. " . leather armour " .. res
diff --git a/crawl-ref/source/dat/des/sprint/sprint_mu.des b/crawl-ref/source/dat/des/sprint/sprint_mu.des
index bb5c036b7e..56d9a18208 100644
--- a/crawl-ref/source/dat/des/sprint/sprint_mu.des
+++ b/crawl-ref/source/dat/des/sprint/sprint_mu.des
@@ -1156,7 +1156,7 @@ KMONS: 2 = patrolling mara
KMONS: 3 = molten gargoyle
KMONS: 4 = patrolling titanic slime creature
KMONS: 5 = generate_awake curse skull
-KMONS: f = skeletal warrior ; longbow ego:flame . arrow q:30
+KMONS: f = skeletal warrior ; longbow ego:flaming . arrow q:30
KMONS: 6 = shadow wraith
KMONS: g = ball lightning / giant spore
KMONS: 7 = patrolling storm dragon
diff --git a/crawl-ref/source/dat/des/variable/float.des b/crawl-ref/source/dat/des/variable/float.des
index 24120240e7..62e1b8ad69 100644
--- a/crawl-ref/source/dat/des/variable/float.des
+++ b/crawl-ref/source/dat/des/variable/float.des
@@ -2281,8 +2281,8 @@ NAME: hangedman_opposites_gauntlet
TAGS: no_monster_gen patrolling
ORIENT: float
DEPTH: D:14-15, Depths, !Depths:$
-MONS: orc knight ; wand of frost . crossbow ego:flame . bolt ego:none . chain mail / \
- orc knight ; wand of flame . crossbow ego:frost . bolt ego:none . chain mail
+MONS: orc knight ; wand of frost . crossbow ego:flaming . bolt ego:none . chain mail / \
+ orc knight ; wand of flame . crossbow ego:freezing . bolt ego:none . chain mail
MONS: ettin ; giant club ego:holy_wrath ident:type . great mace ego:draining ident:type
MONS: rakshasa ; scythe ego:antimagic | trident ego:antimagic / \
mermaid ; chain mail . javelin ego:poisoned
@@ -2743,7 +2743,7 @@ MONS: flying skull
ITEM: bolt ego:exploding q:5
ITEM: potion of heal wounds
ITEM: plate armour good_item
-ITEM: crossbow ego:flame w:9 ident:type / crossbow unrand:hellfire w:1
+ITEM: crossbow ego:flaming w:9 ident:type / crossbow unrand:hellfire w:1
SUBST: ( = ()
TILE: c = wall_marble
MAP
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 3548f6f11c..ba58a13ce2 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -860,21 +860,37 @@ static string _describe_weapon(const item_def &item, bool verbose)
switch (spec_ench)
{
case SPWPN_FLAMING:
- description += "It emits flame when wielded, causing extra "
- "injury to most foes and up to double damage against "
- "particularly susceptible opponents.";
- if (damtype == DVORP_SLICING || damtype == DVORP_CHOPPING)
+ if (is_range_weapon(item))
{
- description += " Big, fiery blades are also staple armaments "
- "of hydra-hunters.";
+ description += "It turns projectiles fired from it into "
+ "bolts of flame.";
+ }
+ else
+ {
+ description += "It emits flame when wielded, causing extra "
+ "injury to most foes and up to double damage against "
+ "particularly susceptible opponents.";
+ if (damtype == DVORP_SLICING || damtype == DVORP_CHOPPING)
+ {
+ description += " Big, fiery blades are also staple armaments "
+ "of hydra-hunters.";
+ }
}
break;
case SPWPN_FREEZING:
- description += "It has been specially enchanted to freeze "
- "those struck by it, causing extra injury to most foes "
- "and up to double damage against particularly "
- "susceptible opponents. It can also slow down "
- "cold-blooded creatures.";
+ if (is_range_weapon(item))
+ {
+ description += "It turns projectiles fired from it into "
+ "bolts of frost.";
+ }
+ else
+ {
+ description += "It has been specially enchanted to freeze "
+ "those struck by it, causing extra injury to most foes "
+ "and up to double damage against particularly "
+ "susceptible opponents. It can also slow down "
+ "cold-blooded creatures.";
+ }
break;
case SPWPN_HOLY_WRATH:
description += "It has been blessed by the Shining One to "
@@ -931,14 +947,6 @@ static string _describe_weapon(const item_def &item, bool verbose)
"enemies.";
}
break;
- case SPWPN_FLAME:
- description += "It turns projectiles fired from it into "
- "bolts of flame.";
- break;
- case SPWPN_FROST:
- description += "It turns projectiles fired from it into "
- "bolts of frost.";
- break;
case SPWPN_CHAOS:
if (is_range_weapon(item))
{
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index c4367ebb50..94ecdf1bfd 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -224,12 +224,12 @@ void ghost_demon::init_random_demon()
|| brand == SPWPN_ORC_SLAYING
|| brand == SPWPN_RETURNING
|| brand == SPWPN_REACHING
+ || brand == SPWPN_FLAME
+ || brand == SPWPN_FROST
#endif
|| brand == SPWPN_DRAGON_SLAYING
|| brand == SPWPN_PROTECTION
|| brand == SPWPN_EVASION
- || brand == SPWPN_FLAME
- || brand == SPWPN_FROST
);
}
diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc
index c1fb6394ff..41811cd858 100644
--- a/crawl-ref/source/goditem.cc
+++ b/crawl-ref/source/goditem.cc
@@ -456,7 +456,7 @@ bool is_fiery_item(const item_def& item)
case OBJ_WEAPONS:
{
const int item_brand = get_weapon_brand(item);
- if (item_brand == SPWPN_FLAMING || item_brand == SPWPN_FLAME)
+ if (item_brand == SPWPN_FLAMING)
return true;
}
break;
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index dddd3d0f15..f643c6d757 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2123,7 +2123,6 @@ static bool _god_hates_brand(const int brand)
if (you_worship(GOD_DITHMENOS)
&& (brand == SPWPN_FLAMING
- || brand == SPWPN_FLAME
|| brand == SPWPN_CHAOS))
{
return true;
@@ -2150,8 +2149,8 @@ static void _rebrand_weapon(item_def& wpn)
if (is_range_weapon(wpn))
{
new_brand = random_choose_weighted(
- 30, SPWPN_FLAME,
- 30, SPWPN_FROST,
+ 30, SPWPN_FLAMING,
+ 30, SPWPN_FREEZING,
20, SPWPN_VENOM,
20, SPWPN_VORPAL,
12, SPWPN_EVASION,
@@ -2198,13 +2197,11 @@ static void _brand_weapon(item_def &wpn)
mprf("%s emits a brilliant flash of light!",itname.c_str());
break;
- case SPWPN_FLAME:
case SPWPN_FLAMING:
flash_colour = RED;
mprf("%s is engulfed in flames!", itname.c_str());
break;
- case SPWPN_FROST:
case SPWPN_FREEZING:
flash_colour = LIGHTCYAN;
mprf("%s is covered with a thin layer of ice!", itname.c_str());
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 65645ad48d..fae13ca525 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -456,11 +456,11 @@ const char* weapon_brand_name(const item_def& item, bool terse)
case SPWPN_DRAGON_SLAYING: return terse ? "slay drac" : "dragon slaying";
case SPWPN_VENOM: return terse ? "venom" : "venom";
case SPWPN_PROTECTION: return terse ? "protect" : "protection";
- case SPWPN_EVASION: return terse ? "evade" : "evasion";
case SPWPN_DRAINING: return terse ? "drain" : "draining";
case SPWPN_SPEED: return terse ? "speed" : "speed";
case SPWPN_PAIN: return terse ? "pain" : "pain";
case SPWPN_DISTORTION: return terse ? "distort" : "distortion";
+ case SPWPN_REAPING: return terse ? "reap" : "reaping";
case SPWPN_VAMPIRICISM:
return terse ? "vamp" : ""; // non-terse already handled
@@ -485,11 +485,9 @@ const char* weapon_brand_name(const item_def& item, bool terse)
case SPWPN_ANTIMAGIC: return terse ? "antimagic" : ""; // non-terse
// handled elsewhere
- // ranged weapon brands
- case SPWPN_FLAME: return terse ? "flame" : "flame";
- case SPWPN_FROST: return terse ? "frost" : "frost";
+ // ranged
case SPWPN_PENETRATION: return terse ? "penet" : "penetration";
- case SPWPN_REAPING: return terse ? "reap" : "reaping";
+ case SPWPN_EVASION: return terse ? "evade" : "evasion";
// both ranged and non-ranged
case SPWPN_CHAOS: return terse ? "chaos" : "chaos";
@@ -500,6 +498,8 @@ const char* weapon_brand_name(const item_def& item, bool terse)
case SPWPN_REACHING: return terse ? "obsolete" : "reaching";
case SPWPN_RETURNING: return terse ? "obsolete" : "returning";
case SPWPN_CONFUSE: return terse ? "confuse" : "confusion";
+ case SPWPN_FLAME: return terse ? "obsolete" : "flame";
+ case SPWPN_FROST: return terse ? "obsolete" : "frost";
#endif
default: return terse ? "buggy" : "bugginess";
}
diff --git a/crawl-ref/source/itemprop-enum.h b/crawl-ref/source/itemprop-enum.h
index c9d0ec51d9..34aacf5145 100644
--- a/crawl-ref/source/itemprop-enum.h
+++ b/crawl-ref/source/itemprop-enum.h
@@ -86,8 +86,10 @@ enum brand_type // item_def.special
SPWPN_DRAINING,
SPWPN_SPEED,
SPWPN_VORPAL,
+#if TAG_MAJOR_VERSION == 34
SPWPN_FLAME, // ranged, only
SPWPN_FROST, // ranged, only
+#endif
SPWPN_VAMPIRICISM,
SPWPN_PAIN,
SPWPN_ANTIMAGIC,
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 63f83a6924..9adde8bd74 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -1117,19 +1117,13 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level)
case WPN_SHORTBOW:
case WPN_LONGBOW:
case WPN_CROSSBOW:
- {
- const int tmp = random2(1000);
- if (tmp < 480)
- rc = SPWPN_FLAME;
- else if (tmp < 730)
- rc = SPWPN_FROST;
- else if (tmp < 880)
- rc = SPWPN_EVASION;
- else if (tmp < 990)
- rc = SPWPN_VORPAL;
-
+ rc = random_choose_weighted(48, SPWPN_FLAMING,
+ 25, SPWPN_FREEZING,
+ 15, SPWPN_EVASION,
+ 11, SPWPN_VORPAL,
+ 1, SPWPN_NORMAL,
+ 0);
break;
- }
case WPN_BLOWGUN:
if (one_chance_in(30))
@@ -1274,11 +1268,11 @@ bool is_weapon_brand_ok(int type, int brand, bool strict)
case SPWPN_CHAOS:
case SPWPN_HOLY_WRATH:
case SPWPN_ELECTROCUTION:
+ case SPWPN_FLAMING:
+ case SPWPN_FREEZING:
break;
// Melee-only brands.
- case SPWPN_FLAMING:
- case SPWPN_FREEZING:
case SPWPN_DRAGON_SLAYING:
case SPWPN_DRAINING:
case SPWPN_VAMPIRICISM:
@@ -1291,8 +1285,6 @@ bool is_weapon_brand_ok(int type, int brand, bool strict)
break;
// Ranged-only brands.
- case SPWPN_FLAME:
- case SPWPN_FROST:
case SPWPN_PENETRATION:
case SPWPN_EVASION:
if (!is_range_weapon(item))
@@ -1304,6 +1296,8 @@ bool is_weapon_brand_ok(int type, int brand, bool strict)
case SPWPN_RETURNING:
case SPWPN_REACHING:
case SPWPN_ORC_SLAYING:
+ case SPWPN_FLAME:
+ case SPWPN_FROST:
return false;
#endif
diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc
index 52169da254..6529a4b3fe 100644
--- a/crawl-ref/source/mon-gear.cc
+++ b/crawl-ref/source/mon-gear.cc
@@ -913,7 +913,7 @@ static void _give_weapon(monster* mon, int level, bool melee_only = false,
item.plus += 1 + random2(3);
item.plus2 += 1 + random2(3);
item.flags |= ISFLAG_KNOW_TYPE;
- set_item_ego_type(item, OBJ_WEAPONS, SPWPN_FLAME);
+ set_item_ego_type(item, OBJ_WEAPONS, SPWPN_FLAMING);
break;
case MONS_YAKTAUR:
@@ -1264,7 +1264,7 @@ static void _give_weapon(monster* mon, int level, bool melee_only = false,
if (is_range_weapon(item))
{
- set_item_ego_type(item, OBJ_WEAPONS, SPWPN_FLAME);
+ set_item_ego_type(item, OBJ_WEAPONS, SPWPN_FLAMING);
item.flags |= ISFLAG_KNOW_TYPE;
}
@@ -1649,7 +1649,7 @@ static void _give_ammo(monster* mon, int level, bool mons_summoned)
const int bow_brand = get_weapon_brand(*launcher);
const int ammo_brand = get_ammo_brand(mitm[thing_created]);
if (ammo_brand != SPMSL_NORMAL
- && (bow_brand == SPWPN_FLAME || bow_brand == SPWPN_FROST))
+ && (bow_brand == SPWPN_FLAMING || bow_brand == SPWPN_FREEZING))
{
mitm[thing_created].special = SPMSL_NORMAL;
}
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 0b3267fcc2..bbd8393cf2 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -876,7 +876,8 @@ void monster::equip_weapon(item_def &item, int near, bool msg)
mpr("It bursts into flame!");
break;
case SPWPN_FREEZING:
- mpr("It glows with a cold blue light!");
+ mpr(is_range_weapon(item) ? "It is covered in frost."
+ : "It glows with a cold blue light!");
break;
case SPWPN_HOLY_WRATH:
mpr("It softly glows with a divine radiance!");
@@ -890,12 +891,6 @@ void monster::equip_weapon(item_def &item, int near, bool msg)
case SPWPN_DRAINING:
mpr("You sense an unholy aura.");
break;
- case SPWPN_FLAME:
- mpr("It bursts into flame!");
- break;
- case SPWPN_FROST:
- mpr("It is covered in frost.");
- break;
case SPWPN_DISTORTION:
mpr("Its appearance distorts for a moment.");
break;
@@ -1386,9 +1381,9 @@ static bool _nonredundant_launcher_ammo_brands(item_def *launcher,
switch (ammo_brand)
{
case SPMSL_FLAME:
- return bow_brand != SPWPN_FLAME;
+ return bow_brand != SPWPN_FLAMING;
case SPMSL_FROST:
- return bow_brand != SPWPN_FROST;
+ return bow_brand != SPWPN_FREEZING;
case SPMSL_CHAOS:
return bow_brand != SPWPN_CHAOS;
case SPMSL_PENETRATION:
diff --git a/crawl-ref/source/player-equip.cc b/crawl-ref/source/player-equip.cc
index 981383d3e7..dccfc45665 100644
--- a/crawl-ref/source/player-equip.cc
+++ b/crawl-ref/source/player-equip.cc
@@ -504,7 +504,8 @@ static void _equip_weapon_effect(item_def& item, bool showMsgs, bool unmeld)
break;
case SPWPN_FREEZING:
- mpr("It glows with a cold blue light!");
+ mpr(is_range_weapon(item) ? "It is covered in frost."
+ : "It glows with a cold blue light!");
break;
case SPWPN_HOLY_WRATH:
@@ -546,14 +547,6 @@ static void _equip_weapon_effect(item_def& item, bool showMsgs, bool unmeld)
you.hand_name(true).c_str());
break;
- case SPWPN_FLAME:
- mpr("It bursts into flame!");
- break;
-
- case SPWPN_FROST:
- mpr("It is covered in frost.");
- break;
-
case SPWPN_VAMPIRICISM:
if (you.species == SP_VAMPIRE)
{
diff --git a/crawl-ref/source/player-reacts.cc b/crawl-ref/source/player-reacts.cc
index 656c8369de..aba6e50da5 100644
--- a/crawl-ref/source/player-reacts.cc
+++ b/crawl-ref/source/player-reacts.cc
@@ -532,16 +532,12 @@ static void _decrement_durations()
else
msg = " feels lighter.";
break;
- case SPWPN_FLAME:
case SPWPN_FLAMING:
msg = " goes out.";
break;
case SPWPN_FREEZING:
msg = " stops glowing.";
break;
- case SPWPN_FROST:
- msg = "'s frost melts away.";
- break;
case SPWPN_VENOM:
msg = " stops dripping with poison.";
break;
diff --git a/crawl-ref/source/ranged_attack.cc b/crawl-ref/source/ranged_attack.cc
index e87955c9c3..6e03cbee38 100644
--- a/crawl-ref/source/ranged_attack.cc
+++ b/crawl-ref/source/ranged_attack.cc
@@ -422,8 +422,6 @@ bool ranged_attack::apply_damage_brand(const char *what)
|| brand == SPWPN_HOLY_WRATH
|| brand == SPWPN_ELECTROCUTION
|| brand == SPWPN_VENOM
- || brand == SPWPN_FLAME
- || brand == SPWPN_FROST
|| brand == SPWPN_CHAOS))
{
return false;
@@ -656,8 +654,7 @@ bool ranged_attack::apply_missile_brand()
break;
case SPMSL_FLAME:
if (using_weapon()
- && (get_weapon_brand(*weapon) == SPWPN_FROST
- || get_weapon_brand(*weapon) == SPWPN_FREEZING))
+ && get_weapon_brand(*weapon) == SPWPN_FREEZING)
{
break;
}
@@ -669,8 +666,7 @@ bool ranged_attack::apply_missile_brand()
break;
case SPMSL_FROST:
if (using_weapon()
- && (get_weapon_brand(*weapon) == SPWPN_FLAME
- || get_weapon_brand(*weapon) == SPWPN_FLAMING))
+ && get_weapon_brand(*weapon) == SPWPN_FLAMING)
{
break;
}
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index b1529b8bf2..1be6f2c411 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -1078,10 +1078,8 @@ unsigned int item_value(item_def item, bool ident)
case SPWPN_CHAOS:
case SPWPN_DRAINING:
- case SPWPN_FLAME:
case SPWPN_FLAMING:
case SPWPN_FREEZING:
- case SPWPN_FROST:
case SPWPN_HOLY_WRATH:
valued *= 18;
break;
diff --git a/crawl-ref/source/spl-wpnench.cc b/crawl-ref/source/spl-wpnench.cc
index 59b1417ecd..a7b2b98f42 100644
--- a/crawl-ref/source/spl-wpnench.cc
+++ b/crawl-ref/source/spl-wpnench.cc
@@ -23,9 +23,7 @@ static special_missile_type _convert_to_missile(brand_type which_brand)
switch (which_brand)
{
case SPWPN_NORMAL: return SPMSL_NORMAL;
- case SPWPN_FLAME: // deliberate fall through
case SPWPN_FLAMING: return SPMSL_FLAME;
- case SPWPN_FROST: // deliberate fall through
case SPWPN_FREEZING: return SPMSL_FROST;
case SPWPN_VENOM: return SPMSL_POISONED;
case SPWPN_CHAOS: return SPMSL_CHAOS;
@@ -34,26 +32,13 @@ static special_missile_type _convert_to_missile(brand_type which_brand)
}
}
-// Some launchers need to convert different brands.
-static brand_type _convert_to_launcher(brand_type which_brand)
-{
- switch (which_brand)
- {
- case SPWPN_FREEZING: return SPWPN_FROST;
- case SPWPN_FLAMING: return SPWPN_FLAME;
- default: return which_brand;
- }
-}
-
static bool _ok_for_launchers(brand_type which_brand)
{
switch (which_brand)
{
case SPWPN_NORMAL:
case SPWPN_FREEZING:
- case SPWPN_FROST:
case SPWPN_FLAMING:
- case SPWPN_FLAME:
case SPWPN_VENOM:
//case SPWPN_PAIN: -- no pain missile type yet
case SPWPN_CHAOS:
@@ -115,10 +100,6 @@ spret_type brand_weapon(brand_type which_brand, int power, bool fail)
mpr("You cannot enchant this weapon with this spell.");
return SPRET_ABORT;
}
-
- // Otherwise, convert to the correct brand type, most specifically (but
- // not necessarily only) flaming -> flame, freezing -> frost.
- which_brand = _convert_to_launcher(which_brand);
}
fail_check();
@@ -137,19 +118,13 @@ spret_type brand_weapon(brand_type which_brand, int power, bool fail)
int duration_affected = 10;
switch (which_brand)
{
- case SPWPN_FLAME:
case SPWPN_FLAMING:
msg += " bursts into flame!";
duration_affected = 7;
break;
- case SPWPN_FROST:
- msg += " frosts over!";
- duration_affected = 7;
- break;
-
case SPWPN_FREEZING:
- msg += " glows blue.";
+ msg += is_range_weapon(weapon) ? " frosts over!" : " glows blue.";
duration_affected = 7;
break;
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index f1b9748832..abc42fafa7 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -3692,6 +3692,13 @@ void unmarshallItem(reader &th, item_def &item)
item.special = SPWPN_NORMAL;
}
+ // Not putting these in a minor tag since it's possible for an old
+ // random monster spawn list to place flame/frost weapons.
+ if (item.base_type == OBJ_WEAPONS && item.special == SPWPN_FROST)
+ item.special = SPWPN_FREEZING;
+ if (item.base_type == OBJ_WEAPONS && item.special == SPWPN_FLAME)
+ item.special = SPWPN_FLAMING;
+
if (item.base_type == OBJ_MISCELLANY && item.sub_type == MISC_HORN_OF_GERYON
&& th.getMinorVersion() < TAG_MINOR_HORN_GERYON_CHANGE)
{
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 32b7358924..5a37f22d91 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -956,7 +956,7 @@ static bool _choose_chaos_upgrade(const monster* mon)
// If the launcher alters its ammo, then branding the
// monster's ammo won't be an upgrade.
int brand = get_weapon_brand(item);
- if (brand == SPWPN_FLAME || brand == SPWPN_FROST
+ if (brand == SPWPN_FLAMING || brand == SPWPN_FREEZING
|| brand == SPWPN_VENOM)
{
special_launcher = true;