lipefl / swade-tools

A Fondry VTT module with automations for Savage Worlds (SWADE)
15 stars 13 forks source link

Handling of Wild Attack and associated Vulnerable status #45

Closed steveculshaw closed 3 years ago

steveculshaw commented 3 years ago

Is there anyway to handle Wild Attack (p.109) and it's associated Vulnerable status which is until the end of the characters next turn ?

The automatic removal of Vulnerable is happening at the end of the characters current turn, so we have to remember to re-apply the Vulnerable status

lipefl commented 3 years ago

Swade Tools will only remove Vulnerable/Distracted if the char starts the turn with it. So if you mark these status during the char turn, it'll only be removed in the next round/turn. The only case scenario i can see what you mentioned it's if the char was already Vulnerable at the start, in this case it'll be removed anyway and you'll have to remember to re-apply. I don't know if there's a way to solve this case, in particular, but i'll try to give you a final answer.

Can you check if it's working this way for you?

grendel111111 commented 3 years ago

It does the same for me. If you wild attack 2 turns in a row (or you were vulnerable at the start of the round because you are recovering from stunned) then the vulnerable condition goes away instead of staying till the next round. I see that at the end of the round it checks if a flag is on that tells that you were vulnerable at the start of the round or not. So if you were vulnerable it sets to yes, if not, no. Then at the end it checks the current state of the flag. Would it be possible to put a line into a macro which adds the wild attack condition, and sets the "vulnerable at start of turn" flag to "no". Then when it gets to the end of the round it looks and thinks that it wasn't on at the start of the round and so doesn't turn it off? I tried to see where the flag was to change it, but can't find it. Am I chasing something that won't work?

There also seems to be an error at the end of a turn. If the character has the last round on a turn then it follows the end of turn sequence and not the end of round sequence so the vulnerable doesn't turn off. (if you put 1 character into a combat and run it with vulnerable on it will never be removed.

lipefl commented 3 years ago

1 - The flag you're looking for is inside the combat -> combatant, called swade-tools[removeVulnerable]. I think i can put a button in melee options "Wild Attack" that will "force" the Vulnerable status to stay at the end of turn.

2 - I tested what you said about end of round, and you're right. Probably a bug, i'll look into that too. Thanks!

lipefl commented 3 years ago

I added a Wild Attack button for melee... Also solved the "end of round" problem. Hope it helps. Update to 1.3.3. Thanks!

steveculshaw commented 3 years ago

@lipefl Nice one ... Can you please explain the logic in how the Wild Attack button works? I've installed v1.3.3 and got the button. Token makes the Wild Attack, and becomes Vulnerable But going through multiple turns, and the Vulnerable doesn't automatically disappear like it used to ?

lipefl commented 3 years ago

@steveculshaw The wild attack only gives the bonus and "force" the Vulnerable status not to be removed this turn (even if the char was already Vulnerable). The next round everything should work as normal. I tested here and it's working fine.

grendel111111 commented 3 years ago

Thanks. The wild attack works great. The end of round effect is still happening.

lipefl commented 3 years ago

@grendel111111 it was working. It must be something i did after... Sorry. I'll reopen the issue and investigate.

lipefl commented 3 years ago

Problem with "end of round" fixed in v1.3.4