Skip to content

Commit

Permalink
Fix npattackPreBuff description and trait check
Browse files Browse the repository at this point in the history
  • Loading branch information
narumi147 committed Aug 11, 2024
1 parent 0e74bda commit 92cb84a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/app/battle/models/svt_entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,9 @@ class BattleServantData {

final skillId = buff.vals.SkillID;
final skillLv = buff.vals.SkillLV;
if (skillId != null && skillLv != null && await buff.shouldActivateBuff(battleData, niceTd.individuality)) {
if (skillId != null &&
skillLv != null &&
await buff.shouldActivateBuff(battleData, getTraits(addTraits: niceTd.individuality))) {
BaseSkill? skill = db.gameData.baseSkills[skillId];
skill ??= await showEasyLoading(() => AtlasApi.skill(skillId), mask: true);
final replacementFunction = skill?.functions.firstOrNull;
Expand All @@ -1437,7 +1439,7 @@ class BattleServantData {
updatedReplacementFunction.svals5 = updatedSvalsList;

updatedFunctions[buff.param] = updatedReplacementFunction;

print('replacing ${buff.param} func');
buff.setUsed(this);
}
}
Expand Down
3 changes: 3 additions & 0 deletions lib/app/descriptors/func/func.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,9 @@ class FuncDescriptor extends StatelessWidget {
if (script.fromCommandSpell == 1) {
_condSpans.add([TextSpan(text: Transl.miscFunction('fromCommandSpell'))]);
}
if (buff.type == BuffType.npattackPrevBuff) {
_condSpans.add([TextSpan(text: '替换宝具效果中的第${(vals?.Value ?? 0) + 1}个效果(包含敌方效果)')]);
}
}

if (func.funcType == FuncType.lastUsePlayerSkillCopy) {
Expand Down
2 changes: 2 additions & 0 deletions lib/app/modules/quest/quest.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class _QuestDetailPageState extends State<QuestDetailPage> {
if (phase > 0) initHash = (phase, widget.enemyHash);
} else if (_quest!.isAnyFree && _quest!.phases.isNotEmpty) {
phase = _quest!.phases.last;
} else if (_quest!.phases.length > 3) {
phase = _quest!.phases.first;
}
}
_resolveQuest();
Expand Down

0 comments on commit 92cb84a

Please sign in to comment.