siphon & slay have green power scaling

This commit is contained in:
Mashy
2019-10-18 15:11:57 +10:00
parent aa5b76551f
commit 05855af04a
4 changed files with 22 additions and 18 deletions
+4 -2
View File
@@ -850,7 +850,8 @@ impl Item {
Item::Slay|
Item::SlayPlus |
Item::SlayPlusPlus => format!(
"Deals {:?}% RedPower as red damage and provides self healing based on damage dealt.",
"Deals {:?}% RedPower + {:?}% GreenPower as red damage and provides self healing based on damage dealt.",
self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().multiplier()),
Item::Sleep|
@@ -884,7 +885,8 @@ impl Item {
Item::Siphon|
Item::SiphonPlus |
Item::SiphonPlusPlus => format!(
"Deals {:?}% BluePower as blue damage each turn and heals caster based on damage dealt. Lasts {:?}T.",
"Deals {:?}% BluePower + {:?}% GreenPower as blue damage each turn and heals caster based on damage dealt. Lasts {:?}T.",
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect()[0].get_duration()),
+13 -11
View File
@@ -757,13 +757,13 @@ impl Skill {
Skill::HealPlus => 185, //GG
Skill::HealPlusPlus => 270, //GG
Skill::SiphonTick=> 40, // GB
Skill::SiphonTickPlus => 50,
Skill::SiphonTickPlusPlus => 60,
Skill::SiphonTick=> 20, // GB
Skill::SiphonTickPlus => 25,
Skill::SiphonTickPlusPlus => 30,
Skill::Slay=> 70, // RG
Skill::SlayPlus => 115,
Skill::SlayPlusPlus => 180,
Skill::Slay=> 40, // RG
Skill::SlayPlus => 60,
Skill::SlayPlusPlus => 90,
Skill::Strike=> 90, //RR
Skill::StrikePlus => 140,
@@ -1471,7 +1471,7 @@ fn restrict(source: &mut Construct, target: &mut Construct, mut results: Resolut
}
fn slay(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
let amount = source.red_power().pct(skill.multiplier());
let amount = source.red_power().pct(skill.multiplier()) + source.green_power().pct(skill.multiplier());
let slay_events = target.deal_red_damage(skill, amount);
for e in slay_events {
@@ -1732,7 +1732,7 @@ fn siphon(source: &mut Construct, target: &mut Construct, mut results: Resolutio
}
fn siphon_tick(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
let amount = source.blue_power().pct(skill.multiplier());
let amount = source.blue_power().pct(skill.multiplier()) + source.green_power().pct(skill.multiplier());
let siphon_events = target.deal_blue_damage(skill, amount);
for e in siphon_events {
@@ -2037,13 +2037,14 @@ mod tests {
.named(&"camel".to_string());
x.blue_power.force(256);
x.green_power.force(220);
x.green_life.force(1024);
x.green_life.reduce(512);
let mut results = resolve(Skill::Siphon, &mut x, &mut y, vec![]);
assert!(y.affected(Effect::Siphon));
assert!(x.green_life() == (512 + 256.pct(Skill::SiphonTick.multiplier())));
assert!(x.green_life() == (512 + 256.pct(Skill::SiphonTick.multiplier()) + 220.pct(Skill::SiphonTick.multiplier())));
let Resolution { source: _, target: _, event, stages: _ } = results.remove(0);
match event {
@@ -2053,14 +2054,15 @@ mod tests {
let Resolution { source: _, target: _, event, stages: _ } = results.remove(0);
match event {
Event::Damage { amount, skill: _, mitigation: _, colour: _} => assert_eq!(amount, 256.pct(Skill::SiphonTick.multiplier())),
Event::Damage { amount, skill: _, mitigation: _, colour: _} => assert_eq!(amount, 256.pct(Skill::SiphonTick.multiplier())
+ 220.pct(Skill::SiphonTick.multiplier())),
_ => panic!("not damage siphon"),
};
let Resolution { source: _, target, event, stages: _ } = results.remove(0);
match event {
Event::Healing { amount, skill: _, overhealing: _ } => {
assert_eq!(amount, 256.pct(Skill::SiphonTick.multiplier()));
assert_eq!(amount, 256.pct(Skill::SiphonTick.multiplier()) + 220.pct(Skill::SiphonTick.multiplier()));
assert_eq!(target.id, x.id);
},
_ => panic!("not healing"),