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

This commit is contained in:
ntr 2019-05-08 14:17:21 +10:00
commit 25fecf09ae
5 changed files with 27 additions and 22 deletions

View File

@ -17,11 +17,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- fx for buffs when applied to enemies - fx for buffs when applied to enemies
- invert + haste -> doubles all cooldowns - invert + haste -> doubles all cooldowns
New skill `Scatter `
Combines - Buff + BB
Links targets together so dmg taken is split
Recharge 140% source blue damage as blue life to target
var / skill info rpc var / skill info rpc
thresholds / bonuses thresholds / bonuses
sell cost sell cost
@ -30,6 +25,11 @@ var / skill info rpc
## [0.1.2] - 2019-05-07 ## [0.1.2] - 2019-05-07
### Added ### Added
New skill `Scatter `
Combines - Buff + BB
Links targets together so dmg taken is split
Recharge 140% source blue damage as blue life to target
New skill `Impurity` New skill `Impurity`
Combines - Buff + GB Combines - Buff + GB
New buff that does the following - New buff that does the following -
@ -71,13 +71,12 @@ New skill `Impurity`
Inc red and blue multiplier changed 200% -> 150% Inc red and blue multiplier changed 200% -> 150%
`(More reworks soon to make this skill fun)` `(More reworks soon to make this skill fun)`
- Haste - Haste
Changed to Buff + RG (was Buff + RB) Changed to Buff + RG (was Buff + RB)
Buff causes target to deal an extra attack when using red attack base skills (strike / slay / chaos) Buff causes target to deal an extra attack when using red attack base skills (strike / slay / chaos)
Extra attack does 25% source speed as red damage Extra attack does 25% source speed as red damage
Cooldown increased to 2T Cooldown increased to 2T
Speed bonused reduced 200% -> 150% Speed bonus reduced 200% -> 150%
- Heal - Heal
Changed multiplier 120% -> 130% Changed multiplier 120% -> 130%

View File

