Tuesday, February 21, 2012

Equipping weapons and bug hunting

Bug hunting, sounds more exiting than it is, and I am not talking about hunting monsters.

I had an annoying bug where chests and bags would not be removed when it was empty. As there are no way to distinguish between a chest that's empty and one that got items in it, I would need to remove them or the player would have to spend a lot of time checking empty chests for missed loot. It's fixed now, turned out that I didn't remove it correctly from the ItemGroupList that's controlled by the map.

I added the possibility to equip items. At the moment its just the right hand that's working, but all the basic code for adding item effects to the player like changing armor class, damage, strength and so on is in place. I also added swapping items so that the player don't have to place the item in the inventory before picking up an equipped item, that also goes for items in the inventory.

So my inventory looks like it did last time I showed it, added some stats in the top part to show effects of using items.


 I drank a potion from the inventory by right clicking it and equipped an iron mace that increased the damage from 1-2 to 2-6, mace doing 1-4 damage and unarmed player doing 1-2.

Swapped iron mace to a dwarven  shortsword and thereby increasing my damage. All seems to work fine, just need to add the other items and create more items that can be randomly generated.

Might switch player stats and item stats to float to give more variety, player doing 1.5 damage and item doing 6.6 with monsters having float health as well. Will make item hunting better as you can find more items without drastic increases in damage. Mace 1.0/4.0 dam to 2.0/5.0 dam, it's a lot of possibilities compared to 1/4 dam to 2/5 dam.

Just noticed that I have 2 slots for the feet, probably going to remove one, and might add slots for rings and necklace. No rpg is complete without magic rings.

No comments:

Post a Comment