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

Method Init

src/game_battlealgorithm.cpp:638–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636}
637
638void Game_BattleAlgorithm::Normal::Init(Style style) {
639 auto* source = GetSource();
640 charged_attack = source->IsCharged();
641 weapon_style = -1;
642 if (source->GetType() == Game_Battler::Type_Ally && style == Style_MultiHit) {
643 auto* ally = static_cast<Game_Actor*>(source);
644 if (ally->GetWeapon() && ally->Get2ndWeapon()) {
645 auto hits = hits_multiplier * ally->GetNumberOfAttacks(Game_Battler::WeaponPrimary);
646 weapon_style = hits;
647 hits += hits_multiplier * ally->GetNumberOfAttacks(Game_Battler::WeaponSecondary);
648 SetRepeat(hits);
649 return;
650 }
651 }
652 SetRepeat(hits_multiplier * source->GetNumberOfAttacks(GetWeapon()));
653}
654
655void Game_BattleAlgorithm::Normal::ApplyComboHitsMultiplier(int hits) {
656 AlgorithmBase::ApplyComboHitsMultiplier(hits);

Callers

nothing calls this directly

Calls 5

IsChargedMethod · 0.80
Get2ndWeaponMethod · 0.80
GetTypeMethod · 0.45
GetWeaponMethod · 0.45
GetNumberOfAttacksMethod · 0.45

Tested by

no test coverage detected