fix: blocking now ends in wielded

This makes blocking more viable because while blocking you can wait for
the enemy to attack and then quickly exit the block and attack yourself.
This commit is contained in:
timokoesters 2019-10-08 21:19:16 +02:00
parent 095e66fc01
commit 45f756343d
No known key found for this signature in database
GPG Key ID: CD80BE9AAEE78097

View File

@ -177,13 +177,15 @@ impl<'a> System<'a> for Sys {
// Block
if controller.secondary
&& (character.movement == Stand || character.movement == Run)
&& (character.action == Idle || character.action.is_wield())
&& character.action.is_wield()
{
character.action = Block {
time_left: Duration::from_secs(5),
};
} else if !controller.secondary && character.action.is_block() {
character.action = Idle;
character.action = Wield {
time_left: Duration::default(),
};
}
}
Some(Item::Debug(item::Debug::Boost)) => {