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

Method ShiftAttributeRate

src/game_battler.cpp:675–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675int Game_Battler::ShiftAttributeRate(int attribute_id, int shift) {
676 auto delta = CanShiftAttributeRate(attribute_id, shift);
677 if (delta) {
678 if (attribute_id > static_cast<int>(attribute_shift.size())) {
679 attribute_shift.resize(attribute_id);
680 }
681 attribute_shift[attribute_id - 1] += delta;
682 }
683 return delta;
684}
685
686int Game_Battler::GetAttributeRateShift(int attribute_id) const {
687 if (attribute_id < 1 || attribute_id > static_cast<int>(attribute_shift.size())) {

Callers 4

game_actor.cppFile · 0.80
game_enemy.cppFile · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected