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

Method ApplyAtkEffect

src/game_battlealgorithm.cpp:212–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212int Game_BattleAlgorithm::AlgorithmBase::ApplyAtkEffect() {
213 auto* target = GetTarget();
214 assert(target);
215 auto atk = GetAffectedAtk();
216 if (atk != 0) {
217 atk = target->ChangeAtkModifier(atk);
218 if (IsAbsorbAtk()) {
219 source->ChangeAtkModifier(-atk);
220 }
221
222 Game_Battle::ManiacBattleHook(
223 Game_Interpreter_Battle::ManiacBattleHookType::StatChange,
224 target->GetType() == Game_Battler::Type_Enemy,
225 target->GetPartyIndex(),
226 target->GetDisplayX(),
227 target->GetDisplayY(),
228 4,
229 atk
230 );
231 }
232 return atk;
233}
234
235int Game_BattleAlgorithm::AlgorithmBase::ApplyDefEffect() {
236 auto* target = GetTarget();

Calls 5

ChangeAtkModifierMethod · 0.80
GetPartyIndexMethod · 0.80
GetTypeMethod · 0.45
GetDisplayXMethod · 0.45
GetDisplayYMethod · 0.45

Tested by

no test coverage detected