spec info update

This commit is contained in:
Mashy 2019-09-19 16:01:46 +10:00
parent f04d179023
commit f78496e681
5 changed files with 107 additions and 59 deletions

View File

@ -133,14 +133,16 @@ function InfoComponent(args) {
} }
return false; return false;
}); });
console.log(info);
const bonusObj = info.includes('Life')
? <div class={`${reqClass} bonus`} > + {bonus.bonus}</div>
: <div class={`${reqClass} bonus`} > + {bonus.bonus}%</div>;
const overFlowObj = overFlow.length ? <div> {overFlow} </div> : null; const overFlowObj = overFlow.length ? <div> {overFlow} </div> : null;
return ( return (
<div key={i} class="spec-goal"> <div key={i} class="spec-goal">
{goals} {goals}
{overFlowObj} {overFlowObj}
<div class={`${reqClass} bonus`} > {bonusObj}
+ {bonus.bonus}
</div>
</div> </div>
); );
}); });

View File

@ -179,10 +179,9 @@ function Construct(props) {
const stats = Object.keys(STATS).map(s => { const stats = Object.keys(STATS).map(s => {
const stat = STATS[s]; const stat = STATS[s];
const info = (s === 'SpeedStat' && 'Speed') const info = (s === 'SpeedStat' && 'speedStat')
|| (s.includes('Power') && 'Power') || (s.includes('Power') && 'powerStat')
|| (s.includes('Life') && 'Life'); || (s.includes('Life') && 'lifeStat');
return <div key={stat.stat} return <div key={stat.stat}
alt={stat.stat} alt={stat.stat}
class={stat.stat} class={stat.stat}

View File

@ -72,6 +72,17 @@ module.exports = {
item: 'SPECS', item: 'SPECS',
description: 'SPECS increase the STATS of a CONSTRUCT.\nSPECS have increased effect once they reach a THRESHOLD across your whole team.\nClick a SPEC above and select a CONSTRUCT to equip.\nDouble-click to unequip.', description: 'SPECS increase the STATS of a CONSTRUCT.\nSPECS have increased effect once they reach a THRESHOLD across your whole team.\nClick a SPEC above and select a CONSTRUCT to equip.\nDouble-click to unequip.',
}, },
powerStat: {
item: 'POWER',
description: 'Power determines the base damage and healing of your construct skills. Combine POWER specs to increase construct power.',
},
lifeStat: {
item: 'LIFE',
description: 'The life of your construct.\n When your construct reaches 0 green life it is knocked out and cannot cast skills.\nRed life mitigates red damage and blue life mitigates blue damage. Combine LIFE specs to increase life totals.',
},
speedStat: {
item: 'SPEED',
description: 'Speed determines the order in which skills resolve. Combine SPEED specs to increase speed.',
},
}, },
}; };

View File

