Gnarlign site tweaks and chieftain buff

This commit is contained in:
Sam 2022-02-11 01:23:09 -05:00
parent 377906dfa0
commit 4991f7ecea
21 changed files with 154 additions and 25 deletions

View File

@ -134,8 +134,17 @@
Custom("Bow Simple"): (
primary: "common.abilities.bowsimple.basic",
secondary: "common.abilities.bowsimple.basic",
abilities: [
],
abilities: [],
),
Custom("Axe Simple"): (
primary: "common.abilities.axesimple.doublestrike",
secondary: "common.abilities.axesimple.doublestrike",
abilities: [],
),
Custom("Dagger Simple"): (
primary: "common.abilities.daggersimple.singlestrike",
secondary: "common.abilities.daggersimple.singlestrike",
abilities: [],
),
Tool(Dagger): (
primary: "common.abilities.dagger.tempbasic",

View File

@ -0,0 +1,56 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 8.0,
damage_increase: 1.0,
base_poise_damage: 15,
poise_damage_increase: 0,
knockback: 8.0,
range: 3.5,
angle: 50.0,
base_buildup_duration: 0.4,
base_swing_duration: 0.08,
hit_timing: 0.5,
base_recover_duration: 0.5,
forward_movement: 2.5,
damage_kind: Slashing,
damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
(
stage: 2,
base_damage: 10.0,
damage_increase: 1.5,
base_poise_damage: 20,
poise_damage_increase: 0,
knockback: 12.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 0.7,
base_swing_duration: 0.1,
hit_timing: 0.5,
base_recover_duration: 0.7,
forward_movement: 2.0,
damage_kind: Slashing,
damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
is_interruptible: false,
ori_modifier: 0.7,
)

View File

@ -0,0 +1,34 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 2.0,
damage_increase: 1.0,
base_poise_damage: 8,
poise_damage_increase: 0,
knockback: 8.0,
range: 3.5,
angle: 50.0,
base_buildup_duration: 0.1,
base_swing_duration: 0.05,
hit_timing: 0.5,
base_recover_duration: 0.05,
forward_movement: 1.0,
damage_kind: Slashing,
damage_effect: Some(Buff((
kind: Bleeding,
dur_secs: 10.0,
strength: DamageFraction(0.1),
chance: 0.1,
))),
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
is_interruptible: false,
ori_modifier: 0.7,
)

View File

@ -17,7 +17,7 @@ BasicAura(
category: Magical,
),
],
aura_duration: 60,
aura_duration: 2,
range: 50,
energy_cost: 0,
scales_with_combo: false,

View File

@ -11,7 +11,7 @@ BasicAura(
category: Magical,
),
],
aura_duration: 60,
aura_duration: 2,
range: 50,
energy_cost: 0,
scales_with_combo: false,

View File

@ -11,7 +11,7 @@ BasicAura(
category: Magical,
),
],
aura_duration: 60,
aura_duration: 2,
range: 50,
energy_cost: 0,
scales_with_combo: false,

View File

