decay values enum Pog?
This commit is contained in:
parent
f941feea6f
commit
b033c719bc
@ -100,9 +100,9 @@ impl Cast {
|
|||||||
Skill::CounterAttackPlus |
|
Skill::CounterAttackPlus |
|
||||||
Skill::CounterAttackPlusPlus => counter_attack(self, game),
|
Skill::CounterAttackPlusPlus => counter_attack(self, game),
|
||||||
|
|
||||||
Skill::Decay => decay(self, game),
|
Skill::Decay => decay(self, game, Decay::Decay),
|
||||||
Skill::DecayPlus => decay_plus(self, game),
|
Skill::DecayPlus => decay(self, game, Decay::DecayPlus),
|
||||||
Skill::DecayPlusPlus => decay_plus_plus(self, game),
|
Skill::DecayPlusPlus => decay(self, game, Decay::DecayPlusPlus),
|
||||||
Skill::DecayTick => decay_tick(self, game),
|
Skill::DecayTick => decay_tick(self, game),
|
||||||
|
|
||||||
Skill::Electrify => electrify(self, game),
|
Skill::Electrify => electrify(self, game),
|
||||||
@ -1422,68 +1422,41 @@ fn counter_attack(cast: Cast, game: &mut Game) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn decay(cast: Cast, game: &mut Game) {
|
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
||||||
let amount = game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(cast.skill.multiplier());
|
enum Decay {
|
||||||
game.action(cast,
|
Decay,
|
||||||
Action::Damage {
|
DecayPlus,
|
||||||
construct: cast.target,
|
DecayPlusPlus,
|
||||||
colour: Colour::Blue,
|
|
||||||
amount,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
game.action(cast,
|
|
||||||
Action::Effect {
|
|
||||||
construct: cast.target,
|
|
||||||
effect: ConstructEffect { effect: Effect::Wither, duration: 3, meta: Some(EffectMeta::Multiplier(50)) },
|
|
||||||
}
|
|
||||||
);
|
|
||||||
game.action(cast,
|
|
||||||
Action::Effect {
|
|
||||||
construct: cast.target,
|
|
||||||
effect: ConstructEffect { effect: Effect::Decay, duration: 2, meta:
|
|
||||||
Some(EffectMeta::CastTick { source: cast.source, target: cast.target, skill: Skill::DecayTick, speed: cast.speed, amount }) },
|
|
||||||
}
|
|
||||||
);
|
|
||||||
game.action(cast,
|
|
||||||
Action::Effect {
|
|
||||||
construct: cast.target,
|
|
||||||
effect: ConstructEffect { effect: Effect::Decayed, duration: 1, meta: None }, // immunity to additional ticks
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn decay_plus(cast: Cast, game: &mut Game) {
|
impl Decay {
|
||||||
let amount = game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(cast.skill.multiplier());
|
pub fn decay_dmg_multiplier(self) -> usize {
|
||||||
game.action(cast,
|
match self {
|
||||||
Action::Damage {
|
Decay::Decay => 33, Decay::DecayPlus => 37, Decay::DecayPlusPlus => 45,
|
||||||
construct: cast.target,
|
|
||||||
colour: Colour::Blue,
|
|
||||||
amount,
|
|
||||||
}
|
}
|
||||||
);
|
|
||||||
game.action(cast,
|
|
||||||
Action::Effect {
|
|
||||||
construct: cast.target,
|
|
||||||
effect: ConstructEffect { effect: Effect::Wither, duration: 3, meta: Some(EffectMeta::Multiplier(35)) },
|
|
||||||
}
|
}
|
||||||
);
|
|
||||||
game.action(cast,
|
pub fn decay_duration(self) -> u8 {
|
||||||
Action::Effect {
|
match self {
|
||||||
construct: cast.target,
|
Decay::Decay => 3, Decay::DecayPlus => 4, Decay::DecayPlusPlus => 5,
|
||||||
effect: ConstructEffect { effect: Effect::Decay, duration: 4, meta:
|
}
|
||||||
Some(EffectMeta::CastTick { source: cast.source, target: cast.target, skill: Skill::DecayTick, speed: cast.speed, amount }) },
|
}
|
||||||
|
|
||||||
|
pub fn wither_multiplier(self) -> usize {
|
||||||
|
match self {
|
||||||
|
Decay::Decay => 50, Decay::DecayPlus => 35, Decay::DecayPlusPlus => 20,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn wither_duration(self) -> u8 {
|
||||||
|
match self {
|
||||||
|
Decay::Decay => 3, Decay::DecayPlus => 4, Decay::DecayPlusPlus => 5,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
game.action(cast,
|
|
||||||
Action::Effect {
|
|
||||||
construct: cast.target,
|
|
||||||
effect: ConstructEffect { effect: Effect::Decayed, duration: 1, meta: None }, // immunity to additional ticks
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn decay_plus_plus(cast: Cast, game: &mut Game) {
|
fn decay(cast: Cast, game: &mut Game, values: Decay) {
|
||||||
let amount = game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(cast.skill.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::Damage {
|
||||||
construct: cast.target,
|
construct: cast.target,
|
||||||
@ -1494,13 +1467,17 @@ fn decay_plus_plus(cast: Cast, game: &mut Game) {
|
|||||||
game.action(cast,
|
game.action(cast,
|
||||||
Action::Effect {
|
Action::Effect {
|
||||||
construct: cast.target,
|
construct: cast.target,
|
||||||
effect: ConstructEffect { effect: Effect::Wither, duration: 4, meta: Some(EffectMeta::Multiplier(20)) },
|
effect: ConstructEffect {
|
||||||
|
effect: Effect::Wither,
|
||||||
|
duration: values.wither_duration(),
|
||||||
|
meta: Some(EffectMeta::Multiplier(values.wither_multiplier()))
|
||||||
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
game.action(cast,
|
game.action(cast,
|
||||||
Action::Effect {
|
Action::Effect {
|
||||||
construct: cast.target,
|
construct: cast.target,
|
||||||
effect: ConstructEffect { effect: Effect::Decay, duration: 4, meta:
|
effect: ConstructEffect { effect: Effect::Decay, duration: values.decay_duration(), meta:
|
||||||
Some(EffectMeta::CastTick { source: cast.source, target: cast.target, skill: Skill::DecayTick, speed: cast.speed, amount }) },
|
Some(EffectMeta::CastTick { source: cast.source, target: cast.target, skill: Skill::DecayTick, speed: cast.speed, amount }) },
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user