nuff of that
This commit is contained in:
parent
d3a8690510
commit
804d3397c7
@ -1,11 +1,8 @@
|
|||||||
# FIXME
|
# FIXME
|
||||||
|
|
||||||
last round of animations skipped cause no skill phase to add new vec
|
last round of animations skipped cause no skill phase to add new vec
|
||||||
check silence skill multiplier
|
check silence skill multiplier
|
||||||
|
|
||||||
game ready not auto starting resolve phase
|
game ready not auto starting resolve phase
|
||||||
cooldown events leak skills
|
|
||||||
|
|
||||||
purify conditional healing
|
purify conditional healing
|
||||||
|
|
||||||
absorb post resolve
|
absorb post resolve
|
||||||
|
|||||||
@ -893,8 +893,6 @@ impl Construct {
|
|||||||
pub fn effect_add(&mut self, effect: ConstructEffect) -> Vec<Event> {
|
pub fn effect_add(&mut self, effect: ConstructEffect) -> Vec<Event> {
|
||||||
if self.is_ko() { return vec![Event::TargetKo { construct: self.id }] }
|
if self.is_ko() { return vec![Event::TargetKo { construct: self.id }] }
|
||||||
|
|
||||||
if self.affected(Effect::Banish) { panic!("banish immunity not fixt yet") }
|
|
||||||
|
|
||||||
if let Some(p) = self.effects.iter().position(|ce| ce.effect == effect.effect) {
|
if let Some(p) = self.effects.iter().position(|ce| ce.effect == effect.effect) {
|
||||||
// duplicate effect
|
// duplicate effect
|
||||||
// replace existing
|
// replace existing
|
||||||
|
|||||||
@ -134,15 +134,6 @@ impl Game {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn copy_constructs(&self) -> Vec<Construct> {
|
|
||||||
self.players.clone()
|
|
||||||
.into_iter()
|
|
||||||
.flat_map(
|
|
||||||
|t| t.constructs
|
|
||||||
.into_iter())
|
|
||||||
.collect::<Vec<Construct>>()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn update_construct(&mut self, construct: &mut Construct) -> &mut Game {
|
pub fn update_construct(&mut self, construct: &mut Construct) -> &mut Game {
|
||||||
match self.players.iter_mut().find(|t| t.constructs.iter().any(|c| c.id == construct.id)) {
|
match self.players.iter_mut().find(|t| t.constructs.iter().any(|c| c.id == construct.id)) {
|
||||||
Some(player) => {
|
Some(player) => {
|
||||||
@ -426,17 +417,19 @@ impl Game {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find their statuses with ticks
|
// find their statuses with ticks
|
||||||
let mut ticks = self.copy_constructs()
|
let mut ticks = self.players
|
||||||
.iter()
|
.iter()
|
||||||
.flat_map(
|
.flat_map(|p| p.constructs.iter()
|
||||||
|c| c.effects
|
.flat_map(
|
||||||
.iter()
|
|c| c.effects
|
||||||
.cloned()
|
.iter()
|
||||||
.filter_map(|e| e.meta)
|
.cloned()
|
||||||
.filter_map(move |m| match m {
|
.filter_map(|e| e.meta)
|
||||||
EffectMeta::CastTick { source, target, skill } => Some(Cast::new(source, c.account, target, skill)),
|
.filter_map(move |m| match m {
|
||||||
_ => None,
|
EffectMeta::CastTick { source, target, skill } => Some(Cast::new(source, c.account, target, skill)),
|
||||||
})
|
_ => None,
|
||||||
|
})
|
||||||
|
)
|
||||||
).collect::<Vec<Cast>>();
|
).collect::<Vec<Cast>>();
|
||||||
|
|
||||||
// add them to the stack
|
// add them to the stack
|
||||||
@ -736,18 +729,19 @@ impl Game {
|
|||||||
})
|
})
|
||||||
.collect::<Vec<Uuid>>();
|
.collect::<Vec<Uuid>>();
|
||||||
|
|
||||||
for mut construct in self.copy_constructs() {
|
for player in self.players.iter_mut() {
|
||||||
if construct.is_ko() {
|
for construct in player.constructs.iter_mut() {
|
||||||
continue;
|
if construct.is_ko() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if !used_cooldown.contains(&construct.id) {
|
||||||
|
construct.reduce_cooldowns();
|
||||||
|
};
|
||||||
|
|
||||||
|
// always reduce durations
|
||||||
|
construct.reduce_effect_durations();
|
||||||
}
|
}
|
||||||
|
|
||||||
if !used_cooldown.contains(&construct.id) {
|
|
||||||
construct.reduce_cooldowns();
|
|
||||||
};
|
|
||||||
|
|
||||||
// always reduce durations
|
|
||||||
construct.reduce_effect_durations();
|
|
||||||
self.update_construct(&mut construct);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self
|
self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user