@@ -177,16 +177,7 @@ 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-
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-
180+ int xp_gain = GetCreatureLevel (creature) * (creature->entity_data .level + 1 );
190181
191182 if ((creature->entity_data .appearance .flags2 & (1 << (int )cube::Creature::AppearanceModifiers::IsBoss)) != 0 )
192183 {
@@ -285,13 +276,13 @@ class Mod : GenericMod {
285276
286277 // ##### PLAYER ######
287278 // Defense
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 );
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 );
291282
292283 // Offense
293- m_PlayerScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 0.2 );
294- m_PlayerScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 0.2 );
284+ m_PlayerScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 1 );
285+ m_PlayerScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 1 );
295286 m_PlayerScaling.insert_or_assign (STAT_TYPE::CRIT, 0 .0001f );
296287 m_PlayerScaling.insert_or_assign (STAT_TYPE::HASTE, 0 .0001f );
297288
@@ -301,13 +292,13 @@ class Mod : GenericMod {
301292
302293 // ##### CREATURE ######
303294 // Defense
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 );
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 );
307298
308299 // Offense
309- m_CreatureScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 0.2 );
310- m_CreatureScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 0.2 );
300+ m_CreatureScaling.insert_or_assign (STAT_TYPE::ATK_POWER, 1 );
301+ m_CreatureScaling.insert_or_assign (STAT_TYPE::SPELL_POWER, 1 );
311302 m_CreatureScaling.insert_or_assign (STAT_TYPE::CRIT, 0 );
312303 m_CreatureScaling.insert_or_assign (STAT_TYPE::HASTE, 0 );
313304
@@ -346,20 +337,20 @@ class Mod : GenericMod {
346337 if (creature->entity_data .hostility_type != cube::Creature::EntityBehaviour::Player &&
347338 creature->entity_data .hostility_type != cube::Creature::EntityBehaviour::Pet)
348339 {
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-
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 ;
352343 }
353344 }
354345
355-
356346 virtual void OnCreatureArmorCalculated (cube::Creature* creature, float * armor) override {
357347 ApplyStatBuff (creature, armor, STAT_TYPE::ARMOR);
358348 ApplyCreatureBuff (creature, armor, STAT_TYPE::ARMOR);
359349 }
360350
361351 virtual void OnCreatureCriticalCalculated (cube::Creature* creature, float * critical) override {
362352 ApplyStatBuff (creature, critical, STAT_TYPE::CRIT);
353+ ApplyCreatureBuff (creature, critical, STAT_TYPE::CRIT);
363354 }
364355
365356 virtual void OnCreatureAttackPowerCalculated (cube::Creature* creature, float * power) override {
@@ -374,6 +365,7 @@ class Mod : GenericMod {
374365
375366 virtual void OnCreatureHasteCalculated (cube::Creature* creature, float * haste) override {
376367 ApplyStatBuff (creature, haste, STAT_TYPE::HASTE);
368+ ApplyCreatureBuff (creature, haste, STAT_TYPE::HASTE);
377369 }
378370
379371 virtual void OnCreatureHPCalculated (cube::Creature* creature, float * hp) override {
0 commit comments