| 185 | } |
| 186 | |
| 187 | int Game_BattleAlgorithm::AlgorithmBase::ApplySpEffect() { |
| 188 | auto* target = GetTarget(); |
| 189 | assert(target); |
| 190 | auto sp = GetAffectedSp(); |
| 191 | if (sp != 0) { |
| 192 | sp = target->ChangeSp(sp); |
| 193 | if (IsAbsorbSp()) { |
| 194 | // Only absorb the sp that were left |
| 195 | source->ChangeSp(-sp); |
| 196 | } |
| 197 | |
| 198 | Game_Battle::ManiacBattleHook( |
| 199 | Game_Interpreter_Battle::ManiacBattleHookType::StatChange, |
| 200 | target->GetType() == Game_Battler::Type_Enemy, |
| 201 | target->GetPartyIndex(), |
| 202 | target->GetDisplayX(), |
| 203 | target->GetDisplayY(), |
| 204 | 3, |
| 205 | sp |
| 206 | ); |
| 207 | } |
| 208 | |
| 209 | return sp; |
| 210 | } |
| 211 | |
| 212 | int Game_BattleAlgorithm::AlgorithmBase::ApplyAtkEffect() { |
| 213 | auto* target = GetTarget(); |
no test coverage detected