Add stinkfiends. Fix bug with get.

This commit is contained in:
Condorra 2024-02-08 22:35:06 +11:00
parent 067d9383ac
commit 18f1bcf241
6 changed files with 288 additions and 3 deletions

View File

@ -210,7 +210,7 @@ fn check_get_from_allowed(from_what: &Item) -> UResult<()> {
if from_what.item_type == "player" || from_what.item_type == "npc" {
if from_what.death_data.is_none() {
user_error(format!(
"You don't think {} would let you just take like that!",
"You don't think {} would let you just take it like that!",
&from_what.pronouns.subject
))?;
}
@ -276,7 +276,7 @@ impl UserVerb for Verb {
)?;
}
if include_loc_contents {
if include_contents {
check_get_from_allowed(&search_what)?;
}

View File

@ -7,6 +7,7 @@ use crate::{
static_content::{
npc::{npc_pronoun_type_to_pronouns, KillBonus},
possession_type::PossessionType,
species::SpeciesType,
},
};
use serde::Deserialize;
@ -20,6 +21,16 @@ enum SewerNPC {
spawn_loc: String,
gender: NPCPronounType,
},
KillerCroc {
code: String,
name: String,
spawn_loc: String,
},
Stinkfiend {
code: String,
name: String,
spawn_loc: String,
},
}
pub fn npc_list() -> Vec<NPC> {
@ -51,6 +62,24 @@ pub fn npc_list() -> Vec<NPC> {
"I know you are there, prey! Give up, we might as well get this over with!",
]),
};
let stinkfiend_stdsay = NPCSayInfo {
say_code: "babble",
frequency_secs: 120,
talk_type: FromFixedList(vec![
"This part of the sewers is mine, and all who enter die by my hand!",
"I hate surface dwellers so much. At least they're easy to kill!",
"Crocodiles don't bother me - I just whip their faces off.",
"A surface dweller once said I stink. I think I still have his skull.",
"Surface dwellers are good for stress relief - whipping them is fun!",
"They come from the surface and think they can just waltz in. Idiots.",
"I think the surface makes people weak.",
"Once I killed a surface dweller with the body of his friend.",
"Us stinkfiends are genetically superior, and one day we will wipe out all others.",
"I dream of a day when stinkfiends rule, and the inferior surface dwellers are wiped out.",
"Death to surface dwellers!",
"There is one surface dweller who hides in a sub-cellar around here who I have never been able to catch. It makes my blood boil. One day I will get her!",
]),
};
from_yaml_str::<Vec<SewerNPC>>(include_str!("sewer_npcs.yaml"))
.unwrap()
@ -99,6 +128,81 @@ pub fn npc_list() -> Vec<NPC> {
wander_zones: vec!["melbs_sewers".to_owned()],
says: vec!(radiant_predator_stdsay.clone()),
..Default::default()
},
SewerNPC::KillerCroc { code, name, spawn_loc } =>
NPC {
code: format!("sewer_croc_{}", &code),
name,
pronouns: Pronouns {
is_proper: false,
..Pronouns::default_inanimate()
},
aliases: vec!["crocodile".to_owned()],
aggression: 12,
description: "A saltwater crocodile, featuring rows of extremely sharp white teeth gleaming in the light, and tough olive-green scales that will clearly protect it from a lot of abuse. It is longer than a person, and looks extremely menacing".to_owned(),
spawn_location: format!("room/melbs_sewers_{}", &spawn_loc),
species: SpeciesType::Crocodile,
kill_bonus: Some(KillBonus {
msg: "On your wristpad: I can't believe you took down a salty! Here's something for your trouble.",
payment: 300,
}),
max_health: 100,
aggro_pc_only: true,
total_xp: 20000,
total_skills: SkillType::values()
.into_iter()
.map(|sk| {
(
sk.clone(),
match sk {
SkillType::Dodge => 14.0,
SkillType::Fists => 20.0,
_ => 8.0
}
)
}).collect(),
player_consents: vec!(ConsentType::Fight),
message_handler: None,
wander_zones: vec!["melbs_sewers".to_owned()],
..Default::default()
},
SewerNPC::Stinkfiend { code, name, spawn_loc } =>
NPC {
code: format!("stinkfiend_{}", &code),
name,
pronouns: Pronouns {
is_proper: false,
..Pronouns::default_inanimate()
},
aliases: vec!["fiend".to_owned()],
aggression: 18,
description: "A grotesquely mutant humanoid creature, with orange-tinged discoloured skin hanging loose on flesh, and distorted yet horrific features. It looks dangerous. The odour of this creature is so pungent you have to choke back the urge to vomit as it wafts your way".to_owned(),
spawn_location: format!("room/melbs_sewers_{}", &spawn_loc),
species: SpeciesType::Human,
kill_bonus: Some(KillBonus {
msg: "On your wristpad: You legend - you killed a bloody stinkfiend! You're braver than I am mate - that deserves a reward!",
payment: 500,
}),
max_health: 120,
aggro_pc_only: true,
total_xp: 30000,
total_skills: SkillType::values()
.into_iter()
.map(|sk| {
(
sk.clone(),
match sk {
SkillType::Dodge => 18.0,
SkillType::Whips => 20.0,
_ => 8.0
}
)
}).collect(),
player_consents: vec!(ConsentType::Fight),
says: vec!(stinkfiend_stdsay.clone()),
message_handler: None,
wander_zones: vec![], // They defend their room.
..Default::default()
}
}).collect()
}

