Add warnings if phaser has next card too long and increase it's virtual HP consumption #151
File diff suppressed because one or more lines are too long
|
@ -163,12 +163,12 @@ const crate_warnings = {
|
|||
trigger: (crate, occupied) => {
|
||||
const nbrHP = useShopStore.getState().crateParams(crate.crate_mode).hp;
|
||||
const stacked_phasers = crate.items.filter((elem, index, data) => {
|
||||
console.log(elem, index)
|
||||
return (elem.name_codename === "Phaser") && ((index < data.length - 1) ? (
|
||||
(data[index + 1].consumes && data[index + 1].consumes.depth && data[index + 1].consumes.depth >= 8.5)
|
||||
) : (occupied >= nbrHP && nbrHP > 0))
|
||||
}
|
||||
).length;
|
||||
// #!debug
|
||||
console.log(stacked_phasers, occupied)
|
||||
return stacked_phasers > 0 && (occupied + stacked_phasers*2 >= nbrHP) && nbrHP >0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue