Author Topic: [FIXED] "Not enough mana" flash message from enemy.  (Read 2466 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
[FIXED] "Not enough mana" flash message from enemy.
« on: October 07, 2023, 02:53:17 am »
When an enemy has enough time to reaction fire, but not enough mana for use his mana-requiring weapon, we will receive flash message "not enough mana" with each step of our soldiers (visible to that enemy).
Not sure, is it a bug or a feature. :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9085
    • View Profile
Re: "Not enough mana" flash message from enemy.
« Reply #1 on: October 07, 2023, 08:39:39 am »
Does not happen to me.

Can you provide a save?

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: "Not enough mana" flash message from enemy.
« Reply #2 on: October 08, 2023, 03:49:25 pm »
Next time when i catch it, sure.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9085
    • View Profile
Re: "Not enough mana" flash message from enemy.
« Reply #3 on: October 08, 2023, 04:10:13 pm »
We don't have to wait that long.
You can give me any save where the enemy has a mana-requiring weapon and is able to react.

I can decrease its mana manually in the save file.

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: "Not enough mana" flash message from enemy.
« Reply #4 on: October 13, 2023, 06:48:41 pm »
Looks like it is not so easy. Maybe something other causes it. I'll try to catch it again in-game.

Offline Blazen

  • Sergeant
  • **
  • Posts: 36
    • View Profile
Re: "Not enough mana" flash message from enemy.
« Reply #5 on: November 02, 2023, 07:26:43 pm »
I've also encountered this bug, however when I've reloaded the save it no longer occurred. The enemy isn't using a mana requiring weapon, however I was trying to train mana growth so I may have tried to use one when the soldier didn't have enough mana.

Edit - I think it happens when one of your soldiers tries to use an ability without having enough mana, and if a different soldier then successfully uses an ability it resolves it.

So to replicate have a soldier use a mana required ability and then move someone.

Edit 2 - It has to be an innate ability, not a staff or glove ect... but something like the ignite ability.
« Last Edit: November 03, 2023, 10:17:54 pm by Blazen »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9085
    • View Profile
Re: "Not enough mana" flash message from enemy.
« Reply #6 on: December 02, 2023, 05:27:03 pm »
To reproduce in vanilla, let the soldiers use skill for example to auto-fire from the rifle:

Code: [Select]
items:
  - type: STR_RIFLE
    tuAuto: 0
    confAuto:
      shots: 4
skills:
  - type: STR_RAPID_FIRE
    costUse:
      time: 500
    flatUse:
      time: true
    targetMode: 7 # auto
    battleType: 1 # firearms
    compatibleWeapons: [STR_RIFLE]
soldiers:
  - type: STR_SOLDIER
    skillIconSprite: 1
    skills:
      - STR_RAPID_FIRE

To reproduce:
1. click on Skill icon and select STR_RAPID_FIRE... selecting is enough, you don't even need to try to fire
2. select someone else and try to do anything, for example move, you will get a "Not enough time units" error, which originates from step 1 (and wasn't cleared/reset)

Video attached.

PS: the bug is there since the skill feature was introduced in March 2020, in OXCE v6.4: https://openxcom.org/forum/index.php/topic,7974.0.html
« Last Edit: December 02, 2023, 05:45:16 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9085
    • View Profile
Re: [FIXED] "Not enough mana" flash message from enemy.
« Reply #7 on: December 03, 2023, 02:21:48 pm »
Reported issue fixed here: https://github.com/MeridianOXC/OpenXcom/commit/f92c1a73e4001a4ae6f518a828bcb0577ac5a400

But this is likely not a complete fix, nor the most beautiful one.
I will keep the thread under "open bugs", and review later.