Index: sql/traits.sql =================================================================== --- sql/traits.sql (revision 3824) +++ sql/traits.sql (working copy) @@ -279,4 +279,10 @@ INSERT INTO `traits` VALUES ('94','fine-tuning','18','75','1','0','0'); INSERT INTO `traits` VALUES ('95','optimization','18','75','1','0','0'); INSERT INTO `traits` VALUES ('96','closed position','19','75','1','0','0'); -INSERT INTO `traits` VALUES ('97','stormsurge','20','75','1','0','0'); \ No newline at end of file +INSERT INTO `traits` VALUES ('97','stormsurge','20','75','1','0','0'); + +INSERT INTO `traits` VALUES ('13', 'conserve mp', '21', '10', '1', '296', '25'); +INSERT INTO `traits` VALUES ('13', 'conserve mp', '21', '30', '2', '296', '28'); +INSERT INTO `traits` VALUES ('13', 'conserve mp', '21', '50', '3', '296', '31'); +INSERT INTO `traits` VALUES ('13', 'conserve mp', '21', '70', '4', '296', '34'); +INSERT INTO `traits` VALUES ('13', 'conserve mp', '21', '90', '5', '296', '37'); \ No newline at end of file Index: src/map/ai/ai_char_normal.cpp =================================================================== --- src/map/ai/ai_char_normal.cpp (revision 3824) +++ src/map/ai/ai_char_normal.cpp (working copy) @@ -1457,7 +1457,16 @@ { if (!m_PChar->StatusEffectContainer->HasStatusEffect(EFFECT_MANAFONT)) { - m_PChar->addMP(-(int16)cost); + if(rand()%100 <= m_PChar->getMod(MOD_CONSERVE_MP)) + { + // MP Cost = floor(Old MP Cost * N / 16) N random 8-15 + m_PChar->addMP(-(floor((float)(((int16)cost * (float)(rand()%8 + 8)) / 16.0f)))); + // ShowDebug(CL_CYAN"Conserve MP Proc \n"); + } + else + { + m_PChar->addMP(-(int16)cost); + } } } }