Skip to content

Commit

Permalink
Changes to death zone for corpses and heads
Browse files Browse the repository at this point in the history
Change to allow corpses to retain their decap status and to the heads to
allow identification of the head easily
  • Loading branch information
omnidecker committed Oct 27, 2023
1 parent c26bbcd commit 66d8a3d
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions vme/zone/death.zon
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ var
reward_exp : extraptr;
nextdude : extraptr;
temp_lst : stringlist;
temp_str2:string;
mobdescr : string;
mobname : string;
temp_str : string;
test_expt : extraptr;
headless:string;
Expand Down Expand Up @@ -186,14 +187,21 @@ code
log("Corpse already headless");
return (item);
}


if ("$headless" in corpse.extra)
{
log("Corpse already headless");
return (item);
}

if (not hasRaceHead(corpse.value[4]))
{
log("Corpse race has no head");
return (item);
}

living_sym := corpse.extra.["$living_sym"].descr;
addextra(corpse.extra,{"$headless"},"has been decaped");
item := load("head@death");
addextra(item.extra,{"$head_time"}, itoa(realtime));
addextra(item.extra,{"$living_sym"}, living_sym);
Expand Down Expand Up @@ -233,16 +241,20 @@ code

set_weight_base(item, item.baseweight);
item.minv := 0;
temp_str2 :=corpse.outside_descr;
temp_str := getword(temp_str2);
temp_str := getword(temp_str2);
temp_str := getword(temp_str2);
temp_str:=temp_str2;
item.outside_descr := "The decapitated head of " + temp_str ;
mobdescr :=corpse.outside_descr;
temp_str := getword(mobdescr);
mobname := mobdescr;
temp_str := getword(mobname);
temp_str := getword(mobname);
if (temp_str != "of")
temp_str := getword(mobname);

item.outside_descr := "The decapitated head of " + mobname ;
item.title := "The decapitated head of " + mobname ;
addextra(item.extra, {""}, "The head has been severed from the body");
headless:=left(corpse.title,length(corpse.title)-6);
corpse.title:=headless+"headless corpse";
corpse.outside_descr:="The headless corpse of "+temp_str;
corpse.outside_descr:="The headless "+ mobdescr;
addextra(corpse.extra, {""}, "The head has been severed from the body");
item.value[2] := corpse.value[2];
item.value[3] := corpse.value[3];
Expand Down Expand Up @@ -295,7 +307,7 @@ code
quit;
}

if ("headless" in corpse.outside_descr)
if ("headless" in corpse.outside_descr or "$headless" in corpse.extra)
{
act("Huh? That can't be done.", A_ALWAYS, self, null, null, TO_CHAR);
quit;
Expand Down Expand Up @@ -487,7 +499,10 @@ code
if ((not isset(self.flags, UNIT_FL_BURIED)) and (not bHometown))
{
act(self.extra.["$rotact"].names.[1], A_HIDEINV, self, null, null, TO_ALL);
self.outside_descr := self.extra.["$rot"].names.[1];
if ("$headless" in self.extra)
self.outside_descr := "The headless " + mid(self.extra.["$rot"].names.[1],4,length(self.extra.["$rot"].names.[1]));
else
self.outside_descr := self.extra.["$rot"].names.[1];
}

//if (self.value[2] == 1)
Expand All @@ -503,7 +518,10 @@ code
if ((not isset(self.flags, UNIT_FL_BURIED)) and (not bHometown))
{
act(self.extra.["$rotact"].names.[2], A_HIDEINV,self,null,null,TO_ALL);
self.outside_descr := self.extra.["$rot"].names.[2];
if ("$headless" in self.extra)
self.outside_descr := "The headless " + mid(self.extra.["$rot"].names.[2],4,length(self.extra.["$rot"].names.[2]));
else
self.outside_descr := self.extra.["$rot"].names.[2];
}

//if (self.value[2] == 1)
Expand All @@ -519,7 +537,10 @@ code
if ((not isset(self.flags, UNIT_FL_BURIED)) and (not bHometown))
{
act(self.extra.["$rotact"].names.[3], A_HIDEINV,self,null,null,TO_ALL);
self.outside_descr := self.extra.["$rot"].names.[3];
if ("$headless" in self.extra)
self.outside_descr := "The headless " + mid(self.extra.["$rot"].names.[3],4,length(self.extra.["$rot"].names.[3]));
else
self.outside_descr := self.extra.["$rot"].names.[3];
}

//if (self.value[2] == 1)
Expand Down Expand Up @@ -1330,7 +1351,7 @@ names {"statue of $1n", "statue"}
title "$1n's statue"
descr "The statue of $1n is standing here."
type ITEM_OTHER
// manipulate {MANIPULATE_TAKE}
manipulate {MANIPULATE_TAKE}
extra {}
"It is a remarkably life-like statue as if someone and everything they carried was turned to stone."
extra {"$rot",
Expand Down

0 comments on commit 66d8a3d

Please sign in to comment.