Purify heals for each debuff removed, switched reflect & purify vbox spot

This commit is contained in:
Mashy 2019-05-03 10:01:01 +10:00
parent 18c8016908
commit d04203066f
5 changed files with 60 additions and 10 deletions

View File

@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [0.1.1] - YYYY-MM-DD
### Added
Event::Skill
needed to convey the use of skill which is followed by other events
used for skill Purify to show that it is used and then followed by removal and other events
### Fixed
### Changed
Switch purify with reflect
- Purify now GG + block instead of GB + block
- Purify now applies a small heal 45% multiplier green damage (power)
- reflect now GB + block
- reflect restores blue shield
## [0.1.0] - 2019-05-02
### Added
New skill `Chaos`
- 50% base red & blue with an additional rng 20% blue & red
@ -38,6 +57,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
`SiphonTick` 100% -> 30%
`StrangleTick` 100% -> 30%
`Strike` 100% -> 110%
`TriageTick` 100% -> 65%
## [0.0.1] - 2019-05-02
`TriageTick` 100% -> 65%

View File

@ -185,6 +185,13 @@ function eventClasses(resolution, cryp) {
if (target && endSkill) return 'active-skill';
}
if (type === 'Skill') {
const { skill } = event;
// Highlight the flow of damage from source -> target
if (source && startSkill) return 'active-skill';
if (target && endSkill) return 'active-skill';
}
if (type === 'Removal') {
const { effect } = event;
}
@ -213,10 +220,15 @@ function getCombatSequence(event) {
if (!event) return false;
// Skip combat animations depending on event type, expandable in future
const dotTicks = ['DecayTick', 'CorruptionTick', 'TriageTick', 'SiphonTick', 'StrangleTick'];
if (dotTicks.includes(event[1].skill)) return ['END_SKILL', 'POST_SKILL'];
if (['Skill'].includes(event[0])) return ['START_SKILL', 'END_SKILL'];
if (['Immunity'].includes(event[0])) return ['START_SKILL', 'POST_SKILL'];
if (['Healing'].includes(event[0]) && event[1].skill === 'Slay') return ['POST_SKILL'];
if (['Removal'].includes(event[0])) return ['POST_SKILL'];
if (['Healing'].includes(event[0])
&& (event[1].skill === 'Slay'
|| event[1].skill === 'SiphonTick'
|| event[1].skill === 'Purify')) return ['POST_SKILL'];
if (['Effect'].includes(event[0])
&& event[1].skill === 'Decay' && event[1].effect === 'Wither') return ['POST_SKILL'];
@ -227,6 +239,7 @@ function getCombatSequence(event) {
if (['Ko'].includes(event[0])
|| (event[1].skill === 'Throw' && event[1].effect === 'Vulnerable')) return ['POST_SKILL'];
if (dotTicks.includes(event[1].skill)) return ['END_SKILL', 'POST_SKILL'];
return ['START_SKILL', 'END_SKILL', 'POST_SKILL'];
}
@ -309,10 +322,15 @@ function getCombatText(cryp, resolution) {
if (postSkill && target) return `+${red}R ${blue}B`;
}
if (type === 'Skill') {
const { skill } = event;
if (startSkill && source) return `${skill}`;
if (endSkill && target) return `${skill}`;
}
if (type === 'Removal') {
const { effect } = event;
if (postSkill && target) return `- ${effect}`;
if (postSkill && target) return `-${effect}`;
}

View File

@ -522,6 +522,10 @@ impl Game {
self.log.push(format!("[{:}] {:} {:?} {:} {:?} {:}T",
speed, source.name, skill, target.name, effect, duration)),
Event::Skill { skill } =>
self.log.push(format!("[{:}] {:} {:?} {:}",
speed, source.name, skill, target.name)),
Event::Removal { effect } =>
self.log.push(format!("[{:}] {:?} removed {:} {:?}",
speed, source.name, target.name, effect)),

View File

@ -203,12 +203,14 @@ pub enum Event {
Inversion { skill: Skill },
Reflection { skill: Skill },
Effect { skill: Skill, effect: Effect, duration: u8 },
Skill { skill: Skill },
Removal { effect: Effect },
Evasion { skill: Skill, evasion_rating: u64 },
TargetKo { skill: Skill },
// skill not necessary but makes it neater as all events are arrays in js
Ko { skill: Skill },
Incomplete,
// not used
Evasion { skill: Skill, evasion_rating: u64 },
}
type Resolutions = Vec<Resolution>;
@ -553,12 +555,16 @@ impl Skill {
Skill::Attack => 100, // 1.0 to pass tests
Skill::Blast => 130, // BB
Skill::Chaos => 50, // BR
Skill::Heal => 120, //GG 1.0 to pass tests
Skill::Heal => 120, //GG
Skill::Slay => 70, // RG
Skill::Strike => 110, //RR
Skill::StrikeII => 130,
Skill::StrikeIII => 150,
// Block Base
Skill::Purify => 45, //Green dmg (heal)
// Others
Skill::CorruptionTick => 80,
Skill::DecayTick => 25,
@ -1191,11 +1197,16 @@ fn purge(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill:
}
fn purify(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions {
results.push(Resolution::new(source, target).event(Event::Skill { skill }));
let amount = source.green_damage().pct(skill.multiplier());
while let Some(i) = target.effects
.iter()
.position(|ce| [Category::Debuff, Category::Debuff].contains(&ce.effect.category())) {
let ce = target.effects.remove(i);
results.push(Resolution::new(source, target).event(Event::Removal { effect: ce.effect }));
target.deal_green_damage(skill, amount)
.into_iter()
.for_each(|e| results.push(Resolution::new(source, target).event(e)));
}
return results;

View File

@ -363,10 +363,10 @@ fn get_combos() -> Vec<Combo> {
Combo { units: vec![Var::Debuff, Var::Red, Var::Blue], var: Var::Invert },
Combo { units: vec![Var::Block, Var::Red, Var::Red], var: Var::Parry },
Combo { units: vec![Var::Block, Var::Green, Var::Green], var: Var::Reflect },
Combo { units: vec![Var::Block, Var::Green, Var::Green], var: Var::Purify },
Combo { units: vec![Var::Block, Var::Blue, Var::Blue], var: Var::Corrupt },
Combo { units: vec![Var::Block, Var::Red, Var::Green], var: Var::Taunt },
Combo { units: vec![Var::Block, Var::Green, Var::Blue], var: Var::Purify },
Combo { units: vec![Var::Block, Var::Green, Var::Blue], var: Var::Reflect },
Combo { units: vec![Var::Block, Var::Red, Var::Blue], var: Var::Recharge },
Combo { units: vec![Var::Stun, Var::Red, Var::Red], var: Var::Strangle },