reflect is back
This commit is contained in:
parent
3a20de13e8
commit
aa2832f4d8
@ -388,11 +388,6 @@ impl Cryp {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
// pub fn rez(&mut self) -> &mut Cryp {
|
|
||||||
// self.hp.set(self.hp.base);
|
|
||||||
// self
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Stats
|
// Stats
|
||||||
pub fn red_damage(&self) -> u64 {
|
pub fn red_damage(&self) -> u64 {
|
||||||
let red_damage_mods = self.effects.iter()
|
let red_damage_mods = self.effects.iter()
|
||||||
@ -424,7 +419,6 @@ impl Cryp {
|
|||||||
return modified_green_damage;
|
return modified_green_damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn skill_speed(&self, s: Skill) -> u64 {
|
pub fn skill_speed(&self, s: Skill) -> u64 {
|
||||||
self.speed().saturating_mul(s.speed() as u64)
|
self.speed().saturating_mul(s.speed() as u64)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -605,14 +605,13 @@ impl Skill {
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if target.is_reflecting() {
|
if target.is_reflecting() {
|
||||||
// // guard against overflow
|
// guard against overflow
|
||||||
// if source.is_reflecting() {
|
if source.is_reflecting() {
|
||||||
// return results;
|
return results;
|
||||||
// }
|
}
|
||||||
// let mut copy = source.clone();
|
return self.resolve(target, source);
|
||||||
// return self.resolve(&mut copy, source);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
match self {
|
match self {
|
||||||
Skill::Amplify => amplify(source, target, results), // increase magic damage
|
Skill::Amplify => amplify(source, target, results), // increase magic damage
|
||||||
@ -1045,28 +1044,26 @@ mod tests {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[test]
|
#[test]
|
||||||
// fn reflect_test() {
|
fn reflect_test() {
|
||||||
// let mut x = Cryp::new()
|
let mut x = Cryp::new()
|
||||||
// .named(&"muji".to_string());
|
.named(&"muji".to_string());
|
||||||
|
|
||||||
// let mut y = Cryp::new()
|
let mut y = Cryp::new()
|
||||||
// .named(&"camel".to_string());
|
.named(&"camel".to_string());
|
||||||
|
|
||||||
// reflect(&mut y.clone(), &mut y, vec![]);
|
reflect(&mut y.clone(), &mut y, vec![]);
|
||||||
// assert!(y.is_reflecting());
|
assert!(y.is_reflecting());
|
||||||
|
|
||||||
// // heal should deal green damage
|
let results = Skill::Attack.resolve(&mut x, &mut y);
|
||||||
// let mut cast = Cast::new(Uuid::nil(), Uuid::nil(), Uuid::nil(), Skill::Attack);
|
|
||||||
// cast.resolve(&mut x, &mut y);
|
|
||||||
|
|
||||||
// assert!(x.hp() == 768);
|
assert!(x.hp() == 768);
|
||||||
|
|
||||||
// match cast.results[0] {
|
match results[0] {
|
||||||
// ResolutionResult::Damage { amount, mitigation: _, category: _ } => assert_eq!(amount, 256),
|
ResolutionResult::Damage { amount, mitigation: _, category: _ } => assert_eq!(amount, 256),
|
||||||
// _ => panic!("not damage"),
|
_ => panic!("not damage"),
|
||||||
// };
|
};
|
||||||
// }
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn triage_test() {
|
fn triage_test() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user