MMerge branch 'core' of ssh://git.mnml.gg:40022/~/mnml into core

This commit is contained in:
ntr 2019-12-18 17:07:32 +10:00
commit c70c4584a6
2 changed files with 15 additions and 12 deletions

View File

@ -83,7 +83,7 @@ class Sleep extends Component {
rotate: 180, rotate: 180,
easing: 'linear', easing: 'linear',
loop: true, loop: true,
duration: TIMES.TARGET_DURATION_MS + TIMES.POST_SKILL_DURATION_MS, duration: TIMES.TARGET_DURATION_MS,
})); }));
this.animations.push(anime({ this.animations.push(anime({
@ -97,7 +97,7 @@ class Sleep extends Component {
this.animations.push(anime({ this.animations.push(anime({
targets: ['#charges'], targets: ['#charges'],
opacity: 1, opacity: 1,
delay: anime.stagger(TIMES.TARGET_DURATION_MS * 0.015, { start: TIMES.TARGET_DELAY_MS }), delay: anime.stagger(TIMES.TARGET_DURATION_MS * 0.01),
easing: 'easeInOutSine', easing: 'easeInOutSine',
})); }));

View File

@ -1309,19 +1309,19 @@ impl Absorption {
fn absorption(cast: Cast, game: &mut Game, values: Absorption) { fn absorption(cast: Cast, game: &mut Game, values: Absorption) {
game.action(cast, game.action(cast,
Action::Remove { Action::Remove {
construct: cast.source, construct: cast.target,
effect: Effect::Absorb, effect: Effect::Absorb,
} }
); );
game.action(cast, game.action(cast,
Action::Effect { Action::Effect {
construct: cast.source, construct: cast.target,
effect: ConstructEffect { effect: Effect::Absorption, duration: values.duration(), meta: Some(EffectMeta::AddedDamage(0)) }, effect: ConstructEffect { effect: Effect::Absorption, duration: values.duration(), meta: Some(EffectMeta::AddedDamage(0)) },
} }
); );
game.action(cast, game.action(cast,
Action::SetEffectMeta { Action::SetEffectMeta {
construct: cast.source, construct: cast.target,
effect: Effect::Absorption, effect: Effect::Absorption,
amount: game.value(Value::DamageReceived { construct: cast.source, colour: Colour::Blue }).pct(100), amount: game.value(Value::DamageReceived { construct: cast.source, colour: Colour::Blue }).pct(100),
}, },
@ -1580,12 +1580,13 @@ impl Decay {
fn decay(cast: Cast, game: &mut Game, values: Decay) { fn decay(cast: Cast, game: &mut Game, values: Decay) {
let amount = game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(values.decay_dmg_multiplier()); let amount = game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(values.decay_dmg_multiplier());
game.action(cast, game.action(cast,
Action::Damage { Action::Effect {
construct: cast.target, construct: cast.target,
colour: Colour::Blue, effect: ConstructEffect { effect: Effect::Decay, duration: values.decay_duration(), meta:
amount, Some(EffectMeta::CastTick { source: cast.source, target: cast.target, skill: Skill::DecayTick, speed: cast.speed, amount }) },
} }
); );
game.action(cast, game.action(cast,
Action::Effect { Action::Effect {
construct: cast.target, construct: cast.target,
@ -1596,13 +1597,15 @@ fn decay(cast: Cast, game: &mut Game, values: Decay) {
}, },
} }
); );
game.action(cast, game.action(cast,
Action::Effect { Action::Damage {
construct: cast.target, construct: cast.target,
effect: ConstructEffect { effect: Effect::Decay, duration: values.decay_duration(), meta: colour: Colour::Blue,
Some(EffectMeta::CastTick { source: cast.source, target: cast.target, skill: Skill::DecayTick, speed: cast.speed, amount }) }, amount,
} }
); );
game.action(cast, game.action(cast,
Action::Effect { Action::Effect {
construct: cast.target, construct: cast.target,
@ -1685,7 +1688,7 @@ fn electrocute(cast: Cast, game: &mut Game, values: Electrocute) {
game.action(cast, game.action(cast,
Action::Remove { Action::Remove {
construct: cast.source, construct: cast.source,
effect: Effect::Electric, effect: Effect::Electrocute,
} }
); );
game.action(cast, game.action(cast,