Thread View: net.games.hack
1 messages
1 total messages
Started by Latitudinarian Lobster
Wed, 05 Jun 1985 00:12
1.0.2 dog and cockatrice fix
Author: Latitudinarian Lobster
Date: Wed, 05 Jun 1985 00:12
Date: Wed, 05 Jun 1985 00:12
98 lines
3398 bytes
3398 bytes
I've hacked hack so that dogs will avoid spots with a dead cockatrice and
will also refuse to pick one up if the dog happens to be there for some
reason (like tripe). The following context diff also contains a couple
older fixes.
*** hack.dog.c.old Fri Apr 26 13:51:29 1985
--- hack.dog.c Tue Jun 4 19:04:45 1985
***************
*** 142,147
dogroom = inroom(omx,omy);
uroom = inroom(u.ux,u.uy);
udist = dist(omx,omy);
/* if we are carrying sth then we drop it (perhaps near @) */
/* Note: if apport == 1 then our behaviour is independent of udist */
--- 142,148 -----
dogroom = inroom(omx,omy);
uroom = inroom(u.ux,u.uy);
udist = dist(omx,omy);
+ if (udist == 0) return(0); /* aeb */
/* if we are carrying sth then we drop it (perhaps near @) */
/* Note: if apport == 1 then our behaviour is independent of udist */
***************
*** 150,155
if(rn2(10) < edog->apport){
relobj(mtmp, (int) mtmp->minvis);
if(edog->apport > 1) edog->apport--;
}
} else {
if(obj = o_at(omx,omy)) if(!index("0_", obj->olet)){
--- 151,158 -----
if(rn2(10) < edog->apport){
relobj(mtmp, (int) mtmp->minvis);
if(edog->apport > 1) edog->apport--;
+ edog->dropdist = udist; /* hpscdi!jon */
+ edog->droptime = moves;
}
} else {
if(obj = o_at(omx,omy))
***************
*** 152,158
if(edog->apport > 1) edog->apport--;
}
} else {
! if(obj = o_at(omx,omy)) if(!index("0_", obj->olet)){
if((otyp = dogfood(obj)) <= CADAVER){
nix = omx;
niy = omy;
--- 155,162 -----
edog->droptime = moves;
}
} else {
! if(obj = o_at(omx,omy))
! if(!index("0_", obj->olet) && !(obj->otyp == DEAD_COCKATRICE)){
if((otyp = dogfood(obj)) <= CADAVER){
nix = omx;
niy = omy;
***************
*** 283,289
if(rn2(10)) continue;
}
! /* dog eschewes cursed objects */
/* but likes dog food */
obj = fobj;
while(obj){
--- 287,293 -----
if(rn2(10)) continue;
}
! /* dog eschewes cursed objects and dead cockatrices */
/* but likes dog food */
obj = fobj;
while(obj){
***************
*** 289,295
while(obj){
if(obj->ox != nx || obj->oy != ny)
goto nextobj;
! if(obj->cursed) goto nxti;
if(obj->olet == FOOD_SYM &&
(otyp = dogfood(obj)) < MANFOOD &&
(otyp < ACCFOOD || edog->hungrytime <= moves)){
--- 293,299 -----
while(obj){
if(obj->ox != nx || obj->oy != ny)
goto nextobj;
! if( (obj->cursed) || (obj->otyp == DEAD_COCKATRICE) ) goto nxti;
if(obj->olet == FOOD_SYM &&
(otyp = dogfood(obj)) < MANFOOD &&
(otyp < ACCFOOD || edog->hungrytime <= moves)){
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads