modified multis, cleaned up anims

This commit is contained in:
Mashy
2019-05-07 14:54:25 +10:00
parent 50bc93073b
commit b922c3d539
5 changed files with 40 additions and 30 deletions
+3 -3
View File
@@ -1206,7 +1206,6 @@ mod tests {
assert!(game.skill_phase_finished());
game = game.resolve_phase_start();
game.resolved.remove(0);
let ruins = game.resolved
.into_iter()
.filter(|r| {
@@ -1217,7 +1216,8 @@ mod tests {
assert!(*effect == Effect::Ruin);
assert!(*duration == 1);
true
}
},
Event::Skill { skill } => false,
_ => panic!("ruin result not effect {:?}", event),
}
false => false,
@@ -1256,7 +1256,7 @@ mod tests {
game = game.resolve_phase_start();
assert!(game.resolved.len() == 4);
assert!(game.resolved.len() == 5);
while let Some(r) = game.resolved.pop() {
let Resolution { source , target, event: _ } = r;
if [i_cryp.id, j_cryp.id].contains(&source.id) {
+1 -1
View File
@@ -271,7 +271,7 @@ impl Instance {
fn next_round(&mut self) -> &mut Instance {
self.phase = InstancePhase::InProgress;
self.phase_end = Utc::now()
.checked_add_signed(Duration::seconds(12000))
.checked_add_signed(Duration::seconds(150))
.expect("could not set phase end");
+26 -23
View File
@@ -585,15 +585,15 @@ impl Skill {
match self {
// Attack Base
Skill::Attack => 80, // Base
Skill::Blast => 110, // BB
Skill::Chaos => 40, // BR
Skill::Heal => 130, //GG
Skill::SiphonTick => 40, // GB
Skill::Slay => 70, // RG
Skill::Strike => 90, //RR
Skill::StrikeII => 110,
Skill::StrikeIII => 130,
Skill::StrikeII => 110,
Skill::StrikeIII => 130,
// Block Base
Skill::CorruptionTick => 80,
@@ -614,8 +614,10 @@ impl Skill {
// Buff base
Skill::ImpureBlast => 25,
Skill::HasteStrike => 30,
Skill::Taunt => 80,
Skill::TriageTick => 75,
_ => 100,
}
}
@@ -635,10 +637,10 @@ impl Skill {
Skill::Stun => 2,
Skill::Sleep => 3,
Skill::Throw => 2,
Skill::Throw => 1,
Skill::Snare => 3,
Skill::Taunt => 1,
Skill::Taunt => 2,
Skill::Impurity => 3,
Skill::Invert => 1,
@@ -716,7 +718,7 @@ impl Skill {
Skill::Purge => None,
Skill::Banish => Some(1),
Skill::Hex => Some(1),
Skill::Haste => None,
Skill::Haste => Some(2),
Skill::HasteStrike => None, // Used in haste
Skill::Slow => None,
@@ -729,7 +731,7 @@ impl Skill {
Skill::Strangle => Some(2),
Skill::StrangleTick => None,
Skill::Clutch => Some(2),
Skill::Taunt => Some(1),
Skill::Taunt => Some(2),
Skill::Injure => Some(2),
Skill::Corrupt => Some(1),
@@ -862,7 +864,6 @@ impl Skill {
Skill::Block => true,
Skill::Parry => true,
Skill::Clutch => true,
// Skill::Taunt => true,
Skill::Corrupt => true,
Skill::TestBlock => true,
@@ -958,6 +959,9 @@ fn clutch(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill:
}
fn taunt(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions {
let red_amount = source.red_damage().pct(skill.multiplier());
results.push(Resolution::new(source, target).event(target.recharge(skill, red_amount, 0)));
let effect = CrypEffect::new(Effect::Taunt, skill.duration());
results.push(Resolution::new(source, target).event(target.add_effect(skill, effect)));
return results;
@@ -1028,13 +1032,13 @@ fn snare(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill:
let snare = CrypEffect::new(Effect::Snare, skill.duration());
results.push(Resolution::new(source, target).event(target.add_effect(skill, snare)));
let mut s_multi: u64 = 100;
for cs in target.skills.iter() {
s_multi += match cs.skill.category() {
Category::Red => 45,
_ => 0,
}
}
let s_multi = target.skills
.iter()
.fold(100, |acc, cs| match cs.skill.category() {
Category::Red => acc + 45,
_ => acc,
});
let amount = source.red_damage().pct(skill.multiplier()).pct(s_multi);
target.deal_red_damage(skill, amount)
@@ -1173,7 +1177,7 @@ fn corruption_tick(source: &mut Cryp, target: &mut Cryp, mut results: Resolution
}
fn ruin(source: &mut Cryp, target: &mut Cryp, 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 }));
let effect = CrypEffect::new(Effect::Ruin, skill.duration());
results.push(Resolution::new(source, target).event(target.add_effect(skill, effect)));
return results;;
@@ -1274,13 +1278,12 @@ fn silence(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill
let silence = CrypEffect::new(Effect::Silence, skill.duration());
results.push(Resolution::new(source, target).event(target.add_effect(skill, silence)));
let mut s_multi: u64 = 100;
for cs in target.skills.iter() {
s_multi += match cs.skill.category() {
Category::Blue => 45,
_ => 0,
}
}
let s_multi = target.skills
.iter()
.fold(100, |acc, cs| match cs.skill.category() {
Category::Blue => acc + 45,
_ => acc,
});
let amount = source.blue_damage().pct(skill.multiplier()).pct(s_multi);
target.deal_blue_damage(skill, amount)