BrogueCE icon indicating copy to clipboard operation
BrogueCE copied to clipboard

Disallow switching places with discordant allies (with prompt to attack)

Open weosk opened this issue 3 years ago • 9 comments

There should be a way to kill discorded allies with melee weapons in case things go south. That just ended a thrilling vampire encounter in a very boring way.

weosk avatar Dec 28 '20 04:12 weosk

Agreed that this should be possible (didn't know it wasn't because I never tried to hit allies even when they were discorded). I'm wondering if negation could save you the headache of dealing with them by canceling the discord. One thing I try to do is, whenever I have an entourage in tow, I make it a point to test read unknown scrolls only after immediately moving through doorways. They always close instantly on the other side of me and prevent any outcome that would require LOS from affecting my allies. This usually works because I will often have a small lead on them. Granted, I feel like this is kind of a workaround for dealing with an overly simplistic group management system, which doesn't allow us the option to give orders, such as "hold position" so that we can leave our minions behind and go do other things in peace. I'm guessing the designed solution to this is the wand of Teleportation, which gets allies out of the way of all kinds of dangers, including ones introduced by--or soon to be introduced by--the player. Too bad it doesn't recharge, though.

R-800 avatar Jan 03 '21 06:01 R-800

Yes, negation works. But hadn't the means for that, it was a discorded dar priestress standing next to me, both on low health after the fight, one hit would have saved the run but we just switched places, so i died.

weosk avatar Jan 08 '21 13:01 weosk

Yes, this took me by surprise, too, the first time I decided I needed to euthanize a discordant pet and just swapped positions with it instead, dying shortly thereafter. A pop-up asking if you want to attack or swap positions might be appropriate.

apgove avatar Jan 18 '21 02:01 apgove

one hit would have saved the run but we just switched places, so i died.

IMO it would make sense if discorded allies didn't allow you to switch places with them.

Then, if you can't switch places with them, the only option would be to attack them, in which case there should probably be a confirmation message like "Really attack your [ally]?", just as when trying to walk into a trap, etc.

HomebrewHomunculus avatar Mar 21 '21 02:03 HomebrewHomunculus

IMO it would make sense if discorded allies didn't allow you to switch places with them.

Then, if you can't switch places with them, the only option would be to attack them, in which case there should probably be a confirmation message like "Really attack your [ally]?", just as when trying to walk into a trap, etc.

I think I agree with this. It would make sense in that switching places only works because your ally is cooperative, which isn't the case when they're discorded.

pender avatar Mar 21 '21 02:03 pender

Sounds good to me. One wrinkle I just thought of: what if the player is wielding a spear or whip? I suppose it would work the same way as any opponent... even if you just want to move towards your ally rather than attack, you can't.

apgove avatar Mar 21 '21 04:03 apgove

I think I agree with this. It would make sense in that switching places only works because your ally is cooperative, which isn't the case when they're discorded.

Yep, my thinking exactly!

Sounds good to me. One wrinkle I just thought of: what if the player is wielding a spear or whip? I suppose it would work the same way as any opponent... even if you just want to move towards your ally rather than attack, you can't.

Hmm. Good catch, the different attack patterns need to be considered.

  1. Some other games use a key combination such as Ctrl + direction to "force attack", regardless of whether the @ can see an enemy there, which is useful for attacking friendlies, the environment, or thin air (invisible monsters). This would solve the spear problem, but perhaps adding such complexity of input is not the best way of preserving Brogue's identity. And I'm not sure if it would work with a whip or flail, as the target isn't necessarily in the direction you're moving.

  2. Another possibility is to have the "Attack your ally?" prompt come up when making a move that would be a "legal" attack on a discorded ally - bumping into them, moving towards them with a spear, moving near them with a whip, etc. Answering "Yes" would make the attack and treat them as hostile. Answering "No" would treat them as an ally, i.e. move normally without attacking. In the spear's case, you would move adjacent to the discorded ally. In the whip's case, it would not treat the ally as a potential target, but attack something else instead. In the case of a "bump weapon" like a sword, you could even perhaps switch places by answering "No".

Such a prompt has the advantage of giving the player the most choice: they would keep the option of switching places, which they currently have. The disadvantage is that it could lead to an inordinate amount of prompting (once every turn), particularly if moving around with a whip or flail. And, as mentioned, the non-cooperative ally allowing the switching of places is still "less realistic".

HomebrewHomunculus avatar Mar 21 '21 11:03 HomebrewHomunculus

Good thoughts, but IMHO Brogue's "brand" is that it keeps things simple. Throwing in a force-move or non-attack-move makes things more complex. I think it would also require somewhat extra work to implement, as it would require a new type of action in the save-game record. The player can always spend a turn to unequip their weapon if they want to, unless it's cursed, in which case, well, that's yet another reason curses suck! :)

Also, I'm assuming choosing to attack your discordant ally would permanently un-ally them, in the same way hitting them with a thrown weapon does.

Possibly a tangent and scope creep, but what happens now when you've been confused? I know your allies can hit you, do you attack (and antagonize) your allies or just swap places? It's worth considering keeping this consistent, if only because it's possible for both to be in effect at the same time!

apgove avatar Mar 21 '21 23:03 apgove

I agree with the above comment. I like most the idea of a prompt to choose to attack a discordant ally

tmewett avatar Mar 24 '21 22:03 tmewett

Surprisingly, it seems the only way for a discordant ally to become an enemy is by polymorphing it. Nothing else seems to work. Throw darts at it. Zap it with a staff of lightning. Hit it with a potion of incineration. Ally don't care. Ally loves player. Ally is loyal. See the code below: https://github.com/tmewett/BrogueCE/blob/dfd321ed82b104ed141323baefc6fef1c7b60315/src/brogue/Combat.c#L331-L337

Assuming the rules above remain the same, I think the change from "swap places" to "attack" introduces only the risk of dealing accidental (and potentially lethal) damage. Does that warrant a confirmation? I think so. The interaction is similar to attacking an acid mound. Most of the time you want to avoid attacking, so the confirmation helps. On the rare occasions when you want to attack, the repeated confirmations are a bit annoying, but you just deal with it.

I submitted PR #657 that prevents discordant allies from swapping places with the player and requires confirmation if the player wants to attack.

zenzombie avatar Jan 22 '24 00:01 zenzombie