mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed exhausted check from BasicAura and reformat max call
This commit is contained in:
parent
c48a7c0072
commit
7ce9a3e284
@ -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,
|
||||||
|
@ -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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user