try changing the shops select ability's possible targets
i think there is an option like "owner" maybe don't realy know ATM (can't check it right now)
I based the building off of Voodoo Lounge and removed the ability called "Shop Sharing". Now if I place the edited Voodoo Lounge ("Non-sharing Voodoo Lounge") and the default Voodoo Lounge side by side owned by an allied player, I am only able to buy from the default one.
So yeah, remove the Shop Sharing ability.
It worked for me. I am able to buy from both of my Voodoo Lounges (the non-sharing one and the default one) and I can buy only from the default Lounge of the AI allied player.
Without the Shop Sharing ability, you can't buy anything from the shop. It didn't work. I can't buy from my own shop.
Goddamit, you're right, sorry. I was tired.
I've tried making the player deselect the shop immediately if it isn't his. Unfortunately, it doesn't deselect fast enough and you can still buy.
I've tried removing the item from the inventory of the player if he bought from a shop that isn't his own, but I found no way to refund the cost since there's no function to retrieve item cost. There only way I see to do the refund is to set the Custom Item Value to the gold cost of the item. I've also heard you can use the HP of item or number of charges to store gold cost when refunding.
- No Sharing Shops
- Events
- Unit - A unit Acquires an item
- Conditions
- (Owner of (Selling unit)) Not equal to (Owner of (Hero manipulating item))
- Actions
- Hero - Drop (Item being manipulated) from (Hero manipulating item)
- Item - Remove (Last dropped item)
- Player - Add (Custom value of (Item being manipulated)) to Player 1 (Red) Current gold
- Game - Display to (Player group((Owner of (Hero manipulating item)))) for 30.00 seconds the text: You may only buy from your own shops.