@ -577,62 +577,92 @@ impl Item {
100 - self.into_skill().unwrap().effect()[0].get_multiplier()), 100 - self.into_skill().unwrap().effect()[0].get_multiplier()),
// specs // specs
// Base // Base
Item::Power => format!("Base item for increased power. Power determines the base damage and healing of your construct skills."), Item::Power => format!("Increases all power stats by {:?}%. Power determines the base damage and healing of your construct skills.",
Item::Life => format!("Base item for increased life. self.into_spec().unwrap().values().base()),
When your construct reaches 0 GreenLife it is knocked out and cannot cast skills."), Item::Life => format!("Increases construct GreenLife by {:?}.
Item::Speed => format!("Base item for increased speed. When your construct reaches 0 GreenLife it is knocked out and cannot cast skills.",
Speed SpeedStat determines the order in which skills resolve."), self.into_spec().unwrap().values().base()),
Item::Speed => format!("Increases construct speed by {:?}%.
Speed SpeedStat determines the order in which skills resolve.",
self.into_spec().unwrap().values().base()),
// Lifes Upgrades // Lifes Upgrades
Item::LifeGG=> format!("Increases construct GreenLife green life. Item::LifeGG |
When your construct reaches 0 GreenLife it is knocked out and cannot cast skills."), Item::LifeGGPlus |
Item::LifeRR=> format!("Increases construct RedLife red life. Item::LifeGGPlusPlus => format!("Increases construct GreenLife by {:?}.
Mitigates red damage that would otherwise reduce your GreenLife green life."), If your team meets total colour thresholds the spec provides additional bonuses",
Item::LifeBB=> format!("Increases construct BlueLife blue life. self.into_spec().unwrap().values().base()),
Mitigates blue damage that would otherwise reduce your GreenLife green life."),
Item::LifeRG=> format!("Increases construct GreenLife and RedLife"), Item::LifeRR |
Item::LifeGB=> format!("Increases construct GreenLife and BlueLife"), Item::LifeRRPlus |
Item::LifeRB=> format!("Increases construct RedLife and BlueLife"), Item::LifeRRPlusPlus => format!("Increases construct RedLife by {:?}.
Item::LifeGGPlus => format!("Increases construct GreenLife."), If your team meets total colour thresholds the spec provides additional bonuses",
Item::LifeRRPlus => format!("Increases construct RedLife."), self.into_spec().unwrap().values().base()),
Item::LifeBBPlus => format!("Increases construct BlueLife."),
Item::LifeRGPlus => format!("Increases construct GreenLife and RedLife"), Item::LifeBB |
Item::LifeGBPlus => format!("Increases construct GreenLife and BlueLife"), Item::LifeBBPlus |
Item::LifeRBPlus => format!("Increases construct RedLife and BlueLife"), Item::LifeBBPlusPlus => format!("Increases construct BlueLife by {:?}.
Item::LifeGGPlusPlus => format!("Increases construct GreenLife."), If your team meets total colour thresholds the spec provides additional bonuses",
Item::LifeRRPlusPlus => format!("Increases construct RedLife."), self.into_spec().unwrap().values().base()),
Item::LifeBBPlusPlus => format!("Increases construct BlueLife."),
Item::LifeRGPlusPlus => format!("Increases construct GreenLife and RedLife"), Item::LifeRG |
Item::LifeGBPlusPlus => format!("Increases construct GreenLife and BlueLife"), Item::LifeRGPlus |
Item::LifeRBPlusPlus => format!("Increases construct RedLife and BlueLife"), Item::LifeRGPlusPlus => format!("Increases construct RedLife and GreenLife by {:?}.
If your team meets total colour thresholds the spec provides additional bonuses",
self.into_spec().unwrap().values().base()),
Item::LifeGB |
Item::LifeGBPlus |
Item::LifeGBPlusPlus => format!("Increases construct GreenLife and BlueLife by {:?}.
If your team meets total colour thresholds the spec provides additional bonuses",
self.into_spec().unwrap().values().base()),
Item::LifeRB |
Item::LifeRBPlus |
Item::LifeRBPlusPlus => format!("Increases construct RedLife and BlueLife by {:?}.
If your team meets total colour thresholds the spec provides additional bonuses",
self.into_spec().unwrap().values().base()),
// Power Upgrades // Power Upgrades
Item::PowerRR=> format!("Increases construct RedPower."), Item::PowerRR |
Item::PowerBB=> format!("Increases construct BluePower."), Item::PowerRRPlus |
Item::PowerGG=> format!("Increases construct GreenPower."), Item::PowerRRPlusPlus => format!("Increases construct RedPower by {:?}%.
Item::PowerRG=> format!("Increases construct GreenPower and RedPower."), If your team meets total colour thresholds the spec provides additional bonuses",
Item::PowerGB=> format!("Increases construct GreenPower and BluePower."), self.into_spec().unwrap().values().base()),
Item::PowerRB=> format!("Increases construct RedPower and BluePower."), Item::PowerBB |
Item::PowerRRPlus => format!("Increases construct RedPower."), Item::PowerBBPlus |
Item::PowerBBPlus => format!("Increases construct BluePower."), Item::PowerBBPlusPlus => format!("Increases construct BluePower by {:?}%.
Item::PowerGGPlus => format!("Increases construct GreenPower."), If your team meets total colour thresholds the spec provides additional bonuses",
Item::PowerRGPlus => format!("Increases construct GreenPower and RedPower."), self.into_spec().unwrap().values().base()),
Item::PowerGBPlus => format!("Increases construct GreenPower and BluePower."),
Item::PowerRBPlus => format!("Increases construct RedPower and BluePower."), Item::PowerGG |
Item::PowerRRPlusPlus => format!("Increases construct RedPower."), Item::PowerGGPlus |
Item::PowerBBPlusPlus => format!("Increases construct BluePower."), Item::PowerGGPlusPlus => format!("Increases construct GreenPower by {:?}%.
Item::PowerGGPlusPlus => format!("Increases construct GreenPower."), If your team meets total colour thresholds the spec provides additional bonuses",
Item::PowerRGPlusPlus => format!("Increases construct GreenPower and RedPower."), self.into_spec().unwrap().values().base()),
Item::PowerGBPlusPlus => format!("Increases construct GreenPower and BluePower."), Item::PowerRG |
Item::PowerRBPlusPlus => format!("Increases construct RedPower and BluePower."), Item::PowerRGPlus |
Item::PowerRGPlusPlus => format!("Increases construct GreenPower and RedPower by {:?}%.
If your team meets total colour thresholds the spec provides additional bonuses",
self.into_spec().unwrap().values().base()),
Item::PowerGB |
Item::PowerGBPlus |
Item::PowerGBPlusPlus => format!("Increases construct GreenPower and BluePower by {:?}%.
If your team meets total colour thresholds the spec provides additional bonuses",
self.into_spec().unwrap().values().base()),
Item::PowerRB |
Item::PowerRBPlus |
Item::PowerRBPlusPlus => format!("Increases construct RedPower and BluePower by {:?}%.
If your team meets total colour thresholds the spec provides additional bonuses",
self.into_spec().unwrap().values().base()),
// Speed Upgrades // Speed Upgrades
Item::SpeedRR| Item::SpeedRR |
Item::SpeedBB| Item::SpeedBB |
Item::SpeedGG| Item::SpeedGG |
Item::SpeedRG| Item::SpeedRG |
Item::SpeedGB| Item::SpeedGB |
Item::SpeedRB| Item::SpeedRB |
Item::SpeedRRPlus | Item::SpeedRRPlus |
Item::SpeedBBPlus | Item::SpeedBBPlus |
Item::SpeedGGPlus | Item::SpeedGGPlus |
@ -644,7 +674,9 @@ impl Item {
Item::SpeedGGPlusPlus | Item::SpeedGGPlusPlus |
Item::SpeedRGPlusPlus | Item::SpeedRGPlusPlus |
Item::SpeedGBPlusPlus | Item::SpeedGBPlusPlus |
Item::SpeedRBPlusPlus => format!("Increases construct SpeedStat and provides COLOUR BONUSES"), Item::SpeedRBPlusPlus => format!("Increases construct SpeedStat by {:?}%.
If your team meets total colour thresholds the spec provides additional bonuses",
self.into_spec().unwrap().values().base()),
// Skills <- need to move effect mulltipliers into skills // Skills <- need to move effect mulltipliers into skills
Item::Amplify| Item::Amplify|

View File

@ -28,6 +28,10 @@ impl SpecValues {
self.bonuses.iter().fold(self.base, |acc, s| acc + s.get_bonus(c)) self.bonuses.iter().fold(self.base, |acc, s| acc + s.get_bonus(c))
} }
pub fn base (self) -> u64 {
self.base
}
/* /*
pub fn calc_multi (&self, c: &Colours) -> u64 { pub fn calc_multi (&self, c: &Colours) -> u64 {
self.multi * (c.red + c.green + c.blue) as u64 self.multi * (c.red + c.green + c.blue) as u64