fix animation stages
This commit is contained in:
parent
14cb075161
commit
c203727d25
@ -16,7 +16,7 @@ pub fn dev_resolve(a_id: Uuid, b_id: Uuid, skill: Skill) -> Resolutions {
|
|||||||
let mut b = Construct::new();
|
let mut b = Construct::new();
|
||||||
b.id = b_id;
|
b.id = b_id;
|
||||||
if skill.aoe() { // Send an aoe skill event for anims
|
if skill.aoe() { // Send an aoe skill event for anims
|
||||||
resolutions.push(Resolution::new(&a, &b).event(Event::AoeSkill { skill }));
|
resolutions.push(Resolution::new(&a, &b).event(Event::AoeSkill { skill }).stages(EventStages::StartEnd));
|
||||||
}
|
}
|
||||||
return resolve(skill, &mut a, &mut b, resolutions);
|
return resolve(skill, &mut a, &mut b, resolutions);
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ pub fn pre_resolve(cast: &Cast, game: &mut Game, mut resolutions: Resolutions) -
|
|||||||
|
|
||||||
if skill.aoe() { // Send an aoe skill event for anims
|
if skill.aoe() { // Send an aoe skill event for anims
|
||||||
resolutions.push(Resolution::new(&source,
|
resolutions.push(Resolution::new(&source,
|
||||||
&game.construct_by_id(cast.target_construct_id).unwrap().clone()).event(Event::AoeSkill { skill }));
|
&game.construct_by_id(cast.target_construct_id).unwrap().clone()).event(Event::AoeSkill { skill }).stages(EventStages::StartEnd));
|
||||||
}
|
}
|
||||||
|
|
||||||
for target_id in targets {
|
for target_id in targets {
|
||||||
@ -68,13 +68,13 @@ pub fn pre_resolve(cast: &Cast, game: &mut Game, mut resolutions: Resolutions) -
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn resolve(skill: Skill, source: &mut Construct, target: &mut Construct, mut resolutions: Vec<Resolution>) -> Resolutions {
|
pub fn resolve(skill: Skill, source: &mut Construct, target: &mut Construct, mut resolutions: Vec<Resolution>) -> Resolutions {
|
||||||
if let Some(disable) = source.disabled(skill) {
|
if let Some(_disable) = source.disabled(skill) {
|
||||||
resolutions.push(Resolution::new(source, target).event(Event::Disable { disable, skill }).stages(EventStages::PostOnly));
|
// resolutions.push(Resolution::new(source, target).event(Event::Disable { disable, skill }).stages(EventStages::PostOnly));
|
||||||
return resolutions;
|
return resolutions;
|
||||||
}
|
}
|
||||||
|
|
||||||
if target.is_ko() {
|
if target.is_ko() {
|
||||||
resolutions.push(Resolution::new(source, target).event(Event::TargetKo { skill }).stages(EventStages::PostOnly));
|
// resolutions.push(Resolution::new(source, target).event(Event::TargetKo { skill }).stages(EventStages::PostOnly));
|
||||||
return resolutions;
|
return resolutions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1811,7 +1811,7 @@ fn silence(source: &mut Construct, target: &mut Construct, mut results: Resoluti
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn purge(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
|
fn purge(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
|
||||||
results.push(Resolution::new(source, target).event(Event::Skill { skill }));
|
results.push(Resolution::new(source, target).event(Event::Skill { skill }).stages(EventStages::StartEnd));
|
||||||
while let Some(i) = target.effects
|
while let Some(i) = target.effects
|
||||||
.iter()
|
.iter()
|
||||||
.position(|ce| {
|
.position(|ce| {
|
||||||
@ -1845,7 +1845,7 @@ fn purge(source: &mut Construct, target: &mut Construct, mut results: Resolution
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn purify(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
|
fn purify(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
|
||||||
results.push(Resolution::new(source, target).event(Event::Skill { skill }));
|
results.push(Resolution::new(source, target).event(Event::Skill { skill }).stages(EventStages::StartEnd));
|
||||||
let amount = source.green_power().pct(skill.multiplier());
|
let amount = source.green_power().pct(skill.multiplier());
|
||||||
while let Some(i) = target.effects
|
while let Some(i) = target.effects
|
||||||
.iter()
|
.iter()
|
||||||
@ -1869,7 +1869,7 @@ fn purify(source: &mut Construct, target: &mut Construct, mut results: Resolutio
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn banish(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
|
fn banish(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
|
||||||
results.push(Resolution::new(source, target).event(Event::Skill { skill }));
|
results.push(Resolution::new(source, target).event(Event::Skill { skill }).stages(EventStages::StartEnd));
|
||||||
|
|
||||||
let red_damage = target.red_life().pct(skill.multiplier());
|
let red_damage = target.red_life().pct(skill.multiplier());
|
||||||
let blue_damage = target.blue_life().pct(skill.multiplier());
|
let blue_damage = target.blue_life().pct(skill.multiplier());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user