Skip to content

Commit

Permalink
Merge pull request #372 from omnidecker/Deathzone
Browse files Browse the repository at this point in the history
Changes to death zone for corpses and heads
  • Loading branch information
Seifert69 authored Oct 30, 2023
2 parents 1cb4632 + dceb8f5 commit f8c02c2
Showing 1 changed file with 36 additions and 14 deletions.
50 changes: 36 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,21 @@ 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 " + left(mobname, length(mobname)-15);
addstring(item.names, "head_of_" + left(mobname, length(mobname)-15));
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 +308,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 +500,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 +519,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 +538,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 +1352,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 f8c02c2

Please sign in to comment.