As far as I can tell I have the ability pretty much finished, however any monster that I have added the flag for the spell to I keep getting the message "A monster tried to cast a spell that has not yet been defined."
I think the problem may be in relation to the execution of the range attack, here is the code that I think is responsible.
Taken from line 1920 of the the melee1.c file
The "if (spower > 18)" is set so high because pre-existing abilities number 1-18, so I have the flame arrow ability labelled "96+19"
If it's relevant, the code that triggers the display of the message "A monster tried to cast a spell that has not yet been defined." can be found in melee.c line 2247
Any pointer would be appreciated. Thanks
I think the problem may be in relation to the execution of the range attack, here is the code that I think is responsible.
Taken from line 1920 of the the melee1.c file
Code:
/*** Execute the ranged attack chosen. ***/ switch (attack) { /* RF4_ARROW1, RF4_ARROW2 */ case 96+0: case 96+1: case 96+19: { int dd = (attack == 96+0) ? 1 : 2; disturb(1, 0); if (spower < 2) { if (blind) msg_print("You hear a twang."); else msg_format("%^s fires an arrow.", m_name); } else { if (blind) msg_print("You hear a loud thwang."); else msg_format("%^s fires an arrow.", m_name); } if (spower > 18) { if (blind) msg_print("You hear a whoosh of fire."); else msg_format("%^s fires a flaming arrow.", m_name); } mon_bolt(m_idx, GF_ARROW, dd, get_sides(attack), -1); break; }
If it's relevant, the code that triggers the display of the message "A monster tried to cast a spell that has not yet been defined." can be found in melee.c line 2247
Code:
default: { msg_print("A monster tried to cast a spell that has not yet been defined."); } }
Comment