cursekeeper_tweaks

This commit is contained in:
flo 2024-03-03 17:50:46 +00:00
parent ef5a9663ba
commit 327c195374
12 changed files with 70 additions and 29 deletions

View File

@ -1040,6 +1040,7 @@
Simple(None, "common.abilities.custom.cursekeeper.summonshamanicspirit"), Simple(None, "common.abilities.custom.cursekeeper.summonshamanicspirit"),
Simple(None, "common.abilities.custom.cursekeeper.summonjiangshi"), Simple(None, "common.abilities.custom.cursekeeper.summonjiangshi"),
Simple(None, "common.abilities.custom.cursekeeper.teleport"), Simple(None, "common.abilities.custom.cursekeeper.teleport"),
Simple(None, "common.abilities.custom.cursekeeper.poisonbomb"),
], ],
), ),
Custom("CursekeeperFake"): ( Custom("CursekeeperFake"): (

View File

@ -5,6 +5,7 @@ BasicRanged(
projectile: Poisonball( projectile: Poisonball(
damage: 58.0, damage: 58.0,
radius: 3.5, radius: 3.5,
knockback: 1.0,
energy_regen: 0, energy_regen: 0,
min_falloff: 0.2, min_falloff: 0.2,
), ),

View File

@ -0,0 +1,18 @@
BasicRanged(
energy_cost: 0,
buildup_duration: 0.3,
recover_duration: 0.3,
projectile: Poisonball(
damage: 32.0,
knockback: 10.0,
radius: 6.0,
energy_regen: 5.0,
min_falloff: 0.1,
),
projectile_body: Object(SpitPoison),
projectile_light: None,
projectile_speed: 25.0,
num_projectiles: 2,
projectile_spread: 0.1,
move_efficiency: 0.3,
)

View File

@ -7,7 +7,7 @@ BasicBeam(
range: 30.0, range: 30.0,
max_angle: 15.0, max_angle: 15.0,
damage_effect: Some(Buff(( damage_effect: Some(Buff((
kind: Burning, kind: Wet,
dur_secs: 3.0, dur_secs: 3.0,
strength: Value(0.2), strength: Value(0.2),
chance: 0.1, chance: 0.1,

View File

@ -5,6 +5,7 @@ BasicRanged(
projectile: Poisonball( projectile: Poisonball(
damage: 32.0, damage: 32.0,
radius: 5.0, radius: 5.0,
knockback: 10.0,
energy_regen: 5.0, energy_regen: 5.0,
min_falloff: 0.1, min_falloff: 0.1,
), ),

View File

@ -1053,7 +1053,7 @@
), ),
TerracottaStatue: ( TerracottaStatue: (
bone0: ( bone0: (
offset: (-28.0, -28.0, -0.0), offset: (-21.0, -19.0, -0.0),
central: ("sprite.furniture.terracotta_statue_4"), central: ("sprite.furniture.terracotta_statue_4"),
), ),
bone1: ( bone1: (

Binary file not shown.

View File

@ -80,6 +80,7 @@ pub enum ProjectileConstructor {
Poisonball { Poisonball {
damage: f32, damage: f32,
radius: f32, radius: f32,
knockback: f32,
min_falloff: f32, min_falloff: f32,
}, },
NecroticSphere { NecroticSphere {
@ -400,8 +401,18 @@ impl ProjectileConstructor {
Poisonball { Poisonball {
damage, damage,
radius, radius,
knockback,
min_falloff, min_falloff,
} => { } => {
let knockback = AttackEffect::new(
Some(GroupTarget::OutOfGroup),
CombatEffect::Knockback(Knockback {
strength: knockback,
direction: KnockbackDir::Away,
})
.adjusted_by_stats(tool_stats),
)
.with_requirement(CombatRequirement::AnyDamage);
let buff = AttackEffect::new( let buff = AttackEffect::new(
Some(GroupTarget::OutOfGroup), Some(GroupTarget::OutOfGroup),
CombatEffect::Buff(CombatBuff { CombatEffect::Buff(CombatBuff {
@ -425,6 +436,7 @@ impl ProjectileConstructor {
let attack = Attack::default() let attack = Attack::default()
.with_damage(damage) .with_damage(damage)
.with_precision(precision_mult) .with_precision(precision_mult)
.with_effect(knockback)
.with_effect(buff); .with_effect(buff);
let explosion = Explosion { let explosion = Explosion {
effects: vec![ effects: vec![

View File

@ -432,7 +432,7 @@ impl SpriteKind {
SpriteKind::HaniwaUrn => 1.09, SpriteKind::HaniwaUrn => 1.09,
SpriteKind::TerracottaChest => 1.09, SpriteKind::TerracottaChest => 1.09,
SpriteKind::TerracottaStatue => 5.29, SpriteKind::TerracottaStatue => 5.29,
SpriteKind::TerracottaBlock => 1.09, SpriteKind::TerracottaBlock => 1.00,
SpriteKind::SeaDecorChain => 1.09, SpriteKind::SeaDecorChain => 1.09,
SpriteKind::SeaDecorBlock => 1.00, SpriteKind::SeaDecorBlock => 1.00,
SpriteKind::SeaDecorWindowHor => 0.55, SpriteKind::SeaDecorWindowHor => 0.55,

View File

@ -1587,9 +1587,14 @@ impl<'a> AgentData<'a> {
read_data, read_data,
rng, rng,
), ),
Tactic::Cursekeeper => { Tactic::Cursekeeper => self.handle_cursekeeper_attack(
self.handle_cursekeeper_attack(agent, controller, tgt_data, read_data, rng) agent,
}, controller,
&attack_data,
tgt_data,
read_data,
rng,
),
Tactic::CursekeeperFake => { Tactic::CursekeeperFake => {
self.handle_cursekeeper_fake_attack(agent, controller, &attack_data) self.handle_cursekeeper_fake_attack(agent, controller, &attack_data)
}, },

View File

@ -4813,6 +4813,7 @@ impl<'a> AgentData<'a> {
&self, &self,
agent: &mut Agent, agent: &mut Agent,
controller: &mut Controller, controller: &mut Controller,
attack_data: &AttackData,
tgt_data: &TargetData, tgt_data: &TargetData,
read_data: &ReadData, read_data: &ReadData,
rng: &mut impl Rng, rng: &mut impl Rng,
@ -4844,7 +4845,7 @@ impl<'a> AgentData<'a> {
.copied(), .copied(),
select_pos: None, select_pos: None,
}); });
} else if agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] > 10.0 { } else if agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] > 12.0 {
agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] = 0.0; agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] = 0.0;
} else { } else {
agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] += read_data.dt.0; agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] += read_data.dt.0;
@ -4860,7 +4861,7 @@ impl<'a> AgentData<'a> {
} }
if line_of_sight_with_target() { if line_of_sight_with_target() {
if agent.combat_state.timers[ActionStateTimers::TimerSummon as usize] > 45.0 { if agent.combat_state.timers[ActionStateTimers::TimerSummon as usize] > 32.0 {
match agent.combat_state.timers[ActionStateTimers::SelectSummon as usize] as i32 { match agent.combat_state.timers[ActionStateTimers::SelectSummon as usize] as i32 {
0 => controller.push_basic_input(InputKind::Ability(0)), 0 => controller.push_basic_input(InputKind::Ability(0)),
1 => controller.push_basic_input(InputKind::Ability(1)), 1 => controller.push_basic_input(InputKind::Ability(1)),
@ -4869,19 +4870,23 @@ impl<'a> AgentData<'a> {
_ => controller.push_basic_input(InputKind::Ability(4)), _ => controller.push_basic_input(InputKind::Ability(4)),
} }
} else if agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] < 6.0 { } else if agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] < 6.0 {
controller.push_basic_input(InputKind::Ability(6));
} else if agent.combat_state.timers[ActionStateTimers::TimerBeam as usize] < 9.0 {
controller.push_basic_input(InputKind::Primary); controller.push_basic_input(InputKind::Primary);
} else { } else {
controller.push_basic_input(InputKind::Secondary); controller.push_basic_input(InputKind::Secondary);
} }
} }
self.path_toward_target( if attack_data.dist_sqrd > 10_f32.powi(2) {
agent, self.path_toward_target(
controller, agent,
tgt_data.pos.0, controller,
read_data, tgt_data.pos.0,
Path::Partial, read_data,
None, Path::Full,
); None,
);
}
} }
pub fn handle_shamanic_spirit_attack( pub fn handle_shamanic_spirit_attack(
@ -4926,7 +4931,7 @@ impl<'a> AgentData<'a> {
enum Conditions { enum Conditions {
AttackToggle = 0, AttackToggle = 0,
} }
if attack_data.dist_sqrd < 15_f32.powi(2) { if attack_data.dist_sqrd < 25_f32.powi(2) {
if !agent.combat_state.conditions[Conditions::AttackToggle as usize] { if !agent.combat_state.conditions[Conditions::AttackToggle as usize] {
controller.push_basic_input(InputKind::Primary); controller.push_basic_input(InputKind::Primary);
if matches!(self.char_state, CharacterState::BasicSummon(c) if matches!(c.stage_section, StageSection::Recover)) if matches!(self.char_state, CharacterState::BasicSummon(c) if matches!(c.stage_section, StageSection::Recover))

View File

@ -617,14 +617,13 @@ impl Structure for TerracottaPalace {
// chamber rooms // chamber rooms
for dir in CARDINALS { for dir in CARDINALS {
let room_center = center + dir * ((room_size / 2) + 8); let room_center = center + dir * ((room_size / 2) + 8);
// floor decor in chamber rooms
painter painter
.cylinder(Aabb { .cylinder(Aabb {
min: (room_center - 3).with_z(base - 24 - (room_size / 2) - (room_size / 16)), min: (room_center - 3).with_z(base - 30 - (room_size / 2) - (room_size / 16)),
max: (room_center + 3).with_z(base - 6 - (room_size / 2) - (room_size / 16)), max: (room_center + 3).with_z(base - 6 - (room_size / 2) - (room_size / 16)),
}) })
.clear(); .clear();
// npcs in chamber rooms // cursekeeper in chamber rooms
let npc_pos = room_center.with_z(base - 24 - (room_size / 2) - (room_size / 16)); let npc_pos = room_center.with_z(base - 24 - (room_size / 2) - (room_size / 16));
let npc = chamber_npcs let npc = chamber_npcs
.swap_remove(RandomField::new(0).get(npc_pos) as usize % chamber_npcs.len()); .swap_remove(RandomField::new(0).get(npc_pos) as usize % chamber_npcs.len());
@ -634,7 +633,7 @@ impl Structure for TerracottaPalace {
// chamber_1 // chamber_1
painter painter
.aabb(Aabb { .aabb(Aabb {
min: Vec2::new(center.x - (room_size / 2), center.y - 5) min: Vec2::new(center.x - (room_size / 2), center.y - 4)
.with_z(base - 10 - (room_size / 2)), .with_z(base - 10 - (room_size / 2)),
max: Vec2::new(center.x - (room_size / 2) + 1, center.y + 5) max: Vec2::new(center.x - (room_size / 2) + 1, center.y + 5)
.with_z(base - 10 - (room_size / 2) + 5), .with_z(base - 10 - (room_size / 2) + 5),
@ -651,7 +650,7 @@ impl Structure for TerracottaPalace {
// chamber_2 // chamber_2
painter painter
.aabb(Aabb { .aabb(Aabb {
min: Vec2::new(center.x + (room_size / 2) - 1, center.y - 5) min: Vec2::new(center.x + (room_size / 2) - 1, center.y - 4)
.with_z(base - 10 - (room_size / 2)), .with_z(base - 10 - (room_size / 2)),
max: Vec2::new(center.x + (room_size / 2), center.y + 5) max: Vec2::new(center.x + (room_size / 2), center.y + 5)
.with_z(base - 10 - (room_size / 2) + 5), .with_z(base - 10 - (room_size / 2) + 5),
@ -668,7 +667,7 @@ impl Structure for TerracottaPalace {
// chamber_3 // chamber_3
painter painter
.aabb(Aabb { .aabb(Aabb {
min: Vec2::new(center.x - 5, center.y - (room_size / 2)) min: Vec2::new(center.x - 4, center.y - (room_size / 2))
.with_z(base - 10 - (room_size / 2)), .with_z(base - 10 - (room_size / 2)),
max: Vec2::new(center.x + 5, center.y - (room_size / 2) + 1) max: Vec2::new(center.x + 5, center.y - (room_size / 2) + 1)
.with_z(base - 10 - (room_size / 2) + 5), .with_z(base - 10 - (room_size / 2) + 5),
@ -685,7 +684,7 @@ impl Structure for TerracottaPalace {
// chamber_4 // chamber_4
painter painter
.aabb(Aabb { .aabb(Aabb {
min: Vec2::new(center.x - 5, center.y + (room_size / 2) - 1) min: Vec2::new(center.x - 4, center.y + (room_size / 2) - 1)
.with_z(base - 10 - (room_size / 2)), .with_z(base - 10 - (room_size / 2)),
max: Vec2::new(center.x + 5, center.y + (room_size / 2)) max: Vec2::new(center.x + 5, center.y + (room_size / 2))
.with_z(base - 10 - (room_size / 2) + 5), .with_z(base - 10 - (room_size / 2) + 5),
@ -880,7 +879,6 @@ impl Structure for TerracottaPalace {
spawn_random_entity(pillar_npc_pos, painter, 1..=1); spawn_random_entity(pillar_npc_pos, painter, 1..=1);
// npcs in upper chamber rooms
let statue = statue_npcs let statue = statue_npcs
.swap_remove(RandomField::new(0).get(statue_pos) as usize % statue_npcs.len()); .swap_remove(RandomField::new(0).get(statue_pos) as usize % statue_npcs.len());
painter.spawn( painter.spawn(
@ -1031,7 +1029,7 @@ impl Structure for TerracottaPalace {
} }
} }
// npcs on top floor // npcs on top floor
let npcs = 3.0_f32; let npcs = 5.0_f32;
let radius_npcs = (room_size / 4) + 6; let radius_npcs = (room_size / 4) + 6;
let phi_npcs = TAU / npcs; let phi_npcs = TAU / npcs;
for n in 1..=npcs as i32 { for n in 1..=npcs as i32 {
@ -1050,7 +1048,7 @@ impl Structure for TerracottaPalace {
// main room npcs // main room npcs
let radius_npcs_main = (room_size / 4) + 10; let radius_npcs_main = (room_size / 4) + 10;
let npcs_main = 10.0_f32; let npcs_main = 15.0_f32;
let phi_npcs_main = TAU / npcs_main; let phi_npcs_main = TAU / npcs_main;
for n in 1..=npcs_main as i32 { for n in 1..=npcs_main as i32 {
let pos = Vec2::new( let pos = Vec2::new(