| 233 | } |
| 234 | |
| 235 | int Game_BattleAlgorithm::AlgorithmBase::ApplyDefEffect() { |
| 236 | auto* target = GetTarget(); |
| 237 | assert(target); |
| 238 | auto def = GetAffectedDef(); |
| 239 | if (def != 0) { |
| 240 | def = target->ChangeDefModifier(def); |
| 241 | if (IsAbsorbDef()) { |
| 242 | source->ChangeDefModifier(-def); |
| 243 | } |
| 244 | |
| 245 | Game_Battle::ManiacBattleHook( |
| 246 | Game_Interpreter_Battle::ManiacBattleHookType::StatChange, |
| 247 | target->GetType() == Game_Battler::Type_Enemy, |
| 248 | target->GetPartyIndex(), |
| 249 | target->GetDisplayX(), |
| 250 | target->GetDisplayY(), |
| 251 | 5, |
| 252 | def |
| 253 | ); |
| 254 | } |
| 255 | return def; |
| 256 | } |
| 257 | |
| 258 | int Game_BattleAlgorithm::AlgorithmBase::ApplySpiEffect() { |
| 259 | auto* target = GetTarget(); |
no test coverage detected