TemplePlus icon indicating copy to clipboard operation
TemplePlus copied to clipboard

Whirlwind offensive action/feat isnt working

Open zicion opened this issue 3 years ago • 7 comments

When i took the feat Whirlwind and used it for the first time on a test character i found it quite good so I took it for my main solo and when i tired to use it my PC just skips his turn, tried it with a spiked chain, dagger and a longsword.

zicion avatar Jul 16 '22 00:07 zicion

A save file would be helpful for this one ([email protected]).

doug1234 avatar Jul 16 '22 23:07 doug1234

A save file would be helpful for this one ([email protected]).

I sent the e-mail can i get a conformation or do i need to send it again?

zicion avatar Jul 17 '22 07:07 zicion

Thanks for the save. The game thinks the gnolls are your allies, because you're a member of the Earth Temple, so it doesn't add them as targets. @doug1234 the immediate culprit is GetEnemyListInRange, which is only used there for now, but I guess it needs to be reworked. Gotta be careful though, that kind of thing tends to have unintended consequences further down the line...

DudeMcDude avatar Jul 19 '22 06:07 DudeMcDude

Took a quick look at the logic today @DudeMcDude. Looks like GetEnemyListInRange() is indeed only used there but it seems like similar logic is used elsewhere (InterruptNonCounterspell). The trouble seems to be using NpcAllegianceShared() as a criteria for not attacking. Should there only be a not friendly check?

doug1234 avatar Jul 23 '22 20:07 doug1234

Took a quick look at the logic today @DudeMcDude. Looks like GetEnemyListInRange() is indeed only used there but it seems like similar logic is used elsewhere (InterruptNonCounterspell). The trouble seems to be using NpcAllegianceShared() as a criteria for not attacking. Should there only be a not friendly check?

I don't really recall the reasoning. "Friendliness" is a bit hairy in this game, where several things might be considered:

  • Do you want bystander NPCs to count?
  • Do you want faction mates to count? I guess, that depends if are fighting alongside you or against you
  • What about charm/domination status?

I don't have easy answers unfortunately, this may require a more thorough overhaul...

DudeMcDude avatar Jul 23 '22 20:07 DudeMcDude

Good thoughts. After looking at it a bit more, I think the code as is does a pretty good job of the things you mention. I just think it needs to override faction if you have ticked someone off and they are attacking you. It seems that only the ai knows that. Is that what I should query? I could add a $#!&ListCheck(obj1, obj2) function?

doug1234 avatar Jul 26 '22 02:07 doug1234

Sounds sound :)

DudeMcDude avatar Jul 26 '22 04:07 DudeMcDude