Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

YANI: Enchancements to Garlic and Royal Jelly

13 views
Skip to first unread message

Kenneth Call

unread,
Nov 17, 2003, 12:26:07 AM11/17/03
to
I have included two different patchs in this message. The garlic patch
allows a player to wear cloves of garlic as they would an amulet.
While a player is wearing a clove of garlic they aggravate monsters
and they scare away all vampires except Vlad.

The Royal Jelly patch allows the player to apply lumps of royal jelly
to items in their inventory. If they apply royal jelly to a killer bee
egg it turns into a queen bee egg. If they apply a cursed lump of
royal jelly to any egg, the egg is killed. Applying uncursed royal
jelly to any egg will revive the egg if it has died. Applying a
blessed lump of royal jelly to any egg will make the resulting
hatchling believe you are its parent.

There are no other oviporous monsters simular to the killer bees such
that applying royal jelly is likely to upgrade them. Perhaps we could
do something with dragons where their color is cycled by applying
royal jelly. It may also be nice to make the garlic only have a chance
of scaring vampires away based on the number of cloves worn and the
level of the vampire. If such is implemented, perhaps those vampires
which do attack will refrain from a biting attack, or a biting attack
causes damage to themselves. An obvious addition would be to make a
polymorphed player that is a vampire be confused or stunned while they
are wearing garlic.

As these patchs stand they will not make much difference to game play.
I feel they are simple additions that add intuitive interactions of
the game elements in the way that nethack is famous for. Comments and
suggestions are very welcome. I have explained how the patchs were
implemented at http://www.seedwiki.com/page.cfm?doc=Nethack%20Source&wikiid=3577.


***Garlic Patch***

diff -c -r ./nethack-3.4.2/src/do_wear.c
./nethack-3.4.2-lots/src/do_wear.c
*** ./nethack-3.4.2/src/do_wear.c Fri Aug 29 19:07:30 2003
--- ./nethack-3.4.2-lots/src/do_wear.c Sat Nov 15 23:10:02 2003
***************
*** 581,587 ****
HSleeping = rnd(100);
break;
case AMULET_OF_YENDOR:
! break;
}
}

--- 581,592 ----
HSleeping = rnd(100);
break;
case AMULET_OF_YENDOR:
! break;
! #ifdef WEARGARLIC
! case CLOVE_OF_GARLIC:
! pline("The air around you is filled with the strong odor of
garlic.");
! break;
! #endif
}
}

