Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/dig.c b/src/dig.c
- index 9b91f98..4efc489 100644
- --- a/src/dig.c
- +++ b/src/dig.c
- @@ -1869,7 +1869,7 @@ boolean *dealloced;
- * Start a rot on organic material. Not corpses -- they
- * are already handled.
- */
- - if (otmp->otyp == CORPSE) {
- + if (otmp->otyp == CORPSE || otmp->otyp == ICE_CREAM) {
- ; /* should cancel timer if under_ice */
- } else if ((under_ice ? otmp->oclass == POTION_CLASS : is_organic(otmp))
- && !obj_resists(otmp, 5, 95)) {
- @@ -2001,10 +2001,15 @@ long timeout;
- y = obj->oy;
- } else if (in_invent) {
- if (flags.verbose) {
- - char *cname = corpse_xname(obj, (const char *) 0, CXN_NO_PFX);
- + char *cname;
- + if (obj->otyp == CORPSE)
- + cname = corpse_xname(obj, (const char *) 0, CXN_NO_PFX);
- + else
- + cname = xname(obj);
- Your("%s%s %s away%c", obj == uwep ? "wielded " : "", cname,
- - otense(obj, "rot"), obj == uwep ? '!' : '.');
- + otense(obj, obj->otyp == ICE_CREAM ? "melt" : "rot"),
- + obj == uwep ? '!' : '.');
- }
- if (obj == uwep) {
- uwepgone(); /* now bare handed */
- diff --git a/src/dog.c b/src/dog.c
- index 5c50eb6..c68dd24 100644
- --- a/src/dog.c
- +++ b/src/dog.c
- @@ -827,6 +827,10 @@ register struct obj *obj;
- : (herbi || starving)
- ? ACCFOOD
- : MANFOOD;
- + case ICE_CREAM:
- + if (carni && resists_cold(mon))
- + return DOGFOOD;
- + /* else fallthrough */
- default:
- if (starving)
- return ACCFOOD;
- diff --git a/src/eat.c b/src/eat.c
- index 5e2aa1a..654776d 100644
- --- a/src/eat.c
- +++ b/src/eat.c
- @@ -333,6 +333,9 @@ struct obj *otmp;
- } else if (otmp->otyp == CRAM_RATION) {
- if (maybe_polyd(is_dwarf(youmonst.data), Race_if(PM_DWARF)))
- nut += nut / 6; /* 600 -> 700 */
- + } else if (otmp->otyp == ICE_CREAM) {
- + if (Cold_resistance)
- + nut += nut / 4; /* 200 -> 250 */
- }
- return nut;
- }
- @@ -2665,13 +2668,16 @@ doeat()
- default:
- if (otmp->otyp == PANCAKE || otmp->otyp == FORTUNE_COOKIE /*eggs*/
- || otmp->otyp == CREAM_PIE || otmp->otyp == CANDY_BAR /*milk*/
- + || otmp->otyp == ICE_CREAM /* both */
- || otmp->otyp == LUMP_OF_ROYAL_JELLY)
- u.uconduct.unvegan++;
- break;
- }
- context.victual.reqtime = objects[otmp->otyp].oc_delay;
- - if (otmp->otyp != FORTUNE_COOKIE
- + if (otmp->otyp == ICE_CREAM && Cold_resistance)
- + context.victual.reqtime /= 2;
- + if (otmp->otyp != FORTUNE_COOKIE && otmp->otyp != ICE_CREAM
- && (otmp->cursed || (!nonrotting_food(otmp->otyp)
- && (monstermoves - otmp->age)
- > (otmp->blessed ? 50L : 30L)
- diff --git a/src/mklev.c b/src/mklev.c
- index 7493042..0881619 100644
- --- a/src/mklev.c
- +++ b/src/mklev.c
- @@ -989,6 +989,7 @@ mklev()
- {
- struct mkroom *croom;
- int ridx;
- + short ice_cream_prob;
- reseed_random(rn2);
- reseed_random(rn2_on_display_rng);
- @@ -998,10 +999,16 @@ mklev()
- return;
- in_mklev = TRUE;
- + /* no ice cream on the floor, as realistically it'd melt */
- + ice_cream_prob = objects[ICE_CREAM].oc_prob;
- + objects[ICE_CREAM].oc_prob = 0;
- + objects[FOOD_RATION].oc_prob += ice_cream_prob; /* rations instead */
- makelevel();
- bound_digging();
- mineralize(-1, -1, -1, -1, FALSE);
- in_mklev = FALSE;
- + objects[ICE_CREAM].oc_prob = ice_cream_prob; /* restore */
- + objects[FOOD_RATION].oc_prob -= ice_cream_prob;
- /* has_morgue gets cleared once morgue is entered; graveyard stays
- set (graveyard might already be set even when has_morgue is clear
- [see fixup_special()], so don't update it unconditionally) */
- diff --git a/src/mkobj.c b/src/mkobj.c
- index 17265ff..a0b8ece 100644
- --- a/src/mkobj.c
- +++ b/src/mkobj.c
- @@ -308,7 +308,7 @@ struct obj *box;
- for (n = rn2(n + 1); n > 0; n--) {
- if (box->otyp == ICE_BOX) {
- - otmp = mksobj(CORPSE, TRUE, TRUE);
- + otmp = mksobj(rn2(10) ? CORPSE : ICE_CREAM, TRUE, TRUE);
- /* Note: setting age to 0 is correct. Age has a different
- * from usual meaning for objects stored in ice boxes. -KAA
- */
- @@ -1089,6 +1089,8 @@ boolean artif;
- /* case TIN: */
- set_corpsenm(otmp, otmp->corpsenm);
- break;
- + case ICE_CREAM:
- + (void) start_timer(200 + rnz(10), TIMER_OBJECT, ROT_CORPSE, obj_to_any(otmp));
- case POT_OIL:
- otmp->age = MAX_OIL_IN_FLASK; /* amount of oil */
- /*FALLTHRU*/
- @@ -1856,7 +1858,8 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */
- boolean buried = (otmp->where == OBJ_BURIED);
- /* Check for corpses just placed on or in ice */
- - if (otmp->otyp == CORPSE && (on_floor || buried) && is_ice(x, y)) {
- + if ((otmp->otyp == CORPSE || otmp->otyp == ICE_CREAM)
- + && (on_floor || buried) && is_ice(x, y)) {
- tleft = stop_timer(action, obj_to_any(otmp));
- if (tleft == 0L) {
- action = REVIVE_MON;
- @@ -1882,7 +1885,8 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */
- }
- /* Check for corpses coming off ice */
- - } else if (force < 0 || (otmp->otyp == CORPSE && otmp->on_ice
- + } else if (force < 0 || ((otmp->otyp == CORPSE || otmp->otyp == ICE_CREAM)
- + && otmp->on_ice
- && !((on_floor || buried) && is_ice(x, y)))) {
- tleft = stop_timer(action, obj_to_any(otmp));
- if (tleft == 0L) {
- diff --git a/src/objects.c b/src/objects.c
- index fcca3b0..b2657e7 100644
- --- a/src/objects.c
- +++ b/src/objects.c
- @@ -771,12 +771,14 @@ FOOD("slime mold", 75, 1, 5, 0, VEGGY, 250, HI_ORGANIC),
- /* people food */
- FOOD("lump of royal jelly", 0, 1, 2, 0, VEGGY, 200, CLR_YELLOW),
- FOOD("cream pie", 25, 1, 10, 0, VEGGY, 100, CLR_WHITE),
- +/* ice cream becomes 1 delay and 250 nutrition with cold resistance */
- +FOOD("ice cream", 30, 2, 2, 0, VEGGY, 200, CLR_WHITE),
- FOOD("candy bar", 13, 1, 2, 0, VEGGY, 100, CLR_BROWN),
- FOOD("fortune cookie", 55, 1, 1, 0, VEGGY, 40, CLR_YELLOW),
- FOOD("pancake", 25, 2, 2, 0, VEGGY, 200, CLR_YELLOW),
- FOOD("lembas wafer", 20, 2, 5, 0, VEGGY, 800, CLR_WHITE),
- FOOD("cram ration", 20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
- -FOOD("food ration", 380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
- +FOOD("food ration", 350, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
- FOOD("K-ration", 0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
- FOOD("C-ration", 0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
- /* tins have type specified by obj->spe (+1 for spinach, other implies
- diff --git a/src/pickup.c b/src/pickup.c
- index 76f35aa..c0e3f64 100644
- --- a/src/pickup.c
- +++ b/src/pickup.c
- @@ -2218,7 +2218,7 @@ register struct obj *obj;
- if (Icebox && !age_is_relative(obj)) {
- obj->age = monstermoves - obj->age; /* actual age */
- /* stop any corpse timeouts when frozen */
- - if (obj->otyp == CORPSE && obj->timed) {
- + if ((obj->otyp == CORPSE || obj->otyp == ICE_CREAM) && obj->timed) {
- long rot_alarm = stop_timer(ROT_CORPSE, obj_to_any(obj));
- (void) stop_timer(REVIVE_MON, obj_to_any(obj));
- diff --git a/src/u_init.c b/src/u_init.c
- index 77e7445..ee23744 100644
- --- a/src/u_init.c
- +++ b/src/u_init.c
- @@ -191,6 +191,8 @@ static struct trobj Leash[] = { { LEASH, 0, TOOL_CLASS, 1, 0 },
- { 0, 0, 0, 0, 0 } };
- static struct trobj Towel[] = { { TOWEL, 0, TOOL_CLASS, 1, 0 },
- { 0, 0, 0, 0, 0 } };
- +static struct trobj Icecream[] = { { ICE_CREAM, 0, FOOD_CLASS, 1, 0 },
- + { 0, 0, 0, 0, 0 } };
- static struct trobj Wishing[] = { { WAN_WISHING, 3, WAND_CLASS, 1, 0 },
- { 0, 0, 0, 0, 0 } };
- static struct trobj Money[] = { { GOLD_PIECE, 0, COIN_CLASS, 1, 0 },
- @@ -782,6 +784,8 @@ u_init()
- ini_inv(Valkyrie);
- if (!rn2(6))
- ini_inv(Lamp);
- + else if (!rn2(5))
- + ini_inv(Icecream);
- knows_class(WEAPON_CLASS);
- knows_class(ARMOR_CLASS);
- skill_init(Skill_V);
- diff --git a/src/zap.c b/src/zap.c
- index 1c7a5de..bf531d8 100644
- --- a/src/zap.c
- +++ b/src/zap.c
- @@ -4858,7 +4858,7 @@ int osym, dmgtyp;
- dmg = 1;
- break;
- case FOOD_CLASS:
- - if (obj->otyp == GLOB_OF_GREEN_SLIME) {
- + if (obj->otyp == GLOB_OF_GREEN_SLIME || obj->otyp == ICE_CREAM) {
- dindx = 1; /* boil and explode */
- dmg = (obj->owt + 19) / 20;
- } else {
- diff --git a/win/share/objects.txt b/win/share/objects.txt
- index 15c6181..39a0336 100644
- --- a/win/share/objects.txt
- +++ b/win/share/objects.txt
- @@ -5062,6 +5062,25 @@ Z = (195, 195, 195)
- ................
- ................
- }
- +# tile 265 (ice cream)
- +{
- + ................
- + ......NNM.......
- + ....MNNNNMO.....
- + ...MNNNNNNMO....
- + ...MNNNNNNNMA...
- + ...NLHLHLHLMQ...
- + ....HLHLHLHA....
- + ....LHLHLHAQ....
- + .....LHLHLA.....
- + .....HLHLHA.....
- + .....LHLHAQ.....
- + ......LHLA......
- + ......HLHA......
- + ......LHA.......
- + .......LA.......
- + .......A........
- +}
- # tile 265 (candy bar)
- {
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement