default to high price rather than zero

This commit is contained in:
jake 2020-09-23 21:41:15 -06:00
parent 8a9ced09ea
commit 1e18d5729b

View File

@ -38,7 +38,7 @@ impl ShopItem for ShopArmor {
price += 70.0 * frame_stats.level_req as f32 * *slot as f32; price += 70.0 * frame_stats.level_req as f32 * *slot as f32;
price as usize price as usize
}) })
.unwrap_or(0) .unwrap_or(0xFFFF)
}, },
ShopArmor::Barrier(barrier) => { ShopArmor::Barrier(barrier) => {
SHIELD_STATS.get(&barrier) SHIELD_STATS.get(&barrier)
@ -49,14 +49,14 @@ impl ShopItem for ShopArmor {
price += 70.0 * barrier_stats.level_req as f32; price += 70.0 * barrier_stats.level_req as f32;
price as usize price as usize
}) })
.unwrap_or(0) .unwrap_or(0xFFFF)
}, },
ShopArmor::Unit(unit) => { ShopArmor::Unit(unit) => {
UNIT_STATS.get(&unit) UNIT_STATS.get(&unit)
.map(|unit_stats| { .map(|unit_stats| {
(unit_stats.stars as f32 * UNIT_MULTIPLIER) as usize (unit_stats.stars as f32 * UNIT_MULTIPLIER) as usize
}) })
.unwrap_or(0) .unwrap_or(0xFFFF)
} }
} }
} }