link rework, description bg
This commit is contained in:
parent
bbfeb22a3f
commit
4514d6c0c2
@ -264,7 +264,10 @@
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
text-align: center;
|
||||
background-color: black;
|
||||
z-index: 2;
|
||||
span {
|
||||
background-color: black;
|
||||
}
|
||||
svg {
|
||||
display: inline;
|
||||
height: 1em;
|
||||
|
||||
@ -143,12 +143,14 @@ class GameConstruct extends Component {
|
||||
const fullInfo = itemInfo.items.find(k => k.item === gameSkillInfo.skill) || INFO[gameSkillInfo.skill];
|
||||
const regEx = /(RedPower|BluePower|GreenPower|RedLife|BlueLife|GreenLife|SpeedStat)/;
|
||||
const infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]());
|
||||
const speed = <div> Speed {shapes.SpeedStat()} multiplier {fullInfo.speed * 4}% </div>;
|
||||
const speed = <span> Speed {shapes.SpeedStat()} multiplier {fullInfo.speed * 4}% </span>;
|
||||
return (
|
||||
<div class="skill-description">
|
||||
<h2> {gameSkillInfo.skill} </h2>
|
||||
<div> {infoDescription} </div>
|
||||
{speed}
|
||||
<span>
|
||||
<h2> {gameSkillInfo.skill} </h2>
|
||||
{infoDescription}
|
||||
{speed}
|
||||
</span>
|
||||
</div>);
|
||||
}
|
||||
const effects = construct.effects.length
|
||||
|
||||
@ -859,11 +859,10 @@ impl Item {
|
||||
Item::Link|
|
||||
Item::LinkPlus |
|
||||
Item::LinkPlusPlus => format!(
|
||||
"Swap {:?}% of green life difference as blue damage to the target and healing to the caster.
|
||||
The swap only occurs if the target construct has more green life than caster.
|
||||
Stuns caster for {:?}T in the process.",
|
||||
self.into_skill().unwrap().multiplier(),
|
||||
self.into_skill().unwrap().effect()[0].get_duration()),
|
||||
"Stun target for {:?}T.
|
||||
Deal blue damage of {:?}% BluePower multiplied by number of effects on target.",
|
||||
self.into_skill().unwrap().effect()[0].get_duration(),
|
||||
self.into_skill().unwrap().multiplier()),
|
||||
|
||||
Item::Silence|
|
||||
Item::SilencePlus |
|
||||
|
||||
@ -823,9 +823,9 @@ impl Skill {
|
||||
Skill::BashPlus => 65,
|
||||
Skill::BashPlusPlus => 100,
|
||||
|
||||
Skill::Link => 75,
|
||||
Skill::LinkPlus => 100,
|
||||
Skill::LinkPlusPlus => 150,
|
||||
Skill::Link => 25,
|
||||
Skill::LinkPlus => 40,
|
||||
Skill::LinkPlusPlus => 70,
|
||||
|
||||
Skill::Ruin => 40,
|
||||
Skill::RuinPlus => 70,
|
||||
@ -981,8 +981,8 @@ impl Skill {
|
||||
Skill::PurgePlus => vec![ConstructEffect {effect: Effect::Purge, duration: 3, meta: None, tick: None}],
|
||||
Skill::PurgePlusPlus => vec![ConstructEffect {effect: Effect::Purge, duration: 4, meta: None, tick: None}],
|
||||
|
||||
Skill::Link => vec![ConstructEffect {effect: Effect::Stun, duration: 3, meta: None, tick: None}],
|
||||
Skill::LinkPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 2, meta: None, tick: None}],
|
||||
Skill::Link => vec![ConstructEffect {effect: Effect::Stun, duration: 1, meta: None, tick: None}],
|
||||
Skill::LinkPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 1, meta: None, tick: None}],
|
||||
Skill::LinkPlusPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 1, meta: None, tick: None}],
|
||||
|
||||
Skill::Silence => vec![ConstructEffect {effect: Effect::Silence, duration: 2, meta: None, tick: None}],
|
||||
@ -1098,7 +1098,7 @@ impl Skill {
|
||||
|
||||
Skill::Link |
|
||||
Skill::LinkPlus |
|
||||
Skill::LinkPlusPlus => Some(2),
|
||||
Skill::LinkPlusPlus => Some(1),
|
||||
|
||||
Skill::Silence |
|
||||
Skill::SilencePlus |
|
||||
@ -1786,27 +1786,12 @@ fn siphon_tick(source: &mut Construct, target: &mut Construct, mut results: Reso
|
||||
}
|
||||
|
||||
fn link(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
|
||||
let swap = match target.green_life().checked_sub(source.green_life()) {
|
||||
Some(s) => s.pct(skill.multiplier()),
|
||||
None => 0
|
||||
};
|
||||
|
||||
let link_events = target.deal_blue_damage(skill, swap);
|
||||
for e in link_events {
|
||||
match e {
|
||||
Event::Damage { amount, mitigation: _, colour: _, skill: _ } => {
|
||||
results.push(Resolution::new(source, target).event(e));
|
||||
let heal = source.deal_green_damage(skill, amount);
|
||||
for h in heal {
|
||||
results.push(Resolution::new(source, source).event(h).stages(EventStages::PostOnly));
|
||||
};
|
||||
},
|
||||
_ => results.push(Resolution::new(source, target).event(e)),
|
||||
}
|
||||
}
|
||||
|
||||
results.push(Resolution::new(source, source)
|
||||
.event(source.add_effect(skill, skill.effect()[0])).stages(EventStages::PostOnly));
|
||||
results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0])));
|
||||
|
||||
let amount = source.blue_power().pct(skill.multiplier().saturating_mul(target.effects.len() as u64));
|
||||
target.deal_blue_damage(skill, amount)
|
||||
.into_iter()
|
||||
.for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly)));
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user