Skip to content

Commit

Permalink
fixed some unit tests that I broke
Browse files Browse the repository at this point in the history
  • Loading branch information
MakoInfused committed Nov 10, 2024
1 parent 56d6e8d commit db5a253
Showing 1 changed file with 55 additions and 45 deletions.
100 changes: 55 additions & 45 deletions src/game_battlealgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,17 @@ int Game_BattleAlgorithm::AlgorithmBase::ApplySpEffect() {
source->ChangeSp(-sp);
}

Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
3,
sp
);
if (Player::IsPatchManiac()) {
Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
3,
sp
);
}
}

return sp;
Expand All @@ -218,15 +220,17 @@ int Game_BattleAlgorithm::AlgorithmBase::ApplyAtkEffect() {
source->ChangeAtkModifier(-atk);
}

Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
4,
atk
);
if (Player::IsPatchManiac()) {
Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
4,
atk
);
}
}
return atk;
}
Expand All @@ -241,15 +245,17 @@ int Game_BattleAlgorithm::AlgorithmBase::ApplyDefEffect() {
source->ChangeDefModifier(-def);
}

Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
5,
def
);
if (Player::IsPatchManiac()) {
Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
5,
def
);
}
}
return def;
}
Expand All @@ -264,15 +270,17 @@ int Game_BattleAlgorithm::AlgorithmBase::ApplySpiEffect() {
source->ChangeSpiModifier(-spi);
}

Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
6,
spi
);
if (Player::IsPatchManiac()) {
Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
6,
spi
);
}
}
return spi;
}
Expand All @@ -287,15 +295,17 @@ int Game_BattleAlgorithm::AlgorithmBase::ApplyAgiEffect() {
source->ChangeAgiModifier(-agi);
}

Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
7,
agi
);
if (Player::IsPatchManiac()) {
Game_Battle::ManiacBattleHook(
Game_Interpreter_Battle::StatChange,
target->GetType() == Game_Battler::Type_Enemy,
target->GetPartyIndex(),
target->GetDisplayX(),
target->GetDisplayY(),
7,
agi
);
}
}
return agi;
}
Expand Down

0 comments on commit db5a253

Please sign in to comment.