Skip to content

Commit

Permalink
[TMP] fix entryFunction should activate COUNT times
Browse files Browse the repository at this point in the history
  • Loading branch information
narumi147 committed Aug 12, 2023
1 parent 7d055ca commit a1befc4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/app/battle/models/svt_entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,20 @@ class BattleServantData {
}

battleData.battleLogger.function('$lBattleName - ${buff.buff.lName.l} ${S.current.skill} [$skillId]');
await BattleSkillInfoData.activateSkill(battleData, skill, buff.additionalParam);
if (buff.buff.type == BuffType.entryFunction) {
final count = buff.vals.Count;
if (count != null && count > 0) {
for (int index = 0; index < count; index++) {
battleData.battleLogger.function(
'$lBattleName - ${buff.buff.lName.l} ${S.current.skill} [$skillId] count ${index + 1}/${buff.vals.Count}');
await BattleSkillInfoData.activateSkill(battleData, skill, buff.additionalParam);
buff.useOnce();
}
}
} else {
battleData.battleLogger.function('$lBattleName - ${buff.buff.lName.l} ${S.current.skill} [$skillId]');
await BattleSkillInfoData.activateSkill(battleData, skill, buff.additionalParam);
}
buff.setUsed();
activated = true;
}
Expand Down

0 comments on commit a1befc4

Please sign in to comment.