There are a number of ritual types according to the combat system. A defensive one (used when defending), an attacking one (used when attacking), a random one (used whenever a random ritual is chosen) and a forth "Smart" type. This type, when used, profiled the defense ritual it was fighting and attempted to produce the best counter ritual. The core 100 lines of code profiled the creatures used, classifying them into defensive/offensive/weak/strong and devised a counter ritual to best defend against the attack. This ritual type isnt currently used but will be making a comeback for some special NPC's.