| 256 | } |
| 257 | |
| 258 | int Game_BattleAlgorithm::AlgorithmBase::ApplySpiEffect() { |
| 259 | auto* target = GetTarget(); |
| 260 | assert(target); |
| 261 | auto spi = GetAffectedSpi(); |
| 262 | if (spi) { |
| 263 | spi = target->ChangeSpiModifier(spi); |
| 264 | if (IsAbsorbSpi()) { |
| 265 | source->ChangeSpiModifier(-spi); |
| 266 | } |
| 267 | |
| 268 | Game_Battle::ManiacBattleHook( |
| 269 | Game_Interpreter_Battle::ManiacBattleHookType::StatChange, |
| 270 | target->GetType() == Game_Battler::Type_Enemy, |
| 271 | target->GetPartyIndex(), |
| 272 | target->GetDisplayX(), |
| 273 | target->GetDisplayY(), |
| 274 | 6, |
| 275 | spi |
| 276 | ); |
| 277 | } |
| 278 | return spi; |
| 279 | } |
| 280 | |
| 281 | int Game_BattleAlgorithm::AlgorithmBase::ApplyAgiEffect() { |
| 282 | auto* target = GetTarget(); |
no test coverage detected