diff --git a/data/json/item_groups.json b/data/json/item_groups.json index c59d3bde20bc3..e1db476ee9e14 100644 --- a/data/json/item_groups.json +++ b/data/json/item_groups.json @@ -655,6 +655,8 @@ "id" : "homeguns", "items":[ ["blowgun", 5], + ["moss_brownie", 2], + ["cop_38", 4], ["rm228", 3], ["dart", 5], ["22_lr", 9], @@ -2983,6 +2985,8 @@ ["rifle_flint", 5], ["pistol_flint", 5], ["flint_ammo", 5], + ["moss_brownie", 5], + ["cop_38", 5], ["cigar", 5], ["television", 10], ["microwave", 5], diff --git a/data/json/items/ranged.json b/data/json/items/ranged.json index 6fc0708317789..582bc2c9cf0b9 100644 --- a/data/json/items/ranged.json +++ b/data/json/items/ranged.json @@ -2860,7 +2860,7 @@ "to_hit": -1, "ranged_damage": 0, "range": 5, - "dispersion": 14, + "dispersion": 25, "recoil": 2, "durability": 6, "burst": 0, @@ -2873,7 +2873,7 @@ "symbol": "(", "color": "brown", "name": "flintlock pistol", - "description": "A flintlock rifle. It has a hollow handle, containing a short cleaning rod.", + "description": "A flintlock pistol. It has a hollow handle, containing a short cleaning rod.", "price": 350, "material": ["iron", "wood"], "skill": "pistol", @@ -2885,11 +2885,63 @@ "to_hit": -1, "ranged_damage": -2, "range": 3, - "dispersion": 21, + "dispersion": 30, "recoil": 8, "durability": 6, "burst": 0, "clip_size": 1, "reload": 800 + }, + { + "id": "moss_brownie", + "type": "GUN", + "symbol": "(", + "color": "brown", + "name": "Mossberg Brownie", + "description": "A four-barreled, .22 Long Rifle pistol, similar to a derringer or pepperbox, produced by O.F. Mossberg & Sons from 1920 to 1932.", + "price": 1100, + "material": ["steel", "wood"], + "flags": "RELOAD_ONE", + "skill": "pistol", + "ammo": "22", + "weight": 364, + "volume": 3, + "bashing": 5, + "cutting": 0, + "to_hit": -1, + "ranged_damage": 0, + "range": 3, + "dispersion": 20, + "recoil": 2, + "durability": 6, + "burst": 0, + "clip_size": 4, + "reload": 100 + }, + { + "id": "cop_38", + "type": "GUN", + "symbol": "(", + "color": "brown", + "name": "COP .38", + "description": "The COP 38 is a four-shot derringer-type pistol chambered for the .38 round. It was designed by Robert Hillberg, based on his earlier work on the Hillberg Insurgency Weapon.", + "price": 1200, + "material": ["steel", "wood"], + "flags": "RELOAD_ONE", + "skill": "pistol", + "ammo": "38", + "weight": 857, + "volume": 3, + "bashing": 5, + "cutting": 0, + "to_hit": -1, + "ranged_damage": -2, + "range": 3, + "dispersion": 15, + "recoil": 2, + "durability": 6, + "burst": 0, + "clip_size": 4, + "reload": 100 } ] diff --git a/src/game.cpp b/src/game.cpp index efbc4199003d2..ccb44ca6560a2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2632,7 +2632,7 @@ void game::update_scent() (m.move_cost_ter_furn(x,y+1) > 0 || m.has_flag("BASHABLE",x,y+1)) ; } } - + for (int x = u.posx - SCENT_RADIUS; x <= u.posx + SCENT_RADIUS; x++) { for (int y = u.posy - SCENT_RADIUS; y <= u.posy + SCENT_RADIUS; y++) { const int move_cost = m.move_cost_ter_furn(x, y); @@ -2642,7 +2642,7 @@ void game::update_scent() int squares_used = squares_used_y[x-1][y] + squares_used_y[x][y] + squares_used_y[x+1][y]; // take the old scent and subtract what diffuses out temp_scent = grscent[x][y] * (1000 - squares_used * diffusivity); // it's okay if this is slightly negative - // we've already summed neighboring scent values in the y direction in the previous loop. + // we've already summed neighboring scent values in the y direction in the previous loop. // Now we do it for the x direction, multiply by diffusion, and this is what diffuses into our current square. grscent[x][y] = static_cast(temp_scent + diffusivity * (sum_3_squares_y[x-1][y] + sum_3_squares_y[x][y] + sum_3_squares_y[x+1][y] )) / 1000; @@ -11405,8 +11405,7 @@ void game::vertical_move(int movez, bool force) { // Force means we're going down, even if there's no staircase, etc. // This happens with sinkholes and the like. if (!force && ((movez == -1 && !m.has_flag("GOES_DOWN", u.posx, u.posy)) || - (movez == 1 && !m.has_flag("GOES_UP", u.posx, u.posy))) && - !(m.ter(u.posx, u.posy) == t_elevator)) { + (movez == 1 && !m.has_flag("GOES_UP", u.posx, u.posy)))) { if (movez == -1) { add_msg(_("You can't go down here!")); } else { @@ -11498,6 +11497,13 @@ void game::vertical_move(int movez, bool force) { despawn_monsters(); clear_zombies(); + // Clear current scents. + for (int x = u.posx - SCENT_RADIUS; x <= u.posx + SCENT_RADIUS; x++) { + for (int y = u.posy - SCENT_RADIUS; y <= u.posy + SCENT_RADIUS; y++) { + grscent[x][y] = 0; + } + } + // Figure out where we know there are up/down connectors std::vector discover; for (int x = 0; x < OMAPX; x++) { diff --git a/src/item.cpp b/src/item.cpp index 346b204a68b90..93dfd99948636 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -364,7 +364,15 @@ std::string item::info(bool showtext, std::vector *dump, game *g, bool dump->push_back(iteminfo("BASE", _("Volume: "), "", volume(), true, "", false, true)); dump->push_back(iteminfo("BASE", _(" Weight: "), "", g->u.convert_weight(weight()), false, "", true, true)); dump->push_back(iteminfo("BASE", _("Bash: "), "", damage_bash(), true, "", false)); - dump->push_back(iteminfo("BASE", (has_flag("SPEAR") || has_flag("STAB") ? _(" Pierce: ") : _(" Cut: ")), "", damage_cut(), true, "", false)); + if (has_flag("SPEAR")) { + dump->push_back(iteminfo("BASE", _(" Pierce: "), "", damage_cut(), true, "", false)); + } + else if (has_flag("STAB")) { + dump->push_back(iteminfo("BASE", _(" Stab: "), "", damage_cut(), true, "", false)); + } + else { + dump->push_back(iteminfo("BASE", _(" Cut: "), "", damage_cut(), true, "", false)); + } dump->push_back(iteminfo("BASE", _(" To-hit bonus: "), ((type->m_to_hit > 0) ? "+" : ""), type->m_to_hit, true, "")); dump->push_back(iteminfo("BASE", _("Moves per attack: "), "", attack_time(), true, "", true, true)); if ( debug == true ) { @@ -873,7 +881,7 @@ std::string item::tname(game *g) if (food != NULL && g != NULL && food->has_flag("HOT")) ret << _(" (hot)"); if (food != NULL && g != NULL && food_type->spoils != 0 && - rotten(g)) + food->rotten(g)) ret << _(" (rotten)"); if (has_flag("FIT")) {