diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index 36fc19b5..f990d118 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -162,30 +162,11 @@ function InfoComponent(args) { function Combos() { if (!player) return false; - - // show recipe for what's in combiner - if (combiner.some(u => u !== null)) { - const filteredCombos = itemInfo.combos - .filter(combo => combiner.every(u => u === null - || combo.components.includes(player.vbox.bound[u]))); - if (filteredCombos.length > 6) return false; - return ( - - - {filteredCombos.map((c, i) => - - - {c.components.map((u, j) => )} - - )} - -
{convertItem(c.item)}{convertItem(u)}
- ); - } - if (!info) return false; + const vboxCombos = itemInfo.combos.filter(c => c.components.includes(info)); if (vboxCombos.length > 6) return false; + return ( diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 6768cde6..e659ee72 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -14,7 +14,6 @@ const addState = connect( player, combiner, reclaiming, - vboxHighlight, vboxSelected, itemInfo, itemUnequip, @@ -49,7 +48,6 @@ const addState = connect( sendVboxCombine, sendVboxDiscard, sendVboxReclaim, - vboxHighlight, vboxSelected, itemInfo, itemUnequip, @@ -70,10 +68,6 @@ const addState = connect( return dispatch(actions.setInfo(item)); } - function setVboxHighlight(v) { - return dispatch(actions.setVboxHighlight(v)); - } - function setVboxSelected(v) { return dispatch(actions.setVboxSelected(v)); } @@ -86,7 +80,6 @@ const addState = connect( setCombiner, setReclaiming, setInfo, - setVboxHighlight, setVboxSelected, setItemEquip, }; @@ -105,7 +98,6 @@ function Vbox(args) { sendVboxCombine, sendVboxDiscard, sendVboxReclaim, - // vboxHighlight, setCombiner, setInfo, @@ -118,19 +110,12 @@ function Vbox(args) { sendItemUnequip, setReclaiming, - setVboxHighlight, } = args; if (!player) return false; const { vbox } = player; const vboxSelecting = vboxSelected.length; - // function setHighlight(type) { - // if (type === 'skill') return setVboxHighlight(itemInfo.items.filter(v => v.skill).map(v => v.item)); - // if (type === 'spec') return setVboxHighlight(itemInfo.items.filter(v => v.spec).map(v => v.item)); - // return false; - // } - function combinerChange(newCombiner) { setCombiner(newCombiner); @@ -140,20 +125,7 @@ function Vbox(args) { setItemEquip(null); } - if (newCombiner.every(c => c === null)) return setVboxHighlight([]); - - const combinerValues = newCombiner.map(cv => player.vbox.bound[cv]).filter(cv => cv); - - const filteredCombos = itemInfo.combos - .filter(combo => combinerValues.every(u => combo.components.includes(u))); - - const comboValues = itemInfo.items.filter(v => { - if (!filteredCombos.some(c => c.components.includes(v.item))) return false; - if (!['Red', 'Green', 'Blue'].includes(v.item) && combinerValues.includes(v.item)) return false; - return true; - }); - - return setVboxHighlight(comboValues.map(v => v.item)); + return true; } // diff --git a/client/src/reducers.jsx b/client/src/reducers.jsx index 35c45a64..496a5acc 100644 --- a/client/src/reducers.jsx +++ b/client/src/reducers.jsx @@ -50,7 +50,6 @@ module.exports = { teamPage: createReducer(0, 'SET_TEAM_PAGE'), teamSelect: createReducer([null, null, null], 'SET_TEAM_SELECT'), - vboxHighlight: createReducer([], 'SET_VBOX_HIGHLIGHT'), vboxSelected: createReducer([], 'SET_VBOX_SELECTED'), ws: createReducer(null, 'SET_WS'), diff --git a/server/src/skill.rs b/server/src/skill.rs index 04fd4d4f..c587a465 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -1765,9 +1765,11 @@ fn purge(source: &mut Construct, target: &mut Construct, mut results: Resolution } } - let mut effect = skill.effect()[0]; - effect.duration = effect.duration * turns; - results.push(Resolution::new(source, target).event(target.add_effect(skill, effect)).stages(EventStages::PostOnly)); + if turns > 1 { + let mut effect = skill.effect()[0]; + effect.duration = effect.duration * turns; + results.push(Resolution::new(source, target).event(target.add_effect(skill, effect)).stages(EventStages::PostOnly)); + } return results; }