Merge branch 'master' of ssh://cryps.gg:40022/~/cryps

This commit is contained in:
Mashy
2019-05-02 11:58:41 +10:00
5 changed files with 50 additions and 23 deletions
Regular → Executable
+7 -9
View File
@@ -75,7 +75,7 @@ pub fn resolve(skill: Skill, source: &mut Cryp, target: &mut Cryp, mut resolutio
Skill::Strike => strike(source, target, resolutions, Skill::Strike),
Skill::StrikeII => strike(source, target, resolutions, Skill::StrikeII),
Skill::StrikeIII => strike(source, target, resolutions, Skill::StrikeIII),
Skill::Stun => stun(source, target, resolutions, Skill::Stun),
Skill::Taunt => taunt(source, target, resolutions, Skill::Taunt),
Skill::Throw => throw(source, target, resolutions, Skill::Throw), // no damage stun, adds vulnerable
@@ -969,10 +969,10 @@ fn slay(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: S
for e in slay_events {
match e {
Event::Damage { amount, mitigation: _, colour: _, skill: _ } => {
let heal = source.deal_green_damage(skill, amount);
results.push(Resolution::new(source, target).event(e));
for e in heal {
results.push(Resolution::new(source, source).event(e));
let heal = source.deal_green_damage(skill, amount);
for h in heal {
results.push(Resolution::new(source, source).event(h));
};
},
_ => results.push(Resolution::new(source, target).event(e)),
@@ -1154,10 +1154,10 @@ fn siphon_tick(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, s
for e in siphon_events {
match e {
Event::Damage { amount, mitigation: _, colour: _, skill: _ } => {
let heal = source.deal_green_damage(Skill::Siphon, amount);
results.push(Resolution::new(source, target).event(e));
for e in heal {
results.push(Resolution::new(source, source).event(e));
let heal = source.deal_green_damage(Skill::Siphon, amount);
for h in heal {
results.push(Resolution::new(source, source).event(h));
};
},
_ => results.push(Resolution::new(source, target).event(e)),
@@ -1407,8 +1407,6 @@ mod tests {
},
_ => panic!("not healing"),
};
}