I'm building a MUD in C++. I'm attempting to create something similar to AI but I'm not sure the best way to go about it. Here's a simple example:
Warrior Mob (WM) is fighting Ranger Mob (RM). WM has 5 different maledictions (WMM1, WMM2, WMM3, WMM4, WMM5) it can inflict on RM. RM can respond in 5 different ways (RMR1, RMR2, RMR3, RMR4, RMR5) depending on which of the 5 maledictions WM has used. I know I could use a bunch of if/then statements:
if(WMM1) then RMR1
if(WMM1 && WMM3) then RMR3
if(WMM1 && WMM4 || WMM5) then RMR4
etc...
but even with only 10 variables that becomes unmanageable quickly. The skill set on any given character is upwards of 45+.