| | |
| | | if (!FuncOpen.Instance.IsFuncOpen(BattleManager.Instance.passFuncId, true)) |
| | | return; |
| | | |
| | | //主线Boss之外的战斗支持永久特权跳过 |
| | | int passRound = BattleManager.Instance.defaultPassRound; |
| | | var name = battleField.ToString(); |
| | | bool isStoryBossBattleField = name == "StoryBossBattleField"; |
| | | |
| | | // 检查是否为永久特权卡玩家 |
| | | bool hasForeverPrivilege = InvestModel.Instance.IsInvested(InvestModel.foreverCardType); |
| | | if (hasForeverPrivilege && !isStoryBossBattleField) |
| | | |
| | | if (hasForeverPrivilege) |
| | | { |
| | | battleField.ForceFinish(); |
| | | return; |
| | | // 永久特权卡玩家逻辑 |
| | | if (BattleConst.FieldNameToIndex.ContainsKey(name)) |
| | | { |
| | | int index = BattleConst.FieldNameToIndex[name]; |
| | | if (BattleManager.Instance.foreverPrivilegePassDict.ContainsKey(index)) |
| | | { |
| | | passRound = BattleManager.Instance.foreverPrivilegePassDict[index]; |
| | | } |
| | | else |
| | | { |
| | | // 未配置的战场类型,使用普通玩家规则 |
| | | if (BattleManager.Instance.passDict.ContainsKey(index)) |
| | | { |
| | | passRound = BattleManager.Instance.passDict[index]; |
| | | } |
| | | // 否则使用默认配置 |
| | | } |
| | | } |
| | | // 如果战场类型不在 FieldNameToIndex 中,使用默认配置 |
| | | } |
| | | else |
| | | { |
| | | // 普通玩家逻辑 |
| | | if (BattleConst.FieldNameToIndex.ContainsKey(name)) |
| | | { |
| | | int index = BattleConst.FieldNameToIndex[name]; |
| | | if (BattleManager.Instance.passDict.ContainsKey(index)) |
| | | { |
| | | passRound = BattleManager.Instance.passDict[index]; |
| | | } |
| | | // 否则使用默认配置 |
| | | } |
| | | // 如果战场类型不在 FieldNameToIndex 中,使用默认配置 |
| | | } |
| | | |
| | | int passRound = BattleManager.Instance.passRound; |
| | | int nowRound = battleField.round; |
| | | if (nowRound < passRound) |
| | | { |
| | |
| | | battleField.ForceFinish(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 改变速度 |
| | | /// </summary> |