MCPcopy Create free account
hub / github.com/EasyRPG/Player / ApplyAgiEffect

Method ApplyAgiEffect

src/game_battlealgorithm.cpp:281–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281int Game_BattleAlgorithm::AlgorithmBase::ApplyAgiEffect() {
282 auto* target = GetTarget();
283 assert(target);
284 auto agi = GetAffectedAgi();
285 if (agi) {
286 agi = target->ChangeAgiModifier(agi);
287 if (IsAbsorbAgi()) {
288 source->ChangeAgiModifier(-agi);
289 }
290
291 Game_Battle::ManiacBattleHook(
292 Game_Interpreter_Battle::ManiacBattleHookType::StatChange,
293 target->GetType() == Game_Battler::Type_Enemy,
294 target->GetPartyIndex(),
295 target->GetDisplayX(),
296 target->GetDisplayY(),
297 7,
298 agi
299 );
300 }
301 return agi;
302}
303
304bool Game_BattleAlgorithm::AlgorithmBase::ApplyStateEffect(StateEffect se) {
305 auto* target = GetTarget();

Calls 5

ChangeAgiModifierMethod · 0.80
GetPartyIndexMethod · 0.80
GetTypeMethod · 0.45
GetDisplayXMethod · 0.45
GetDisplayYMethod · 0.45

Tested by

no test coverage detected