Update of /cvsroot/wpdev/wolfpack/ai
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5891/ai
Modified Files:
ai_mage.cpp
Log Message:
mage ai updates
Index: ai_mage.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai/ai_mage.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ai_mage.cpp 16 Oct 2004 18:19:41 -0000 1.1
--- ai_mage.cpp 16 Oct 2004 18:28:05 -0000 1.2
***************
*** 170,179 ****
}
- static const mageryPerCircle = (1000.0 / 7.0);
-
/*
Get the id of a random damage spell
*/
int getRandomHarmfulSpell() {
unsigned char maxCircle = QMIN(8, QMAX(1, (unsigned char)((m_npc->skillValue(MAGERY) + 200) / mageryPerCircle)));
int selected = RandomNum(1, maxCircle * 2) - 1; // Select a random spell
--- 170,178 ----
}
/*
Get the id of a random damage spell
*/
int getRandomHarmfulSpell() {
+ static const mageryPerCircle = (1000.0 / 7.0);
unsigned char maxCircle = QMIN(8, QMAX(1, (unsigned char)((m_npc->skillValue(MAGERY) + 200) / mageryPerCircle)));
int selected = RandomNum(1, maxCircle * 2) - 1; // Select a random spell
***************
*** 240,244 ****
spell = 11; // Cure
objTarget = m_npc;
! } else if (dispelTarget) { // We have something to dispel that is attacking us. Easily dispatch threat.
spell = 41; // Dispel
objTarget = dispelTarget;
--- 239,243 ----
spell = 11; // Cure
objTarget = m_npc;
! } else if (dispelTarget && m_npc->skillValue(MAGERY) * 0.01 * 75 > RandomNum(1, 100)) { // We have something to dispel that is attacking us. Easily dispatch threat.
spell = 41; // Dispel
objTarget = dispelTarget;
***************
*** 267,272 ****
}
- //m_npc->talk(tr("CASTING SPELL %1").arg(spell));
-
if (m_npc->canHandleEvent(EVENT_CASTSPELL)) {
PyObject *target = PyGetObjectObject(objTarget);
--- 266,269 ----
|