From 9050270179f72192029df08996802f008e2ea261 Mon Sep 17 00:00:00 2001 From: KPhoenix Date: Sun, 25 Feb 2024 04:15:12 -0500 Subject: [PATCH] Spell damage per spell --- Source/missiles.cpp | 46 +++++++++++++++++++++++++++++++++++++++++---- Source/player.cpp | 2 +- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index fe403265db1..00eaa1cf441 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -359,11 +359,49 @@ bool Plr2PlrMHit(const Player &player, Player &target, int mindam, int maxdam, i dam <<= 6; } if (!missileData.isArrow()) { - // PVP REBALANCE: Only do 33% of spell damage to players on arena levels instead of the default 50%. - if (player.isOnArenaLevel()) - dam /= 3; - else + // PVP REBALANCE: Adjust damage values for spells in arena. + if (player.isOnArenaLevel()) { + switch (mtype) { + case MissileID::BloodStar: // 200% (400% of default) + dam *= 2; + break; + case MissileID::BoneSpirit: // 100% (200% of default) + break; + case MissileID::ChainBall: // 200% (400% of default) + dam *= 2; + break; + case MissileID::ChargedBolt: // 100% (200% of default), don't allow diagonal dodge + break; + case MissileID::Elemental: // 40% damage (80% of default) + dam *= 4; + dam /= 10; + break; + case MissileID::Fireball: // 20% damage (40% of default) + dam *= 2; + dam /= 10; + break; + case MissileID::Firebolt: // 100% (200% of default) + case MissileID::FireWall: // 100% (200% of default) + case MissileID::FlameWave: // 100% (200% of default), don't allow diagonal dodge + break; + case MissileID::FlashBottom: // 50% (100% default) + case MissileID::FlashTop: // 50% (100% of default) + dam /= 2; + break; + case MissileID::Guardian: // 100% (200% of default), limit 1 at a time per player + break; + case MissileID::Inferno: // 400% (800% of default) + dam *= 4; + break; + case MissileID::Lightning: // 200% (400% of default) + dam *= 2; + break; + case MissileID::NovaBall: // 100% (200% of default) + break; + } + } else { dam /= 2; + } } if (resper > 0) { dam -= (dam * resper) / 100; diff --git a/Source/player.cpp b/Source/player.cpp index 03af495bdd6..fe472e9d877 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -487,7 +487,7 @@ bool DoWalk(Player &player, int variant) // PVP REBALANCE: Increment _pDiawalkCounter and punish reaching DiawalkDamageThreshold for arena use. if (player.isOnArenaLevel()) { if (player.calculateDiagonalMovementPercentage() > DiawalkDamageThreshold && &player == MyPlayer) - // Deal 20 HP worth of damage each diagonal movement multiplied by the amount of percent they are above the threshold. + // Deal 5 HP worth of damage each diagonal movement multiplied by the amount of percent they are above the threshold. NetSendCmdDamage(true, player, (player.calculateDiagonalMovementPercentage() - DiawalkDamageThreshold) * 5 * 64, DamageType::Physical); } break;