***************
*** 626,632 ****
HSleeping = 0;
return;
case AMULET_OF_YENDOR:
! break;
}
setworn((struct obj *)0, W_AMUL);
return;
--- 631,642 ----
HSleeping = 0;
return;
case AMULET_OF_YENDOR:
! break;
! #ifdef WEARGARLIC
! case CLOVE_OF_GARLIC:
! pline("The odor of garlic fades.");
! break;
! #endif
}
setworn((struct obj *)0, W_AMUL);
return;
***************
*** 1459,1465 ****
return 1; /* costs a turn even though it didn't get worn */
setworn(otmp, mask);
Ring_on(otmp);
! } else if (otmp->oclass == AMULET_CLASS) {
if(uamul) {
already_wearing("an amulet");
return(0);
--- 1469,1479 ----
return 1; /* costs a turn even though it didn't get worn */
setworn(otmp, mask);
Ring_on(otmp);
! #ifdef WEARGARLIC
! } else if (otmp->oclass == AMULET_CLASS || otmp->otyp ==
CLOVE_OF_GARLIC) {
! #else
! } else if (otmp->oclass == AMULET_CLASS) {
! #endif
if(uamul) {
already_wearing("an amulet");
return(0);
diff -c -r ./nethack-3.4.2/src/invent.c
./nethack-3.4.2-lots/src/invent.c
*** ./nethack-3.4.2/src/invent.c Fri Aug 29 19:07:32 2003
--- ./nethack-3.4.2-lots/src/invent.c Sat Nov 15 11:37:52 2003
***************
*** 855,862 ****
* "else" in "you don't have anything else to ___".
*/
else if ((putting_on(word) &&
! ((otmp->oclass == FOOD_CLASS && otmp->otyp != MEAT_RING) ||
! (otmp->oclass == TOOL_CLASS &&
otyp != BLINDFOLD && otyp != TOWEL && otyp != LENSES)))
|| (!strcmp(word, "wield") &&
(otmp->oclass == TOOL_CLASS && !is_weptool(otmp)))
--- 855,866 ----
* "else" in "you don't have anything else to ___".
*/
else if ((putting_on(word) &&
! #ifdef WEARGARLIC
! ((otmp->oclass == FOOD_CLASS && otmp->otyp != MEAT_RING &&
otmp->otyp != CLOVE_OF_GARLIC) ||
! #else
! ((otmp->oclass == FOOD_CLASS && otmp->otyp != MEAT_RING) ||
! #endif


**** Royal Jelly Patch ****


diff -c -r nethack-3.4.2/src/apply.c nethack-3.4.2-eggs/src/apply.c
*** nethack-3.4.2/src/apply.c Fri Aug 29 19:07:26 2003
--- nethack-3.4.2-eggs/src/apply.c Sat Nov 15 22:05:50 2003
***************
*** 34,40 ****
STATIC_PTR int NDECL(set_trap); /* occupation callback */
STATIC_DCL int FDECL(use_whip, (struct obj *));
STATIC_DCL int FDECL(use_pole, (struct obj *));
! STATIC_DCL int FDECL(use_cream_pie, (struct obj *));
STATIC_DCL int FDECL(use_grapple, (struct obj *));
STATIC_DCL int FDECL(do_break_wand, (struct obj *));
STATIC_DCL boolean FDECL(figurine_location_checks,
--- 34,43 ----
STATIC_PTR int NDECL(set_trap); /* occupation callback */
STATIC_DCL int FDECL(use_whip, (struct obj *));
STATIC_DCL int FDECL(use_pole, (struct obj *));
! STATIC_DCL int FDECL(use_cream_pie, (struct obj *));
! #ifdef ROYAL_JELLY
! STATIC_DCL int FDECL(use_royal_jelly, (struct obj *));
! #endif
STATIC_DCL int FDECL(use_grapple, (struct obj *));
STATIC_DCL int FDECL(do_break_wand, (struct obj *));
STATIC_DCL boolean FDECL(figurine_location_checks,
***************
*** 2461,2468 ****
obj_extract_self(obj);
delobj(obj);
return(0);
! }
!
STATIC_OVL int
use_grapple (obj)
struct obj *obj;
--- 2464,2516 ----
obj_extract_self(obj);
delobj(obj);
return(0);
! }
!
! #ifdef ROYAL_JELLY
!
! STATIC_OVL int
! use_royal_jelly(obj)
! struct obj *obj;
! {
! struct obj *eobj;
! static const char allowall[3] = { COIN_CLASS, ALL_CLASSES, 0 };
!
! if ((eobj = getobj(allowall, "rub the royal jelly on")) == 0)
! return;
!
! if (obj->quan > 1L) {
! obj = splitobj(obj, 1L);
! }
!
! You("rub royal jelly all over %s",yname(eobj));
!
! if(eobj->otyp != EGG) {
!
! useup(obj);
! return;
! }
!
! if(eobj->corpsenm == PM_KILLER_BEE)
! eobj->corpsenm = PM_QUEEN_BEE;
!
! if(obj->cursed) {
! useup(obj);
! kill_egg(eobj);
! return;
! }
!
! attach_egg_hatch_timeout(eobj);
!
! if(obj->blessed)
! eobj->spe = 1; /* Applying royal jelly to the egg will make the
! * hatchling believe you are its mother */
!
! useup(obj);
! return;
!
!
! }
! #endif
STATIC_OVL int
use_grapple (obj)
struct obj *obj;
***************
*** 2780,2786 ****

Janis

unread,
Nov 17, 2003, 8:10:10 PM11/17/03
to
arepa...@hotmail.com (Kenneth Call) wrote in message news:<f8ce4eb9.03111...@posting.google.com>...

> I have included two different patchs in this message. The garlic patch
> allows a player to wear cloves of garlic as they would an amulet.
> While a player is wearing a clove of garlic they aggravate monsters
> and they scare away all vampires except Vlad.

I like that idea :-)

If Vlad will sometime be made nastier it would not be necessary to
make him immune to garlic, just scare him a bit would be enough.

> It may also be nice to make the garlic only have a chance
> of scaring vampires away based on the number of cloves worn and the
> level of the vampire. If such is implemented, perhaps those vampires
> which do attack will refrain from a biting attack, or a biting attack
> causes damage to themselves. An obvious addition would be to make a
> polymorphed player that is a vampire be confused or stunned while they
> are wearing garlic.

Cancel the vampires last attack maybe?

> As these patchs stand they will not make much difference to game play.
> I feel they are simple additions that add intuitive interactions of
> the game elements in the way that nethack is famous for. Comments and
> suggestions are very welcome. I have explained how the patchs were

> implemented at [...]

I could not detect the scare and aggravate effect in the code patches
you provided. Did I miss them or have you omitted some parts of code?

Janis

Pat Rankin

unread,
Nov 18, 2003, 2:44:15 AM11/18/03
to
In article <f8ce4eb9.03111...@posting.google.com>,\
arepa...@hotmail.com (Kenneth Call) writes...
[...]

> There are no other oviporous monsters simular to the killer bees such
> that applying royal jelly is likely to upgrade them.

Yes there are: winged gargoyles lay gargoyle eggs, with a very
small chance of laying a winged gargoyle egg instead. Just like how
eggs are handled for queen & killer bees.

> Perhaps we could
> do something with dragons where their color is cycled by applying
> royal jelly.

Ick; a cheesy way to acquire the desired color scales or steed.
Don't do it; no color of dragon represents an "upgrade" of any other
color.

> It may also be nice to make the garlic only have a chance

> of scaring vampires away based on the number of cloves worn [...]

I'm fairly sure that there are places in the code which assume
that you can't wear stackable objects. Wearing cloves of garlic will
break that assumption and may or may not end up creating various bugs.
(I didn't read through the actual patch to see whether you've already
addressed this.)

dogscoff

unread,
Nov 18, 2003, 6:43:47 AM11/18/03
to
I haven't tried this patch but if it works as described it will be a
very good one. Small incremental enhancements like this are what has
made nethack what it is today, so well done. I really hope this patch
makes it into a future official release.

> I'm fairly sure that there are places in the code which assume
> that you can't wear stackable objects. Wearing cloves of garlic will
> break that assumption and may or may not end up creating various bugs.

Perhaps a new item could be created, called "garlic necklace". You'd
have to (a)pply garlic cloves to make one, and then could add more
cloves to it as you get them to increase its potency.

Kenneth Call

unread,
Nov 18, 2003, 10:22:52 AM11/18/03
to
>
> I could not detect the scare and aggravate effect in the code patches
> you provided. Did I miss them or have you omitted some parts of code?
>
> Janis

Well now I am embarrased. How could I mess up a simple cut and paste,
on both patchs? Below are the patchs.


**** GARLIC PATCH ****

diff -c -r ./nethack-3.4.2/src/monmove.c
./nethack-3.4.2-lots/src/monmove.c
*** ./nethack-3.4.2/src/monmove.c Fri Aug 29 19:07:36 2003
--- ./nethack-3.4.2-lots/src/monmove.c Sun Nov 16 22:21:56 2003
***************
*** 141,146 ****
--- 141,151 ----
#ifdef ELBERETH
|| sengr_at("Elbereth", x, y)
#endif
+ #ifdef WEARGARLIC
+ || (uamul && uamul->otyp == CLOVE_OF_GARLIC
+ && mtmp->data->mlet == S_VAMPIRE
+ && mtmp->mnum != PM_VLAD_THE_IMPALER)
+ #endif
|| (mtmp->data->mlet == S_VAMPIRE
&& IS_ALTAR(levl[x][y].typ)));
}
diff -c -r ./nethack-3.4.2/src/objects.c
./nethack-3.4.2-lots/src/objects.c
*** ./nethack-3.4.2/src/objects.c Fri Aug 29 19:07:36 2003
--- ./nethack-3.4.2-lots/src/objects.c Sat Nov 15 20:46:50 2003
***************
*** 702,708 ****
--- 702,715 ----
FOOD("banana", 10, 1, 2, 0, VEGGY, 80, CLR_YELLOW),
FOOD("carrot", 15, 1, 2, 0, VEGGY, 50, CLR_ORANGE),
FOOD("sprig of wolfsbane", 7, 1, 1, 0, VEGGY, 40, CLR_GREEN),
+ #ifdef WEARGARLIC
+ /* special case because it confers a magical property */
+ OBJECT(OBJ("clove of garlic", (char *)0),
+ BITS(1,1,0,0,0,0,0,0,0,0,0,0,VEGGY),
+ AGGRAVATE_MONSTER, FOOD_CLASS, 7, 1, 1, 7, 0, 0, 0, 0, 40,
CLR_WHITE),
+ #else
FOOD("clove of garlic", 7, 1, 1, 0, VEGGY, 40, CLR_WHITE),
+ #endif
FOOD("slime mold", 75, 1, 5, 0, VEGGY, 250, HI_ORGANIC),

/* people food */


**** ROYAL JELLY PATCH ****

Strcpy(class_list, tools_too);
else
Strcpy(class_list, tools);
! if (carrying(CREAM_PIE) || carrying(EUCALYPTUS_LEAF))
add_class(class_list, FOOD_CLASS);

obj = getobj(class_list, "use or apply");
--- 2828,2839 ----
Strcpy(class_list, tools_too);
else
Strcpy(class_list, tools);
! #ifdef ROYAL_JELLY
! if (carrying(CREAM_PIE) || carrying(EUCALYPTUS_LEAF)
! || carrying(LUMP_OF_ROYAL_JELLY))
! #else
! if (carrying(CREAM_PIE) || carrying(EUCALYPTUS_LEAF))
! #endif
add_class(class_list, FOOD_CLASS);

obj = getobj(class_list, "use or apply");
***************
*** 2807,2813 ****
break;
case CREAM_PIE:
res = use_cream_pie(obj);
! break;
case BULLWHIP:
res = use_whip(obj);
break;
--- 2860,2871 ----
break;
case CREAM_PIE:
res = use_cream_pie(obj);
! break;
! #ifdef ROYAL_JELLY
! case LUMP_OF_ROYAL_JELLY:
! res = use_royal_jelly(obj);
! break;
! #endif
case BULLWHIP:
res = use_whip(obj);
break;
diff -c -r nethack-3.4.2/src/invent.c nethack-3.4.2-eggs/src/invent.c
*** nethack-3.4.2/src/invent.c Fri Aug 29 19:07:32 2003
--- nethack-3.4.2-eggs/src/invent.c Sat Nov 15 22:05:50 2003
***************
*** 888,895 ****
(otyp != POT_OIL || !otmp->dknown ||
!objects[POT_OIL].oc_name_known)) ||
(otmp->oclass == FOOD_CLASS &&
! otyp != CREAM_PIE && otyp != EUCALYPTUS_LEAF) ||
! (otmp->oclass == GEM_CLASS && !is_graystone(otmp))))
|| (!strcmp(word, "invoke") &&
(!otmp->oartifact && !objects[otyp].oc_unique &&
(otyp != FAKE_AMULET_OF_YENDOR || otmp->known) &&
--- 888,900 ----
(otyp != POT_OIL || !otmp->dknown ||
!objects[POT_OIL].oc_name_known)) ||
(otmp->oclass == FOOD_CLASS &&
! #ifdef ROYAL_JELLY
! otyp != CREAM_PIE && otyp != EUCALYPTUS_LEAF
! && otyp != LUMP_OF_ROYAL_JELLY) ||
! #else
! otyp != CREAM_PIE && otyp != EUCALYPTUS_LEAF) ||
! #endif
! (otmp->oclass == GEM_CLASS && !is_graystone(otmp))))
|| (!strcmp(word, "invoke") &&
(!otmp->oartifact && !objects[otyp].oc_unique &&
(otyp != FAKE_AMULET_OF_YENDOR || otmp->known) &&

lby...@gmail.com

unread,
Dec 6, 2004, 7:42:27 PM12/6/04
to
if you need royal jelly,we can provide best royal jelly from china,our
web:http://www.chinabees.com

best

wuhan yimin beeproduct co.,ltd
zairong li

86-27-836162873
86-27-83649500

BELANGER

unread,
Dec 6, 2004, 7:50:46 PM12/6/04
to
lby...@gmail.com insists:

>if you need royal jelly,we can provide best royal jelly from china,our
>web:http://www.chinabees.com

"Under the normal feeding condition, each bee inside male Bee
Larva is not much, the agriculture of bee also does not let
excessive male Bee Larva(bee larvae), such as excessive male Bee
Larva(bee larvae), etc. goes to heaven as a fairy the building
changes into the adulthood drone empress, in addition to having
minority and virgin king hands over the tail, the superfluous
drone light eat to do not fuck live, consumed the bee the animal
feed in the cluster unnecessarily."

China is awesome.

--
BELANGER

0 new messages