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

Method ApplySpiEffect

src/game_battlealgorithm.cpp:258–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258int 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
281int Game_BattleAlgorithm::AlgorithmBase::ApplyAgiEffect() {
282 auto* target = GetTarget();

Calls 5

ChangeSpiModifierMethod · 0.80
GetPartyIndexMethod · 0.80
GetTypeMethod · 0.45
GetDisplayXMethod · 0.45
GetDisplayYMethod · 0.45

Tested by

no test coverage detected