@@ -177,7 +177,16 @@ class Mod : GenericMod {
177177 if (player->id == attacker->id || player->pet_id == attacker->id )
178178 {
179179 FloatRGBA purple (0 .65f , 0 .40f , 1 .0f , 1 .0f );
180- int xp_gain = GetCreatureLevel (creature) * (creature->entity_data .level + 1 );
180+
181+ int xp_gain = 100 ;
182+
183+ if (player->entity_data .level > GetCreatureLevel (creature)) {
184+ xp_gain = (int )std::roundf (100 * (creature->entity_data .level + 1 ) * std::powf (0 .8f , player->entity_data .level - GetCreatureLevel (creature)));
185+ }
186+ else {
187+ xp_gain = (int )std::roundf (100 * (creature->entity_data .level + 1 ) * (1 + 0 .15f * (GetCreatureLevel (creature) - player->entity_data .level )) * std::powf (1 .05f , GetCreatureLevel (creature) - player->entity_data .level ));
188+ }
189+
181190
182191 if ((creature->entity_data .appearance .flags2 & (1 << (int )cube::Creature::AppearanceModifiers::IsBoss)) != 0 )
183192 {
@@ -276,13 +285,13 @@ class Mod : GenericMod {
276285
277286 // ##### PLAYER ######
278287 // Defense
279- m_PlayerScaling.insert_or_assign (STAT_TYPE::HEALTH, 5 );
280- m_PlayerScaling.insert_or_assign (STAT_TYPE::ARMOR, 1 );
281- m_PlayerScaling.insert_or_assign (STAT_TYPE::RESISTANCE, 1 );
288+ m_PlayerScaling.insert_or_assign (STAT_TYPE::HEALTH, 1 );
289+ m_PlayerScaling.insert_or_assign (STAT_TYPE::ARMOR, 0.2 );
290+ m_PlayerScaling.insert_or_assign (STAT_TYPE::RESISTANCE, 0.2 );
282291
283292 // Offense
284- m_PlayerScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 1 );
285- m_PlayerScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 1 );
293+ m_PlayerScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 0.2 );
294+ m_PlayerScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 0.2 );
286295 m_PlayerScaling.insert_or_assign (STAT_TYPE::CRIT, 0 .0001f );
287296 m_PlayerScaling.insert_or_assign (STAT_TYPE::HASTE, 0 .0001f );
288297
@@ -292,13 +301,13 @@ class Mod : GenericMod {
292301
293302 // ##### CREATURE ######
294303 // Defense
295- m_CreatureScaling.insert_or_assign (STAT_TYPE::HEALTH, 20 );
296- m_CreatureScaling.insert_or_assign (STAT_TYPE::ARMOR, 0 .1f );
297- m_CreatureScaling.insert_or_assign (STAT_TYPE::RESISTANCE, 0 .1f );
304+ m_CreatureScaling.insert_or_assign (STAT_TYPE::HEALTH, 4 );
305+ m_CreatureScaling.insert_or_assign (STAT_TYPE::ARMOR, 0 .02f );
306+ m_CreatureScaling.insert_or_assign (STAT_TYPE::RESISTANCE, 0 .02f );
298307
299308 // Offense
300- m_CreatureScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 1 );
301- m_CreatureScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 1 );
309+ m_CreatureScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 0.2 );
310+ m_CreatureScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 0.2 );
302311 m_CreatureScaling.insert_or_assign (STAT_TYPE::CRIT, 0 );
303312 m_CreatureScaling.insert_or_assign (STAT_TYPE::HASTE, 0 );
304313
@@ -337,20 +346,20 @@ class Mod : GenericMod {
337346 if (creature->entity_data .hostility_type != cube::Creature::EntityBehaviour::Player &&
338347 creature->entity_data .hostility_type != cube::Creature::EntityBehaviour::Pet)
339348 {
340- *stat /= creature-> entity_data . level + 1 ;
341- *stat += m_CreatureScaling.at (type) * ( GetCreatureLevel (creature) - LEVELS_PER_REGION / 2 );
342- *stat *= creature-> entity_data . level + 1 ;
349+ *stat *= 0.2 * std::pow ( 2.7183 , 0.2 * GetCreatureLevel ( creature)) / 1.21 * std::pow ( 0.99 , 1 + 0.07 * GetCreatureLevel (creature) * GetCreatureLevel (creature)) ;
350+ *stat += m_CreatureScaling.at (type) * GetCreatureLevel (creature);
351+
343352 }
344353 }
345354
355+
346356 virtual void OnCreatureArmorCalculated (cube::Creature* creature, float * armor) override {
347357 ApplyStatBuff (creature, armor, STAT_TYPE::ARMOR);
348358 ApplyCreatureBuff (creature, armor, STAT_TYPE::ARMOR);
349359 }
350360
351361 virtual void OnCreatureCriticalCalculated (cube::Creature* creature, float * critical) override {
352362 ApplyStatBuff (creature, critical, STAT_TYPE::CRIT);
353- ApplyCreatureBuff (creature, critical, STAT_TYPE::CRIT);
354363 }
355364
356365 virtual void OnCreatureAttackPowerCalculated (cube::Creature* creature, float * power) override {
@@ -365,7 +374,6 @@ class Mod : GenericMod {
365374
366375 virtual void OnCreatureHasteCalculated (cube::Creature* creature, float * haste) override {
367376 ApplyStatBuff (creature, haste, STAT_TYPE::HASTE);
368- ApplyCreatureBuff (creature, haste, STAT_TYPE::HASTE);
369377 }
370378
371379 virtual void OnCreatureHPCalculated (cube::Creature* creature, float * hp) override {
0 commit comments