| 162 | } |
| 163 | |
| 164 | int VarianceAdjustEffect(int base, int var) { |
| 165 | // FIXME: RPG_RT 2k3 doesn't apply variance if negative attribute flips damage |
| 166 | if (var > 0 && (base > 0 || Player::IsLegacy())) { |
| 167 | int adj = std::max(1, var * base / 10); |
| 168 | return base + Rand::GetRandomNumber(0, adj) - adj / 2; |
| 169 | } |
| 170 | return base; |
| 171 | } |
| 172 | |
| 173 | int AdjustDamageForDefend(int dmg, const Game_Battler& target) { |
| 174 | if (target.IsDefending()) { |
no test coverage detected