fix: improve endgame clock and gameplay stability
This commit is contained in:
1 parent
ce6aabfc55
commit
658298ee86
46 files changed
+1915
-99
No files matched your search
@@ -457,9 +457,12 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32, sources ...*commo
|
||||
// actor from the scene's actual slot IDs, rather than assuming cast_entity
|
||||
// identifies a lineup position.
|
||||
attackSlot, attackID := firstAvatarIdx, firstAvatarID
|
||||
var attackerSlot *uint32
|
||||
_, attackedByMonster := s.MonsterEntities[casterID]
|
||||
for _, avatar := range battleInfo.BattleAvatarList {
|
||||
if casterID != 0 && avatar.Index+1 == casterID {
|
||||
if !attackedByMonster && casterID != 0 && (avatar.Index+1 == casterID || (casterID >= techniqueAvatarEntityOffset && avatar.Id == casterID-techniqueAvatarEntityOffset)) {
|
||||
attackSlot, attackID = avatar.Index, avatar.Id
|
||||
attackerSlot = &attackSlot
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -472,7 +475,6 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32, sources ...*commo
|
||||
if attackBuffID == 0 {
|
||||
attackBuffID = cfg.WeaknessBuffID
|
||||
}
|
||||
_, attackedByMonster := s.MonsterEntities[casterID]
|
||||
if attackedByMonster {
|
||||
// An ambush has no player entry attack.
|
||||
} else if attackBuffID != 0 {
|
||||
@@ -550,7 +552,7 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32, sources ...*commo
|
||||
battleInfo.MonsterWaveList = common.ToSceneMonsterWaves(player.BattleConfig.Monsters)
|
||||
battleInfo.JAOIOKBBMFC = uint32(len(battleInfo.MonsterWaveList))
|
||||
|
||||
rules.addGlobalPassives(battleInfo, player)
|
||||
rules.addGlobalPassives(battleInfo, player, attackerSlot)
|
||||
|
||||
// Official challenges add their resource-defined corruption. Custom battles
|
||||
// retain only the corruption actually supplied in their buff list.
|
||||
@@ -563,7 +565,7 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32, sources ...*commo
|
||||
battleInfo.BuffList = append(battleInfo.BuffList, battleBuff(buffID, firstAvatarIdx, map[string]float32{"SkillIndex": 1}))
|
||||
}
|
||||
}
|
||||
if err := rules.applyAhaHelp(battleInfo, player.BattleConfig.EnableInvasionSupport, firstAvatarIdx); err != nil {
|
||||
if err := rules.applyAhaHelp(battleInfo, player.BattleConfig.EnableInvasionSupport, firstAvatarIdx, attackerSlot); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(battleInfo.MonsterWaveList) == 0 {
|
||||
|
||||
Reference in new issue
Block a user