Skip to content

Commit

Permalink
Fix ice cube
Browse files Browse the repository at this point in the history
  • Loading branch information
haihala committed Nov 30, 2024
1 parent 7573fe6 commit 0ae734b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions client/characters/src/characters/samurai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,21 @@ fn normals() -> impl Iterator<Item = (SamuraiAction, Action)> {
.with_damage(9)
.with_distance_on_hit(0.9)
.with_on_hit_events({
let mut evs = vec![ActionEvent::LaunchStun(Vec2::Y * 6.0)];

let launch_height = 5.0;
if situation.inventory.contains(&ItemId::IceCube) {
evs.extend(vec![
vec![
// Order here matters
ActionEvent::ClearMovement,
ActionEvent::LaunchStun(Vec2::Y * launch_height),
ActionEvent::RelativeVisualEffect(VfxRequest {
effect: VisualEffect::Icon(Icon::IceCube),
tf: Transform::from_translation(Vec3::Y * 1.0),
..default()
}),
]);
]
} else {
vec![ActionEvent::LaunchStun(Vec2::Y * launch_height)]
}

evs
})
.build(),
}),
Expand Down

0 comments on commit 0ae734b

Please sign in to comment.