Summary: Removing the RemoveInvisibility call from the two GenericAbility.Apply functions would make official and known to the players the existing (and reasonable, in gameplay/flavour terms) status quo that using non-attacking abilities leaves you invisible, as well as fixing the Backstab+Strike ability+Invisibility bug.
----------
When using a (non-attacking) abilty while invisible, the invisibility is not removed properly. In the GenericAbility.Apply functions, the RemoveInvisibility function is called. If the GenericAbility is not passive, it will then clear all ModifiedStat.Invisible effects. However, abilities that grant Invisibility also set NonTargetable and NonEngageable ModifiedStats, which are not removed by this RemoveInvisibility function. For attacking abilities (ie. anything that contains an AttackBase (or derived) objects, so this is most of them) this doesn't matter much, since the three StatusEffects are all marked OneHitUse so are cleaned up after an attack anyway. But after non-attacking abilities (eg. activating a modal, drinking a potion, Rhymer's Summon) this doesn't happen, which means the character becomes visible but is still not targetable or engageable; effectively, the character is visible to the player but still invisible to other characters (including your own, by the way). An exception to this are Teleport abilities (eg. Escape), since these use Invisibilty themselves and explicitly make the character targetable and engageable again because of that.
One possibility would be to change the RemoveInvisibility function and have it clear NonEngageable and NonTargetable as well. However, this would remove those even if they are caused by another (non-invisibility) effect, since there is no way to tell whether they originated from an Invisibility-type ability. Moreover, from a gameplay perspective you have to wonder whether fixing it is even desirable. After all, wouldn't it make more sense if activating a modal ability or drinking a potion *would* leave you invisible? And anything with an attack in it makes you visible again already anyway. Rhymer's summon (and other summoning, from figurines) might be a bit more borderline in this regard, but that's only a couple of them.
I would therefore suggest removing the RemoveInvisibility call from the GenericAbility.Apply function instead. Firstly, this avoids the issue with fixing it above. Secondly, this clarifies the situation with regards to non-attacking abilities: as is, they effectively leave you invisible anyway, the player just doesn't know it because the character is rendered as visible again. Seems better to just make that official, by keeping the character visually invisible as well (for lack of a better description). Thirdly, this also fixes the bug with Backstab, where if you are Invisible and use a Strike ability you don't get the Backstab bonus, because the Strike ability will call the GenericAbility.Apply function before the actual attack occurs, which means that by the time the attack hits the character is visible again as far as the Backstab ability is concerned.
If the RemoveInvisibility call is removed, I would also suggest changing the line "this.m_ownerStats.InvisibilityState--;" into "this.m_ownerStats.InvisibilityState = 0;" in the TeleportAbility.BecomeVisible function, since otherwise with eg. Escape while Invisible you could end up with the reverse situation (character is rendered as invisible for the player, but is targetable and engageable by other characters; in the present situation this wouldn't happen because activating Escape would call RemoveInvisibility and clear all other Invisible effects first).
Question
Loren Tyr
Summary: Removing the RemoveInvisibility call from the two GenericAbility.Apply functions would make official and known to the players the existing (and reasonable, in gameplay/flavour terms) status quo that using non-attacking abilities leaves you invisible, as well as fixing the Backstab+Strike ability+Invisibility bug.
When using a (non-attacking) abilty while invisible, the invisibility is not removed properly. In the GenericAbility.Apply functions, the RemoveInvisibility function is called. If the GenericAbility is not passive, it will then clear all ModifiedStat.Invisible effects. However, abilities that grant Invisibility also set NonTargetable and NonEngageable ModifiedStats, which are not removed by this RemoveInvisibility function. For attacking abilities (ie. anything that contains an AttackBase (or derived) objects, so this is most of them) this doesn't matter much, since the three StatusEffects are all marked OneHitUse so are cleaned up after an attack anyway. But after non-attacking abilities (eg. activating a modal, drinking a potion, Rhymer's Summon) this doesn't happen, which means the character becomes visible but is still not targetable or engageable; effectively, the character is visible to the player but still invisible to other characters (including your own, by the way). An exception to this are Teleport abilities (eg. Escape), since these use Invisibilty themselves and explicitly make the character targetable and engageable again because of that.
One possibility would be to change the RemoveInvisibility function and have it clear NonEngageable and NonTargetable as well. However, this would remove those even if they are caused by another (non-invisibility) effect, since there is no way to tell whether they originated from an Invisibility-type ability. Moreover, from a gameplay perspective you have to wonder whether fixing it is even desirable. After all, wouldn't it make more sense if activating a modal ability or drinking a potion *would* leave you invisible? And anything with an attack in it makes you visible again already anyway. Rhymer's summon (and other summoning, from figurines) might be a bit more borderline in this regard, but that's only a couple of them.
I would therefore suggest removing the RemoveInvisibility call from the GenericAbility.Apply function instead. Firstly, this avoids the issue with fixing it above. Secondly, this clarifies the situation with regards to non-attacking abilities: as is, they effectively leave you invisible anyway, the player just doesn't know it because the character is rendered as visible again. Seems better to just make that official, by keeping the character visually invisible as well (for lack of a better description). Thirdly, this also fixes the bug with Backstab, where if you are Invisible and use a Strike ability you don't get the Backstab bonus, because the Strike ability will call the GenericAbility.Apply function before the actual attack occurs, which means that by the time the attack hits the character is visible again as far as the Backstab ability is concerned.
If the RemoveInvisibility call is removed, I would also suggest changing the line "this.m_ownerStats.InvisibilityState--;" into "this.m_ownerStats.InvisibilityState = 0;" in the TeleportAbility.BecomeVisible function, since otherwise with eg. Escape while Invisible you could end up with the reverse situation (character is rendered as invisible for the player, but is targetable and engageable by other characters; in the present situation this wouldn't happen because activating Escape would call RemoveInvisibility and clear all other Invisible effects first).
Edited by Loren TyrLink to comment
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now