thankyou so much.player.selectedItem is the index in the inventory of the selected item. player.HeldItem will return the item instance of that slot, then you want to check it's type against that number.
player.HeldItem.type == ....
and there has anothere problem
player.ammoCost80 = true;
player.ammoCost75 = true;
player.thrownCost50 = true;
player.thrownCost33 = true;
i add this code,and cost buff& cost potion.
but looks like still consume ammo.
i just find "manaCost = 1f" in player.cs .
did ammo or thrown has same code?
and how to make ammo can through walls?
how to add this code"tileCollide = false;"in moditem.cs?