Improve item combination algorithm
This commit is contained in:
@@ -3,5 +3,5 @@ import Dodge.Data
|
||||
import Data.Maybe
|
||||
import Control.Lens
|
||||
|
||||
itStackAmount :: Item -> Int
|
||||
itStackAmount it = fromMaybe 1 $ it ^? itConsumption . itAmount
|
||||
itStackAmount :: Item -> IcAmount
|
||||
itStackAmount it = fromMaybe 1 $ it ^? itConsumption . icAmount
|
||||
|
||||
@@ -13,7 +13,7 @@ makeTypeCraftNum :: Int -> ItemBaseType -> Item
|
||||
makeTypeCraftNum i ct = defaultCraftable
|
||||
{ _itInvSize = 0.5
|
||||
, _itCurseStatus = Uncursed
|
||||
, _itConsumption = ItemItselfConsumable i
|
||||
, _itConsumption = ItemItselfConsumable $ IcAmount i
|
||||
}
|
||||
& itType . iyBase .~ ct
|
||||
|
||||
|
||||
Reference in New Issue
Block a user