View File

@ -228,3 +228,33 @@
name: repulsive foul radiant predator
gender: Male
spawn_loc: 14q
- !Stinkfiend
code: stink_1
name: repulsive stinkfiend
gender: Male
spawn_loc: 8h
- !Stinkfiend
code: stink_2
name: despicable stinkfiend
gender: Female
spawn_loc: 9h
- !Stinkfiend
code: stink_3
name: despicable stinkfiend
gender: Male
spawn_loc: 10h
- !Stinkfiend
code: stink_4
name: disgusting stinkfiend
gender: Female
spawn_loc: 8i
- !Stinkfiend
code: stink_5
name: paranoid stinkfiend
gender: Female
spawn_loc: 9i
- !Stinkfiend
code: stink_6
name: revolting stinkfiend
gender: Male
spawn_loc: 10i

View File

@ -969,6 +969,7 @@
scavtable: CitySewer
item_flags:
- !DarkPlace
repel_npc: true
- zone: melbs_sewers
code: melbs_sewers_10h
name: Vast sewer cavern
@ -986,6 +987,7 @@
scavtable: CitySewer
item_flags:
- !DarkPlace
repel_npc: true
- zone: melbs_sewers
code: melbs_sewers_13h
name: Dank narrow sewerpipe
@ -1134,6 +1136,7 @@
scavtable: CitySewer
item_flags:
- !DarkPlace
repel_npc: true
- zone: melbs_sewers
code: melbs_sewers_9i
name: Vast sewer cavern
@ -1154,6 +1157,7 @@
scavtable: CitySewer
item_flags:
- !DarkPlace
repel_npc: true
- zone: melbs_sewers
code: melbs_sewers_10i
name: Vast sewer cavern
@ -1172,6 +1176,7 @@
scavtable: CitySewer
item_flags:
- !DarkPlace
repel_npc: true
- zone: melbs_sewers
code: melbs_sewers_11i
name: Wide fetid sewerpipe

View File

