summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ng-setup.cc
diff options
context:
space:
mode:
authorChris Oelmueller <chris.oelmueller@gmail.com>2014-04-11 05:03:21 +0200
committerNicholas Feinberg <pleasingfung@gmail.com>2014-06-14 23:00:53 -0700
commitc9d9781072485459e38ff57c97428b82801c0d31 (patch)
tree472195f48b8308c50f81702329bdb042ba45d8d3 /crawl-ref/source/ng-setup.cc
parent1d2420bf267a70c4c379992b6665f997d00b70d2 (diff)
downloadcrawl-ref-c9d9781072485459e38ff57c97428b82801c0d31.tar.gz
crawl-ref-c9d9781072485459e38ff57c97428b82801c0d31.zip
Plus2: Merge plusses in items given at new-game setup.
Diffstat (limited to 'crawl-ref/source/ng-setup.cc')
-rw-r--r--crawl-ref/source/ng-setup.cc40
1 files changed, 18 insertions, 22 deletions
diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc
index 8aa5fc56f2..18c5356d72 100644
--- a/crawl-ref/source/ng-setup.cc
+++ b/crawl-ref/source/ng-setup.cc
@@ -34,7 +34,7 @@
#define MIN_START_STAT 3
static void _newgame_give_item(object_class_type base, int sub_type,
- int qty = 1, int plus = 0, int plus2 = 0);
+ int qty = 1, int plus = 0);
static void _init_player()
{
@@ -350,10 +350,10 @@ void give_basic_mutations(species_type speci)
static void _newgame_make_item_tutorial(int slot, equipment_type eqslot,
object_class_type base,
int sub_type, int replacement = -1,
- int qty = 1, int plus = 0, int plus2 = 0)
+ int qty = 1, int plus = 0)
{
newgame_make_item(slot, eqslot, base, sub_type, replacement, qty, plus,
- plus2, true);
+ true);
}
// Creates an item of a given base and sub type.
@@ -362,7 +362,7 @@ static void _newgame_make_item_tutorial(int slot, equipment_type eqslot,
void newgame_make_item(int slot, equipment_type eqslot,
object_class_type base,
int sub_type, int replacement,
- int qty, int plus, int plus2, bool force_tutorial)
+ int qty, int plus, bool force_tutorial)
{
// Don't set normal equipment in the tutorial.
if (!force_tutorial && crawl_state.game_is_tutorial())
@@ -399,7 +399,6 @@ void newgame_make_item(int slot, equipment_type eqslot,
item.sub_type = sub_type;
item.quantity = qty;
item.plus = plus;
- item.plus2 = plus2;
item.special = 0;
if (is_deck(item))
@@ -439,9 +438,9 @@ void newgame_make_item(int slot, equipment_type eqslot,
}
static void _newgame_give_item(object_class_type base, int sub_type,
- int qty, int plus, int plus2)
+ int qty, int plus)
{
- newgame_make_item(-1, EQ_NONE, base, sub_type, -1, qty, plus, plus2);
+ newgame_make_item(-1, EQ_NONE, base, sub_type, -1, qty, plus);
}
static void _newgame_clear_item(int slot)
@@ -488,7 +487,7 @@ static void _update_weapon(const newgame_def& ng)
}
break;
case WPN_SHORTBOW:
- newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_SHORTBOW, -1, 1, plus, plus);
+ newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_SHORTBOW, -1, 1, plus);
newgame_make_item(2, EQ_NONE, OBJ_MISSILES, MI_ARROW, -1, 20);
autopickup_starting_ammo(MI_ARROW);
@@ -496,7 +495,7 @@ static void _update_weapon(const newgame_def& ng)
you.equip[EQ_WEAPON] = 1;
break;
case WPN_CROSSBOW:
- newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_CROSSBOW, -1, 1, plus, plus);
+ newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_CROSSBOW, -1, 1, plus);
newgame_make_item(2, EQ_NONE, OBJ_MISSILES, MI_BOLT, -1, 20);
autopickup_starting_ammo(MI_BOLT);
@@ -504,7 +503,7 @@ static void _update_weapon(const newgame_def& ng)
you.equip[EQ_WEAPON] = 1;
break;
case WPN_SLING:
- newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_SLING, -1, 1, plus, plus);
+ newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_SLING, -1, 1, plus);
newgame_make_item(2, EQ_NONE, OBJ_MISSILES, MI_SLING_BULLET, -1, 20);
autopickup_starting_ammo(MI_SLING_BULLET);
@@ -643,8 +642,7 @@ static void _give_items_skills(const newgame_def& ng)
you.religion = GOD_YREDELEMNUL;
you.piety = 35;
- newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_SHORT_SWORD, -1, 1,
- 1, 1);
+ newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_SHORT_SWORD, -1, 1, +1);
_update_weapon(ng);
newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_LEATHER_ARMOUR,
@@ -663,8 +661,7 @@ static void _give_items_skills(const newgame_def& ng)
you.char_direction = GDT_GAME_START;
you.piety = 38;
- newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_SHORT_SWORD, -1, 1,
- 1, 1);
+ newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_SHORT_SWORD, -1, 1, +1);
_update_weapon(ng);
newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_LEATHER_ARMOUR,
@@ -688,7 +685,7 @@ static void _give_items_skills(const newgame_def& ng)
you.equip[EQ_WEAPON] = -1;
- newgame_make_item(0, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE, -1, 1, 1);
+ newgame_make_item(0, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE, -1, 1, +1);
newgame_make_item(1, EQ_NONE, OBJ_POTIONS, POT_CURING);
newgame_make_item(2, EQ_NONE, OBJ_POTIONS, POT_HEAL_WOUNDS);
@@ -698,7 +695,7 @@ static void _give_items_skills(const newgame_def& ng)
break;
case JOB_SKALD:
- newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_SHORT_SWORD, -1, 1, 0, 0);
+ newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_SHORT_SWORD, -1, 1, +0);
_update_weapon(ng);
newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_LEATHER_ARMOUR,
@@ -775,9 +772,8 @@ static void _give_items_skills(const newgame_def& ng)
break;
case JOB_ENCHANTER:
- newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_DAGGER, -1, 1, 1,
- 1);
- newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE, -1, 1, 1);
+ newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_DAGGER, -1, 1, +1);
+ newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE, -1, 1, +1);
newgame_make_item(2, EQ_NONE, OBJ_BOOKS, BOOK_MALEDICT);
if (you.species == SP_OGRE || you.species == SP_TROLL)
@@ -887,7 +883,7 @@ static void _give_items_skills(const newgame_def& ng)
break;
case JOB_ASSASSIN:
- newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_DAGGER, -1, 1, 2, 2);
+ newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_DAGGER, -1, 1, +2);
newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_BLOWGUN);
newgame_make_item(2, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE);
@@ -927,7 +923,7 @@ static void _give_items_skills(const newgame_def& ng)
if (you.species == SP_OGRE)
{
you.inv[0].sub_type = WPN_CLUB;
- you.inv[0].plus = you.inv[0].plus2 = 1;
+ you.inv[0].plus = 1;
}
// Skills.
@@ -964,7 +960,7 @@ static void _give_items_skills(const newgame_def& ng)
if (you.species == SP_OGRE)
{
you.inv[0].sub_type = WPN_CLUB;
- you.inv[0].plus = you.inv[0].plus2 = 1;
+ you.inv[0].plus = 1;
}
// Skills