@ -51,7 +51,6 @@ function GameCryp(props) {
const { const {
cryp, cryp,
resolution, resolution,
activeSkill, activeSkill,
setActiveCryp, setActiveCryp,
selectSkillTarget, selectSkillTarget,

View File

@ -221,7 +221,7 @@ function getCombatSequence(event) {
// Skip combat animations depending on event type, expandable in future // Skip combat animations depending on event type, expandable in future
const dotTicks = ['DecayTick', 'CorruptionTick', 'TriageTick', 'SiphonTick', 'StrangleTick']; const dotTicks = ['DecayTick', 'CorruptionTick', 'TriageTick', 'SiphonTick', 'StrangleTick'];
if (['Skill'].includes(event[0])) return ['START_SKILL', 'END_SKILL']; if (['Skill', 'AoeSkill'].includes(event[0])) return ['START_SKILL', 'END_SKILL'];
if (['Immunity'].includes(event[0])) return ['START_SKILL', 'POST_SKILL']; if (['Immunity'].includes(event[0])) return ['START_SKILL', 'POST_SKILL'];
if (['Removal'].includes(event[0])) return ['POST_SKILL']; if (['Removal'].includes(event[0])) return ['POST_SKILL'];
@ -235,12 +235,9 @@ function getCombatSequence(event) {
&& (event[1].skill === 'Reflect')) return ['POST_SKILL']; && (event[1].skill === 'Reflect')) return ['POST_SKILL'];
if (['Effect'].includes(event[0]) if (event[0] === 'Effect'
&& ((event[1].skill === 'Decay' && event[1].effect === 'Wither') && (['Ruin', 'Taunt', 'Strangling', 'Parry'].includes(event[1].skill)
|| event[1].skill === 'Ruin' || (event[1].skill === 'Decay' && event[1].effect === 'Wither'))) return ['POST_SKILL'];
|| event[1].skill === 'Taunt'
|| event[1].skill === 'Strangling'
|| event[1].skill === 'Parry')) return ['POST_SKILL'];
if (['Damage'].includes(event[0]) if (['Damage'].includes(event[0])
&& ((event[1].skill === 'Chaos' && event[1].colour === 'RedDamage') && ((event[1].skill === 'Chaos' && event[1].colour === 'RedDamage')
@ -257,6 +254,7 @@ function getCombatSequence(event) {
function getCombatText(cryp, resolution) { function getCombatText(cryp, resolution) {
if (!resolution) return ''; if (!resolution) return '';
const [type, event] = resolution.event; const [type, event] = resolution.event;
const source = cryp.id === resolution.source.id; const source = cryp.id === resolution.source.id;
const target = cryp.id === resolution.target.id; const target = cryp.id === resolution.target.id;
@ -333,7 +331,7 @@ function getCombatText(cryp, resolution) {
if (postSkill && target) return `+${red}R ${blue}B`; if (postSkill && target) return `+${red}R ${blue}B`;
} }
if (type === 'Skill') { if (type === 'Skill' || type === 'AoeSkill') {
const { skill } = event; const { skill } = event;
if (startSkill && source) return `${skill}`; if (startSkill && source) return `${skill}`;
if (endSkill && target) return `${skill}`; if (endSkill && target) return `${skill}`;

View File

@ -510,6 +510,10 @@ impl Game {
self.log.push(format!("[{:}] {:} {:?} {:} {:?} {:}T", self.log.push(format!("[{:}] {:} {:?} {:} {:?} {:}T",
speed, source.name, skill, target.name, effect, duration)), speed, source.name, skill, target.name, effect, duration)),
Event::AoeSkill { skill } =>
self.log.push(format!("[{:}] {:} {:?} {:}",
speed, source.name, skill, target.name)),
Event::Skill { skill } => Event::Skill { skill } =>
self.log.push(format!("[{:}] {:} {:?} {:}", self.log.push(format!("[{:}] {:} {:?} {:}",
speed, source.name, skill, target.name)), speed, source.name, skill, target.name)),
@ -1125,7 +1129,7 @@ mod tests {
// should auto progress back to skill phase // should auto progress back to skill phase
assert!(game.phase == Phase::Skill); assert!(game.phase == Phase::Skill);
assert!(game.player_by_id(y_player.id).unwrap().cryps[0].skill_on_cd(Skill::Stun).is_none()); assert!(game.player_by_id(y_player.id).unwrap().cryps[0].skill_on_cd(Skill::Stun).is_some());
// second round // second round
// now we block and it should go back on cd // now we block and it should go back on cd
@ -1137,7 +1141,7 @@ mod tests {
game = game.resolve_phase_start(); game = game.resolve_phase_start();
assert!(game.player_by_id(x_player.id).unwrap().cryps[0].skill_on_cd(Skill::Stun).is_some()); assert!(game.player_by_id(x_player.id).unwrap().cryps[0].skill_on_cd(Skill::Stun).is_none());
assert!(game.player_by_id(y_player.id).unwrap().cryps[0].skill_on_cd(Skill::Block).is_none()); assert!(game.player_by_id(y_player.id).unwrap().cryps[0].skill_on_cd(Skill::Block).is_none());
} }
@ -1319,7 +1323,7 @@ mod tests {
assert!(*duration == 1); assert!(*duration == 1);
true true
}, },
Event::Skill { skill } => false, Event::AoeSkill { skill } => false,
_ => panic!("ruin result not effect {:?}", event), _ => panic!("ruin result not effect {:?}", event),
} }
false => false, false => false,

View File

@ -16,9 +16,14 @@ pub fn resolution_steps(cast: &Cast, game: &mut Game) -> Resolutions {
} }
pub fn pre_resolve(cast: &Cast, game: &mut Game, mut resolutions: Resolutions) -> Resolutions { pub fn pre_resolve(cast: &Cast, game: &mut Game, mut resolutions: Resolutions) -> Resolutions {
let skill = cast.skill;
let source = game.cryp_by_id(cast.source_cryp_id).unwrap().clone(); let source = game.cryp_by_id(cast.source_cryp_id).unwrap().clone();
let targets = game.get_targets(cast.skill, &source, cast.target_cryp_id); let targets = game.get_targets(cast.skill, &source, cast.target_cryp_id);
if skill.aoe() { // Send an aoe skill event for anims
resolutions.push(Resolution::new(&source, &game.cryp_by_id(cast.target_cryp_id).unwrap().clone()).event(Event::AoeSkill { skill }));
}
for target_id in targets { for target_id in targets {
// we clone the current state of the target and source // we clone the current state of the target and source
// so we can modify them during the resolution // so we can modify them during the resolution
@ -294,6 +299,7 @@ pub enum Event {
Inversion { skill: Skill }, Inversion { skill: Skill },
Reflection { skill: Skill }, Reflection { skill: Skill },
Effect { skill: Skill, effect: Effect, duration: u8 }, Effect { skill: Skill, effect: Effect, duration: u8 },
AoeSkill { skill: Skill },
Skill { skill: Skill }, Skill { skill: Skill },
Removal { effect: Effect }, Removal { effect: Effect },
TargetKo { skill: Skill }, TargetKo { skill: Skill },
@ -754,7 +760,7 @@ impl Skill {
Skill::Parry => Some(2), // avoid all damage Skill::Parry => Some(2), // avoid all damage
Skill::Riposte => None, // used on parry Skill::Riposte => None, // used on parry
Skill::Snare => Some(2), Skill::Snare => Some(2),
Skill::Stun => Some(1), Skill::Stun => Some(2),
Skill::Heal => None, Skill::Heal => None,
Skill::Triage => None, // hot Skill::Triage => None, // hot
Skill::TriageTick => None, Skill::TriageTick => None,
@ -762,7 +768,7 @@ impl Skill {
Skill::Blast => None, Skill::Blast => None,
Skill::Chaos => None, Skill::Chaos => None,
Skill::Amplify => Some(1), Skill::Amplify => Some(1),
Skill::Impurity => None, Skill::Impurity => Some(3),
Skill::ImpureBlast => None, Skill::ImpureBlast => None,
Skill::Invert => Some(2), Skill::Invert => Some(2),
Skill::Decay => Some(1), // dot Skill::Decay => Some(1), // dot
@ -1236,7 +1242,6 @@ 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 { fn ruin(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions {
results.push(Resolution::new(source, target).event(Event::Skill { skill }));
let effect = CrypEffect::new(Effect::Ruin, skill.duration()); let effect = CrypEffect::new(Effect::Ruin, skill.duration());
results.push(Resolution::new(source, target).event(target.add_effect(skill, effect))); results.push(Resolution::new(source, target).event(target.add_effect(skill, effect)));
return results;; return results;;