Removed exhausted check from BasicAura and reformat max call

This commit is contained in:
Knightress Paladin 2021-07-21 20:20:27 -07:00
parent c48a7c0072
commit 7ce9a3e284
2 changed files with 4 additions and 9 deletions

View File

@ -1928,7 +1928,6 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
},
timer: Duration::default(),
stage_section: StageSection::Buildup,
exhausted: false,
}),
CharacterAbility::Blink {
buildup_duration,

View File

@ -49,8 +49,6 @@ pub struct Data {
pub timer: Duration,
/// What section the character stage is in
pub stage_section: StageSection,
/// Whether the aura has been cast already or not
pub exhausted: bool,
}
impl CharacterBehavior for Data {
@ -69,8 +67,8 @@ impl CharacterBehavior for Data {
timer: tick_attack_or_default(data, self.timer, None),
..*self
});
} else if true {
// Creates aura if it hasn't been created already
} else {
// Creates aura
let targets =
AuraTarget::from((Some(self.static_data.targets), Some(data.uid)));
let mut aura = self.static_data.aura.to_aura(
@ -87,9 +85,8 @@ impl CharacterBehavior for Data {
category: _,
source: _,
} => {
data.strength *= 1.0
+ (std::cmp::max(self.static_data.combo_at_cast, 1) as f32)
.log(2.0);
data.strength *=
1.0 + (self.static_data.combo_at_cast.max(1) as f32).log(2.0);
},
}
update.server_events.push_front(ServerEvent::ComboChange {
@ -105,7 +102,6 @@ impl CharacterBehavior for Data {
update.character = CharacterState::BasicAura(Data {
timer: Duration::default(),
stage_section: StageSection::Cast,
exhausted: true,
..*self
});
}