-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environmental explosions ignore all effects #200
Comments
OK I had the idea of using game state override of making this a separate mod, end up scraping it because of privatewrite variables, so basically this can only be done in highlander |
Are you sure the source is
A simple Script Trace should clear that up. |
the thing is |
I will run a test with my scrapped mod project to trace which one is the actual one called |
Environmental explosions currently just damage the affected unit for a set amount, ignoring all effects except armor and shields. This is due to damage reductions/immunities are only checked in
X2Effect_ApplyWeaponDamage
but not inXCOmGameState_Unit.TakeDamage
, causing units with fortress to still take damage from exploding cars/gas canisters.Fix: Instead of calling
TakeDamage()
directly, apply aX2Effect_ApplyWeaponDamage
effect instead, dynamically generate an x2effect right before dealing damage should be OK as without references from template managers it should be garbage collected, otherwise extend the effect with a new effect that takes in the destructible source. The code is inExplode()
function ofXComGameState_DestructionSphere
code to apply effects without triggering ability can be found in
EverVigilantTurnEndListener
inXComGameState_Ability
The text was updated successfully, but these errors were encountered: