Skip to content

Commit

Permalink
Spell damage per spell
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Feb 25, 2024
1 parent 7914670 commit 9050270
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
46 changes: 42 additions & 4 deletions Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Source/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9050270

Please sign in to comment.