#11527·wesnoth

Lua Error with CA Spread Poison

Author: knyghtmareCreated Aug 31, 2026Updated Sep 14, 2026
LabelsBugBlocker: New StableLua API

Game and System Information

  • Version: Wesnoth 1.19.27
  • OS: Windows 11 (msys2)

Description of the bug

Sudden error on log and chat when ghoul a attacked

Steps to reproduce the behavior

3p — Deep Shrine-Auto-Save6.gz

  1. load save, ensure war of legends is installed
  2. see error when ally green (undead) attack with ghoul

Expected behavior

No Errors

Additional context

20260831 23:03:21 error scripting/lua: ai/lua/battle_calcs.lua:828: attempt to index a nil value (field '?')
stack traceback:
	ai/lua/battle_calcs.lua:828: in field 'attack_rating'
	ai/lua/ca_spread_poison.lua:68: in function <ai/lua/ca_spread_poison.lua:11>
	(...tail calls...)