@ -10,6 +10,7 @@ pub enum SpeciesType {
Dog,
Robot,
Rat,
Crocodile,
}
impl SpeciesType {

View File

@ -0,0 +1,145 @@
<map version="freeplane 1.7.0">
<!--To view this file, download free mind mapping software Freeplane from http://freeplane.sourceforge.net -->
<node TEXT="Obtain Imperial Loot" FOLDED="false" ID="ID_560261708" CREATED="1706963207358" MODIFIED="1706963324852" STYLE="oval">
<font SIZE="18"/>
<hook NAME="MapStyle">
<properties edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" fit_to_viewport="false"/>
<map_styles>
<stylenode LOCALIZED_TEXT="styles.root_node" STYLE="oval" UNIFORM_SHAPE="true" VGAP_QUANTITY="24.0 pt">
<font SIZE="24"/>
<stylenode LOCALIZED_TEXT="styles.predefined" POSITION="right" STYLE="bubble">
<stylenode LOCALIZED_TEXT="default" ICON_SIZE="12.0 pt" COLOR="#000000" STYLE="fork">
<font NAME="SansSerif" SIZE="10" BOLD="false" ITALIC="false"/>
</stylenode>
<stylenode LOCALIZED_TEXT="defaultstyle.details"/>
<stylenode LOCALIZED_TEXT="defaultstyle.attributes">
<font SIZE="9"/>
</stylenode>
<stylenode LOCALIZED_TEXT="defaultstyle.note" COLOR="#000000" BACKGROUND_COLOR="#ffffff" TEXT_ALIGN="LEFT"/>
<stylenode LOCALIZED_TEXT="defaultstyle.floating">
<edge STYLE="hide_edge"/>
<cloud COLOR="#f0f0f0" SHAPE="ROUND_RECT"/>
</stylenode>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.user-defined" POSITION="right" STYLE="bubble">
<stylenode LOCALIZED_TEXT="styles.topic" COLOR="#18898b" STYLE="fork">
<font NAME="Liberation Sans" SIZE="10" BOLD="true"/>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.subtopic" COLOR="#cc3300" STYLE="fork">
<font NAME="Liberation Sans" SIZE="10" BOLD="true"/>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.subsubtopic" COLOR="#669900">
<font NAME="Liberation Sans" SIZE="10" BOLD="true"/>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.important">
<icon BUILTIN="yes"/>
</stylenode>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.AutomaticLayout" POSITION="right" STYLE="bubble">
<stylenode LOCALIZED_TEXT="AutomaticLayout.level.root" COLOR="#000000" STYLE="oval" SHAPE_HORIZONTAL_MARGIN="10.0 pt" SHAPE_VERTICAL_MARGIN="10.0 pt">
<font SIZE="18"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,1" COLOR="#0033ff">
<font SIZE="16"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,2" COLOR="#00b439">
<font SIZE="14"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,3" COLOR="#990000">
<font SIZE="12"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,4" COLOR="#111111">
<font SIZE="10"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,5"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,6"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,7"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,8"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,9"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,10"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,11"/>
</stylenode>
</stylenode>
</map_styles>
</hook>
<hook NAME="AutomaticEdgeColor" COUNTER="1" RULE="ON_BRANCH_CREATION"/>
<node TEXT="Defeat Imperial Servant" POSITION="right" ID="ID_1398622982" CREATED="1706963340883" MODIFIED="1706963416908">
<edge COLOR="#ff0000"/>
<node TEXT="Get into Treasury Room" ID="ID_861163063" CREATED="1706963430390" MODIFIED="1706963507714">
<node TEXT="Defeat guardbots" ID="ID_1601463278" CREATED="1706963617228" MODIFIED="1706963632467"/>
<node TEXT="Obtain Treasury key" ID="ID_668131045" CREATED="1706963637887" MODIFIED="1706966065457">
<node TEXT="Obtain red code share" ID="ID_1686458255" CREATED="1706963694319" MODIFIED="1706964021755">
<node TEXT="Make Josephine in sub-sewer like you" ID="ID_1532259397" CREATED="1706964229320" MODIFIED="1707305448126">
<node TEXT="Bring him 10x Radiant Predator daggers" ID="ID_497635414" CREATED="1706964576337" MODIFIED="1706964864488"/>
<node TEXT="Access sub-sewer" ID="ID_1089305975" CREATED="1706964531187" MODIFIED="1706964572264">
<node TEXT="Fight Stinkfiends" ID="ID_1546136234" CREATED="1706964876006" MODIFIED="1706964919208">
<node TEXT="Fight crocs" ID="ID_703382098" CREATED="1706964926243" MODIFIED="1706964933162">
<node TEXT="Fight Radiant Predators" ID="ID_168042451" CREATED="1706964935199" MODIFIED="1706964947458">
<node TEXT="Access sewers" ID="ID_1610624232" CREATED="1706964950542" MODIFIED="1706964956680">
<node TEXT="Access cleaners office" ID="ID_399892457" CREATED="1706964956686" MODIFIED="1706964984775">
<node TEXT="Fight mutant rats" ID="ID_644839726" CREATED="1706964984781" MODIFIED="1706964992291">
<node TEXT="Get into Kings Office corridor" ID="ID_1348403008" CREATED="1706964992298" MODIFIED="1706965004473">
<node TEXT="Find key" ID="ID_1054726468" CREATED="1706965007079" MODIFIED="1706965013049"/>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node TEXT="Obtain green code share" ID="ID_356520144" CREATED="1706964027970" MODIFIED="1706964034023">
<node TEXT="Defeat Ronald in the radfields" ID="ID_130763808" CREATED="1706966420067" MODIFIED="1706966578964">
<node TEXT="Get into Ronald&apos;s house" ID="ID_36487686" CREATED="1706966585982" MODIFIED="1706966604703">
<node TEXT="Defeat taipan" ID="ID_884842200" CREATED="1706966616135" MODIFIED="1706966628606"/>
<node TEXT="Cross radfields" ID="ID_1568051037" CREATED="1706966635931" MODIFIED="1706966656986">
<node TEXT="Obtain rad protection" ID="ID_383434287" CREATED="1706966661011" MODIFIED="1706966667156"/>
<node TEXT="Get pass out of Melbs" ID="ID_786689319" CREATED="1706966676000" MODIFIED="1706966702527">
<node TEXT="Pass test" ID="ID_514343353" CREATED="1706966715543" MODIFIED="1706966720999">
<node TEXT="Gather information from NPCs" ID="ID_1986134011" CREATED="1706966723834" MODIFIED="1706966729369"/>
</node>
</node>
</node>
</node>
</node>
</node>
<node TEXT="Obtain blue code share" ID="ID_799203956" CREATED="1706964037063" MODIFIED="1706964042797">
<node TEXT="Defeat redback" ID="ID_1015654339" CREATED="1706966859303" MODIFIED="1706966883721">
<node TEXT="Get into King&apos;s Office basement" ID="ID_165789526" CREATED="1706966887438" MODIFIED="1706966918656">
<node TEXT="Get trapdoor key" ID="ID_1755966958" CREATED="1706967058650" MODIFIED="1706967094670">
<node TEXT="Search sewer cavern" ID="ID_1303666712" CREATED="1706967101302" MODIFIED="1706967116514"/>
</node>
</node>
</node>
</node>
<node TEXT="Bribe lock shop to combine shares" ID="ID_1498661507" CREATED="1706965071622" MODIFIED="1706965092227">
<node TEXT="Obtain Nanolock designs" ID="ID_145014413" CREATED="1706965099986" MODIFIED="1706965137438">
<node TEXT="Get into SaviourCorp vault" ID="ID_1243386143" CREATED="1706965201522" MODIFIED="1706965268396">
<node TEXT="Pick or break vault lock" ID="ID_820756720" CREATED="1706966132454" MODIFIED="1706966144682"/>
<node TEXT="Get into employee lounge" ID="ID_97039430" CREATED="1706966149463" MODIFIED="1706966155813">
<node TEXT="Pass internship" ID="ID_461494700" CREATED="1706966161327" MODIFIED="1706966167694">
<node TEXT="Find 10x items requested by boss" ID="ID_872885000" CREATED="1706966172850" MODIFIED="1706966248886"/>
<node TEXT="Get hired" ID="ID_541742509" CREATED="1706966262975" MODIFIED="1706966264684">
<node TEXT="Pass interview" ID="ID_1820320376" CREATED="1706966266690" MODIFIED="1706966272229">
<node TEXT="Learn right answers around public areas" ID="ID_62997340" CREATED="1706966275615" MODIFIED="1706966294044"/>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node TEXT="Power down electric floor" ID="ID_1446572475" CREATED="1706963773773" MODIFIED="1706963827268">
<node TEXT="Break or pick utility room lock" ID="ID_1737449075" CREATED="1706967176873" MODIFIED="1706967198483">
<node TEXT="Set grid 1 to 2" ID="ID_1117032386" CREATED="1707130150565" MODIFIED="1707130202771"/>
<node TEXT="Set grid 2 to 2" ID="ID_988949371" CREATED="1707130206069" MODIFIED="1707130213666"/>
</node>
</node>
</node>
</node>
</node>
</map>