@ -4,7 +4,7 @@ ItemDef(
kind: Armor((
kind: Chest("GnarlingChieftain"),
stats: (
protection: Some(Normal(60.0)),
protection: Some(Normal(120.0)),
poise_resilience: Some(Normal(60.0)),
energy_max: Some(2.7),
energy_reward: Some(0.027),

BIN
assets/voxygen/element/ui/map/buttons/gnarling.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/element/ui/map/buttons/gnarling_bg.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/element/ui/map/buttons/gnarling_hover.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -31,6 +31,7 @@
"hud.map.change_map_mode": "Change Map Mode",
"hud.map.toggle_minimap_voxel": "Toggle Minimap Voxel View",
"hud.map.zoom_minimap_explanation": "Zoom in the Minimap to see\nthe area around you in higher detail",
"hud.map.gnarling": "Gnarling Fortification",
},

View File

@ -144,6 +144,7 @@ pub enum SiteKind {
Castle,
Cave,
Tree,
Gnarling,
}
#[derive(Debug, Clone, Serialize, Deserialize)]

View File

@ -696,7 +696,7 @@ impl Body {
object::Body::SeaLantern => 100,
object::Body::GnarlingTotemRed
| object::Body::GnarlingTotemGreen
| object::Body::GnarlingTotemWhite => 25,
| object::Body::GnarlingTotemWhite => 50,
_ => 1000,
},
Body::Golem(golem) => match golem.species {
@ -777,14 +777,7 @@ impl Body {
Body::Arthropod(_) => true,
_ => false,
},
BuffKind::Regeneration | BuffKind::ProtectingWard | BuffKind::Hastened => matches!(
self,
Body::Object(
object::Body::GnarlingTotemRed
| object::Body::GnarlingTotemGreen
| object::Body::GnarlingTotemWhite
)
),
BuffKind::Regeneration => matches!(self, Body::Object(object::Body::GnarlingTotemGreen)),
_ => false,
}
}

View File

@ -180,6 +180,7 @@ pub struct EntityInfo {
pub has_agency: bool,
pub alignment: Alignment,
pub agent_mark: Option<agent::Mark>,
pub no_flee: bool,
// Stats
pub body: Body,
pub name: Option<String>,
@ -220,6 +221,7 @@ impl EntityInfo {
skillset_asset: None,
pet: None,
trading_information: None,
no_flee: false,
}
}
@ -528,6 +530,12 @@ impl EntityInfo {
self.trading_information = Some(e.clone());
self
}
#[must_use]
pub fn with_no_flee(mut self) -> Self {
self.no_flee = true;
self
}
}
#[derive(Default)]

View File

@ -2249,8 +2249,8 @@ impl<'a> AgentData<'a> {
read_data: &ReadData,
rng: &mut impl Rng,
) {
const TOTEM_TIMER: f32 = 15.0;
const HEAVY_ATTACK_WAIT_TIME: f32 = 20.0;
const TOTEM_TIMER: f32 = 10.0;
const HEAVY_ATTACK_WAIT_TIME: f32 = 15.0;
// Handle timers
agent.action_state.timer += read_data.dt.0;
@ -2262,8 +2262,14 @@ impl<'a> AgentData<'a> {
_ => {},
}
// If time to summon a totem, do it
if agent.action_state.timer > TOTEM_TIMER {
if !agent.action_state.initialized {
// If not initialized yet, start out by summoning green totem
controller.push_basic_input(InputKind::Ability(2));
if matches!(self.char_state, CharacterState::BasicSummon(s) if s.stage_section == StageSection::Recover) {
agent.action_state.initialized = true;
}
} else if agent.action_state.timer > TOTEM_TIMER {
// If time to summon a totem, do it
let input = rng.gen_range(1..=3);
controller.push_basic_input(InputKind::Ability(input));
} else if agent.action_state.counter > HEAVY_ATTACK_WAIT_TIME {

View File

@ -408,6 +408,7 @@ impl NpcData {
has_agency,
agent_mark,
alignment,
no_flee,
// stats
body,
name,
@ -495,7 +496,7 @@ impl NpcData {
.with_trade_site(trade_for_site),
)
.with_patrol_origin(pos)
.with_no_flee_if(matches!(agent_mark, Some(agent::Mark::Guard)))
.with_no_flee_if(matches!(agent_mark, Some(agent::Mark::Guard)) || no_flee)
});
let agent = if matches!(alignment, comp::Alignment::Enemy)

View File

@ -417,6 +417,9 @@ image_ids! {
mmap_poi_peak: "voxygen.element.ui.map.buttons.peak",
mmap_poi_biome: "voxygen.element.ui.map.buttons.biome",
mmap_poi_peak_hover: "voxygen.element.ui.map.buttons.peak_hover",
mmap_site_gnarling: "voxygen.element.ui.map.buttons.gnarling",
mmap_site_gnarling_hover: "voxygen.element.ui.map.buttons.gnarling_hover",
mmap_site_gnarling_bg: "voxygen.element.ui.map.buttons.gnarling_bg",
// Window Parts
window_3: "voxygen.element.ui.generic.frames.window_3",

View File

@ -870,6 +870,7 @@ impl<'a> Widget for Map<'a> {
SiteKind::Castle => i18n.get("hud.map.castle"),
SiteKind::Cave => i18n.get("hud.map.cave"),
SiteKind::Tree => i18n.get("hud.map.tree"),
SiteKind::Gnarling => i18n.get("hud.map.gnarling"),
});
let (difficulty, desc) = match &site.kind {
SiteKind::Town => (None, i18n.get("hud.map.town").to_string()),
@ -891,6 +892,7 @@ impl<'a> Widget for Map<'a> {
SiteKind::Castle => (None, i18n.get("hud.map.castle").to_string()),
SiteKind::Cave => (None, i18n.get("hud.map.cave").to_string()),
SiteKind::Tree => (None, i18n.get("hud.map.tree").to_string()),
SiteKind::Gnarling => (Some(0), i18n.get("hud.map.gnarling").to_string()),
};
let desc = desc + &get_site_economy(site_rich);
let site_btn = Button::image(match &site.kind {
@ -899,6 +901,7 @@ impl<'a> Widget for Map<'a> {
SiteKind::Castle => self.imgs.mmap_site_castle,
SiteKind::Cave => self.imgs.mmap_site_cave,
SiteKind::Tree => self.imgs.mmap_site_tree,
SiteKind::Gnarling => self.imgs.mmap_site_gnarling,
})
.x_y_position_relative_to(
state.ids.map_layers[0],
@ -912,6 +915,7 @@ impl<'a> Widget for Map<'a> {
SiteKind::Castle => self.imgs.mmap_site_castle_hover,
SiteKind::Cave => self.imgs.mmap_site_cave_hover,
SiteKind::Tree => self.imgs.mmap_site_tree_hover,
SiteKind::Gnarling => self.imgs.mmap_site_gnarling_hover,
})
.image_color(UI_HIGHLIGHT_0.alpha(fade))
.with_tooltip(
@ -922,7 +926,7 @@ impl<'a> Widget for Map<'a> {
match &site.kind {
SiteKind::Town => TEXT_COLOR,
SiteKind::Castle => TEXT_COLOR,
SiteKind::Dungeon { .. } => match difficulty {
SiteKind::Dungeon { .. } | SiteKind::Gnarling => match difficulty {
Some(0) => QUALITY_LOW,
Some(1) => QUALITY_COMMON,
Some(2) => QUALITY_MODERATE,
@ -946,7 +950,7 @@ impl<'a> Widget for Map<'a> {
// Only display sites that are toggled on
let show_site = match &site.kind {
SiteKind::Town => show_towns,
SiteKind::Dungeon { .. } => show_dungeons,
SiteKind::Dungeon { .. } | SiteKind::Gnarling => show_dungeons,
SiteKind::Castle => show_castles,
SiteKind::Cave => show_caves,
SiteKind::Tree => show_trees,
@ -1003,7 +1007,7 @@ impl<'a> Widget for Map<'a> {
dif_img.set(state.ids.site_difs[i], ui)
}
},
SiteKind::Dungeon { .. } => {
SiteKind::Dungeon { .. } | SiteKind::Gnarling => {
if show_dungeons {
dif_img.set(state.ids.site_difs[i], ui)
}

View File

@ -698,6 +698,7 @@ impl<'a> Widget for MiniMap<'a> {
SiteKind::Castle => None,
SiteKind::Cave => None,
SiteKind::Tree => None,
SiteKind::Gnarling => Some(0),
};
Image::new(match &site.kind {
@ -706,6 +707,7 @@ impl<'a> Widget for MiniMap<'a> {
SiteKind::Castle => self.imgs.mmap_site_castle_bg,
SiteKind::Cave => self.imgs.mmap_site_cave_bg,
SiteKind::Tree => self.imgs.mmap_site_tree,
SiteKind::Gnarling => self.imgs.mmap_site_gnarling_bg,
})
.x_y_position_relative_to(
state.ids.map_layers[0],
@ -729,6 +731,7 @@ impl<'a> Widget for MiniMap<'a> {
SiteKind::Castle => self.imgs.mmap_site_castle,
SiteKind::Cave => self.imgs.mmap_site_cave,
SiteKind::Tree => self.imgs.mmap_site_tree,
SiteKind::Gnarling => self.imgs.mmap_site_gnarling,
})
.middle_of(state.ids.mmap_site_icons_bgs[i])
.w_h(20.0, 20.0)

View File

@ -157,7 +157,7 @@ impl World {
civ::SiteKind::Refactor => world_msg::SiteKind::Town,
civ::SiteKind::Tree | civ::SiteKind::GiantTree => world_msg::SiteKind::Tree,
// TODO: Maybe change?
civ::SiteKind::Gnarling => world_msg::SiteKind::Dungeon { difficulty: 0 },
civ::SiteKind::Gnarling => world_msg::SiteKind::Gnarling,
},
wpos: site.center * TerrainChunkSize::RECT_SIZE.map(|e| e as i32),
}

View File

@ -73,7 +73,7 @@ impl GnarlingFortification {
pub fn generate(wpos: Vec2<i32>, land: &Land, rng: &mut impl Rng) -> Self {
let rpos_height = |rpos| land.get_alt_approx(rpos + wpos) as i32;
let name = String::from("Gnarling Fortification");
let name = NameGen::location(rng).generate_gnarling();
let seed = rng.gen();
let origin = wpos;
@ -1884,6 +1884,7 @@ fn random_gnarling<R: Rng>(pos: Vec3<i32>, rng: &mut R) -> EntityInfo {
fn gnarling_chieftain<R: Rng>(pos: Vec3<i32>, rng: &mut R) -> EntityInfo {
EntityInfo::at(pos.map(|x| x as f32))
.with_asset_expect("common.entity.dungeon.gnarling.chieftain", rng)
.with_no_flee()
}
fn deadwood<R: Rng>(pos: Vec3<i32>, rng: &mut R) -> EntityInfo {