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(), timer: Duration::default(),
stage_section: StageSection::Buildup, stage_section: StageSection::Buildup,
exhausted: false,
}), }),
CharacterAbility::Blink { CharacterAbility::Blink {
buildup_duration, buildup_duration,

View File

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