keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Power charge no longer kept in the battle menu

Open Loobinex opened this issue 1 year ago • 1 comments

To reproduce:

  1. Start a fight
  2. Open the Battle menu
  3. Fully charge lightning outside of the battle menu, keep LMB held
  4. Move cursor over to the enemy units to cast it -> notice you cannot cast the charged spell.

Loobinex avatar May 29 '24 21:05 Loobinex

somthing with playerstates.toml

PieterVdc avatar Aug 06 '24 08:08 PieterVdc

Do we support using overcharge inside the battle menu? I mean the following steps. Do we support this kind of operation?

  1. Start a combat, and open the battle menu.
  2. Go to Keeper's spell menu, and click Lightning spell.
  3. Move the mouse cursor into the battle menu. Move it onto the enemy's icon.
  4. Hold the left mouse key. Try to overcharge. Release the key to cast the spell.

Linvail avatar Sep 17 '24 11:09 Linvail

When you have your cursor over the battle menu, you should neither lose charge, or be able to charge up more.

EDIT: Seems that actually you should be able to charge up in the menu, you could in the original game at least. But in KeeperFX this has been impossible for many years.

Loobinex avatar Sep 17 '24 15:09 Loobinex

From what I heard and what I observed in my tests, the current behaviors are:

  • Lightning: Charge outside, and move the cursor onto an enemy icon in the battle menu. We will lose the charged level. (Bug 1)
  • Speed: Charge outside, and move the cursor onto an enemy icon in the battle menu, The charged level remains without needing to hold the left button. Click the left button on our creature icon can cast the charged spell. When moving the cursor outside the battle menu, we will lose the charged level.
  • Both Lightning and Speed CAN NOT be charged inside the battle menu (Bug 2).

Bug 1 can be easily fixed by adding "ENEMY_CRTRS" to the Castability of POWER_LIGHTNING. However, it will cause another bug: When moving the cursor out of the battle menu, a non-charged Lightning will be cast on the ground, right on the edge between the battle menu and the normal map. This might be caused by an unwanted Left button release event.

Bug 2 is related to the handling of holding the left button. I can let the charging happen inside the battle menu by hacking get_packet_control_mouse_clicks(), but it causes a bad side effect - one additional Lightning will be cast on the normal map behind the battle menu. It seems related to the left button handling, too.

Linvail avatar Sep 17 '24 17:09 Linvail