pub enum WorldDifficulty {
Easy,
Normal,
Hard,
Peaceful,
}Expand description
The declared combat difficulty of the delve (DSL v0.6). Values are the
vanilla /difficulty keywords.
Difficulty is the single largest lever on how hard a delve feels, so the
campaign declares it rather than letting the compiler choose. Easy halves
incoming player damage — min(dmg / 2 + 1, dmg) — so a campaign tuned
under easy is tuned against a halved world. A campaign that
raises this must redo that arithmetic.
WorldDifficulty::Peaceful parses but is rejected by validation
(DW0468): peaceful makes the engine discard every hostile-category mob on
the tick it is ticked, summoned or not, so every wave, actor and ambush in the
campaign would silently vanish. It is a variant only so the compiler can say
that in a diagnostic instead of a serde “unknown variant” parse error.
Variants§
Easy
/difficulty easy — the compiler’s historical choice for a wave
campaign, and the default reading of an absent field. Incoming player
damage is halved (min(dmg / 2 + 1, dmg)).
Normal
/difficulty normal — vanilla-baseline damage. The souls-style baseline.
Hard
/difficulty hard — amplified damage, and zombies reinforce.
Peaceful
/difficulty peaceful — always rejected (DW0468). Present only so
the rejection can be a diagnostic with a rationale.
Implementations§
Trait Implementations§
Source§impl Clone for WorldDifficulty
impl Clone for WorldDifficulty
impl Copy for WorldDifficulty
Source§impl Debug for WorldDifficulty
impl Debug for WorldDifficulty
Source§impl Default for WorldDifficulty
impl Default for WorldDifficulty
Source§impl<'de> Deserialize<'de> for WorldDifficulty
impl<'de> Deserialize<'de> for WorldDifficulty
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WorldDifficulty
Source§impl JsonSchema for WorldDifficulty
impl JsonSchema for WorldDifficulty
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more